animejs 4.3.6 → 4.4.1

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.
Files changed (142) hide show
  1. package/README.md +6 -9
  2. package/dist/bundles/anime.esm.js +973 -391
  3. package/dist/bundles/anime.esm.min.js +2 -2
  4. package/dist/bundles/anime.umd.js +977 -390
  5. package/dist/bundles/anime.umd.min.js +2 -2
  6. package/dist/modules/animatable/animatable.cjs +1 -1
  7. package/dist/modules/animatable/animatable.js +2 -2
  8. package/dist/modules/animatable/index.cjs +1 -1
  9. package/dist/modules/animatable/index.js +1 -1
  10. package/dist/modules/animation/additive.cjs +1 -1
  11. package/dist/modules/animation/additive.js +1 -1
  12. package/dist/modules/animation/animation.cjs +38 -16
  13. package/dist/modules/animation/animation.d.ts +2 -2
  14. package/dist/modules/animation/animation.js +42 -20
  15. package/dist/modules/animation/composition.cjs +1 -1
  16. package/dist/modules/animation/composition.js +3 -3
  17. package/dist/modules/animation/index.cjs +1 -1
  18. package/dist/modules/animation/index.js +1 -1
  19. package/dist/modules/core/clock.cjs +1 -1
  20. package/dist/modules/core/clock.js +1 -1
  21. package/dist/modules/core/colors.cjs +1 -1
  22. package/dist/modules/core/colors.js +1 -1
  23. package/dist/modules/core/consts.cjs +3 -9
  24. package/dist/modules/core/consts.d.ts +1 -5
  25. package/dist/modules/core/consts.js +4 -8
  26. package/dist/modules/core/globals.cjs +16 -5
  27. package/dist/modules/core/globals.d.ts +22 -1
  28. package/dist/modules/core/globals.js +18 -6
  29. package/dist/modules/core/helpers.cjs +7 -10
  30. package/dist/modules/core/helpers.js +8 -11
  31. package/dist/modules/core/render.cjs +7 -34
  32. package/dist/modules/core/render.js +8 -35
  33. package/dist/modules/core/styles.cjs +53 -32
  34. package/dist/modules/core/styles.d.ts +1 -0
  35. package/dist/modules/core/styles.js +55 -35
  36. package/dist/modules/core/targets.cjs +1 -1
  37. package/dist/modules/core/targets.js +1 -1
  38. package/dist/modules/core/transforms.cjs +129 -13
  39. package/dist/modules/core/transforms.d.ts +1 -0
  40. package/dist/modules/core/transforms.js +130 -15
  41. package/dist/modules/core/units.cjs +1 -1
  42. package/dist/modules/core/units.js +1 -1
  43. package/dist/modules/core/values.cjs +68 -8
  44. package/dist/modules/core/values.d.ts +5 -2
  45. package/dist/modules/core/values.js +69 -11
  46. package/dist/modules/draggable/draggable.cjs +1 -1
  47. package/dist/modules/draggable/draggable.js +1 -1
  48. package/dist/modules/draggable/index.cjs +1 -1
  49. package/dist/modules/draggable/index.js +1 -1
  50. package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
  51. package/dist/modules/easings/cubic-bezier/index.js +1 -1
  52. package/dist/modules/easings/eases/index.cjs +1 -1
  53. package/dist/modules/easings/eases/index.js +1 -1
  54. package/dist/modules/easings/eases/parser.cjs +1 -1
  55. package/dist/modules/easings/eases/parser.js +1 -1
  56. package/dist/modules/easings/index.cjs +1 -1
  57. package/dist/modules/easings/index.js +1 -1
  58. package/dist/modules/easings/irregular/index.cjs +1 -1
  59. package/dist/modules/easings/irregular/index.js +1 -1
  60. package/dist/modules/easings/linear/index.cjs +1 -1
  61. package/dist/modules/easings/linear/index.js +1 -1
  62. package/dist/modules/easings/none.cjs +1 -1
  63. package/dist/modules/easings/none.js +1 -1
  64. package/dist/modules/easings/spring/index.cjs +1 -1
  65. package/dist/modules/easings/spring/index.js +1 -1
  66. package/dist/modules/easings/steps/index.cjs +1 -1
  67. package/dist/modules/easings/steps/index.js +1 -1
  68. package/dist/modules/engine/engine.cjs +1 -1
  69. package/dist/modules/engine/engine.js +1 -1
  70. package/dist/modules/engine/index.cjs +1 -1
  71. package/dist/modules/engine/index.js +1 -1
  72. package/dist/modules/events/index.cjs +1 -1
  73. package/dist/modules/events/index.js +1 -1
  74. package/dist/modules/events/scroll.cjs +1 -1
  75. package/dist/modules/events/scroll.js +1 -1
  76. package/dist/modules/index.cjs +9 -1
  77. package/dist/modules/index.d.ts +1 -0
  78. package/dist/modules/index.js +4 -1
  79. package/dist/modules/layout/index.cjs +1 -1
  80. package/dist/modules/layout/index.js +1 -1
  81. package/dist/modules/layout/layout.cjs +29 -25
  82. package/dist/modules/layout/layout.d.ts +4 -3
  83. package/dist/modules/layout/layout.js +30 -26
  84. package/dist/modules/scope/index.cjs +1 -1
  85. package/dist/modules/scope/index.js +1 -1
  86. package/dist/modules/scope/scope.cjs +1 -1
  87. package/dist/modules/scope/scope.js +1 -1
  88. package/dist/modules/svg/drawable.cjs +1 -1
  89. package/dist/modules/svg/drawable.js +1 -1
  90. package/dist/modules/svg/helpers.cjs +1 -1
  91. package/dist/modules/svg/helpers.js +1 -1
  92. package/dist/modules/svg/index.cjs +1 -1
  93. package/dist/modules/svg/index.js +1 -1
  94. package/dist/modules/svg/morphto.cjs +3 -6
  95. package/dist/modules/svg/morphto.js +3 -6
  96. package/dist/modules/svg/motionpath.cjs +1 -1
  97. package/dist/modules/svg/motionpath.js +1 -1
  98. package/dist/modules/text/index.cjs +3 -1
  99. package/dist/modules/text/index.d.ts +1 -0
  100. package/dist/modules/text/index.js +2 -1
  101. package/dist/modules/text/scramble.cjs +272 -0
  102. package/dist/modules/text/scramble.d.ts +3 -0
  103. package/dist/modules/text/scramble.js +270 -0
  104. package/dist/modules/text/split.cjs +5 -5
  105. package/dist/modules/text/split.d.ts +5 -5
  106. package/dist/modules/text/split.js +5 -5
  107. package/dist/modules/timeline/index.cjs +1 -1
  108. package/dist/modules/timeline/index.js +1 -1
  109. package/dist/modules/timeline/position.cjs +1 -1
  110. package/dist/modules/timeline/position.js +1 -1
  111. package/dist/modules/timeline/timeline.cjs +36 -18
  112. package/dist/modules/timeline/timeline.d.ts +6 -5
  113. package/dist/modules/timeline/timeline.js +37 -19
  114. package/dist/modules/timer/index.cjs +1 -1
  115. package/dist/modules/timer/index.js +1 -1
  116. package/dist/modules/timer/timer.cjs +8 -12
  117. package/dist/modules/timer/timer.d.ts +2 -0
  118. package/dist/modules/timer/timer.js +9 -13
  119. package/dist/modules/types/index.d.ts +76 -8
  120. package/dist/modules/utils/chainable.cjs +8 -5
  121. package/dist/modules/utils/chainable.js +8 -5
  122. package/dist/modules/utils/index.cjs +5 -1
  123. package/dist/modules/utils/index.d.ts +1 -0
  124. package/dist/modules/utils/index.js +2 -1
  125. package/dist/modules/utils/number.cjs +1 -1
  126. package/dist/modules/utils/number.js +1 -1
  127. package/dist/modules/utils/random.cjs +1 -1
  128. package/dist/modules/utils/random.js +1 -1
  129. package/dist/modules/utils/stagger.cjs +117 -20
  130. package/dist/modules/utils/stagger.js +118 -21
  131. package/dist/modules/utils/target.cjs +1 -1
  132. package/dist/modules/utils/target.js +1 -1
  133. package/dist/modules/utils/time.cjs +5 -3
  134. package/dist/modules/utils/time.d.ts +1 -1
  135. package/dist/modules/utils/time.js +5 -3
  136. package/dist/modules/waapi/composition.cjs +1 -1
  137. package/dist/modules/waapi/composition.js +1 -1
  138. package/dist/modules/waapi/index.cjs +1 -1
  139. package/dist/modules/waapi/index.js +1 -1
  140. package/dist/modules/waapi/waapi.cjs +19 -20
  141. package/dist/modules/waapi/waapi.js +20 -21
  142. package/package.json +2 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Anime.js - UMD minified bundle
3
- * @version v4.3.6
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - 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(),l=Symbol(),h=Symbol(),d=Symbol(),c=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=()=>{},_=/\)\s*[-.\d]/,b=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,T=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,x=/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,S=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,$=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,E=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,k=/([a-z])([A-Z])/g,C=/(\w+)(\([^)]+\)+)/g,N=/(\*=|\+=|-=)/,D=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,I={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,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:v,onBeforeUpdate:v,onUpdate:v,onLoop:v,onPause:v,onComplete:v,onRender:v},L={current:null,root:i},A={defaults:I,precision:4,timeScale:1,tickThreshold:200},R=e&&s.AnimeJSDevTools,B={version:"4.3.6",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(B));const P=t=>t.replace(k,"$1-$2").toLowerCase(),F=(t,e)=>0===t.indexOf(e),M=Date.now,V=Array.isArray,O=t=>t&&t.constructor===Object,z=t=>"number"==typeof t&&!isNaN(t),H=t=>"string"==typeof t,X=t=>"function"==typeof t,Y=t=>void 0===t,W=t=>Y(t)||null===t,U=t=>e&&t instanceof SVGElement,q=t=>b.test(t),j=t=>F(t,"rgb"),G=t=>F(t,"hsl"),Q=t=>!A.defaults.hasOwnProperty(t),Z=["opacity","rotate","overflow","color"],J=t=>H(t)?parseFloat(t):t,K=Math.pow,tt=Math.sqrt,et=Math.sin,st=Math.cos,it=Math.abs,rt=Math.exp,nt=Math.ceil,ot=Math.floor,at=Math.asin,lt=Math.max,ht=Math.atan2,dt=Math.PI,ct=Math.round,ut=(t,e,s)=>t<e?e:t>s?s:t,pt={},mt=(t,e)=>{if(e<0)return t;if(!e)return ct(t);let s=pt[e];return s||(s=pt[e]=10**e),ct(t*s)/s},ft=(t,e)=>V(e)?e.reduce((e,s)=>it(s-t)<it(e-t)?s:e):e?ct(t/e)*e:t,gt=(t,e,s)=>t+(e-t)*s,yt=t=>t===1/0?u:t===-1/0?-u:t,vt=t=>t<=c?c:yt(mt(t,11)),_t=t=>V(t)?[...t]:t,bt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=Y(r)?e[i]:r}return s},Tt=(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}},xt=(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},wt=(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},St=(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),$t=(t,e)=>Y(t)?e:t,Et=(t,e,s,i,r)=>{let n;if(X(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!H(t)||!F(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(Z.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:F(e,"--")?4:e in t.style?2:e in t?0:1:0,Ct=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[d]||t).getPropertyValue(e);return"auto"===r?"0":r},Nt=(t,e,s,i)=>{const r=Y(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[l];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&&!Y(r)?r:F(e,"scale")?"1":F(e,"rotate")||F(e,"skew")?"0deg":"0px"})(t,e,i):4===r?Ct(t,e,i).trimStart():Ct(t,e,i)},Dt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,It=(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(" ")&&E.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(q(r=s)||(j(r)||G(r))&&(")"===r[r.length-1]||!_.test(r)))return e.t=2,e.d=j(i=s)?(t=>{const e=T.exec(t)||x.exec(t),s=Y(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):q(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):G(i)?(t=>{const e=w.exec(t)||S.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=Y(e[4])?1:+e[4];let o,a,l;if(0===i)o=a=l=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=mt(255*St(e,t,s+1/3),0),a=mt(255*St(e,t,s),0),l=mt(255*St(e,t,s-1/3),0)}return[o,a,l,n]})(i):[0,0,0,1],e;{const t=s.match($);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split($)||[],e}}var i,r;return e.n=s,e},Lt=(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),At={t:0,n:0,u:null,o:null,d:null,s:null},Rt=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,h=t.completed,d=t.iterationDuration,u=t.iterationCount,p=t._currentIteration,f=t._loopDelay,g=t._reversed,v=t._alternate,_=t._hasChildren,b=t._delay,T=t._currentTime,x=b+d,w=e-b,S=ut(T,-b,a),$=ut(w,-b,a),E=w-T,k=$>0,C=$>=a,N=a<=c,D=2===n;let I=0,L=w,R=0;if(u>1){const e=~~($/(d+(C?0:f)));t._currentIteration=ut(e,0,u),C&&t._currentIteration--,I=t._currentIteration%2,L=$%(d+f)||0}const B=g^(v&&I),P=t._ease;let F=C?B?0:a:B?d-L:L;P&&(F=d*P(F/d)||0);const M=(o?o.backwards:w<T)?!B:!!B;if(t._currentTime=w,t._iterationTime=F,t.backwards=M,k&&!t.began?(t.began=!0,s||o&&(M||!o.began)||t.onBegin(t)):w<=0&&(t.began=!1),s||_||!k||t._currentIteration===p||t.onLoop(t),D||1===n&&(e>=b&&e<=x||e<=b&&S>b||e>=x&&S!==a)||F>=x&&S!==a||F<=b&&S>0||e<=S&&S===a&&h||C&&!h&&N){if(k&&(t.computeDeltaTime(S),s||t.onBeforeUpdate(t)),!_){const e=D||(M?-1*E:E)>=A.tickThreshold,n=t._offset+(o?o._offset:0)+b+F;let a,h,d,c,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,v=u._prevRep,_=t!==r.none;if((e||(s!==o||n<=f+(g?g._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!_||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!g||g._isOverridden||n<=g._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+u._delay))){const e=u._currentTime=ut(F-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,v=y&&g||0===s||1===s?-1:A.precision;let b,T;if(y)b=T=n(mt(gt(u._fromNumber,u._toNumber,s),v));else if(1===m)T=n(mt(gt(u._fromNumber,u._toNumber,s),v)),b=`${T}${u._unit}`;else if(2===m){const t=u._fromNumbers,e=u._toNumbers,i=mt(ut(n(gt(t[0],e[0],s)),0,255),0),r=mt(ut(n(gt(t[1],e[1],s)),0,255),0),o=mt(ut(n(gt(t[2],e[2],s)),0,255),0),a=ut(n(mt(gt(t[3],e[3],s),v)),0,1);if(b=`rgba(${i},${r},${o},${a})`,_){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(mt(gt(u._fromNumbers[t],u._toNumbers[t],s),v)),i=u._strings[t+1];b+=`${i?e+i:e}`,_&&(u._numbers[t]=e)}}if(_&&(u._number=T),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):(h=a.style,3===f?(a!==d&&(d=a,c=a[l]),c[t]=b,p=1):2===f?h[t]=b:4===f&&h.setProperty(t,b)),k&&(R=1)}}if(p&&u._renderTransforms){let t=m;for(let e in c)t+=`${y[e]}${c[e]}) `;h.transform=t,p=0}u=u._next}!s&&R&&t.onRender(t)}!s&&k&&t.onUpdate(t)}return o&&N?!s&&(o.began&&!M&&w>0&&!h||M&&w<=c&&h)&&(t.onComplete(t),t.completed=!M):k&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,h||_||(t.completed=!0,s||o&&(M||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,R},Bt=(t,e,s,i,r)=>{const n=t._currentIteration;if(Rt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,l=i?e:o._iterationTime,h=M();let d=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;Tt(o,e=>{if(a){const i=e.duration,r=e._offset+e._delay;s||!(i<=c)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Rt(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}Tt(o,t=>{const e=mt((l-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(h):r;d+=Rt(t,e,s,i,n),!t.completed&&u&&(u=!1)},a),!s&&d&&o.onRender(o),(u||a)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},Pt={},Ft=(t,e,s)=>{if(3===s)return f.get(t)||t;if(2===s||1===s&&U(e)&&t in e.style){const e=Pt[t];if(e)return e;{const e=t?P(t):t;return Pt[t]=e,e}}return t},Mt=t=>{if(t._hasChildren)Tt(t,Mt,!0);else{const e=t;e.pause(),Tt(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[l];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(P(s)):r[s]=n;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===m&&t.removeAttribute("style")})}})}return t};class Vt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=p/240,this._fps=240,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<c?c:s,r=p/i;i>I.frameRate&&(I.frameRate=i),this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<c?c:e}requestTick(t){const e=this._scheduledTime;if(this._lastTickTime=t,t<e)return 0;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Ot={animation:null,update:v},zt=(()=>e?requestAnimationFrame:setImmediate)(),Ht=(()=>e?cancelAnimationFrame:clearImmediate)();class Xt extends Vt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=I,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=M();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?(xt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Bt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}Ot.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(M()),this.reqId=zt(Wt)),this}pause(){if(this.reqId)return this.paused=!0,Ut()}resume(){if(this.paused)return this.paused=!1,Tt(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===A.timeScale?1:p)}set speed(t){this._speed=t*A.timeScale,Tt(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 Yt=(()=>{const t=new Xt(M());return e&&(B.engine=t,i.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())})),t})(),Wt=()=>{Yt._head?(Yt.reqId=zt(Wt),Yt.update()):Yt.reqId=0},Ut=()=>(Ht(Yt.reqId),Yt.reqId=0,Yt),qt={_rep:new WeakMap,_add:new Map},jt=(t,e,s="_rep")=>{const i=qt[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Gt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,Qt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=c,t._currentTime=c},Zt=(t,e)=>{const s=t._composition;if(s===r.replace){const s=t._absoluteStartTime;wt(e,t,Gt,"_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){Qt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)Qt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=mt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<c&&Qt(i)}let o=!0;if(Tt(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;Tt(t,t=>{t!==e&&Tt(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===r.blend){const e=jt(t.target,t.property,"_add"),s=(t=>{let e=Ot.animation;return e||(e={duration:c,computeDeltaTime:v,_offset:0,_delay:0,_head:null,_tail:null},Ot.animation=e,Ot.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}}}),Rt(e,1,1,0,2)}),e})(qt._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=c,i._startTime=0,i._numbers=_t(t._fromNumbers),i._number=0,i._next=null,i._prev=null,wt(e,i),wt(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}wt(e,t,null,"_prevAdd","_nextAdd")}return t},Jt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=qt._rep.get(s)[i];if(xt(n,t,"_prevRep","_nextRep"),e===r.blend){const e=qt._add,r=e.get(s);if(!r)return;const n=r[i],o=Ot.animation;xt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){xt(n,a,"_prevAdd","_nextAdd"),xt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Kt=(t,e,s)=>{let i=!1;return Tt(e,r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=Ft(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),xt(e,r),Jt(r),i=!0)}},!0),i},te=(t,e,s)=>{const i=e||Yt;let r;if(i._hasChildren){let e=0;Tt(i,n=>{if(!n._hasChildren)if(r=Kt(t,n,s),r&&!n._head)n.cancel(),xt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?te(t,n,s):n._hasChildren=!1},!0),Y(i.iterationDuration)||(i.iterationDuration=e)}else r=Kt(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},ee=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),se=t=>t._cancelled?(t._hasChildren?Tt(t,se):Tt(t,t=>{t._composition!==r.none&&Zt(t,jt(t.target,t.property))}),t._cancelled=0,t):t;let ie=0;class re extends Vt{constructor(t={},e=null,s=0){super(0),++ie;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:l,loopDelay:h,autoplay:d,frameRate:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:_,onUpdate:b}=t;L.current&&L.current.register(this);const T=e?0:Yt._lastTickTime,x=e?e.defaults:A.defaults,w=X(r)||Y(r)?x.delay:+r,S=X(n)||Y(n)?1/0:+n,$=$t(l,x.loop),E=$t(h,x.loopDelay);let k=!0===$||$===1/0||$<0?1/0:$+1;if(R){const s=k===1/0;if(R.register(this,t,s)&&s){const t=a?2:1,s=e?R.maxNestedInfiniteLoops:R.maxInfiniteLoops;k=Math.max(s,t)}}let C=0;e?C=s:(Yt.reqId||Yt.requestTick(M()),C=(Yt._lastTickTime-Yt._startTime)*A.timeScale),this.id=Y(i)?ie:i,this.parent=e,this.duration=yt((S+E)*k-E)||c,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||x.onBegin,this.onBeforeUpdate=_||x.onBeforeUpdate,this.onUpdate=b||x.onUpdate,this.onLoop=f||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=S,this.iterationCount=k,this._autoplay=!e&&$t(d,x.autoplay),this._offset=C,this._delay=w,this._loopDelay=E,this._iterationTime=0,this._currentIteration=0,this._resolve=v,this._running=!1,this._reversed=+$t(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=$t(a,x.alternate),this._prev=null,this._next=null,this._lastTickTime=T,this._startTime=T,this._lastTime=T,this._fps=$t(u,x.frameRate),this._speed=$t(p,x.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return ut(mt(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(mt(this._iterationTime,A.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ut(mt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ut(mt(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*ut(+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 se(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Bt(this,0,1,~~t,2),ee(this),this._hasChildren&&Tt(this,ee),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Bt(this,this.duration,1,~~t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!Y(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Yt._speed);return this._startTime=M()-(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<=c&&!this._hasChildren?Bt(this,c,0,0,2):(this._running||(wt(Yt,this),Yt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Yt.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){se(this),this.completed=!1;const i=this.paused;return this.paused=!0,Bt(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?ot(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?Tt(this,t=>t.cancel(),!0):Tt(this,Jt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=vt(t);if(e===s)return this;const i=t/e,r=t<=c;return this.duration=r?c:s,this.iterationDuration=r?c:vt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Bt(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(t=0){return this.seek(this.duration,t).cancel()}then(t=v){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=v};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}function ne(t){const e=H(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function oe(t){if(W(t))return[];if(!e)return V(t)&&t.flat(1/0)||[t];if(V(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=ne(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=ne(t);return s?Array.from(s):[t]}function ae(t){const e=oe(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=U(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[l]={})}}return e}const le={deg:1,rad:180/dt,turn:360},he={},de=(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,l=he[a];if(Y(l)||r){let r;if(n in le)r=o*le[n]/le[s];else{const e=100,a=t.cloneNode(),l=t.parentNode,h=l&&l!==i?l:i.body;h.appendChild(a);const d=a.style;d.width=e+n;const c=a.offsetWidth||e;d.width=e+s;const u=c/(a.offsetWidth||e);h.removeChild(a),r=u*o}e.n=r,he[a]=r}else e.n=l;return e.t,e.u=s,e},ce=t=>t,ue=(t=1.68)=>e=>K(e,+t),pe={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},me=dt/2,fe=2*dt,ge={[m]:ue,Quad:ue(2),Cubic:ue(3),Quart:ue(4),Quint:ue(5),Sine:t=>1-st(t*me),Circ:t=>1-tt(1-t*t),Expo:t=>t?K(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=K(2,--s))-1)/11;);return 1/K(4,3-s)-7.5625*K((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=ut(+t,1,10),i=ut(+e,c,2),r=i/fe*at(1/s),n=fe/i;return t=>0===t||1===t?t:-s*K(2,-10*(1-t))*et((1-t-r)*n)}},ye=(()=>{const t={linear:ce,none:ce};for(let e in pe)for(let s in ge){const i=ge[s],r=pe[e];t[e+s]=s===m||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ve={linear:ce,none:ce},_e=t=>{if(ve[t])return ve[t];if(t.indexOf("(")<=-1){const e=pe[t]||t.includes("Back")||t.includes("Elastic")?ye[t]():ye[t];return e?ve[t]=e:ce}{const e=t.slice(0,-1).split("("),s=ye[e[0]];return s?ve[t]=s(...e[1].split(",")):ce}},be=["steps(","irregular(","linear(","cubicBezier("],Te=t=>{if(H(t))for(let e=0,s=be.length;e<s;e++)if(F(t,be[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}\``),ce;return X(t)?t:H(t)?_e(t):ce},xe={t:0,n:0,u:null,o:null,d:null,s:null},we={t:0,n:0,u:null,o:null,d:null,s:null},Se={},$e={func:null},Ee={func:null},ke=[null],Ce=[null,null],Ne={to:null};let De,Ie,Le=0,Ae=0;class Re extends re{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i),++Ae;const l=ae(t),h=l.length,d=e.keyframes,u=d?bt(((t,e)=>{const s={};if(V(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(Q);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];Q(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=$t(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(Q(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}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})(d,e),e):e,{id:m,delay:f,duration:g,ease:y,playbackEase:v,modifier:_,composition:b,onRender:T}=u,x=s?s.defaults:A.defaults,w=$t(y,x.ease),S=$t(v,x.playbackEase),$=S?Te(S):null,E=!Y(w.ease),k=E?w.ease:$t(y,$?"linear":x.ease),C=E?w.settlingDuration:$t(g,x.duration),N=$t(f,x.delay),D=_||x.modifier,I=Y(b)&&h>=p?r.none:Y(b)?x.composition:b,L=this._offset+(s?s._offset:0);E&&(w.parent=this);let R=NaN,B=NaN,P=0,F=0;for(let t=0;t<h;t++){const e=l[t],i=o||t,d=a||h;let p=NaN,m=NaN;for(let t in u)if(Q(t)){const o=kt(e,t),a=Ft(t,e,o);let l=u[t];const h=V(l);if(n&&!h&&(Ce[0]=l,Ce[1]=l,l=Ce),h){const t=l.length,e=!O(l[0]);2===t&&e?(Ne.to=l,ke[0]=Ne,De=ke):t>2&&e?(De=[],l.forEach((t,e)=>{e?1===e?(Ce[1]=t,De.push(Ce)):De.push(t):Ce[0]=t})):De=l}else ke[0]=l,De=ke;let f=null,g=null,y=NaN,v=0,_=0;for(let t=De.length;_<t;_++){const n=De[_];O(n)?Ie=n:(Ne.to=n,Ie=Ne),$e.func=null,Ee.func=null;const l=Et(Ie.to,e,i,d,$e);let h;O(l)&&!Y(l.to)?(Ie=l,h=l.to):h=l;const u=Et(Ie.from,e,i,d),p=Ie.ease||k,m=Et(p,e,i,d),b=X(m)||H(m)?m:p,T=!Y(b)&&!Y(b.ease),x=T?b.ease:b,w=T?b.settlingDuration:Et($t(Ie.duration,t>1?Et(C,e,i,d)/t:C),e,i,d),S=Et($t(Ie.delay,_?0:N),e,i,d),$=Et($t(Ie.composition,I),e,i,d),E=z($)?$:r[$],A=Ie.modifier||D,R=!Y(u),B=!Y(h),M=V(h),U=M||R&&B,q=g?v+S:S,j=mt(L+q,12);F||!R&&!M||(F=1);let G=g;if(E!==r.none){f||(f=jt(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=j;)if(G=t,t=t._nextRep,t&&t._absoluteStartTime>=j)for(;t;)Qt(t),t=t._nextRep}if(U){It(M?Et(h[0],e,i,d,Ee):u,xe),It(M?Et(h[1],e,i,d,$e):h,we);const t=Nt(e,a,o,Se);0===xe.t&&(G?1===G._valueType&&(xe.t=1,xe.u=G._unit):(It(t,At),1===At.t&&(xe.t=1,xe.u=At.u)))}else B?It(h,we):g?Lt(g,we):It(s&&G&&G.parent.parent===s?G._value:Nt(e,a,o,Se),we),R?It(u,xe):g?Lt(g,xe):It(s&&G&&G.parent.parent===s?G._value:Nt(e,a,o,Se),xe);if(xe.o&&(xe.n=Dt(G?G._toNumber:It(Nt(e,a,o,Se),At).n,xe.n,xe.o)),we.o&&(we.n=Dt(xe.n,we.n,we.o)),xe.t!==we.t)if(3===xe.t||3===we.t){const t=3===xe.t?xe:we,e=3===xe.t?we:xe;e.t=3,e.s=_t(t.s),e.d=t.d.map(()=>e.n)}else if(1===xe.t||1===we.t){const t=1===xe.t?xe:we,e=1===xe.t?we:xe;e.t=1,e.u=t.u}else if(2===xe.t||2===we.t){const t=2===xe.t?xe:we,e=2===xe.t?we:xe;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(xe.u!==we.u){let t=we.u?xe:we;t=de(e,t,we.u?we.u:xe.u,!1)}if(we.d&&xe.d&&we.d.length!==xe.d.length){const t=xe.d.length>we.d.length?xe:we,e=t===xe?we:xe;e.d=t.d.map((t,s)=>Y(e.d[s])?0:e.d[s]),e.s=_t(t.s)}const Q=mt(+w||c,12);let Z=Se[a];W(Z)||(Se[a]=null);const J={parent:this,id:Le++,property:a,target:e,_value:null,_toFunc:$e.func,_fromFunc:Ee.func,_ease:Te(x),_fromNumbers:_t(xe.d),_toNumbers:_t(we.d),_strings:_t(we.s),_fromNumber:xe.n,_toNumber:we.n,_numbers:_t(xe.d),_number:xe.n,_unit:we.u,_modifier:A,_currentTime:0,_startTime:q,_delay:+S,_updateDuration:Q,_changeDuration:Q,_absoluteStartTime:j,_tweenType:o,_valueType:we.t,_composition:E,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Z,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};E!==r.none&&Zt(J,f),isNaN(y)&&(y=J._startTime),v=mt(q+Q,12),g=J,P++,wt(this,J)}(isNaN(B)||y<B)&&(B=y),(isNaN(R)||v>R)&&(R=v),3===o&&(p=P-_,m=P)}if(!isNaN(p)){let t=0;Tt(this,e=>{t>=p&&t<m&&(e._renderTransforms=1,e._composition===r.blend&&Tt(Ot.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}h||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),B?(Tt(this,t=>{t._startTime-t._delay||(t._delay-=B),t._startTime-=B}),R-=B):B=0,R||(R=c,this.iterationCount=0),this.targets=l,this.id=Y(m)?Ae:m,this.duration=R===c?c:yt((R+this._loopDelay)*this.iterationCount-this._loopDelay)||c,this.onRender=T||x.onRender,this._ease=$,this._delay=B,this.iterationDuration=R,!this._autoplay&&F&&this.onRender(this)}stretch(t){const e=this.duration;if(e===vt(t))return this;const s=t/e;return Tt(this,t=>{t._updateDuration=vt(t._updateDuration*s),t._changeDuration=vt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return Tt(this,t=>{const e=t._toFunc,s=t._fromFunc;(e||s)&&(s?(It(s(),xe),xe.u!==t._unit&&t.target[o]&&de(t.target,xe,t._unit,!0),t._fromNumbers=_t(xe.d),t._fromNumber=xe.n):e&&(It(Nt(t.target,t.property,t._tweenType),At),t._fromNumbers=_t(At.d),t._fromNumber=At.n),e&&(It(e(),we),t._toNumbers=_t(we.d),t._strings=_t(we.s),t._toNumber=we.o?Dt(t._fromNumber,we.n,we.o):we.n))}),this.duration===c&&this.restart(),this}revert(){return super.revert(),Mt(this)}then(t){return super.then(t)}}const Be={_head:null,_tail:null},Pe=(t,e,s)=>{let i,r=Be._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),xt(Be,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},Fe=(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),Pe(e,s),wt(Be,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>Pe(e,s,t);return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Me(t,e,s){const i=ae(t);if(!i.length)return;const[r]=i,n=kt(r,e),o=Ft(e,r,n);let a=Nt(r,o);if(Y(s))return a;if(It(a,At),0===At.t||1===At.t){if(!1===s)return At.n;{const t=de(r,At,s,!1);return`${mt(t.n,A.precision)}${t.u}`}}}const Ve=(t,e)=>{if(!Y(e))return e.duration=c,e.composition=$t(e.composition,r.none),new Re(t,e,null,0,!0).resume()},Oe=(t,e,s)=>{const i=oe(t);for(let t=0,r=i.length;t<r;t++)Pe(i[t],s,e&&e.controlAnimation&&e);return te(i,e,s),i},ze=(t,e)=>{let s=t.iterationDuration;if(s===c&&(s=0),Y(e))return s;if(z(+e))return+e;const i=e,r=t?t.labels:null,n=!W(r),o=((t,e)=>{if(F(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!Y(o),l=N.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h:s,c=+e[1];return Dt(d,c,t[0])}return a?o:n?Y(r[i])?s:r[i]:s};function He(t,e,s,i,r,n){const o=z(t.duration)&&t.duration<=c?s-c:s;e.composition&&Bt(e,o,1,1,1);const a=i?new Re(i,t,e,o,!1,r,n):new re(t,e,o);return e.composition&&a.init(!0),wt(e,a),Tt(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=function(t){return yt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||c}(e),e}let Xe=0;class Ye extends re{constructor(t={}){super(t,null,0),++Xe,this.id=Y(t.id)?Xe:t.id,this.duration=0,this.labels={};const e=t.defaults,s=A.defaults;this.defaults=e?bt(e,s):s,this.composition=$t(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=$t(t.playbackEase,s.playbackEase);this._ease=i?Te(i):null,this.iterationDuration=0}add(t,e,s){const i=O(e),r=O(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(X(s)){const e=s,r=oe(t),n=this.duration,o=this.iterationDuration,a=i.id;let l=0;const h=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,Y(a)||(s.id=a+"-"+l),He(s,this,ze(this,e(t,l,h,this)),t,l,h),l++})}else He(i,this,ze(this,s),t)}else He(t,this,ze(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(Y(t)||t&&Y(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return Y(t)||Y(t.persist)||(t.persist=!0),this.add(t,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return Y(e)?this:(e.duration=c,e.composition=r.replace,this.add(t,e,s))}call(t,e){return Y(t)||t&&!X(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return Y(t)||t&&!H(t)||(this.labels[t]=ze(this,e)),this}remove(t,e){return te(oe(t),this,e),this}stretch(t){const e=this.duration;if(e===vt(t))return this;const s=t/e,i=this.labels;Tt(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return Tt(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),Tt(this,t=>t.revert,!0),Mt(this)}then(t){return super.then(t)}}const We=t=>new Ye(t).init();class Ue{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,!Y(t)&&!Y(e)){for(let t in e){const s=e[t];Q(t)?o[t]=s:F(t,"on")?n[t]=s:i[t]=s}this.callbacks=new Re({v:0},n);for(let e in o){const s=o[e],n=O(s);let a={},l="+=0";if(n){const t=s.unit;H(t)&&(l+=t)}else a.duration=s;a[e]=n?bt({to:l},s):l;const h=bt(i,a);h.composition=r.replace,h.autoplay=!1;const d=this.animations[e]=new Re(t,h,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(Y(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return Tt(d,e=>{if(V(t))for(let s=0,i=t.length;s<i;s++)Y(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;Y(s)||(e._ease=Te(s)),e._currentTime=0}),Y(e)||d.stretch(e),d.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=v,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const qe=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var je=Object.freeze({__proto__:null,clamp:ut,damp:(t,e,s,i)=>i?1===i?e:gt(t,e,1-Math.exp(-i*s*.1)):t,degToRad:t=>t*Math.PI/180,lerp:gt,mapRange:qe,padEnd:(t,e,s)=>`${t}`.padEnd(e,s),padStart:(t,e,s)=>`${t}`.padStart(e,s),radToDeg:t=>180*t/Math.PI,round:mt,roundPad:(t,e)=>(+t).toFixed(e),snap:ft,wrap:(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e});const Ge=10*p;class Qe{constructor(t={}){const e=!Y(t.bounce)||!Y(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=ut($t(t.bounce,.5),-1,1),this.pd=ut($t(t.duration,628),10*A.timeScale,Ge*A.timeScale),this.m=ut($t(t.mass,1),1,Ge),this.s=ut($t(t.stiffness,100),c,Ge),this.d=ut($t(t.damping,10),c,Ge),this.v=ut($t(t.velocity,0),-1e4,Ge),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||v,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?rt(-n*e*s)*(1*st(i*n)+r*et(i*n)):1===e?(1+r*n)*rt(-n*s):((1+r)*rt((-e*s+i)*n)+(1-r)*rt((-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=K(2*dt/t,2),this.bn>=0?this.d=4*(1-this.bn)*dt/t:this.d=4*dt/(t*(1+this.bn)),this.s=mt(ut(this.s,c,Ge),3),this.d=mt(ut(this.d,c,300),3)}calculateBDFromSD(){const t=2*dt/tt(this.s);this.pd=t*(1===A.timeScale?p:1);const e=this.d/(2*tt(this.s));this.bn=e<=1?1-this.d*t/(4*dt):4*dt/(this.d*t)-1,this.bn=mt(ut(this.bn,-1,1),3),this.pd=mt(ut(this.pd,10*A.timeScale,Ge*A.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=ut(tt(o/r),c,p),h=this.zeta=n/(2*tt(o*r));h<1?(this.wd=l*tt(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*tt(h*h-1),this.b=(h*l-a)/this.wd);let d=0,u=0,m=0;for(;u<=t&&m<=e;)it(1-this.solve(d))<s?u++:u=0,this.solverDuration=d,d+=i,m++;this.settlingDuration=mt(this.solverDuration*p,0)*A.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=ut($t(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=ut($t(t,1),10*A.timeScale,Ge*A.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ut($t(t,100),c,Ge),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ut($t(t,10),c,Ge),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ut($t(t,1),1,Ge),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ut($t(t,0),-1e4,Ge),this.compute()}}const Ze=t=>new Qe(t),Je=t=>(console.warn("createSpring() is deprecated use spring() instead"),new Qe(t)),Ke=t=>{t.cancelable&&t.preventDefault()};class ts{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:v,remove:v}}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 es{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 ss=(t,e)=>t&&X(t)?t(e):t;let is=0;class rs{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,l=e.releaseEase,h=l&&Te(l),d=!Y(l)&&!Y(l.ease),c=O(r)&&!Y(r.mapTo)?r.mapTo:"translateX",p=O(n)&&!Y(n.mapTo)?n.mapTo:"translateY",m=ss(e.container,this);this.containerArray=V(m)?m:null,this.$container=m&&!this.containerArray?oe(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=O(t)?new ts(t):oe(t)[0],this.$trigger=oe(o||t)[0],this.fixed="fixed"===Me(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=d?l:Ze({mass:$t(e.releaseMass,1),stiffness:$t(e.releaseStiffness,80),damping:$t(e.releaseDamping,20)}),this.releaseYSpring=d?l:Ze({mass:$t(e.releaseMass,1),stiffness:$t(e.releaseStiffness,80),damping:$t(e.releaseDamping,20)}),this.releaseEase=h||ye.outQuint,this.hasReleaseSpring=d,this.onGrab=e.onGrab||v,this.onDrag=e.onDrag||v,this.onRelease=e.onRelease||v,this.onUpdate=e.onUpdate||v,this.onSettle=e.onSettle||v,this.onSnap=e.onSnap||v,this.onResize=e.onResize||v,this.onAfterResize=e.onAfterResize||v,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),Y(r)||!0===r)f[c]=0;else if(O(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[c]=e}else!1===r&&(f[c]=0,this.disabled[0]=1);if(Y(n)||!0===n)f[p]=0;else if(O(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 Ue(this.$target,f),this.xProp=c,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=M(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new es(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new re({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 re({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!Y(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]?c: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=ht(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 re({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),O(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=M(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=mt(ut(tt(t*t+e*e)/r*o,a,l),5);const d=lt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=mt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=ft(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=mt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=ft(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return mt(this.animate[this.xProp](),A.precision)}set x(t){this.setX(t,!1)}get y(){return mt(this.animate[this.yProp](),A.precision)}set y(t){this.setY(t,!1)}get progressX(){return qe(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(qe(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return qe(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(qe(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=mt(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=mt(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,l=this.window[1]=s.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?ut(d,a,d):d,this.scrollView[1]=h?ut(c,l,c):c,this.updateScrollCoords();const{width:v,height:_,left:b,top:T,right:x,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=mt(h?ut(v,a,a):v,0),this.dragArea[3]=mt(h?ut(_,l,l):_,0);const S=Me(t,"overflow"),$="visible"===S,E="hidden"===S;if(this.canScroll=!u&&this.contained&&(t===i.body&&$||!E&&!$)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!V(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?h?0:t.scrollLeft:0,o=i?h?0:t.scrollTop:0,d=i?this.scrollView[0]-n-v:0,c=i?this.scrollView[1]-o-_:0;this.targetBounds[0]=mt(r.top+s-(h?0:T),0),this.targetBounds[1]=mt(r.right+e-(h?a:x),0),this.targetBounds[2]=mt(r.bottom+s-(h?l:w),0),this.targetBounds[3]=mt(r.left+e-(h?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]=-mt(r.top-(u?ut(T,0,l):T)+o-m,0),this.containerBounds[1]=-mt(r.right-(u?ut(x,0,a):x)-d+f,0),this.containerBounds[2]=-mt(r.bottom-(u?ut(w,0,l):w)-c+g,0),this.containerBounds[3]=-mt(r.left-(u?ut(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,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,e=t.x,r=t.y,n=ss(t.container,this),o=ss(t.containerPadding,this)||0,a=V(o)?o:[o,o,o,o],l=this.x,h=this.y,d=ss(t.cursor,this),c={onHover:"grab",onGrab:"grabbing"};if(d){const{onHover:t,onGrab:e}=d;t&&(c.onHover=t),e&&(c.onGrab=e)}const u=ss(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;Y(t)||(p.mouse=t),Y(e)||(p.touch=e)}this.containerArray=V(n)?n:null,this.$container=n&&!this.containerArray?oe(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=$t(a,[0,0,0,0]),this.containerFriction=ut($t(ss(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ut($t(ss(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=ss(O(e)&&!Y(e.snap)?e.snap:t.snap,this),this.snapY=ss(O(r)&&!Y(r.snap)?r.snap:t.snap,this),this.scrollSpeed=$t(ss(t.scrollSpeed,this),1.5),this.scrollThreshold=$t(ss(t.scrollThreshold,this),20),this.dragSpeed=$t(ss(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=$t(ss(t.minVelocity,this),0),this.maxVelocity=$t(ss(t.maxVelocity,this),50),this.velocityMultiplier=$t(ss(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(ut(l,y,f),!0),this.setY(ut(h,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],l=this.scroll.x,h=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?ut(d,this.window[0],d):d,p=this.useWin?ut(c,this.window[1],c):c,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,T,x,w]=this.scrollBounds,S=mt(ut((_-b+t)/y,-1,0)*g,0),$=mt(ut((v-T-e)/y,0,1)*g,0),E=mt(ut((_-x-s)/y,0,1)*g,0),k=mt(ut((v-w+i)/y,-1,0)*g,0);if(S||E||k||$){const[t,e]=this.disabled;let s=l,i=h;t||(s=mt(ut(l+(k||$),0,r-o),0),this.coords[0]-=l-s),e||(i=mt(ut(h+(S||E),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[d,c]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(d>e?e+(d-e)*m:d<i?i+(d-i)*m:d,!1),this.setY(c>s?s+(c-s)*m:c<t?t+(c-t)*m:c,!1),this.computeVelocity(r-l,n-h),this.angle=ht(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 te([this],null,"x"),te([this],null,"y"),te([this],null,"progressX"),te([this],null,"progressY"),te([this.scroll]),te([this.overshootCoords]),this}scrollInView(t,e=0,s=ye.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[l,h,d,c]=o,p=mt(ut(r-l,-u,0),0),m=mt(ut(i-h,0,u),0),f=mt(ut(r-d,0,u),0),g=mt(ut(i-c,-u,0),0);new Re(n,{x:mt(n.x+(g?g-e:m?m+e:0),0),y:mt(n.y+(p?p-e:f?f+e:0),0),duration:Y(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=Ve(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=ye.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,l]=this.containerPadding,h=this.scroll.y-this.targetBounds[0]+n+e,d=this.scroll.x-this.targetBounds[1]-o-e,c=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+l+e,p=this.isOutOfBounds([h,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=ut(ft(i,this.snapX),u,d),a=ut(ft(r,this.snapY),h,c),l=Y(t)?350*A.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,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),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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=Me(this.$target,"zIndex",!1);is=(f>is?f:is)+1,this.targetStyles=Ve(this.$target,{zIndex:is}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Ve(i.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,ye.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 l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=Me(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&a<0||d&&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):(Ke(t),this.triggerStyles||(this.triggerStyles=Ve(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Ke,{passive:!1}),this.$trigger.addEventListener("touchmove",Ke,{passive:!1}),this.$trigger.addEventListener("touchend",Ke),(this.dragged||!this.disabled[0]&&it(o)>this.dragThreshold||!this.disabled[1]&&it(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,l,h]=this.pointer,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,x=this.y,w=this.computeVelocity(s-l,n-h),S=this.angle=ht(n-a,s-o),$=150*w,E=(1-this.releaseContainerFriction)*this.dragSpeed,k=T+st(S)*$,C=x+et(S)*$,N=k>c?c+(k-c)*E:k<p?p+(k-p)*E:k,D=C>u?u+(C-u)*E:C<d?d+(C-d)*E:C,I=this.destX=ut(mt(ft(N,this.snapX),5),p,c),L=this.destY=ut(mt(ft(D,this.snapY),5),d,u),R=this.isOutOfBounds(this.containerBounds,k,C);let B=0,P=0,F=v,M=v,V=0;if(b.x=T,b.y=x,!t){const t=I===c?T>c?-1:1:T<p?-1:1,s=mt(T-I,0);g.velocity=e&&_?s?$*t/it(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=g;B=T===I?0:_?r:r-n*A.timeScale,_&&(F=i),B>V&&(V=B)}if(!e){const e=L===u?x>u?-1:1:x<d?-1:1,s=mt(x-L,0);y.velocity=t&&_?s?$*e/it(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=y;P=x===L?0:_?r:r-n*A.timeScale,_&&(M=i),P>V&&(V=P)}if(!_&&R&&E&&(B||P)){const t=r.blend;new Re(b,{x:{to:N,duration:.65*B},y:{to:D,duration:.65*P},ease:v,composition:t}).init(),new Re(b,{x:{to:I,duration:B},y:{to:L,duration:P},ease:v,composition:t}).init(),this.overshootTicker.stretch(lt(B,P)).restart()}else t||this.animate[this.xProp](I,B,F),e||this.animate[this.yProp](L,P,M);this.scrollInView(V,this.scrollThreshold,v);let O=!1;I!==m&&(this.snapped[0]=I,this.snapX&&(O=!0)),L!==f&&this.snapY&&(this.snapped[1]=L,this.snapY&&(O=!0)),O&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Ke),this.$trigger.removeEventListener("touchmove",Ke),this.$trigger.removeEventListener("touchend",Ke),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=Ve(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":Ke(t)}}}const ns=(t=v)=>new re({duration:1*A.timeScale,onComplete:t},null,0).resume(),os=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&&!X(a)&&a.revert&&(e=a),Y(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||v}};class as{constructor(t={}){L.current&&L.current.register(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||oe(e)[0]||i);const n=t.defaults,o=A.defaults,a=t.mediaQueries;if(this.defaults=n?bt(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);X(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,X(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);X(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,X(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);X(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(X(s))return s(this);const i=os(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,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](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 ls=(t,e)=>t&&X(t)?t(e):t,hs=new Map;class ds{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 re({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Tt(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new re({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=mt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new re({autoplay:!1,duration:250*A.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new re({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=mt(t?s.scrollX:e.scrollLeft,0),this.scrollY=mt(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(){Tt(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),Tt(this,t=>{t.refresh(),t.onResize(t),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),hs.delete(this.element)}}const cs=(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:l,u:h}=It(a,At);let d=l;return"%"===h?d=l/100*s:h&&(d=de(t,At,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},us=(t,e,s,i,r)=>{let n;if(H(e)){const o=N.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=cs(t,h[0],s,i,r),p=cs(t,h[1],s,i,r);if(d){const e=Dt(cs(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=Dt(cs(t,"max",s),p,l);n=e>u?u:e}else n=Dt(u,p,l)}else n=cs(t,e,s,i,r)}else n=e;return mt(n,0)},ps=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 ms=0;const fs=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class gs{constructor(t={}){L.current&&L.current.register(this);const e=$t(t.sync,"play pause"),s=e?Te(e):null,r=e&&("linear"===e||e===ce),n=e&&!(s===ce&&!r),o=e&&(z(e)||!0===e||r),a=e&&H(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=ms++,this.id=Y(t.id)?this.index:t.id,this.container=(t=>{const e=t&&oe(t)[0]||i.body;let s=hs.get(e);return s||(s=new ds(e),hs.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||!!l,this.syncEase=n?s:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:v,this.onSyncLeave=l&&!h&&l[1]?l[1]:v,this.onSyncEnterForward=l&&h&&l[0]?l[0]:v,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:v,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:v,this.onSyncLeaveBackward=l&&h&&l[3]?l[3]:v,this.onEnter=t.onEnter||v,this.onLeave=t.onLeave||v,this.onEnterForward=t.onEnterForward||v,this.onLeaveForward=t.onLeaveForward||v,this.onEnterBackward=t.onEnterBackward||v,this.onLeaveBackward=t.onLeaveBackward||v,this.onUpdate=t.onUpdate||v,this.onResize=t.onResize||v,this.onSyncComplete=t.onSyncComplete||v,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=$t(t.debug,!1),this._next=null,this._prev=null,wt(this.container,this),ns(()=>{if(!this.reverted){if(!this.target){const e=oe(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,Y(t)||Y(t.persist)||(t.persist=!0),!this._params.target)){let e;Y(t.targets)?Tt(t,t=>{t.targets&&!e&&(e=ps(t))}):e=ps(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:mt(ut(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=$t(ls(t.repeat,this),!0),this.horizontal="x"===$t(ls(t.axis,this),"y"),this.enter=$t(ls(t.enter,this),"end start"),this.leave=$t(ls(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=fs[this.index%fs.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?t.winHeight:t.height,c=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,v=e?60:g,_=e?v:y,b=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",x=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?c: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?h:g,e?g:d)}`,s||(n.style.cssText+=`background:\n ${x("#FFFF")}${T(g-10)} / 100px 100px ${b},\n ${x("#FFF8")}${T(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${w("relative",0,0,e?c:g,e?g:u)}`,s||(o.style.cssText+=`background:\n ${x("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${x("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const S=[" enter: "," leave: "];this.coords.forEach((t,s)=>{const r=s>1,l=(r?0:this.offset)+t,m=s%2,f=l<_,g=l>(r?e?h:d:e?c:u)-_,b=(r?m&&!f:!m&&!f)||g,T=i.createElement("div"),x=i.createElement("div"),$=e?b?"right":"left":b?"bottom":"top",E=b?(e?v:y)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;x.innerHTML=`${this.id}${S[m]}${this.thresholds[s]}`,T.style.cssText=`${w("absolute",0,0,v,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-${$}: 2px solid ${a};\n `,x.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 `,T.appendChild(x);let k=l-E+(e?1:0);T.style[e?"left":"top"]=`${k}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Me(t.element,"position")&&(this.debugStyles=Ve(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&&a!==s.element&&a!==i.body;){const e="sticky"===Me(a,"position")&&Ve(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=s.scale,d=(r?l.left+s.scrollX-s.left:l.top+s.scrollY-s.top)*h,c=(r?l.width:l.height)*h,u=r?s.width:s.height,p=(r?s.scrollWidth:s.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",v="end",_="start";if(H(m)){const t=m.split(" ");v=t[0],g=t.length>1?t[1]:g}else if(O(m)){const t=m;Y(t.container)||(v=t.container),Y(t.target)||(g=t.target)}else z(m)&&(v=m);if(H(f)){const t=f.split(" ");_=t[0],y=t.length>1?t[1]:y}else if(O(f)){const t=f;Y(t.container)||(_=t.container),Y(t.target)||(y=t.target)}else z(f)&&(_=f);const b=us(e,g,c),T=us(e,y,c),x=b+d-u,w=T+d-p,S=us(e,v,u,x,w),$=us(e,_,u,x,w),E=b+d-S,k=T+d-$,C=k-E;this.offset=d,this.offsetStart=E,this.offsetEnd=k,this.distance=C<=0?0:C,this.thresholds=[g,y,v,_],this.coords=[b,T,S,$],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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,c=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&c,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(l&&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=mt(gt(e,g,gt(.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"}(d&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),this.forceEnter&&this.hasEntered?d&&(this.forceEnter=!1):(p&&d&&(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))),(d||!d&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!d&&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 xt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const ys=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,vs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?ce:r=>0===r||1===r?r:ys(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=ys(r,e,s)-t,i>0?o=r:n=r}while(it(i)>1e-7&&++a<100);return r})(r,t,s),e,i),_s=(t=10,e)=>{const s=e?nt:ot;return e=>s(ut(e,0,1)*t)*(1/t)},bs=(...t)=>{const e=t.length;if(!e)return ce;const s=e-1,i=t[0],r=t[s],n=[0],o=[J(i)];for(let e=1;e<s;e++){const i=t[e],r=H(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(Y(l)?e/s:J(l)/100),o.push(J(a))}return o.push(J(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]}},Ts=(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(ut(o,r,1))}return s.push(1),bs(...s)};var xs=Object.freeze({__proto__:null,Spring:Qe,createSpring:Je,cubicBezier:vs,eases:ye,irregular:Ts,linear:bs,spring:Ze,steps:_s});const ws=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(mt(t(i/e),4));return`linear(${s.join(", ")})`},Ss={},$s=t=>{let e=Ss[t];if(e)return e;if(e="linear",H(t)){if(F(t,"linear")||F(t,"cubic-")||F(t,"steps")||F(t,"ease"))e=t;else if(F(t,"cubicB"))e=P(t);else{const s=_e(t);X(s)&&(e=s===ce?"linear":ws(s))}Ss[t]=e}else if(X(t)){const s=ws(t);s&&(e=s)}else t.ease&&(e=ws(t.ease));return e},Es=["x","y","z"],ks=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...Es],Cs=(()=>[...Es,...g.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let Ns=null;const Ds=(t,e,s,i,r)=>{let n=H(e)?e:Et(e,s,i,r);return z(n)?ks.includes(t)||F(t,"translate")?`${n}px`:F(t,"rotate")||F(t,"skew")?`${n}deg`:`${n}`:n},Is=(t,e,s,i,r,n)=>{let o="0";const a=Y(i)?getComputedStyle(t)[e]:Ds(e,i,t,r,n);return o=Y(s)?V(i)?i.map(s=>Ds(e,s,t,r,n)):a:[Ds(e,s,t,r,n),a],o};class Ls{constructor(t,s){L.current&&L.current.register(this),W(Ns)&&(!e||!Y(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(g.forEach(t=>{const e=F(t,"skew"),s=F(t,"scale"),i=F(t,"rotate"),r=F(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{}}),Ns=!0):Ns=!1);const i=ae(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=$t(s.autoplay,A.defaults.autoplay),o=!(!n||!n.link)&&n,a=s.alternate&&!0===s.alternate,h=s.reversed&&!0===s.reversed,d=$t(s.loop,A.defaults.loop),c=!0===d||d===1/0?1/0:z(d)?d+1:1,u=a?h?"alternate-reverse":"alternate":h?"reverse":"normal",_=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=!n||!1!==o,this.reversed=h,this.persist=$t(s.persist,A.defaults.persist),this.autoplay=n,this._speed=$t(s.playbackRate,A.defaults.playbackRate),this._resolve=v,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[l],n=Cs.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},h=$t(s.ease,A.defaults.ease),d=Et(h,t,e,r),p=X(d)||H(d)?d:h,v=h.ease&&h,b=$s(p),T=(v?v.settlingDuration:Et($t(s.duration,A.defaults.duration),t,e,r))*_,x=Et($t(s.delay,A.defaults.delay),t,e,r)*_,w=$t(s.composition,"replace");for(let l in s){if(!Q(l))continue;const h={},d={iterations:c,direction:u,fill:"both",easing:b,duration:T,delay:x,composite:w},p=s[l],m=!!n&&(g.includes(l)?l:f.get(l)),y=m?"transform":l;let v;if(a[y]||(a[y]=o[y]),O(p)){const s=p,n=$t(s.ease,b),a=n.ease&&n,c=s.to,u=s.from;if(d.duration=(a?a.settlingDuration:Et($t(s.duration,T),t,e,r))*_,d.delay=Et($t(s.delay,x),t,e,r)*_,d.composite=$t(s.composition,w),d.easing=$s(n),v=Is(t,l,u,c,e,r),m?(h[`--${m}`]=v,i[m]=v):h[l]=Is(t,l,u,c,e,r),Fe(this,t,l,h,d),!Y(u))if(m){const t=`--${m}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else v=V(p)?p.map(s=>Ds(l,s,t,e,r)):Ds(l,p,t,e,r),m?(h[`--${m}`]=v,i[m]=v):h[l]=v,Fe(this,t,l,h,d)}if(n){let t=m;for(let e in i)t+=`${y[e]}var(--${e})) `;o.transform=t}}),o&&this.autoplay.link(this)}forEach(t){try{const e=H(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return 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"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];Y(r)||r===m?s.removeProperty(P(e)):t.style[e]=r}t.getAttribute("style")===m&&t.removeAttribute("style")}),this}then(t=v){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=v};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const As={animate:(t,e)=>new Ls(t,e),convertEase:ws};let Rs=0,Bs=0;const Ps=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),Fs=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},Ms=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},Vs=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,Fs(s)),i&&!e.has(i)&&e.set(i,Fs(i))},Os=t=>{t.forEach((t,e)=>Ms(e,t)),t.clear()},zs={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},Hs=t=>{if(!t)return;const e=t.parentNode;e&&(e._head===t&&(e._head=t._next),e._tail===t&&(e._tail=t._prev),t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t._prev=null,t._next=null,t.parentNode=null)},Xs=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+Bs++);const n=i||{};return n.$el=t,n.$measure=t,n.id=r,n.index=0,n.total=1,n.delay=0,n.duration=0,n.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(t=>n.properties[t]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Ys=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=Ps(n,e),t.measuredInlineTransform=null,t.measuredDisplay=s.display,t.measuredVisibility=s.visibility,t.measuredPosition=p,t.measuredHasDisplayNone="none"===s.display,t.measuredHasVisibilityHidden="hidden"===s.visibility,t.measuredIsVisible=!(t.measuredHasDisplayNone||t.measuredHasVisibilityHidden),t.measuredIsRemoved=t.measuredHasDisplayNone||t.measuredHasVisibilityHidden||u;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=Fs(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=Fs(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let g,y,v=0,_=0,b=0,T=0;if(!i){const t=e.getBoundingClientRect();v=t.left,_=t.top,b=t.width,T=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);Y(e)||(a[t]=e)}if(a.left=v,a.top=_,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=v,y=_):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=v-s-r,y=_-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=v-t-l.properties.clientLeft,y=_-e-l.properties.clientTop}else g=v-s-r,y=_-i-n}return a.x=g,a.y=y,a.width=b,a.height=T,t},Ws=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},Us=(t,e)=>{const s=Et(e.ease,t.$el,t.index,t.total),i=X(s)?s:e.ease,r=!Y(i)&&!Y(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:Et(e.duration,t.$el,t.index,t.total),t.delay=Et(e.delay,t.$el,t.index,t.total)},qs=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},js=t=>{const e=t.$el.style,s=t.inlineStyles;for(let t=0,i=s.length;t<i;t+=2){const i=s[t],r=s[t+1];r&&""!==r?e[i]=r:(e[i]="",e.removeProperty(i))}},Gs=t=>{const e=t.inlineTransforms,s=t.$el.style;!t.hasTransform||!e||t.hasTransform&&"none"===s.transform||e&&"none"===e?s.removeProperty("transform"):e&&(s.transform=e);const i=t.$measure;if(t.hasTransform&&i!==t.$el){const e=i.style,s=t.measuredInlineTransform;s&&""!==s?e.transform=s:e.removeProperty("transform")}t.measuredInlineTransform=null,null!==t.inlineTransition&&(Ms(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(Ms(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Qs=t=>{(t.measuredIsRemoved||t.hasVisibilitySwap)&&(t.$el.style.removeProperty("display"),t.$el.style.removeProperty("visibility"),t.hasVisibilitySwap&&(t.$measure.style.removeProperty("display"),t.$measure.style.removeProperty("visibility"))),t.layout.pendingRemoval.delete(t.$el)},Zs=(t,e,s)=>(e.properties={...t.properties},e.state=s,e.isTarget=t.isTarget,e.hasTransform=t.hasTransform,e.inlineTransforms=t.inlineTransforms,e.measuredIsVisible=t.measuredIsVisible,e.measuredDisplay=t.measuredDisplay,e.measuredIsRemoved=t.measuredIsRemoved,e.measuredHasDisplayNone=t.measuredHasDisplayNone,e.measuredHasVisibilityHidden=t.measuredHasVisibilityHidden,e.hasDisplayNone=t.hasDisplayNone,e.isInlined=t.isInlined,e.hasVisibilityHidden=t.hasVisibilityHidden,e);class Js{constructor(t){this.layout=t,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(t=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}forEach(t,e){let s=t,i=0;for(;s;)if(e(s,i++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(t){this.forEach(this.rootNode,t)}forEachNode(t){for(const e of this.rootNodes)this.forEach(e,t)}registerElement(t,e){if(!t||1!==t.nodeType)return null;this.layout.transitionMuteStore.has(t)||this.layout.transitionMuteStore.set(t,Fs(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||U(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?zs:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=Ps(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=Ps(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){Ys(u,e,o,n);let t=e.lastElementChild;for(;t;)s.push(t,u),t=t.previousElementSibling;r||(r=u);continue}{let i=e.lastElementChild;for(;i;)s.push(i,t),i=i.previousElementSibling;r||(r=u);continue}}Hs(u),u=Xs(e,t,this,u)}else u=Xs(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!u.measuredHasVisibilityHidden||a&&!u.measuredHasDisplayNone,this.nodes.set(u.id,u),u.parentNode=t||null,u._prev=null,u._next=null,t?(this.rootNodes.delete(u),t._head?(t._tail._next=u,u._prev=t._tail,t._tail=u):(t._head=u,t._tail=u)):this.rootNodes.add(u),Ys(u,u.$el,o,n);let p=e.lastElementChild;for(;p;)s.push(p,u),p=p.previousElementSibling;r||(r=u)}return r}ensureDetachedNode(t,e){if(!t||t===this.layout.root)return null;const s=t.dataset.layoutId,i=s?this.nodes.get(s):null;if(i&&i.$el===t)return i;let r=null,n=t.parentElement;for(;n&&n!==this.layout.root;){if(e.has(n)){r=this.ensureDetachedNode(n,e);break}n=n.parentElement}return this.registerElement(t,r)}record(){const t=this.layout,e=t.children,s=t.root,i=V(e)?e:[e],r=[],n="*"===e?s:L.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=Fs(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=H(e)?n.querySelectorAll(e):e}const l=ae(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0,u=this.nodes.size;this.nodes.forEach((t,e)=>{t.index=c++,t.total=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!Ps(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(Gs);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),Ms(e,i)}return this}}function Ks(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class ti{constructor(t,e={}){L.current&&L.current.register(this);const s=Ks(e.swapAt),i=Ks(e.enterFrom),r=Ks(e.leaveTo),n=e.properties;if(e.duration=$t(e.duration,350),e.delay=$t(e.delay,0),e.ease=$t(e.ease,"inOut(3.5)"),this.params=e,this.root=ae(t)[0],this.id=Rs++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=bt(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])this.properties.add(t);if(n)for(let t=0,e=n.length;t<e;t++)this.properties.add(n[t]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(t=>this.recordedProperties.add(t)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Js(this),this.newState=new Js(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),Os(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>Os(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(js),this}animate(t={}){const e={ease:$t(t.ease,this.params.ease),delay:$t(t.delay,this.params.delay),duration:$t(t.duration,this.params.duration)},s={},i=$t(t.onComplete,this.params.onComplete),r=$t(t.onPause,this.params.onPause);for(let e in I)"ease"!==e&&"duration"!==e&&"delay"!==e&&(Y(t[e])?Y(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{const e=t.autoplay;if(e&&e.linked)i&&i(this.timeline);else{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Qs(t),js(t)});for(let t=0,e=w.length;t<e;t++){const e=w[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||Os(this.transitionMuteStore)})}},s.onPause=()=>{const e=t.autoplay;if(e&&e.linked)return i&&i(this.timeline),void(r&&r(this.timeline));this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Qs),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=bt(bt(t.swapAt||{},this.swapAtParams),e),o=bt(bt(t.enterFrom||{},this.enterFromParams),e),a=bt(bt(t.leaveTo||{},this.leaveToParams),e),[l,h]=Ks(n),[d,c]=Ks(o),[u,p]=Ks(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,v=this.entering,_=this.leaving,b=this.pendingRemoval;g.length=y.length=v.length=_.length=0,m.forEachRootNode(Vs),f.record(),f.forEachRootNode(qs);const T=[],x=[],w=[],S=[],$=f.rootNode,E=$.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=Zs(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(Zs(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const w=b.has(e),S=a.measuredIsVisible,E=t.measuredIsVisible,k=!S&&E&&!o,C=!x&&(y||w)&&!r,N=x&&!y&&!n,D=N||x&&w&&!n;t.branchAdded=r||C,t.branchRemoved=n||D,t.branchNotRendered=o||x,x&&S&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",Zs(a,t,f)),N?(t.isTarget&&(_.push(e),t.isLeaving=!0),b.add(e)):!x&&w&&b.delete(e),C&&!o||k?(Ws(a,d),t.isTarget&&(v.push(e),t.isEntering=!0)):D&&!o&&Ws(t,u),t===$||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let k=0,C=0,N=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==$&&i;for(;a&&!a.isTarget&&a!==$;)a=a.parentNode;const d=g.length;t===$?(t.index=0,t.total=d,Us(t,e)):t.isEntering?(t.index=a?a.index:k,t.total=a?d:v.length,Us(t,c),k++):t.isLeaving?(t.index=a?a.index:C,t.total=a?d:_.length,C++,Us(t,p)):t.isTarget?(t.index=N++,t.total=d,Us(t,e)):(t.index=a?a.index:0,t.total=d,Us(t,h)),r.index=t.index,r.total=t.total;for(let e in n)n[e]=Et(n[e],s,t.index,t.total),o[e]=Et(o[e],s,r.index,r.total);const u=Math.abs(n.width-o.width)>1,f=Math.abs(n.height-o.height)>1;if(t.sizeChanged=u||f,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,w.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(l.transform&&(t.hasTransform=!0,w.push(s)),S.push(s)))});const D={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=D,this.timeline=We(s),!x.length&&!w.length&&!y.length)return Os(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==E||this.absoluteCoords)&&(e.style.position=this.absoluteCoords?"fixed":"absolute",e.style.left="0px",e.style.top="0px",e.style.marginLeft="0px",e.style.marginTop="0px",e.style.translate=`${n.x}px ${n.y}px`),e===E&&"static"===r.measuredPosition&&(e.style.position="relative",e.style.left="0px",e.style.top="0px")),e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none"}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||r.isInlined||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e),i=s.properties;e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;this.timeline.call(()=>{e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(S.length){const t=Te(f.nodes.get(S[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(S,s,0)}}const L=w.length;if(L){for(let t=0;t<L;t++){const e=w[t],s=f.getNode(e);s.isInlined||(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`),e.style.transform=m.getComputedValue(e,"transform"),S.includes(e)&&(s.ease=Et(n.ease,e,s.index,s.total),s.duration=Et(n.duration,e,s.index,s.total))}this.transformAnimation=As.animate(w,{translate:t=>f.getNode(t).isInlined?"0px 0px":`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!S.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,Et(l.transform,t,i.index,i.total),e]},autoplay:!1,...D}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const ei=je,si={},ii=t=>(...e)=>{const s=t(...e);return new Proxy(v,{apply:(t,e,[i])=>s(i),get:(t,e)=>ii((...t)=>{const i=si[e](...t);return t=>i(s(t))})})},ri=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?ii(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return si[t]||(si[t]=i),i},ni=ri("roundPad",ei.roundPad),oi=ri("padStart",ei.padStart),ai=ri("padEnd",ei.padEnd),li=ri("wrap",ei.wrap),hi=ri("mapRange",ei.mapRange),di=ri("degToRad",ei.degToRad),ci=ri("radToDeg",ei.radToDeg),ui=ri("snap",ei.snap),pi=ri("clamp",ei.clamp),mi=ri("round",ei.round),fi=ri("lerp",ei.lerp,1),gi=ri("damp",ei.damp,1),yi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let vi=0;const _i=(t,e=0,s=1,i=0)=>{let r=void 0===t?vi++: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}},bi=t=>t[yi(0,t.length-1)],Ti=t=>{let e,s,i=t.length;for(;i;)s=yi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},xi=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!Y(o),l=a&&!Y(o.ease)?o.ease:a?Te(o):null,h=e.grid,d=e.axis,c=e.total,u=Y(r)||0===r||"first"===r,p="center"===r,f="last"===r,g="random"===r,y=V(t),v=e.use,_=J(y?t[0]:t),b=y?J(t[1]):0,T=E.exec((y?t[1]:t)+m),x=e.start||0+(y?_:0);let w=u?0:z(r)?r:0;return(t,r,o,a)=>{const[u]=ae(t),m=Y(c)?o:c,S=!Y(v)&&(X(v)?v(u,r,m):Nt(u,v)),$=z(S)||H(S)&&z(+S)?+S:r;if(p&&(w=(m-1)/2),f&&(w=m-1),!s.length){for(let t=0;t<m;t++){if(h){const e=p?(h[0]-1)/2:w%h[0],i=p?(h[1]-1)/2:ot(w/h[0]),r=e-t%h[0],n=i-ot(t/h[0]);let o=tt(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(it(w-t));i=lt(...s)}l&&(s=s.map(t=>l(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:it(i-t))),g&&(s=Ti(s))}const E=y?(b-_)/i:_;let k=(a?ze(a,Y(e.start)?a.iterationDuration:x):x)+(E*mt(s[$],2)||0);return e.modifier&&(k=e.modifier(k)),T&&(k=`${k}${T[2]}`),k}};var wi=Object.freeze({__proto__:null,$:ae,clamp:pi,cleanInlineStyles:Mt,createSeededRandom:_i,damp:gi,degToRad:di,get:Me,keepTime:os,lerp:fi,mapRange:hi,padEnd:ai,padStart:oi,radToDeg:ci,random:yi,randomPick:bi,remove:Oe,round:mi,roundPad:ni,set:Ve,shuffle:Ti,snap:ui,stagger:xi,sync:ns,wrap:li});const Si=t=>{const e=oe(t)[0];return e&&U(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},$i=(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)},Ei=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[a],o=t.getCTM(),l=0===s;return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=$i(t,r,a,-1,l),s=$i(t,r,a,1,l);return 180*ht(s.y-e.y,s.x-e.x)/dt}{const s=$i(t,r,a,0,l);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}}}},ki=(t,e=0)=>{const s=Si(t);if(s)return{translateX:Ei(s,"x",e),translateY:Ei(s,"y",e),rotate:Ei(s,"a",e)}},Ci=(t,e=0,s=0)=>oe(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 l=new Proxy(t,{get(t,e){const s=t[e];return e===d?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],l=+s[1],h=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(tt(s.a*s.a+s.b*s.b)+tt(s.c*s.c+s.d*s.d))/2)}return e})(o),d=-1e3*r*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${d}`),t.setAttribute("stroke-dasharray",`${c} ${u}`)}return Reflect.apply(s,t,e)}:X(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),l.setAttribute("draw",`${e} ${s}`)),l})(t,e,s)),Ni=(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=Si(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[h];o&&s.setAttribute(r?"d":"points",o);let a="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),h=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<h;e++){const d=e/(h-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+mt(c.x,3)+n+c.y+" ",l+=p+mt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[h]=l,[a,l]};var Di=Object.freeze({__proto__:null,createDrawable:Ci,createMotionPath:ki,morphTo:Ni});const Ii="undefined"!=typeof Intl&&Intl.Segmenter,Li=/\{value\}/g,Ai=/\{i\}/g,Ri=/(\s+)/,Bi=/^\s+$/,Pi="line",Fi="word",Mi="char",Vi="data-line";let Oi=null,zi=null,Hi=null;const Xi=t=>t.isWordLike||" "===t.segment||z(+t.segment),Yi=t=>t.setAttribute("aria-hidden","true"),Wi=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Ui={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},qi=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&qi(e)}},ji=(t,e,s)=>{const i=t.getAttribute(Vi);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&Bi.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&Bi.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)ji(t.children[r],e,s);return s},Gi=(t,e={})=>{let s="";const i=H(e.class)?` class="${e.class}"`:"",r=$t(e.clone,!1),n=$t(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},Qi=(t,e,s,i,r,n,o,a,l)=>{const h=r===Pi,d=r===Mi,c=`_${r}_`,u=X(t)?t(s):t,p=h?"block":"inline-block";Hi.innerHTML=u.replace(Li,`<i class="${c}"></i>`).replace(Ai,`${d?l:h?o:a}`);const m=Hi.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),v=y.length;if(v){f.style.display=p,g.style.display=p,g.setAttribute(Vi,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=v;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${Ui[r]}`),f};class Zi{constructor(t,s={}){Oi||(Oi=Ii?new Ii([],{granularity:Fi}):{segment:t=>{const e=[],s=t.split(Ri);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Bi.test(i)})}return e}}),zi||(zi=Ii?new Ii([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Hi&&e&&(Hi=i.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=s,d=(t=V(t)?t[0]:t)&&t.nodeType?t:(ne(t)||[])[0],c=!0===o?{}:o,u=!0===r||Y(r)?{}:r,p=!0===n?{}:n;this.debug=$t(h,!1),this.includeSpaces=$t(l,!1),this.accessible=$t(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=O(c)?Gi(Pi,c):c,this.wordTemplate=O(u)||this.linesOnly?Gi(Fi,u):u,this.charTemplate=O(p)?Gi(Mi,p):p,this.$target=d,this.html=d&&d.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&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?i.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!X(t))return console.warn("Effect must return a function.");const e=os(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=>X(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=[],l=this.words,h=this.chars,d=Oi.segment(o),c=i.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=Xi(t);if(!u||s&&u&&Xi(u))a.push(e);else{const t=a.length-1,s=a[t];Ri.test(s)||Ri.test(e)?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 d=a[t+1],u=r&&d&&!d.trim(),p=o,m=s?zi.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,d=i.createTextNode(a);Qi(s,h,d,f,Mi,n,-1,l.length,h.length)}}e?Qi(e,l,f,c,Fi,n,-1,l.length,h.length):s?c.appendChild(f):c.appendChild(i.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(i.createTextNode(o))}}t.parentNode.replaceChild(c,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,l=r&&a;this.ready=!r||a,(l||t)&&this.effectsCleanups.forEach(t=>X(t)&&t(this)),s||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),l&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Wi(e,Fi))),o&&(l||n)&&(this.chars=Wi(e,Mi));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!Y(d)&&s-d>.5*i&&c++,e.setAttribute(Vi,`${c}`);const r=e.querySelectorAll(`[${Vi}]`);let n=r.length;for(;n--;)r[n].setAttribute(Vi,`${c}`);d=s}if(l){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<c+1;t++){const i=e.cloneNode(!0);ji(i,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&s.add(e),e.removeChild(t))}),a.push(i)}s.forEach(qi);for(let e=0,s=a.length;e<s;e++)Qi(r,this.lines,a[e],t,Pi,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Wi(e,Fi)),o&&(this.chars=Wi(e,Mi))}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&&(l||!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(Yi),this.words.forEach(Yi),this.chars.forEach(Yi)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Ji=(t,e)=>new Zi(t,e),Ki=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Zi(t,e));var tr=Object.freeze({__proto__:null,TextSplitter:Zi,split:Ki,splitText:Ji});t.$=ae,t.Animatable=Ue,t.AutoLayout=ti,t.Draggable=rs,t.JSAnimation=Re,t.Scope=as,t.ScrollObserver=gs,t.Spring=Qe,t.TextSplitter=Zi,t.Timeline=Ye,t.Timer=re,t.WAAPIAnimation=Ls,t.animate=(t,e)=>new Re(t,e,null,0,!1).init(),t.clamp=pi,t.cleanInlineStyles=Mt,t.createAnimatable=(t,e)=>new Ue(t,e),t.createDraggable=(t,e)=>new rs(t,e),t.createDrawable=Ci,t.createLayout=(t,e)=>new ti(t,e),t.createMotionPath=ki,t.createScope=t=>new as(t),t.createSeededRandom=_i,t.createSpring=Je,t.createTimeline=We,t.createTimer=t=>new re(t,null,0).init(),t.cubicBezier=vs,t.damp=gi,t.degToRad=di,t.eases=ye,t.easings=xs,t.engine=Yt,t.get=Me,t.irregular=Ts,t.keepTime=os,t.lerp=fi,t.linear=bs,t.mapRange=hi,t.morphTo=Ni,t.onScroll=(t={})=>new gs(t),t.padEnd=ai,t.padStart=oi,t.radToDeg=ci,t.random=yi,t.randomPick=bi,t.remove=Oe,t.round=mi,t.roundPad=ni,t.scrollContainers=hs,t.set=Ve,t.shuffle=Ti,t.snap=ui,t.split=Ki,t.splitText=Ji,t.spring=Ze,t.stagger=xi,t.steps=_s,t.svg=Di,t.sync=ns,t.text=tr,t.utils=wi,t.waapi=As,t.wrap=li});
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(),l=Symbol(),h=Symbol(),d=1e-11,c=1e12,u=1e3,p="",m=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),f=["perspective","translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],g=f.reduce((t,e)=>({...t,[e]:e+"("}),{}),y=()=>{},v=/\)\s*[-.\d]/,b=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,_=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,T=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,x=/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,S=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,$=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,C=/([a-z])([A-Z])/g,E=/(\*=|\+=|-=)/,k=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,N={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:u,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},D={current:null,root:i},A={defaults:N,precision:4,timeScale:1,tickThreshold:200,editor:null},I={version:"4.4.1",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(I));const R=t=>t.replace(C,"$1-$2").toLowerCase(),L=(t,e)=>0===t.indexOf(e),B=Date.now,P=Array.isArray,F=t=>t&&t.constructor===Object,M=t=>"number"==typeof t&&!isNaN(t),V=t=>"string"==typeof t,O=t=>"function"==typeof t,z=t=>void 0===t,H=t=>z(t)||null===t,X=t=>e&&t instanceof SVGElement,Y=t=>b.test(t),W=t=>L(t,"rgb"),U=t=>L(t,"hsl"),q=t=>!A.defaults.hasOwnProperty(t),j=["opacity","rotate","overflow","color"],G=t=>V(t)?parseFloat(t):t,Z=Math.pow,Q=Math.sqrt,J=Math.sin,K=Math.cos,tt=Math.abs,et=Math.exp,st=Math.ceil,it=Math.floor,rt=Math.asin,nt=Math.max,ot=Math.atan2,at=Math.PI,lt=Math.round,ht=(t,e,s)=>t<e?e:t>s?s:t,dt=(t,e)=>{if(e<0)return t;if(!e)return lt(t);const s=10**e;return lt(t*s)/s},ct=(t,e)=>P(e)?e.reduce((e,s)=>tt(s-t)<tt(e-t)?s:e):e?lt(t/e)*e:t,ut=(t,e,s)=>t+(e-t)*s,pt=t=>t===1/0?c:t===-1/0?-c:t,mt=t=>t<=d?d:pt(dt(t,11)),ft=t=>P(t)?[...t]:t,gt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=z(r)?e[i]:r}return s},yt=(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}},vt=(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},bt=(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},_t=t=>{let e=p;for(let s=0,i=f.length;s<i;s++){const i=f[s],r=t[i];if(void 0!==r){if("translateX"===i){const i=t.translateY;if(void 0!==i){const n=t.translateZ;void 0!==n?(e+=`translate3d(${r},${i},${n}) `,s+=2):(e+=`translate(${r},${i}) `,s+=1);continue}}if("scaleX"===i&&void 0===t.scale){const i=t.scaleY;if(void 0!==i){const n=t.scaleZ;void 0!==n?(e+=`scale3d(${r},${i},${n}) `,s+=2):(e+=`scale(${r},${i}) `,s+=1);continue}}e+=`${g[i]}${r}) `}"rotateZ"===i&&void 0!==t.rotate3d&&(e+=`rotate3d(${t.rotate3d}) `)}return void 0!==t.matrix&&(e+=`matrix(${t.matrix}) `),void 0!==t.matrix3d&&(e+=`matrix3d(${t.matrix3d}) `),e},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),xt=(t,e)=>z(t)?e:t,wt=(t,e,s,i,r,n)=>{let o;if(O(t))o=()=>{const r=t(e,s,i,n);return isNaN(+r)?r||0:+r};else{if(!V(t)||!L(t,"var("))return t;o=()=>{const s=t.match(k),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==p||!r||(n=r.trim()),n||0}}return r&&(r.func=o),o()},St=(t,e)=>t[o]?t[a]&&((t,e)=>{if(j.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:f.includes(e)||m.get(e)?3:L(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[h]||t).getPropertyValue(e);return"auto"===r?"0":r},Ct=(t,e,s,i)=>{const r=z(s)?St(t,e):s;if(0===r){const s=t[e];return s&&i&&(i[e]=s),s||0}if(1===r){const s=t.getAttribute(e);return s&&i&&(i[e]=s),s}return 3===r?((t,e,s)=>{const i=t.style.transform;if(i){const r=t[l];let n=0;const o=i.length;let a;for(;n<o;){for(;n<o&&32===i.charCodeAt(n);)n++;if(n>=o)break;const t=n;for(;n<o&&40!==i.charCodeAt(n);)n++;if(n>=o)break;const e=i.substring(t,n);let s=1;const l=n+1;let h=-1,d=-1;for(n++;n<o&&s>0;){const t=i.charCodeAt(n);40===t?s++:41===t?s--:44===t&&1===s&&(-1===h?h=n:-1===d&&(d=n)),n++}const c=n-1;"translate"===e||"translate3d"===e?(-1===h?r.translateX=i.substring(l,c).trim():(r.translateX=i.substring(l,h).trim(),-1===d?r.translateY=i.substring(h+1,c).trim():(r.translateY=i.substring(h+1,d).trim(),r.translateZ=i.substring(d+1,c).trim())),a=i.substring(l,c)):"scale"===e||"scale3d"===e?-1===h?r.scale=i.substring(l,c).trim():(r.scaleX=i.substring(l,h).trim(),-1===d?r.scaleY=i.substring(h+1,c).trim():(r.scaleY=i.substring(h+1,d).trim(),r.scaleZ=i.substring(d+1,c).trim())):r[e]=i.substring(l,c)}if("translate3d"===e&&a)return s&&(s[e]=a),a;const h=r[e];if(!z(h))return s&&(s[e]=h),h}return"translate3d"===e?"0px, 0px, 0px":"rotate3d"===e?"0, 0, 0, 0deg":L(e,"scale")?"1":L(e,"rotate")||L(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,kt=(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(" ")&&$.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(Y(r=s)||(W(r)||U(r))&&(")"===r[r.length-1]||!v.test(r)))return e.t=2,e.d=W(i=s)?(t=>{const e=_.exec(t)||T.exec(t),s=z(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):Y(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):U(i)?(t=>{const e=x.exec(t)||w.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=z(e[4])?1:+e[4];let o,a,l;if(0===i)o=a=l=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=dt(255*Tt(e,t,s+1/3),0),a=dt(255*Tt(e,t,s),0),l=dt(255*Tt(e,t,s-1/3),0)}return[o,a,l,n]})(i):[0,0,0,1],e;{const t=s.match(S);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(S)||[],e}}var i,r;return e.n=s,e},Nt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=ft(t._toNumbers),e.s=ft(t._strings),e),Dt={t:0,n:0,u:null,o:null,d:null,s:null},At=(t,e,s)=>{const i=t._modifier,n=t._fromNumbers,o=t._toNumbers,a=dt(ht(i(ut(n[0],o[0],e)),0,255),0),l=dt(ht(i(ut(n[1],o[1],e)),0,255),0),h=dt(ht(i(ut(n[2],o[2],e)),0,255),0),d=ht(i(dt(ut(n[3],o[3],e),s)),0,1);if(t._composition!==r.none){const e=t._numbers;e[0]=a,e[1]=l,e[2]=h,e[3]=d}return`rgba(${a},${l},${h},${d})`},It=(t,e,s)=>{const i=t._modifier,n=t._fromNumbers,o=t._toNumbers,a=t._strings,l=t._composition!==r.none;let h=a[0];for(let r=0,d=o.length;r<d;r++){const d=i(dt(ut(n[r],o[r],e),s)),c=a[r+1];h+=`${c?d+c:d}`,l&&(t._numbers[r]=d)}return h},Rt=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,h=t.completed,c=t.iterationDuration,u=t.iterationCount,p=t._currentIteration,m=t._loopDelay,f=t._reversed,g=t._alternate,y=t._hasChildren,v=t._delay,b=t._currentTime,_=v+c,T=e-v,x=ht(b,-v,a),w=ht(T,-v,a),S=T-b,$=w>0,C=w>=a,E=a<=d,k=2===n;let N=0,D=T,I=0;if(u>1){const e=~~(w/(c+(C?0:m)));t._currentIteration=ht(e,0,u),C&&t._currentIteration--,N=t._currentIteration%2,D=w%(c+m)||0}const R=f^(g&&N),L=t._ease;let B=C?R?0:a:R?c-D:D;L&&(B=c*L(B/c)||0);const P=(o?o.backwards:T<b)?!R:!!R;if(t._currentTime=T,t._iterationTime=B,t.backwards=P,$&&!t.began?(t.began=!0,s||o&&(P||!o.began)||t.onBegin(t)):T<=0&&(t.began=!1),s||y||!$||t._currentIteration===p||t.onLoop(t),k||1===n&&(e>=v&&e<=_||e<=v&&x>v||e>=_&&x!==a)||B>=_&&x!==a||B<=v&&x>0||e<=x&&x===a&&h||C&&!h&&E){if($&&(t.computeDeltaTime(x),s||t.onBeforeUpdate(t)),!y){const e=k||(P?-1*S:S)>=A.tickThreshold,n=t._offset+(o?o._offset:0)+v+B;let a,h,d,c,u=t._head,p=0;for(;u;){const t=u._composition,s=u._currentTime,o=u._changeDuration,m=u._absoluteStartTime+u._changeDuration,f=u._nextRep,g=u._prevRep,y=t!==r.none;if((e||(s!==o||n<=m+(f?f._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!y||!u._isOverridden&&(!u._isOverlapped||n<=m)&&(!f||f._isOverridden||n<=f._absoluteStartTime)&&(!g||g._isOverridden||n>=g._absoluteStartTime+g._changeDuration+u._delay))){const e=u._currentTime=ht(B-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,m=u._valueType,f=u._tweenType,g=0===f,v=0===m,b=v&&g||0===s||1===s?-1:A.precision;let _,T;if(v?_=T=n(dt(ut(u._fromNumber,u._toNumber,s),b)):1===m?(T=n(dt(ut(u._fromNumber,u._toNumber,s),b)),_=`${T}${u._unit}`):2===m?_=At(u,s,b):3===m&&(_=It(u,s,b)),y&&(u._number=T),i||t===r.blend)u._value=_;else{const t=u.property;a=u.target,g?a[t]=_:1===f?a.setAttribute(t,_):(h=a.style,3===f?(a!==d&&(d=a,c=a[l]),c[t]=_,p=1):2===f?h[t]=_:4===f&&h.setProperty(t,_)),$&&(I=1)}}p&&u._renderTransforms&&(h.transform=_t(c),p=0),u=u._next}!s&&I&&t.onRender(t)}!s&&$&&t.onUpdate(t)}return o&&E?!s&&(o.began&&!P&&T>0&&!h||P&&T<=d&&h)&&(t.onComplete(t),t.completed=!P):$&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,h||y||(t.completed=!0,s||o&&(P||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,I},Lt=(t,e,s,i,r)=>{const n=t._currentIteration;if(Rt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,l=i?e:o._iterationTime,h=B();let c=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;yt(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&&Rt(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}yt(o,t=>{const e=dt((l-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(h):r;c+=Rt(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))))}},Bt={},Pt=(t,e,s)=>{if(3===s)return m.get(t)||t;if(2===s||1===s&&X(e)&&t in e.style){const e=Bt[t];if(e)return e;{const e=t?R(t):t;return Bt[t]=e,e}}return t},Ft=(t,e=!1)=>{if(t._hasChildren)yt(t,t=>Ft(t,e),!0);else{const s=t;s.pause(),yt(s,t=>{const i=t.property,r=t.target,n=t._tweenType,a=t._inlineValue,h=H(a)||a===p;if(0===n)e||h||(r[i]=a);else if(r[o])if(1===n)e||(h?r.removeAttribute(i):r.setAttribute(i,a));else{const e=r.style;if(3===n){const s=r[l];h?delete s[i]:s[i]=a,t._renderTransforms&&(Object.keys(s).length?e.transform=_t(s):e.removeProperty("transform"))}else h?e.removeProperty(R(i)):e[i]=a}r[o]&&s._tail===t&&s.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===p&&t.removeAttribute("style")})})}return t},Mt=t=>Ft(t,!0);class Vt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=u/240,this._fps=240,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=u/i;i>N.frameRate&&(N.frameRate=i),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;if(this._lastTickTime=t,t<e)return 0;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Ot={animation:null,update:y},zt=(()=>e?requestAnimationFrame:setImmediate)(),Ht=(()=>e?cancelAnimationFrame:clearImmediate)();class Xt extends Vt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=N,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=B();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?(vt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Lt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}Ot.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(B()),this.reqId=zt(Wt)),this}pause(){if(this.reqId)return this.paused=!0,Ut()}resume(){if(this.paused)return this.paused=!1,yt(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===A.timeScale?1:u)}set speed(t){this._speed=t*A.timeScale,yt(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:u;this.defaults.duration*=t,this._speed*=t}}get precision(){return A.precision}set precision(t){A.precision=t}}const Yt=(()=>{const t=new Xt(B());return e&&(I.engine=t,i.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())})),t})(),Wt=()=>{Yt._head?(Yt.reqId=zt(Wt),Yt.update()):Yt.reqId=0},Ut=()=>(Ht(Yt.reqId),Yt.reqId=0,Yt),qt={_rep:new WeakMap,_add:new Map},jt=(t,e,s="_rep")=>{const i=qt[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Gt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,Zt=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;bt(e,t,Gt,"_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){Zt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)Zt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=dt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<d&&Zt(i)}let o=!0;if(yt(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;yt(t,t=>{t!==e&&yt(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===r.blend){const e=jt(t.target,t.property,"_add"),s=(t=>{let e=Ot.animation;return e||(e={duration:d,computeDeltaTime:y,_offset:0,_delay:0,_head:null,_tail:null},Ot.animation=e,Ot.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?ft(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}}}),Rt(e,1,1,0,2)}),e})(qt._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=d,i._startTime=0,i._numbers=ft(t._fromNumbers),i._number=0,i._next=null,i._prev=null,bt(e,i),bt(s,i));const n=t._toNumber;if(t._fromNumber=i._fromNumber-n,t._toNumber=0,t._numbers=ft(t._fromNumbers),t._number=0,i._fromNumber=n,t._toNumbers){const e=ft(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}bt(e,t,null,"_prevAdd","_nextAdd")}return t},Jt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=qt._rep.get(s)[i];if(vt(n,t,"_prevRep","_nextRep"),e===r.blend){const e=qt._add,r=e.get(s);if(!r)return;const n=r[i],o=Ot.animation;vt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){vt(n,a,"_prevAdd","_nextAdd"),vt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Kt=(t,e,s)=>{let i=!1;return yt(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),vt(e,r),Jt(r),i=!0)}},!0),i},te=(t,e,s)=>{const i=e||Yt;let r;if(i._hasChildren){let e=0;yt(i,n=>{if(!n._hasChildren)if(r=Kt(t,n,s),r&&!n._head)n.cancel(),vt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?te(t,n,s):n._hasChildren=!1},!0),z(i.iterationDuration)||(i.iterationDuration=e)}else r=Kt(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},ee=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),se=t=>t._cancelled?(t._hasChildren?yt(t,se):yt(t,t=>{t._composition!==r.none&&Qt(t,jt(t.target,t.property))}),t._cancelled=0,t):t;let ie=0;const re=(t,e)=>t._priority>e._priority;class ne extends Vt{constructor(t={},e=null,s=0){super(0),++ie;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:l,loopDelay:h,autoplay:c,frameRate:u,playbackRate:p,priority:m,onComplete:f,onLoop:g,onPause:v,onBegin:b,onBeforeUpdate:_,onUpdate:T}=t;D.current&&D.current.register(this);const x=e?0:Yt._lastTickTime,w=e?e.defaults:A.defaults,S=O(r)||z(r)?w.delay:+r,$=O(n)||z(n)?1/0:+n,C=xt(l,w.loop),E=xt(h,w.loopDelay);let k=!0===C||C===1/0||C<0?1/0:C+1,N=0;e?N=s:(Yt.reqId||Yt.requestTick(B()),N=(Yt._lastTickTime-Yt._startTime)*A.timeScale),this.id=z(i)?ie:i,this.parent=e,this.duration=pt(($+E)*k-E)||d,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=b||w.onBegin,this.onBeforeUpdate=_||w.onBeforeUpdate,this.onUpdate=T||w.onUpdate,this.onLoop=g||w.onLoop,this.onPause=v||w.onPause,this.onComplete=f||w.onComplete,this.iterationDuration=$,this.iterationCount=k,this._autoplay=!e&&xt(c,w.autoplay),this._offset=N,this._delay=S,this._loopDelay=E,this._iterationTime=0,this._currentIteration=0,this._resolve=y,this._running=!1,this._reversed=+xt(o,w.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=xt(a,w.alternate),this._prev=null,this._next=null,this._lastTickTime=x,this._startTime=x,this._lastTime=x,this._fps=xt(u,w.frameRate),this._speed=xt(p,w.playbackRate),this._priority=+xt(m,1)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return ht(dt(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 ht(dt(this._iterationTime,A.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ht(dt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ht(dt(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*ht(+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 se(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Lt(this,0,1,~~t,2),ee(this),this._hasChildren&&yt(this,ee),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Lt(this,this.duration,1,~~t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!z(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Yt._speed);return this._startTime=B()-(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?Lt(this,d,0,0,2):(this._running||(bt(Yt,this,re),Yt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Yt.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){se(this),this.completed=!1;const i=this.paused;return this.paused=!0,Lt(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?it(c/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?yt(this,t=>t.cancel(),!0):yt(this,Jt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=mt(t);if(e===s)return this;const i=t/e,r=t<=d;return this.duration=r?d:s,this.iterationDuration=r?d:mt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Lt(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(t=0){return this.seek(this.duration,t).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 oe(t){const e=V(t)?D.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function ae(t){if(H(t))return[];if(!e)return P(t)&&t.flat(1/0)||[t];if(P(t)){const e=t.flat(1/0),s=[];for(let t=0,i=e.length;t<i;t++){const i=e[t];if(!H(i)){const t=oe(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!H(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=oe(t);return s?Array.from(s):[t]}function le(t){const e=ae(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=X(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[l]={})}}return e}const he={deg:1,rad:180/at,turn:360},de={},ce=(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,l=de[a];if(z(l)||r){let r;if(n in he)r=o*he[n]/he[s];else{const e=100,a=t.cloneNode(),l=t.parentNode,h=l&&l!==i?l:i.body;h.appendChild(a);const d=a.style;d.width=e+n;const c=a.offsetWidth||e;d.width=e+s;const u=c/(a.offsetWidth||e);h.removeChild(a),r=u*o}e.n=r,de[a]=r}else e.n=l;return e.t,e.u=s,e},ue=t=>t,pe=(t=1.68)=>e=>Z(e,+t),me={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},fe=at/2,ge=2*at,ye={[p]:pe,Quad:pe(2),Cubic:pe(3),Quart:pe(4),Quint:pe(5),Sine:t=>1-K(t*fe),Circ:t=>1-Q(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=ht(+t,1,10),i=ht(+e,d,2),r=i/ge*rt(1/s),n=ge/i;return t=>0===t||1===t?t:-s*Z(2,-10*(1-t))*J((1-t-r)*n)}},ve=(()=>{const t={linear:ue,none:ue};for(let e in me)for(let s in ye){const i=ye[s],r=me[e];t[e+s]=s===p||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),be={linear:ue,none:ue},_e=t=>{if(be[t])return be[t];if(t.indexOf("(")<=-1){const e=me[t]||t.includes("Back")||t.includes("Elastic")?ve[t]():ve[t];return e?be[t]=e:ue}{const e=t.slice(0,-1).split("("),s=ve[e[0]];return s?be[t]=s(...e[1].split(",")):ue}},Te=["steps(","irregular(","linear(","cubicBezier("],xe=t=>{if(V(t))for(let e=0,s=Te.length;e<s;e++)if(L(t,Te[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}\``),ue;return O(t)?t:V(t)?_e(t):ue},we={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},$e={},Ce={func:null},Ee={func:null},ke=[null],Ne=[null,null],De={to:null};let Ae,Ie,Re=0,Le=0;class Be extends ne{constructor(t,e,s,i,n=!1,o=0,a){super(e,s,i),++Le;const l=le(t),h=l.length,c=e.keyframes,p=c?gt(((t,e)=>{const s={};if(P(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(q);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];q(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=xt(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(q(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}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,{id:m,delay:f,duration:g,ease:y,playbackEase:v,modifier:b,composition:_,onRender:T}=p,x=s?s.defaults:A.defaults,w=xt(y,x.ease),S=xt(v,x.playbackEase),$=S?xe(S):null,C=!z(w.ease),E=C?w.ease:xt(y,$?"linear":x.ease),k=C?w.settlingDuration:xt(g,x.duration),N=xt(f,x.delay),D=b||x.modifier,I=z(_)&&h>=u?r.none:z(_)?x.composition:_,R=this._offset+(s?s._offset:0);C&&(w.parent=this);let L=NaN,B=NaN,X=0,Y=0;for(let t=0;t<h;t++){const e=l[t],i=o||t,h=a||l;let c=NaN,u=NaN;for(let t in p)if(q(t)){const o=St(e,t),a=Pt(t,e,o);let l=p[t];const m=P(l);if(n&&!m&&(Ne[0]=l,Ne[1]=l,l=Ne),m){const t=l.length,e=!F(l[0]);2===t&&e?(De.to=l,ke[0]=De,Ae=ke):t>2&&e?(Ae=[],l.forEach((t,e)=>{e?1===e?(Ne[1]=t,Ae.push(Ne)):Ae.push(t):Ne[0]=t})):Ae=l}else ke[0]=l,Ae=ke;let f=null,g=null,y=NaN,v=0,b=0;for(let t=Ae.length;b<t;b++){const n=Ae[b];F(n)?Ie=n:(De.to=n,Ie=De),Ce.func=null,Ee.func=null;const l=wt(xt(Ie.composition,I),e,i,h,null,null),c=M(l)?l:r[l];f||c===r.none||(f=jt(e,a));const u=f?f._tail:null,p=s&&u&&u.parent.parent===s?u:g,m=wt(Ie.to,e,i,h,Ce,p);let _;F(m)&&!z(m.to)?(Ie=m,_=m.to):_=m;const T=wt(Ie.from,e,i,h,null,p),x=Ie.ease||E,w=wt(x,e,i,h,null,p),S=O(w)||V(w)?w:x,$=!z(S)&&!z(S.ease),C=$?S.ease:S,A=$?S.settlingDuration:wt(xt(Ie.duration,t>1?wt(k,e,i,h,null,p)/t:k),e,i,h,null,p),L=wt(xt(Ie.delay,b?0:N),e,i,h,null,p),B=Ie.modifier||D,W=!z(T),U=!z(_),q=P(_),j=q||W&&U,G=g?v+L:L,Z=dt(R+G,12);Y||!W&&!q||(Y=1);let Q=g;if(c!==r.none){let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=Z;)if(Q=t,t=t._nextRep,t&&t._absoluteStartTime>=Z)for(;t;)Zt(t),t=t._nextRep}if(j){kt(q?wt(_[0],e,i,h,Ee,p):T,we),kt(q?wt(_[1],e,i,h,Ce,p):_,Se);const t=Ct(e,a,o,$e);0===we.t&&(Q?1===Q._valueType&&(we.t=1,we.u=Q._unit):(kt(t,Dt),1===Dt.t&&(we.t=1,we.u=Dt.u)))}else U?kt(_,Se):g?Nt(g,Se):kt(s&&Q&&Q.parent.parent===s?Q._value:Ct(e,a,o,$e),Se),W?kt(T,we):g?Nt(g,we):kt(s&&Q&&Q.parent.parent===s?Q._value:Ct(e,a,o,$e),we);if(we.o&&(we.n=Et(Q?Q._toNumber:kt(Ct(e,a,o,$e),Dt).n,we.n,we.o)),Se.o&&(Se.n=Et(we.n,Se.n,Se.o)),we.t!==Se.t)if(3===we.t||3===Se.t){const t=3===we.t?we:Se,e=3===we.t?Se:we;e.t=3,e.s=ft(t.s),e.d=t.d.map(()=>e.n)}else if(1===we.t||1===Se.t){const t=1===we.t?we:Se,e=1===we.t?Se:we;e.t=1,e.u=t.u}else if(2===we.t||2===Se.t){const t=2===we.t?we:Se,e=2===we.t?Se:we;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(we.u!==Se.u){let t=Se.u?we:Se;t=ce(e,t,Se.u?Se.u:we.u,!1)}if(Se.d&&we.d&&Se.d.length!==we.d.length){const t=we.d.length>Se.d.length?we:Se,e=t===we?Se:we;e.d=t.d.map((t,s)=>z(e.d[s])?0:e.d[s]),e.s=ft(t.s)}const J=dt(+A||d,12);let K=$e[a];H(K)||($e[a]=null);const tt={parent:this,id:Re++,property:a,target:e,_value:null,_toFunc:Ce.func,_fromFunc:Ee.func,_ease:xe(C),_fromNumbers:ft(we.d),_toNumbers:ft(Se.d),_strings:ft(Se.s),_fromNumber:we.n,_toNumber:Se.n,_numbers:ft(we.d),_number:we.n,_unit:Se.u,_modifier:B,_currentTime:0,_startTime:G,_delay:+L,_updateDuration:J,_changeDuration:J,_absoluteStartTime:Z,_tweenType:o,_valueType:Se.t,_composition:c,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:K,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};c!==r.none&&Qt(tt,f);const et=tt._valueType;tt._value=3===et?It(tt,1,-1):2===et?At(tt,1,-1):1===et?`${B(tt._toNumber)}${tt._unit}`:B(tt._toNumber),isNaN(y)&&(y=tt._startTime),v=dt(G+J,12),g=tt,X++,bt(this,tt)}(isNaN(B)||y<B)&&(B=y),(isNaN(L)||v>L)&&(L=v),3===o&&(c=X-b,u=X)}if(!isNaN(c)){let t=0;yt(this,e=>{t>=c&&t<u&&(e._renderTransforms=1,e._composition===r.blend&&yt(Ot.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}h||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),B?(yt(this,t=>{t._startTime-t._delay||(t._delay-=B),t._startTime-=B}),L-=B):B=0,L||(L=d,this.iterationCount=0),this.targets=l,this.id=z(m)?Le:m,this.duration=L===d?d:pt((L+this._loopDelay)*this.iterationCount-this._loopDelay)||d,this.onRender=T||x.onRender,this._ease=$,this._delay=B,this.iterationDuration=L,!this._autoplay&&Y&&this.onRender(this)}stretch(t){const e=this.duration;if(e===mt(t))return this;const s=t/e;return yt(this,t=>{t._updateDuration=mt(t._updateDuration*s),t._changeDuration=mt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return yt(this,t=>{const e=t._toFunc,s=t._fromFunc;(e||s)&&(s?(kt(s(),we),we.u!==t._unit&&t.target[o]&&ce(t.target,we,t._unit,!0),t._fromNumbers=ft(we.d),t._fromNumber=we.n):e&&(kt(Ct(t.target,t.property,t._tweenType),Dt),t._fromNumbers=ft(Dt.d),t._fromNumber=Dt.n),e&&(kt(e(),Se),t._toNumbers=ft(Se.d),t._strings=ft(Se.s),t._toNumber=Se.o?Et(t._fromNumber,Se.n,Se.o):Se.n))}),this.duration===d&&this.restart(),this}revert(){return super.revert(),Ft(this)}then(t){return super.then(t)}}const Pe=(t,e)=>{let s=t.iterationDuration;if(s===d&&(s=0),z(e))return s;if(M(+e))return+e;const i=e,r=t?t.labels:null,n=!H(r),o=((t,e)=>{if(L(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!z(o),l=E.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h:s,c=+e[1];return Et(d,c,t[0])}return a?o:n?z(r[i])?s:r[i]:s};function Fe(t,e,s,i,r,n){const o=M(t.duration)&&t.duration<=d?s-d:s;e.composition&&Lt(e,o,1,1,1);const a=i?new Be(i,t,e,o,!1,r,n):new ne(t,e,o);return e.composition&&a.init(!0),bt(e,a),yt(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=function(t){return pt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||d}(e),e}let Me=0;class Ve extends ne{constructor(t={}){super(t,null,0),++Me,this.id=z(t.id)?Me:t.id,this.duration=0,this.labels={};const e=t.defaults,s=A.defaults;this.defaults=e?gt(e,s):s,this.composition=xt(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=xt(t.playbackEase,s.playbackEase);this._ease=i?xe(i):null,this.iterationDuration=0}add(t,e,s){const i=F(e),r=F(t);if(i||r){if(this._hasChildren=!0,i){const i=e,r=A.editor&&A.editor.addTimelineChild,n=s&&"Stagger"===s.type&&A.editor,o=O(s)?s:null;if(o||n){const e=ae(t),n=this.duration,a=this.iterationDuration,l=i.id;let h=0;const d=e.length,c=r?r(t,i,this.id,s,d):null,u=o||A.editor.resolveStagger(s.defaultValue);e.forEach(t=>{const s={...c||i};this.duration=n,this.iterationDuration=a,z(l)||(s.id=l+"-"+h),Fe(s,this,Pe(this,u(t,h,e,null,this)),t,h,e),h++})}else{const e=r?r(t,i,this.id,s):i,n=s&&s.type?s.defaultValue:s;Fe(e,this,Pe(this,n),t)}}else Fe(t,this,Pe(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(z(t)||t&&z(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return z(t)||z(t.persist)||(t.persist=!0),this.add(t,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return z(e)?this:(e.duration=d,e.composition=r.replace,this.add(t,e,s))}call(t,e){return z(t)||t&&!O(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return z(t)||t&&!V(t)||(this.labels[t]=Pe(this,e)),this}remove(t,e){return te(ae(t),this,e),this}stretch(t){const e=this.duration;if(e===mt(t))return this;const s=t/e,i=this.labels;yt(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return yt(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),yt(this,t=>t.revert,!0),Ft(this)}then(t){return super.then(t)}}const Oe=t=>A.editor?A.editor.addTimeline(t):new Ve(t).init();class ze{constructor(t,e){D.current&&D.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,!z(t)&&!z(e)){for(let t in e){const s=e[t];q(t)?o[t]=s:L(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=F(s);let a={},l="+=0";if(n){const t=s.unit;V(t)&&(l+=t)}else a.duration=s;a[e]=n?gt({to:l},s):l;const h=gt(i,a);h.composition=r.replace,h.autoplay=!1;const d=this.animations[e]=new Be(t,h,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(z(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return yt(d,e=>{if(P(t))for(let s=0,i=t.length;s<i;s++)z(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;z(s)||(e._ease=xe(s)),e._currentTime=0}),z(e)||d.stretch(e),d.reset(!0).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 He=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var Xe=Object.freeze({__proto__:null,clamp:ht,damp:(t,e,s,i)=>i?1===i?e:ut(t,e,1-Math.exp(-i*s*.1)):t,degToRad:t=>t*Math.PI/180,lerp:ut,mapRange:He,padEnd:(t,e,s)=>`${t}`.padEnd(e,s),padStart:(t,e,s)=>`${t}`.padStart(e,s),radToDeg:t=>180*t/Math.PI,round:dt,roundPad:(t,e)=>(+t).toFixed(e),snap:ct,wrap:(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e});const Ye=10*u;class We{constructor(t={}){const e=!z(t.bounce)||!z(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/u,this.maxIterations=this.maxDuration/this.timeStep/u,this.bn=ht(xt(t.bounce,.5),-1,1),this.pd=ht(xt(t.duration,628),10*A.timeScale,Ye*A.timeScale),this.m=ht(xt(t.mass,1),1,Ye),this.s=ht(xt(t.stiffness,100),d,Ye),this.d=ht(xt(t.damping,10),d,Ye),this.v=ht(xt(t.velocity,0),-1e4,Ye),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?et(-n*e*s)*(1*K(i*n)+r*J(i*n)):1===e?(1+r*n)*et(-n*s):((1+r)*et((-e*s+i)*n)+(1-r)*et((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===A.timeScale?this.pd/u:this.pd;this.m=1,this.v=0,this.s=Z(2*at/t,2),this.bn>=0?this.d=4*(1-this.bn)*at/t:this.d=4*at/(t*(1+this.bn)),this.s=dt(ht(this.s,d,Ye),3),this.d=dt(ht(this.d,d,300),3)}calculateBDFromSD(){const t=2*at/Q(this.s);this.pd=t*(1===A.timeScale?u:1);const e=this.d/(2*Q(this.s));this.bn=e<=1?1-this.d*t/(4*at):4*at/(this.d*t)-1,this.bn=dt(ht(this.bn,-1,1),3),this.pd=dt(ht(this.pd,10*A.timeScale,Ye*A.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=ht(Q(o/r),d,u),h=this.zeta=n/(2*Q(o*r));h<1?(this.wd=l*Q(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*Q(h*h-1),this.b=(h*l-a)/this.wd);let c=0,p=0,m=0;for(;p<=t&&m<=e;)tt(1-this.solve(c))<s?p++:p=0,this.solverDuration=c,c+=i,m++;this.settlingDuration=dt(this.solverDuration*u,0)*A.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=ht(xt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=ht(xt(t,1),10*A.timeScale,Ye*A.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ht(xt(t,100),d,Ye),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ht(xt(t,10),d,Ye),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ht(xt(t,1),1,Ye),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ht(xt(t,0),-1e4,Ye),this.compute()}}const Ue=t=>new We(t),qe=t=>(console.warn("createSpring() is deprecated use spring() instead"),new We(t)),je={_head:null,_tail:null},Ge=(t,e,s)=>{let i,r=je._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),vt(je,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},Ze=(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),Ge(e,s),bt(je,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>Ge(e,s,t);return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Qe(t,e,s){const i=le(t);if(!i.length)return;const[r]=i,n=St(r,e),o=Pt(e,r,n);let a=Ct(r,o);if(z(s))return a;if(kt(a,Dt),0===Dt.t||1===Dt.t){if(!1===s)return Dt.n;{const t=ce(r,Dt,s,!1);return`${dt(t.n,A.precision)}${t.u}`}}}const Je=(t,e)=>{if(!z(e))return e.duration=d,e.composition=xt(e.composition,r.none),new Be(t,e,null,0,!0).resume()},Ke=(t,e,s)=>{const i=ae(t);for(let t=0,r=i.length;t<r;t++)Ge(i[t],s,e&&e.controlAnimation&&e);return te(i,e,s),i},ts=t=>{t.cancelable&&t.preventDefault()};class es{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 ss{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 is=(t,e)=>t&&O(t)?t(e):t;let rs=0;class ns{constructor(t,e={}){if(!t)return;D.current&&D.current.register(this);const r=e.x,n=e.y,o=e.trigger,a=e.modifier,l=e.releaseEase,h=l&&xe(l),d=!z(l)&&!z(l.ease),u=F(r)&&!z(r.mapTo)?r.mapTo:"translateX",p=F(n)&&!z(n.mapTo)?n.mapTo:"translateY",m=is(e.container,this);this.containerArray=P(m)?m:null,this.$container=m&&!this.containerArray?ae(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=F(t)?new es(t):ae(t)[0],this.$trigger=ae(o||t)[0],this.fixed="fixed"===Qe(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=d?l:Ue({mass:xt(e.releaseMass,1),stiffness:xt(e.releaseStiffness,80),damping:xt(e.releaseDamping,20)}),this.releaseYSpring=d?l:Ue({mass:xt(e.releaseMass,1),stiffness:xt(e.releaseStiffness,80),damping:xt(e.releaseDamping,20)}),this.releaseEase=h||ve.outQuint,this.hasReleaseSpring=d,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),z(r)||!0===r)f[u]=0;else if(F(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===r&&(f[u]=0,this.disabled[0]=1);if(z(n)||!0===n)f[p]=0;else if(F(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 ze(this.$target,f),this.xProp=u,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=[-c,c,c,-c],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=B(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new ss(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ne({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 ne({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!z(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]?u: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=ot(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 ne({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),F(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=B(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=dt(ht(Q(t*t+e*e)/r*o,a,l),5);const d=nt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=dt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=ct(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=dt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=ct(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return dt(this.animate[this.xProp](),A.precision)}set x(t){this.setX(t,!1)}get y(){return dt(this.animate[this.yProp](),A.precision)}set y(t){this.setY(t,!1)}get progressX(){return He(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(He(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return He(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(He(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=dt(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=dt(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,l=this.window[1]=s.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?ht(d,a,d):d,this.scrollView[1]=h?ht(c,l,c):c,this.updateScrollCoords();const{width:v,height:b,left:_,top:T,right:x,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=dt(h?ht(v,a,a):v,0),this.dragArea[3]=dt(h?ht(b,l,l):b,0);const S=Qe(t,"overflow"),$="visible"===S,C="hidden"===S;if(this.canScroll=!u&&this.contained&&(t===i.body&&$||!C&&!$)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!P(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?h?0:t.scrollLeft:0,o=i?h?0:t.scrollTop:0,d=i?this.scrollView[0]-n-v:0,c=i?this.scrollView[1]-o-b:0;this.targetBounds[0]=dt(r.top+s-(h?0:T),0),this.targetBounds[1]=dt(r.right+e-(h?a:x),0),this.targetBounds[2]=dt(r.bottom+s-(h?l:w),0),this.targetBounds[3]=dt(r.left+e-(h?0:_),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]=-dt(r.top-(u?ht(T,0,l):T)+o-m,0),this.containerBounds[1]=-dt(r.right-(u?ht(x,0,a):x)-d+f,0),this.containerBounds[2]=-dt(r.bottom-(u?ht(w,0,l):w)-c+g,0),this.containerBounds[3]=-dt(r.left-(u?ht(_,0,a):_)+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,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,e=t.x,r=t.y,n=is(t.container,this),o=is(t.containerPadding,this)||0,a=P(o)?o:[o,o,o,o],l=this.x,h=this.y,d=is(t.cursor,this),c={onHover:"grab",onGrab:"grabbing"};if(d){const{onHover:t,onGrab:e}=d;t&&(c.onHover=t),e&&(c.onGrab=e)}const u=is(t.dragThreshold,this),p={mouse:3,touch:7};if(M(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;z(t)||(p.mouse=t),z(e)||(p.touch=e)}this.containerArray=P(n)?n:null,this.$container=n&&!this.containerArray?ae(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=xt(a,[0,0,0,0]),this.containerFriction=ht(xt(is(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ht(xt(is(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=is(F(e)&&!z(e.snap)?e.snap:t.snap,this),this.snapY=is(F(r)&&!z(r.snap)?r.snap:t.snap,this),this.scrollSpeed=xt(is(t.scrollSpeed,this),1.5),this.scrollThreshold=xt(is(t.scrollThreshold,this),20),this.dragSpeed=xt(is(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=xt(is(t.minVelocity,this),0),this.maxVelocity=xt(is(t.maxVelocity,this),50),this.velocityMultiplier=xt(is(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(ht(l,y,f),!0),this.setY(ht(h,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],l=this.scroll.x,h=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?ht(d,this.window[0],d):d,p=this.useWin?ht(c,this.window[1],c):c,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,b]=this.coords,[_,T,x,w]=this.scrollBounds,S=dt(ht((b-_+t)/y,-1,0)*g,0),$=dt(ht((v-T-e)/y,0,1)*g,0),C=dt(ht((b-x-s)/y,0,1)*g,0),E=dt(ht((v-w+i)/y,-1,0)*g,0);if(S||C||E||$){const[t,e]=this.disabled;let s=l,i=h;t||(s=dt(ht(l+(E||$),0,r-o),0),this.coords[0]-=l-s),e||(i=dt(ht(h+(S||C),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[d,c]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(d>e?e+(d-e)*m:d<i?i+(d-i)*m:d,!1),this.setY(c>s?s+(c-s)*m:c<t?t+(c-t)*m:c,!1),this.computeVelocity(r-l,n-h),this.angle=ot(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 te([this],null,"x"),te([this],null,"y"),te([this],null,"progressX"),te([this],null,"progressY"),te([this.scroll]),te([this.overshootCoords]),this}scrollInView(t,e=0,s=ve.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[l,h,d,u]=o,p=dt(ht(r-l,-c,0),0),m=dt(ht(i-h,0,c),0),f=dt(ht(r-d,0,c),0),g=dt(ht(i-u,-c,0),0);new Be(n,{x:dt(n.x+(g?g-e:m?m+e:0),0),y:dt(n.y+(p?p-e:f?f+e:0),0),duration:z(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=Je(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=ve.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,l]=this.containerPadding,h=this.scroll.y-this.targetBounds[0]+n+e,d=this.scroll.x-this.targetBounds[1]-o-e,c=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+l+e,p=this.isOutOfBounds([h,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=ht(ct(i,this.snapX),u,d),a=ht(ct(r,this.snapY),h,c),l=z(t)?350*A.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,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),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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=Qe(this.$target,"zIndex",!1);rs=(f>rs?f:rs)+1,this.targetStyles=Je(this.$target,{zIndex:rs}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Je(i.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,ve.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 l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=Qe(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&a<0||d&&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):(ts(t),this.triggerStyles||(this.triggerStyles=Je(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",ts,{passive:!1}),this.$trigger.addEventListener("touchmove",ts,{passive:!1}),this.$trigger.addEventListener("touchend",ts),(this.dragged||!this.disabled[0]&&tt(o)>this.dragThreshold||!this.disabled[1]&&tt(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,l,h]=this.pointer,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,v=this.releaseEase,b=this.hasReleaseSpring,_=this.overshootCoords,T=this.x,x=this.y,w=this.computeVelocity(s-l,n-h),S=this.angle=ot(n-a,s-o),$=150*w,C=(1-this.releaseContainerFriction)*this.dragSpeed,E=T+K(S)*$,k=x+J(S)*$,N=E>c?c+(E-c)*C:E<p?p+(E-p)*C:E,D=k>u?u+(k-u)*C:k<d?d+(k-d)*C:k,I=this.destX=ht(dt(ct(N,this.snapX),5),p,c),R=this.destY=ht(dt(ct(D,this.snapY),5),d,u),L=this.isOutOfBounds(this.containerBounds,E,k);let B=0,P=0,F=v,M=v,V=0;if(_.x=T,_.y=x,!t){const t=I===c?T>c?-1:1:T<p?-1:1,s=dt(T-I,0);g.velocity=e&&b?s?$*t/tt(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=g;B=T===I?0:b?r:r-n*A.timeScale,b&&(F=i),B>V&&(V=B)}if(!e){const e=R===u?x>u?-1:1:x<d?-1:1,s=dt(x-R,0);y.velocity=t&&b?s?$*e/tt(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=y;P=x===R?0:b?r:r-n*A.timeScale,b&&(M=i),P>V&&(V=P)}if(!b&&L&&C&&(B||P)){const t=r.blend;new Be(_,{x:{to:N,duration:.65*B},y:{to:D,duration:.65*P},ease:v,composition:t}).init(),new Be(_,{x:{to:I,duration:B},y:{to:R,duration:P},ease:v,composition:t}).init(),this.overshootTicker.stretch(nt(B,P)).restart()}else t||this.animate[this.xProp](I,B,F),e||this.animate[this.yProp](R,P,M);this.scrollInView(V,this.scrollThreshold,v);let O=!1;I!==m&&(this.snapped[0]=I,this.snapX&&(O=!0)),R!==f&&this.snapY&&(this.snapped[1]=R,this.snapY&&(O=!0)),O&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",ts),this.$trigger.removeEventListener("touchmove",ts),this.$trigger.removeEventListener("touchend",ts),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=Je(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":ts(t)}}}const os=(t=y)=>new ne({duration:1*A.timeScale,onComplete:t},null,0).resume(),as=t=>{let e;return(...s)=>{let i,r,n,o,a;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,a=e._startTime,e.revert());const l=t(...s);return l&&!O(l)&&l.revert&&(e=l),z(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r,e._startTime=a),l||y}};class ls{constructor(t={}){D.current&&D.current.register(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||ae(e)[0]||i);const n=t.defaults,o=A.defaults,a=t.mediaQueries;if(this.defaults=n?gt(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=D.current,s=D.root,i=A.defaults;D.current=this,D.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 D.current=e,D.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);O(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,O(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);O(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,O(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);O(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(O(s))return s(this);const i=as(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,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](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 hs=(t,e)=>t&&O(t)?t(e):t,ds=new Map;class cs{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 ne({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;yt(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ne({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=dt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ne({autoplay:!1,duration:250*A.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ne({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=dt(t?s.scrollX:e.scrollLeft,0),this.scrollY=dt(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(){yt(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),yt(this,t=>{t.refresh(),t.onResize(t),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),ds.delete(this.element)}}const us=(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:l,u:h}=kt(a,Dt);let d=l;return"%"===h?d=l/100*s:h&&(d=ce(t,Dt,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},ps=(t,e,s,i,r)=>{let n;if(V(e)){const o=E.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=us(t,h[0],s,i,r),p=us(t,h[1],s,i,r);if(d){const e=Et(us(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=Et(us(t,"max",s),p,l);n=e>u?u:e}else n=Et(u,p,l)}else n=us(t,e,s,i,r)}else n=e;return dt(n,0)},ms=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 fs=0;const gs=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class ys{constructor(t={}){D.current&&D.current.register(this);const e=xt(t.sync,"play pause"),s=e?xe(e):null,r=e&&("linear"===e||e===ue),n=e&&!(s===ue&&!r),o=e&&(M(e)||!0===e||r),a=e&&V(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=fs++,this.id=z(t.id)?this.index:t.id,this.container=(t=>{const e=t&&ae(t)[0]||i.body;let s=ds.get(e);return s||(s=new cs(e),ds.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||!!l,this.syncEase=n?s:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:y,this.onSyncLeave=l&&!h&&l[1]?l[1]:y,this.onSyncEnterForward=l&&h&&l[0]?l[0]:y,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:y,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:y,this.onSyncLeaveBackward=l&&h&&l[3]?l[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.onResize=t.onResize||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=xt(t.debug,!1),this._next=null,this._prev=null,bt(this.container,this),os(()=>{if(!this.reverted){if(!this.target){const e=ae(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,z(t)||z(t.persist)||(t.persist=!0),!this._params.target)){let e;z(t.targets)?yt(t,t=>{t.targets&&!e&&(e=ms(t))}):e=ms(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:dt(ht(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=xt(hs(t.repeat,this),!0),this.horizontal="x"===xt(hs(t.axis,this),"y"),this.enter=xt(hs(t.enter,this),"end start"),this.leave=xt(hs(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=gs[this.index%gs.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?t.winHeight:t.height,c=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,v=e?60:g,b=e?v:y,_=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",x=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?c: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?h:g,e?g:d)}`,s||(n.style.cssText+=`background:\n ${x("#FFFF")}${T(g-10)} / 100px 100px ${_},\n ${x("#FFF8")}${T(g-10)} / 10px 10px ${_};\n `),o.style.cssText=`${w("relative",0,0,e?c:g,e?g:u)}`,s||(o.style.cssText+=`background:\n ${x("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${_},\n ${x("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${_};\n `);const S=[" enter: "," leave: "];this.coords.forEach((t,s)=>{const r=s>1,l=(r?0:this.offset)+t,m=s%2,f=l<b,g=l>(r?e?h:d:e?c:u)-b,_=(r?m&&!f:!m&&!f)||g,T=i.createElement("div"),x=i.createElement("div"),$=e?_?"right":"left":_?"bottom":"top",C=_?(e?v:y)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;x.innerHTML=`${this.id}${S[m]}${this.thresholds[s]}`,T.style.cssText=`${w("absolute",0,0,v,y)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${_?"end":"start"};\n border-${$}: 2px solid ${a};\n `,x.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${y};\n margin-${e?_?"right":"left":_?"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&&_||!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?_?"top-left":"top-right":_?"top-left":"bottom-left"}-radius: 5px;\n border-${e?_?"bottom-left":"bottom-right":_?"top-right":"bottom-right"}-radius: 5px;\n `,T.appendChild(x);let E=l-C+(e?1:0);T.style[e?"left":"top"]=`${E}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Qe(t.element,"position")&&(this.debugStyles=Je(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&&a!==s.element&&a!==i.body;){const e="sticky"===Qe(a,"position")&&Je(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=s.scale,d=(r?l.left+s.scrollX-s.left:l.top+s.scrollY-s.top)*h,c=(r?l.width:l.height)*h,u=r?s.width:s.height,p=(r?s.scrollWidth:s.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",v="end",b="start";if(V(m)){const t=m.split(" ");v=t[0],g=t.length>1?t[1]:g}else if(F(m)){const t=m;z(t.container)||(v=t.container),z(t.target)||(g=t.target)}else M(m)&&(v=m);if(V(f)){const t=f.split(" ");b=t[0],y=t.length>1?t[1]:y}else if(F(f)){const t=f;z(t.container)||(b=t.container),z(t.target)||(y=t.target)}else M(f)&&(b=f);const _=ps(e,g,c),T=ps(e,y,c),x=_+d-u,w=T+d-p,S=ps(e,v,u,x,w),$=ps(e,b,u,x,w),C=_+d-S,E=T+d-$,k=E-C;this.offset=d,this.offsetStart=C,this.offsetEnd=E,this.distance=k<=0?0:k,this.thresholds=[g,y,v,b],this.coords=[_,T,S,$],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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,c=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&c,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(l&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&M(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=dt(ut(e,g,ut(.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"}(d&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),this.forceEnter&&this.hasEntered?d&&(this.forceEnter=!1):(p&&d&&(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))),(d||!d&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!d&&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 vt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const vs=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,bs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?ue:r=>0===r||1===r?r:vs(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=vs(r,e,s)-t,i>0?o=r:n=r}while(tt(i)>1e-7&&++a<100);return r})(r,t,s),e,i),_s=(t=10,e)=>{const s=e?st:it;return e=>s(ht(e,0,1)*t)*(1/t)},Ts=(...t)=>{const e=t.length;if(!e)return ue;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=V(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(z(l)?e/s:G(l)/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]}},xs=(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(ht(o,r,1))}return s.push(1),Ts(...s)};var ws=Object.freeze({__proto__:null,Spring:We,createSpring:qe,cubicBezier:bs,eases:ve,irregular:xs,linear:Ts,spring:Ue,steps:_s});const Ss=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(dt(t(i/e),4));return`linear(${s.join(", ")})`},$s={},Cs=t=>{let e=$s[t];if(e)return e;if(e="linear",V(t)){if(L(t,"linear")||L(t,"cubic-")||L(t,"steps")||L(t,"ease"))e=t;else if(L(t,"cubicB"))e=R(t);else{const s=_e(t);O(s)&&(e=s===ue?"linear":Ss(s))}$s[t]=e}else if(O(t)){const s=Ss(t);s&&(e=s)}else t.ease&&(e=Ss(t.ease));return e},Es=["x","y","z"],ks=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...Es],Ns=(()=>[...Es,...f.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let Ds=null;const As=(t,e,s,i,r)=>{let n=V(e)?e:wt(e,s,i,r,null,null);return M(n)?ks.includes(t)||L(t,"translate")?`${n}px`:L(t,"rotate")||L(t,"skew")?`${n}deg`:`${n}`:n},Is=(t,e,s,i,r,n)=>{let o="0";const a=z(i)?getComputedStyle(t)[e]:As(e,i,t,r,n);return o=z(s)?P(i)?i.map(s=>As(e,s,t,r,n)):a:[As(e,s,t,r,n),a],o};class Rs{constructor(t,s){D.current&&D.current.register(this),H(Ds)&&(!e||!z(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(f.forEach(t=>{const e=L(t,"skew"),s=L(t,"scale"),i=L(t,"rotate"),r=L(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{}}),Ds=!0):Ds=!1);const i=le(t);i.length||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const r=xt(s.autoplay,A.defaults.autoplay),n=!(!r||!r.link)&&r,o=s.alternate&&!0===s.alternate,a=s.reversed&&!0===s.reversed,h=xt(s.loop,A.defaults.loop),d=!0===h||h===1/0?1/0:M(h)?h+1:1,c=o?a?"alternate-reverse":"alternate":a?"reverse":"normal",v=1===A.timeScale?1:u;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=!r||!1!==n,this.reversed=a,this.persist=xt(s.persist,A.defaults.persist),this.autoplay=r,this._speed=xt(s.playbackRate,A.defaults.playbackRate),this._resolve=y,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const r=t[l],n=Ns.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},h=xt(s.ease,A.defaults.ease),u=wt(h,t,e,i,null,null),y=O(u)||V(u)?u:h,b=h.ease&&h,_=Cs(y),T=(b?b.settlingDuration:wt(xt(s.duration,A.defaults.duration),t,e,i,null,null))*v,x=wt(xt(s.delay,A.defaults.delay),t,e,i,null,null)*v,w=xt(s.composition,"replace");for(let l in s){if(!q(l))continue;const h={},u={iterations:d,direction:c,fill:"both",easing:_,duration:T,delay:x,composite:w},p=s[l],g=!!n&&(f.includes(l)?l:m.get(l)),y=g?"transform":l;let b;if(a[y]||(a[y]=o[y]),F(p)){const s=p,n=xt(s.ease,_),a=n.ease&&n,d=s.to,c=s.from;if(u.duration=(a?a.settlingDuration:wt(xt(s.duration,T),t,e,i,null,null))*v,u.delay=wt(xt(s.delay,x),t,e,i,null,null)*v,u.composite=xt(s.composition,w),u.easing=Cs(n),b=Is(t,l,c,d,e,i),g?(h[`--${g}`]=b,r[g]=b):h[l]=Is(t,l,c,d,e,i),Ze(this,t,l,h,u),!z(c))if(g){const t=`--${g}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else b=P(p)?p.map(s=>As(l,s,t,e,i)):As(l,p,t,e,i),g?(h[`--${g}`]=b,r[g]=b):h[l]=b,Ze(this,t,l,h,u)}if(n){let t=p;for(let e in r)t+=`${g[e]}var(--${e})) `;o.transform=t}}),n&&this.autoplay.link(this)}forEach(t){try{const e=V(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return 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:u);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"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];z(r)||r===p?s.removeProperty(R(e)):t.style[e]=r}t.getAttribute("style")===p&&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 Ls={animate:(t,e)=>new Rs(t,e),convertEase:Ss};let Bs=0,Ps=0;const Fs=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),Ms=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},Vs=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},Os=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,Ms(s)),i&&!e.has(i)&&e.set(i,Ms(i))},zs=t=>{t.forEach((t,e)=>Vs(e,t)),t.clear()},Hs={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},Xs=t=>{if(!t)return;const e=t.parentNode;e&&(e._head===t&&(e._head=t._next),e._tail===t&&(e._tail=t._prev),t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t._prev=null,t._next=null,t.parentNode=null)},Ys=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+Ps++);const n=i||{};return n.$el=t,n.$measure=t,n.id=r,n.index=0,n.targets=null,n.delay=0,n.duration=0,n.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(t=>n.properties[t]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Ws=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=Fs(n,e),t.measuredInlineTransform=null,t.measuredDisplay=s.display,t.measuredVisibility=s.visibility,t.measuredPosition=p,t.measuredHasDisplayNone="none"===s.display,t.measuredHasVisibilityHidden="hidden"===s.visibility,t.measuredIsVisible=!(t.measuredHasDisplayNone||t.measuredHasVisibilityHidden),t.measuredIsRemoved=t.measuredHasDisplayNone||t.measuredHasVisibilityHidden||u;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=Ms(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=Ms(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let g,y,v=0,b=0,_=0,T=0;if(!i){const t=e.getBoundingClientRect();v=t.left,b=t.top,_=t.width,T=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);z(e)||(a[t]=e)}if(a.left=v,a.top=b,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=v,y=b):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=v-s-r,y=b-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=v-t-l.properties.clientLeft,y=b-e-l.properties.clientTop}else g=v-s-r,y=b-i-n}return a.x=g,a.y=y,a.width=_,a.height=T,t},Us=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},qs=(t,e)=>{const s=wt(e.ease,t.$el,t.index,t.targets,null,null),i=O(s)?s:e.ease,r=!z(i)&&!z(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:wt(e.duration,t.$el,t.index,t.targets,null,null),t.delay=wt(e.delay,t.$el,t.index,t.targets,null,null)},js=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},Gs=t=>{const e=t.$el.style,s=t.inlineStyles;for(let t=0,i=s.length;t<i;t+=2){const i=s[t],r=s[t+1];r&&""!==r?e[i]=r:(e[i]="",e.removeProperty(i))}},Zs=t=>{const e=t.inlineTransforms,s=t.$el.style;!t.hasTransform||!e||t.hasTransform&&"none"===s.transform||e&&"none"===e?s.removeProperty("transform"):e&&(s.transform=e);const i=t.$measure;if(t.hasTransform&&i!==t.$el){const e=i.style,s=t.measuredInlineTransform;s&&""!==s?e.transform=s:e.removeProperty("transform")}t.measuredInlineTransform=null,null!==t.inlineTransition&&(Vs(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(Vs(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Qs=t=>{(t.measuredIsRemoved||t.hasVisibilitySwap)&&(t.$el.style.removeProperty("display"),t.$el.style.removeProperty("visibility"),t.hasVisibilitySwap&&(t.$measure.style.removeProperty("display"),t.$measure.style.removeProperty("visibility"))),t.layout.pendingRemoval.delete(t.$el)},Js=(t,e,s)=>(e.properties={...t.properties},e.state=s,e.isTarget=t.isTarget,e.hasTransform=t.hasTransform,e.inlineTransforms=t.inlineTransforms,e.measuredIsVisible=t.measuredIsVisible,e.measuredDisplay=t.measuredDisplay,e.measuredIsRemoved=t.measuredIsRemoved,e.measuredHasDisplayNone=t.measuredHasDisplayNone,e.measuredHasVisibilityHidden=t.measuredHasVisibilityHidden,e.hasDisplayNone=t.hasDisplayNone,e.isInlined=t.isInlined,e.hasVisibilityHidden=t.hasVisibilityHidden,e);class Ks{constructor(t){this.layout=t,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(t=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}forEach(t,e){let s=t,i=0;for(;s;)if(e(s,i++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(t){this.forEach(this.rootNode,t)}forEachNode(t){for(const e of this.rootNodes)this.forEach(e,t)}registerElement(t,e){if(!t||1!==t.nodeType)return null;this.layout.transitionMuteStore.has(t)||this.layout.transitionMuteStore.set(t,Ms(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||X(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?Hs:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=Fs(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=Fs(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){Ws(u,e,o,n);let t=e.lastElementChild;for(;t;)s.push(t,u),t=t.previousElementSibling;r||(r=u);continue}{let i=e.lastElementChild;for(;i;)s.push(i,t),i=i.previousElementSibling;r||(r=u);continue}}Xs(u),u=Ys(e,t,this,u)}else u=Ys(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!u.measuredHasVisibilityHidden||a&&!u.measuredHasDisplayNone,this.nodes.set(u.id,u),u.parentNode=t||null,u._prev=null,u._next=null,t?(this.rootNodes.delete(u),t._head?(t._tail._next=u,u._prev=t._tail,t._tail=u):(t._head=u,t._tail=u)):this.rootNodes.add(u),Ws(u,u.$el,o,n);let p=e.lastElementChild;for(;p;)s.push(p,u),p=p.previousElementSibling;r||(r=u)}return r}ensureDetachedNode(t,e){if(!t||t===this.layout.root)return null;const s=t.dataset.layoutId,i=s?this.nodes.get(s):null;if(i&&i.$el===t)return i;let r=null,n=t.parentElement;for(;n&&n!==this.layout.root;){if(e.has(n)){r=this.ensureDetachedNode(n,e);break}n=n.parentElement}return this.registerElement(t,r)}record(){const t=this.layout,e=t.children,s=t.root,i=P(e)?e:[e],r=[],n="*"===e?s:D.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=Ms(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=V(e)?n.querySelectorAll(e):e}const l=le(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0;const u=[];this.nodes.forEach(t=>{u.push(t.$el)}),this.nodes.forEach((t,e)=>{t.index=c++,t.targets=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!Fs(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(Zs);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),Vs(e,i)}return this}}function ti(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class ei{constructor(t,e={}){D.current&&D.current.register(this);const s=ti(e.swapAt),i=ti(e.enterFrom),r=ti(e.leaveTo),n=e.properties;if(e.duration=xt(e.duration,350),e.delay=xt(e.delay,0),e.ease=xt(e.ease,"inOut(3.5)"),this.params=e,this.root=le(t)[0],this.id=e.id||Bs++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=gt(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])this.properties.add(t);if(n)for(let t=0,e=n.length;t<e;t++)this.properties.add(n[t]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(t=>this.recordedProperties.add(t)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Ks(this),this.newState=new Ks(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),zs(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>zs(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(Gs),this}animate(t={}){const e={ease:xt(t.ease,this.params.ease),delay:xt(t.delay,this.params.delay),duration:xt(t.duration,this.params.duration)},s={id:this.id},i=xt(t.onComplete,this.params.onComplete),r=xt(t.onPause,this.params.onPause);for(let e in N)"ease"!==e&&"duration"!==e&&"delay"!==e&&(z(t[e])?z(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{const e=t.autoplay,s=A.editor;if(e&&e.linked||s&&s.showPanel)i&&i(this.timeline);else{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Qs(t),Gs(t)});for(let t=0,e=w.length;t<e;t++){const e=w[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||zs(this.transitionMuteStore)})}},s.onPause=()=>{const e=t.autoplay;if(e&&e.linked)return i&&i(this.timeline),void(r&&r(this.timeline));this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Qs),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=gt(gt(t.swapAt||{},this.swapAtParams),e),o=gt(gt(t.enterFrom||{},this.enterFromParams),e),a=gt(gt(t.leaveTo||{},this.leaveToParams),e),[l,h]=ti(n),[d,c]=ti(o),[u,p]=ti(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,v=this.entering,b=this.leaving,_=this.pendingRemoval;g.length=y.length=v.length=b.length=0,m.forEachRootNode(Os),f.record(),f.forEachRootNode(js);const T=[],x=[],w=[],S=[],$=f.rootNode,C=$.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=Js(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(Js(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const w=_.has(e),S=a.measuredIsVisible,C=t.measuredIsVisible,E=!S&&C&&!o,k=!x&&(y||w)&&!r,N=x&&!y&&!n,D=N||x&&w&&!n;t.branchAdded=r||k,t.branchRemoved=n||D,t.branchNotRendered=o||x,x&&S&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",Js(a,t,f)),N?(t.isTarget&&(b.push(e),t.isLeaving=!0),_.add(e)):!x&&w&&_.delete(e),k&&!o||E?(Us(a,d),t.isTarget&&(v.push(e),t.isEntering=!0)):D&&!o&&Us(t,u),t===$||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let E=0,k=0,D=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==$&&i;for(;a&&!a.isTarget&&a!==$;)a=a.parentNode;t===$?(t.index=0,t.targets=g,qs(t,e)):t.isEntering?(t.index=a?a.index:E,t.targets=a?g:v,qs(t,c),E++):t.isLeaving?(t.index=a?a.index:k,t.targets=a?g:b,k++,qs(t,p)):t.isTarget?(t.index=D++,t.targets=g,qs(t,e)):(t.index=a?a.index:0,t.targets=g,qs(t,h)),r.index=t.index,r.targets=t.targets;for(let e in n)n[e]=wt(n[e],s,t.index,t.targets,null,null),o[e]=wt(o[e],s,r.index,r.targets,null,null);const d=Math.abs(n.width-o.width)>1,u=Math.abs(n.height-o.height)>1;if(t.sizeChanged=d||u,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,w.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(l.transform&&(t.hasTransform=!0,w.push(s)),S.push(s)))});const I={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=I,this.timeline=Oe(s),!x.length&&!w.length&&!y.length)return zs(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==C||this.absoluteCoords)&&(e.style.position=this.absoluteCoords?"fixed":"absolute",e.style.left="0px",e.style.top="0px",e.style.marginLeft="0px",e.style.marginTop="0px",e.style.translate=`${n.x}px ${n.y}px`),e===C&&"static"===r.measuredPosition&&(e.style.position="relative",e.style.left="0px",e.style.top="0px")),e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none"}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||r.isInlined||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e),i=s.properties;e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;this.timeline.call(()=>{e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(S.length){const t=xe(f.nodes.get(S[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(S,s,0)}}const R=w.length;if(R){for(let t=0;t<R;t++){const e=w[t],s=f.getNode(e);s.isInlined||(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`),e.style.transform=m.getComputedValue(e,"transform"),S.includes(e)&&(s.ease=wt(n.ease,e,s.index,s.targets,null,null),s.duration=wt(n.duration,e,s.index,s.targets,null,null))}this.transformAnimation=Ls.animate(w,{translate:t=>f.getNode(t).isInlined?"0px 0px":`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!S.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,wt(l.transform,t,i.index,i.targets,null,null),e]},autoplay:!1,...I}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const si=Xe,ii={},ri=t=>(...e)=>{const s=t(...e);return new Proxy(y,{apply:(t,e,[i])=>s(i),get:(t,e)=>{if(ii[e])return ri((...t)=>{const i=ii[e](...t);return t=>i(s(t))})}})},ni=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?ri(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return ii[t]||(ii[t]=i),i},oi=ni("roundPad",si.roundPad),ai=ni("padStart",si.padStart),li=ni("padEnd",si.padEnd),hi=ni("wrap",si.wrap),di=ni("mapRange",si.mapRange),ci=ni("degToRad",si.degToRad),ui=ni("radToDeg",si.radToDeg),pi=ni("snap",si.snap),mi=ni("clamp",si.clamp),fi=ni("round",si.round),gi=ni("lerp",si.lerp,1),yi=ni("damp",si.damp,1),vi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let bi=0;const _i=(t,e=0,s=1,i=0)=>{let r=void 0===t?bi++: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}},Ti=t=>t[vi(0,t.length-1)],xi=t=>{let e,s,i=t.length;for(;i;)s=vi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},wi=(t,e={})=>{let s,i=[],r=0;const n=e.from,o=e.reversed,a=e.ease,l=!z(a),h=l&&!z(a.ease)?a.ease:l?xe(a):null,d=e.grid,c=!0===d,u=e.axis,m=e.total,f=z(n)||0===n||"first"===n,g="center"===n,y="last"===n,v="random"===n,b=P(n),_=P(t),T=e.use,x=G(_?t[0]:t),w=_?G(t[1]):0,S=$.exec((_?t[1]:t)+p),C=e.start||0+(_?x:0);let E=f?0:M(n)?n:0;return(t,a,l,p,f)=>{const[$]=le(t),k=z(m)?l.length:m,N=!z(T)&&(O(T)?T($,a,k):Ct($,T)),D=M(N)||V(N)&&M(+N)?+N:a;if(g&&(E=(k-1)/2),y&&(E=k-1),!i.length){if(c){let t=!0,e=1/0,s=1/0,r=-1/0,o=-1/0;const a=[],h=[];for(let i=0;i<k;i++){const n=l[i];let d=0,c=0,u=!1;if(n&&O(n.getBoundingClientRect)){const t=n.getBoundingClientRect();d=t.left+t.width/2,c=t.top+t.height/2,u=!0}else{const t=n;t&&M(t.x)&&M(t.y)&&(d=t.x,c=t.y,u=!0)}if(!u){t=!1;break}a.push(d),h.push(c),d<e&&(e=d),c<s&&(s=c),d>r&&(r=d),c>o&&(o=c)}if(t){let t=a[0],l=h[0];b?(t=e+n[0]*(r-e),l=s+n[1]*(o-s)):g?(t=(e+r)/2,l=(s+o)/2):y?(t=a[k-1],l=h[k-1]):M(n)&&(t=a[n],l=h[n]);for(let e=0;e<k;e++){const s=t-a[e],r=l-h[e];let n=Q(s*s+r*r);"x"===u&&(n=-s),"y"===u&&(n=-r),i.push(n)}let d=1/0;for(let t=0,e=i.length;t<e;t++){const e=tt(i[t]);e>0&&e<d&&(d=e)}if(d>0&&d<1/0)for(let t=0,e=i.length;t<e;t++)i[t]=i[t]/d}else for(let t=0;t<k;t++)i.push(tt(E-t))}else for(let t=0;t<k;t++)if(d){let e,s;b?(e=n[0]*(d[0]-1),s=n[1]*(d[1]-1)):g?(e=(d[0]-1)/2,s=(d[1]-1)/2):(e=E%d[0],s=it(E/d[0]));const r=e-t%d[0],o=s-it(t/d[0]);let a=Q(r*r+o*o);"x"===u&&(a=-r),"y"===u&&(a=-o),i.push(a)}else i.push(tt(E-t));r=nt(...i),h&&(i=i.map(t=>h(t/r)*r)),o&&(i=i.map(t=>u?t<0?-1*t:-t:tt(r-t))),v&&(i=xi(i))}const A=_?(w-x)/r:x;z(s)&&(s=f?Pe(f,z(e.start)?f.iterationDuration:C):C);let I=s+(A*dt(i[D],2)||0);return e.modifier&&(I=e.modifier(I)),S&&(I=`${I}${S[2]}`),I}};var Si=Object.freeze({__proto__:null,$:le,addChild:bt,clamp:mi,cleanInlineStyles:Mt,createSeededRandom:_i,damp:yi,degToRad:ci,forEachChildren:yt,get:Qe,keepTime:as,lerp:gi,mapRange:di,padEnd:li,padStart:ai,radToDeg:ui,random:vi,randomPick:Ti,remove:Ke,removeChild:vt,round:fi,roundPad:oi,set:Je,shuffle:xi,snap:pi,stagger:wi,sync:os,wrap:hi});const $i=t=>{const e=ae(t)[0];return e&&X(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},Ci=(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)},Ei=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[a],o=t.getCTM(),l=0===s;return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=Ci(t,r,a,-1,l),s=Ci(t,r,a,1,l);return 180*ot(s.y-e.y,s.x-e.x)/at}{const s=Ci(t,r,a,0,l);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}}}},ki=(t,e=0)=>{const s=$i(t);if(s)return{translateX:Ei(s,"x",e),translateY:Ei(s,"y",e),rotate:Ei(s,"a",e)}},Ni=(t,e=0,s=0)=>ae(t).map(t=>((t,e,s)=>{const i=u,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const l=new Proxy(t,{get(t,e){const s=t[e];return e===h?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],l=+s[1],h=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(Q(s.a*s.a+s.b*s.b)+Q(s.c*s.c+s.d*s.d))/2)}return e})(o),d=-1e3*r*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${d}`),t.setAttribute("stroke-dasharray",`${c} ${u}`)}return Reflect.apply(s,t,e)}:O(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),l.setAttribute("draw",`${e} ${s}`)),l})(t,e,s)),Di=(t,e=.33)=>(s,i,r,n)=>{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 o=$i(t);if(!o)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(o.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${o.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const a="path"===s.tagName,l=a?" ":",",h=n?n._value:null;h&&s.setAttribute(a?"d":"points",h);let d="",c="";if(e){const t=s.getTotalLength(),i=o.getTotalLength(),r=Math.max(Math.ceil(t*e),Math.ceil(i*e));for(let e=0;e<r;e++){const n=e/(r-1),h=s.getPointAtLength(t*n),u=o.getPointAtLength(i*n),p=a?0===e?"M":"L":"";d+=p+dt(h.x,3)+l+h.y+" ",c+=p+dt(u.x,3)+l+u.y+" "}}else d=s.getAttribute(a?"d":"points"),c=o.getAttribute(a?"d":"points");return[d,c]};var Ai=Object.freeze({__proto__:null,createDrawable:Ni,createMotionPath:ki,morphTo:Di});const Ii="undefined"!=typeof Intl&&Intl.Segmenter,Ri=/\{value\}/g,Li=/\{i\}/g,Bi=/(\s+)/,Pi=/^\s+$/,Fi="line",Mi="word",Vi="char",Oi="data-line";let zi=null,Hi=null,Xi=null;const Yi=t=>t.isWordLike||" "===t.segment||M(+t.segment),Wi=t=>t.setAttribute("aria-hidden","true"),Ui=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],qi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},ji=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&ji(e)}},Gi=(t,e,s)=>{const i=t.getAttribute(Oi);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&Pi.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&Pi.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)Gi(t.children[r],e,s);return s},Zi=(t,e={})=>{let s="";const i=V(e.class)?` class="${e.class}"`:"",r=xt(e.clone,!1),n=xt(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},Qi=(t,e,s,i,r,n,o,a,l)=>{const h=r===Fi,d=r===Vi,c=`_${r}_`,u=O(t)?t(s):t,p=h?"block":"inline-block";Xi.innerHTML=u.replace(Ri,`<i class="${c}"></i>`).replace(Li,`${d?l:h?o:a}`);const m=Xi.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),v=y.length;if(v){f.style.display=p,g.style.display=p,g.setAttribute(Oi,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=v;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${qi[r]}`),f};class Ji{constructor(t,s={}){zi||(zi=Ii?new Ii([],{granularity:Mi}):{segment:t=>{const e=[],s=t.split(Bi);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Pi.test(i)})}return e}}),Hi||(Hi=Ii?new Ii([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Xi&&e&&(Xi=i.createElement("template")),D.current&&D.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=s,d=(t=P(t)?t[0]:t)&&t.nodeType?t:(oe(t)||[])[0],c=!0===o?{}:o,u=!0===r||z(r)?{}:r,p=!0===n?{}:n;this.debug=xt(h,!1),this.includeSpaces=xt(l,!1),this.accessible=xt(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=F(c)?Zi(Fi,c):c,this.wordTemplate=F(u)||this.linesOnly?Zi(Mi,u):u,this.charTemplate=F(p)?Zi(Vi,p):p,this.$target=d,this.html=d&&d.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&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?i.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!O(t))return console.warn("Effect must return a function."),this;const e=as(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=>O(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=[],l=this.words,h=this.chars,d=zi.segment(o),c=i.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=Yi(t);if(!u||s&&u&&Yi(u))a.push(e);else{const t=a.length-1,s=a[t];Bi.test(s)||Bi.test(e)?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 d=a[t+1],u=r&&d&&!d.trim(),p=o,m=s?Hi.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,d=i.createTextNode(a);Qi(s,h,d,f,Vi,n,-1,l.length,h.length)}}e?Qi(e,l,f,c,Mi,n,-1,l.length,h.length):s?c.appendChild(f):c.appendChild(i.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(i.createTextNode(o))}}t.parentNode.replaceChild(c,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,l=r&&a;this.ready=!r||a,(l||t)&&this.effectsCleanups.forEach(t=>O(t)&&t(this)),s||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),l&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Ui(e,Mi))),o&&(l||n)&&(this.chars=Ui(e,Vi));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!z(d)&&s-d>.5*i&&c++,e.setAttribute(Oi,`${c}`);const r=e.querySelectorAll(`[${Oi}]`);let n=r.length;for(;n--;)r[n].setAttribute(Oi,`${c}`);d=s}if(l){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<c+1;t++){const i=e.cloneNode(!0);Gi(i,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&s.add(e),e.removeChild(t))}),a.push(i)}s.forEach(ji);for(let e=0,s=a.length;e<s;e++)Qi(r,this.lines,a[e],t,Fi,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Ui(e,Mi)),o&&(this.chars=Ui(e,Vi))}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&&(l||!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(Wi),this.words.forEach(Wi),this.chars.forEach(Wi)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Ki=(t,e)=>new Ji(t,e),tr=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Ji(t,e)),er=t=>{let e="";for(let s=0,i=t.length;s<i;s++)if(s+2<i&&"-"===t[s+1]&&t.charCodeAt(s)<t.charCodeAt(s+2)){const i=t.charCodeAt(s),r=t.charCodeAt(s+2);for(let t=i;t<=r;t++)e+=String.fromCharCode(t);s+=2}else e+=t[s];return e},sr={lowercase:"a-z",uppercase:"A-Z",numbers:"0-9",symbols:"!%#_|*+=",braille:"⠀-⣿",blocks:"▀-▟",shades:"░-▓"},ir=new WeakMap,rr=(t={})=>{t||(t={});const e=t.chars,s=xe(t.ease||"linear"),i=t.text,r=t.from,n=t.reversed||!1,o=t.perturbation||0,a=t.cursor,l=!0===a?"_":"number"==typeof a?String.fromCharCode(a):"string"==typeof a?a:"",h=l.length,d=t.seed||0,c=void 0===t.override||t.override,u=t.revealRate||60,p=1e3*A.timeScale/u,m=t.settleDuration||300*A.timeScale,f=t.settleRate||30,g=t.duration,v=t.revealDelay,b=t.delay,_=t.onChange||y;return(t,a,u,y)=>{const T="function"==typeof e?e(t,a,u):e||"a-zA-Z0-9!%#_",x=er(sr[T]||T),w=x.length-1,S="function"==typeof g?g(t,a,u):g,$="function"==typeof v?v(t,a,u):v||0,C="function"==typeof b?b(t,a,u):b||0,E=d?_i(d):_i();ir.has(t)||ir.set(t,t.textContent);const k=y?y._value:t.textContent,N=void 0!==i?"function"==typeof i?i(t,a,u):i:y?y._value:ir.get(t),D=" "===N||"&nbsp;"===N?" ":N,I=" "===k?0:k.length,R=D.length,L=!0===c?x:"string"==typeof c&&c.length>0?er(sr[c]||c):null,B=L?L.length-1:0,P=" "===c?" ":null,F=""===c?R:Math.max(I,R),M=S>0?S:(F-1)*p+m,V=dt((M+$)/A.timeScale,0)*A.timeScale,O=$>0?dt($/V,12):0,z=void 0===r||"auto"===r?R<I?"right":"left":r,H=new Int32Array(F);if("random"===z){for(let t=0;t<F;t++)H[t]=t;for(let t=F-1;t>0;t--){const e=E(0,t),s=H[t];H[t]=H[e],H[e]=s}}else{const t="right"===z?(""!==c&&I?I:F)-1:"center"===z?((""!==c&&I?I:F)-1)/2:"number"==typeof z?z:0,e=Math.abs,s=new Array(F);for(let t=0;t<F;t++)s[t]=t;s.sort((s,i)=>e(s-t)-e(i-t));for(let t=0;t<F;t++)H[s[t]]=t}if(n){const t=F-1;for(let e=0;e<F;e++)H[e]=t-H[e]}const X=dt(m/M,12),Y=dt((1-X)/F,12),W=h*Y,U=dt(1e3*A.timeScale/(f*V),12),q=new Float32Array(F),j=new Float32Array(F),G=o>0?o*X:0;for(let t=0;t<F;t++){const e=G>0?(E(0,2e3)-1e3)/1e3*G:0,s=G>0?(E(0,2e3)-1e3)/1e3*G:0;q[t]=H[t]*Y+e,j[t]=Math.ceil((q[t]+X+s)/U)*U}if(R<F&&"left"!==z&&"right"!==z&&"random"!==z){let t=0;for(let e=R;e<F;e++)j[e]>t&&(t=j[e]);const e=new Array(R);for(let t=0;t<R;t++)e[t]=t;e.sort((t,e)=>H[t]-H[e]);const s=(1-t)/R;for(let i=0;i<R;i++){const r=t+i*s;r>j[e[i]]&&(j[e[i]]=r)}}const Z=new Array(F);for(let t=0;t<F;t++)Z[t]=x[E(0,w)];const Q=L?L===x?Z:new Array(F):null;if(Q&&Q!==Z)for(let t=0;t<F;t++)Q[t]=P||L[E(0,L.length-1)];let J=k;if(!y)if(""===c)J="";else if(L){J="";for(let t=0;t<I;t++)J+=" "===k[t]?" ":Q[t]}let K=-1,tt=-1,et="";const st=""!==c,it=!!L,rt=h>0;return{from:0,to:1,duration:V,delay:C,ease:"linear",modifier:t=>{if(t===K)return et;if(K=t,C>0&&t<=0)return et=k,k;if(t<=0)return et=J,J;if(t>=1)return et=D,D;et="";const e=t/U|0,i=e!==tt;i&&(tt=e);const r=O>0?(t-O)/(1-O):t,n=r>0?s(r):0;for(let t=0;t<F;t++){const e=q[t];n>=j[t]?t<R&&(et+=D[t]):n<=0||n<e?st&&t<I&&(it?" "===k[t]?et+=" ":(i&&(Q[t]=P||L[E(0,B)]),et+=Q[t]):et+=k[t]):t<R&&" "===D[t]||t<I&&" "===k[t]?et+=" ":rt&&n-e<W?et+=l[h-1-((n-e)/Y|0)]:(i&&(Z[t]=x[E(0,w)]),et+=Z[t])}return i&&_(et,n),et}}}};var nr=Object.freeze({__proto__:null,TextSplitter:Ji,scrambleText:rr,split:tr,splitText:Ki});t.$=le,t.Animatable=ze,t.AutoLayout=ei,t.Draggable=ns,t.JSAnimation=Be,t.Scope=ls,t.ScrollObserver=ys,t.Spring=We,t.TextSplitter=Ji,t.Timeline=Ve,t.Timer=ne,t.WAAPIAnimation=Rs,t.addChild=bt,t.animate=(t,e)=>A.editor?A.editor.addAnimation(t,e):new Be(t,e,null,0,!1).init(),t.clamp=mi,t.cleanInlineStyles=Mt,t.createAnimatable=(t,e)=>new ze(t,e),t.createDraggable=(t,e)=>new ns(t,e),t.createDrawable=Ni,t.createLayout=(t,e)=>new ei(t,e),t.createMotionPath=ki,t.createScope=t=>new ls(t),t.createSeededRandom=_i,t.createSpring=qe,t.createTimeline=Oe,t.createTimer=t=>new ne(t,null,0).init(),t.cubicBezier=bs,t.damp=yi,t.degToRad=ci,t.eases=ve,t.easings=ws,t.engine=Yt,t.forEachChildren=yt,t.get=Qe,t.globals=A,t.irregular=xs,t.keepTime=as,t.lerp=gi,t.linear=Ts,t.mapRange=di,t.morphTo=Di,t.onScroll=(t={})=>new ys(t),t.padEnd=li,t.padStart=ai,t.radToDeg=ui,t.random=vi,t.randomPick=Ti,t.remove=Ke,t.removeChild=vt,t.round=fi,t.roundPad=oi,t.scrambleText=rr,t.scrollContainers=ds,t.set=Je,t.shuffle=xi,t.snap=pi,t.split=tr,t.splitText=Ki,t.spring=Ue,t.stagger=wi,t.steps=_s,t.svg=Ai,t.sync=os,t.text=nr,t.utils=Si,t.waapi=Ls,t.wrap=hi});
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - CJS
3
- * @version v4.3.6
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */