framer-motion 10.16.7 → 10.16.9

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var indexLegacy = require('./index-legacy-54a1a21d.js');
5
+ var indexLegacy = require('./index-legacy-98fbe8d8.js');
6
6
 
7
7
 
8
8
 
@@ -2691,7 +2691,7 @@ class MotionValue {
2691
2691
  * This will be replaced by the build step with the latest version number.
2692
2692
  * When MotionValues are provided to motion components, warn if versions are mixed.
2693
2693
  */
2694
- this.version = "10.16.7";
2694
+ this.version = "10.16.9";
2695
2695
  /**
2696
2696
  * Duration, in milliseconds, since last updating frame.
2697
2697
  *
@@ -3174,19 +3174,38 @@ function animateTarget(visualElement, definition, { delay = 0, transitionOverrid
3174
3174
  const valueTransition = {
3175
3175
  delay,
3176
3176
  elapsed: 0,
3177
- ...transition,
3177
+ ...getValueTransition$1(transition || {}, key),
3178
3178
  };
3179
3179
  /**
3180
3180
  * If this is the first time a value is being animated, check
3181
3181
  * to see if we're handling off from an existing animation.
3182
3182
  */
3183
+ let canSkipHandoff = true;
3183
3184
  if (window.HandoffAppearAnimations && !value.hasAnimated) {
3184
3185
  const appearId = visualElement.getProps()[optimizedAppearDataAttribute];
3185
3186
  if (appearId) {
3187
+ canSkipHandoff = false;
3186
3188
  valueTransition.elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);
3187
3189
  valueTransition.syncStart = true;
3188
3190
  }
3189
3191
  }
3192
+ let canSkip = canSkipHandoff && valueTarget === value.get();
3193
+ if (valueTransition.type === "spring" &&
3194
+ (value.getVelocity() || valueTransition.velocity)) {
3195
+ canSkip = false;
3196
+ }
3197
+ if (canSkip)
3198
+ continue;
3199
+ /**
3200
+ * Skip this animation if the value hasn't changed. With an exception
3201
+ * that we can't skip if it's a spring animation
3202
+ */
3203
+ if (canSkipHandoff &&
3204
+ valueTarget === value.get() &&
3205
+ (valueTransition.type !== "spring" ||
3206
+ (!value.getVelocity() && !valueTransition.velocity))) {
3207
+ continue;
3208
+ }
3190
3209
  value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)
3191
3210
  ? { type: false }
3192
3211
  : valueTransition));
@@ -3914,7 +3933,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3914
3933
  * and warn against mismatches.
3915
3934
  */
3916
3935
  if (process.env.NODE_ENV === "development") {
3917
- warnOnce(nextValue.version === "10.16.7", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.7 may not work as expected.`);
3936
+ warnOnce(nextValue.version === "10.16.9", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.9 may not work as expected.`);
3918
3937
  }
3919
3938
  }
3920
3939
  else if (isMotionValue(prevValue)) {
package/dist/cjs/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var indexLegacy = require('./index-legacy-54a1a21d.js');
6
+ var indexLegacy = require('./index-legacy-98fbe8d8.js');
7
7
 
8
8
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
9
 
@@ -109,7 +109,7 @@ function useVisualElement(Component, visualState, props, createVisualElement) {
109
109
  * so components added after the initial render can animate changes
110
110
  * in useEffect vs useLayoutEffect.
111
111
  */
112
- window.HandoffAppearAnimations = undefined;
112
+ window.HandoffAppearAnimations = false;
113
113
  canHandoff.current = false;
114
114
  });
115
115
  return visualElement;
@@ -5925,6 +5925,9 @@ function useInstantTransition() {
5925
5925
  });
5926
5926
  };
5927
5927
  }
5928
+ function disableInstantTransitions() {
5929
+ indexLegacy.instantAnimationState.current = false;
5930
+ }
5928
5931
 
5929
5932
  function useResetProjection() {
5930
5933
  const reset = React__namespace.useCallback(() => {
@@ -5993,6 +5996,9 @@ frame) {
5993
5996
  }
5994
5997
 
5995
5998
  function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) {
5999
+ // Prevent optimised appear animations if Motion has already started animating.
6000
+ if (window.HandoffAppearAnimations === false)
6001
+ return;
5996
6002
  const id = element.dataset[indexLegacy.optimizedAppearDataId];
5997
6003
  if (!id)
5998
6004
  return;
@@ -6229,6 +6235,7 @@ exports.animations = animations;
6229
6235
  exports.calcLength = calcLength;
6230
6236
  exports.createDomMotionComponent = createDomMotionComponent;
6231
6237
  exports.createMotionComponent = createMotionComponent;
6238
+ exports.disableInstantTransitions = disableInstantTransitions;
6232
6239
  exports.domAnimation = domAnimation;
6233
6240
  exports.domMax = domMax;
6234
6241
  exports.filterProps = filterProps;
@@ -3,6 +3,7 @@ import { optimizedAppearDataAttribute } from '../optimized-appear/data-id.mjs';
3
3
  import { animateMotionValue } from './motion-value.mjs';
4
4
  import { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';
5
5
  import { setTarget } from '../../render/utils/setters.mjs';
6
+ import { getValueTransition } from '../utils/transitions.mjs';
6
7
  import { frame } from '../../frameloop/frame.mjs';
7
8
 
8
9
  /**
@@ -37,19 +38,38 @@ function animateTarget(visualElement, definition, { delay = 0, transitionOverrid
37
38
  const valueTransition = {
38
39
  delay,
39
40
  elapsed: 0,
40
- ...transition,
41
+ ...getValueTransition(transition || {}, key),
41
42
  };
42
43
  /**
43
44
  * If this is the first time a value is being animated, check
44
45
  * to see if we're handling off from an existing animation.
45
46
  */
47
+ let canSkipHandoff = true;
46
48
  if (window.HandoffAppearAnimations && !value.hasAnimated) {
47
49
  const appearId = visualElement.getProps()[optimizedAppearDataAttribute];
48
50
  if (appearId) {
51
+ canSkipHandoff = false;
49
52
  valueTransition.elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);
50
53
  valueTransition.syncStart = true;
51
54
  }
52
55
  }
56
+ let canSkip = canSkipHandoff && valueTarget === value.get();
57
+ if (valueTransition.type === "spring" &&
58
+ (value.getVelocity() || valueTransition.velocity)) {
59
+ canSkip = false;
60
+ }
61
+ if (canSkip)
62
+ continue;
63
+ /**
64
+ * Skip this animation if the value hasn't changed. With an exception
65
+ * that we can't skip if it's a spring animation
66
+ */
67
+ if (canSkipHandoff &&
68
+ valueTarget === value.get() &&
69
+ (valueTransition.type !== "spring" ||
70
+ (!value.getVelocity() && !valueTransition.velocity))) {
71
+ continue;
72
+ }
53
73
  value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)
54
74
  ? { type: false }
55
75
  : valueTransition));
@@ -6,6 +6,9 @@ import { appearAnimationStore } from './store.mjs';
6
6
  import { noop } from '../../utils/noop.mjs';
7
7
 
8
8
  function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) {
9
+ // Prevent optimised appear animations if Motion has already started animating.
10
+ if (window.HandoffAppearAnimations === false)
11
+ return;
9
12
  const id = element.dataset[optimizedAppearDataId];
10
13
  if (!id)
11
14
  return;
package/dist/es/index.mjs CHANGED
@@ -37,7 +37,7 @@ export { isMotionComponent } from './motion/utils/is-motion-component.mjs';
37
37
  export { unwrapMotionComponent } from './motion/utils/unwrap-motion-component.mjs';
38
38
  export { VisualElement } from './render/VisualElement.mjs';
39
39
  export { addScaleCorrector } from './projection/styles/scale-correction.mjs';
40
- export { useInstantTransition } from './utils/use-instant-transition.mjs';
40
+ export { disableInstantTransitions, useInstantTransition } from './utils/use-instant-transition.mjs';
41
41
  export { useInstantLayoutTransition } from './projection/use-instant-layout-transition.mjs';
42
42
  export { useResetProjection } from './projection/use-reset-projection.mjs';
43
43
  export { buildTransform } from './render/html/utils/build-transform.mjs';
@@ -66,7 +66,7 @@ function useVisualElement(Component, visualState, props, createVisualElement) {
66
66
  * so components added after the initial render can animate changes
67
67
  * in useEffect vs useLayoutEffect.
68
68
  */
69
- window.HandoffAppearAnimations = undefined;
69
+ window.HandoffAppearAnimations = false;
70
70
  canHandoff.current = false;
71
71
  });
72
72
  return visualElement;
@@ -22,7 +22,7 @@ function updateMotionValuesFromProps(element, next, prev) {
22
22
  * and warn against mismatches.
23
23
  */
24
24
  if (process.env.NODE_ENV === "development") {
25
- warnOnce(nextValue.version === "10.16.7", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.7 may not work as expected.`);
25
+ warnOnce(nextValue.version === "10.16.9", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.9 may not work as expected.`);
26
26
  }
27
27
  }
28
28
  else if (isMotionValue(prevValue)) {
@@ -34,5 +34,8 @@ function useInstantTransition() {
34
34
  });
35
35
  };
36
36
  }
37
+ function disableInstantTransitions() {
38
+ instantAnimationState.current = false;
39
+ }
37
40
 
38
- export { useInstantTransition };
41
+ export { disableInstantTransitions, useInstantTransition };
@@ -28,7 +28,7 @@ class MotionValue {
28
28
  * This will be replaced by the build step with the latest version number.
29
29
  * When MotionValues are provided to motion components, warn if versions are mixed.
30
30
  */
31
- this.version = "10.16.7";
31
+ this.version = "10.16.9";
32
32
  /**
33
33
  * Duration, in milliseconds, since last updating frame.
34
34
  *
@@ -110,7 +110,7 @@
110
110
  * so components added after the initial render can animate changes
111
111
  * in useEffect vs useLayoutEffect.
112
112
  */
113
- window.HandoffAppearAnimations = undefined;
113
+ window.HandoffAppearAnimations = false;
114
114
  canHandoff.current = false;
115
115
  });
116
116
  return visualElement;
@@ -3838,7 +3838,7 @@
3838
3838
  * This will be replaced by the build step with the latest version number.
3839
3839
  * When MotionValues are provided to motion components, warn if versions are mixed.
3840
3840
  */
3841
- this.version = "10.16.7";
3841
+ this.version = "10.16.9";
3842
3842
  /**
3843
3843
  * Duration, in milliseconds, since last updating frame.
3844
3844
  *
@@ -4321,19 +4321,38 @@
4321
4321
  const valueTransition = {
4322
4322
  delay,
4323
4323
  elapsed: 0,
4324
- ...transition,
4324
+ ...getValueTransition$1(transition || {}, key),
4325
4325
  };
4326
4326
  /**
4327
4327
  * If this is the first time a value is being animated, check
4328
4328
  * to see if we're handling off from an existing animation.
4329
4329
  */
4330
+ let canSkipHandoff = true;
4330
4331
  if (window.HandoffAppearAnimations && !value.hasAnimated) {
4331
4332
  const appearId = visualElement.getProps()[optimizedAppearDataAttribute];
4332
4333
  if (appearId) {
4334
+ canSkipHandoff = false;
4333
4335
  valueTransition.elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);
4334
4336
  valueTransition.syncStart = true;
4335
4337
  }
4336
4338
  }
4339
+ let canSkip = canSkipHandoff && valueTarget === value.get();
4340
+ if (valueTransition.type === "spring" &&
4341
+ (value.getVelocity() || valueTransition.velocity)) {
4342
+ canSkip = false;
4343
+ }
4344
+ if (canSkip)
4345
+ continue;
4346
+ /**
4347
+ * Skip this animation if the value hasn't changed. With an exception
4348
+ * that we can't skip if it's a spring animation
4349
+ */
4350
+ if (canSkipHandoff &&
4351
+ valueTarget === value.get() &&
4352
+ (valueTransition.type !== "spring" ||
4353
+ (!value.getVelocity() && !valueTransition.velocity))) {
4354
+ continue;
4355
+ }
4337
4356
  value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)
4338
4357
  ? { type: false }
4339
4358
  : valueTransition));
@@ -6710,7 +6729,7 @@
6710
6729
  * and warn against mismatches.
6711
6730
  */
6712
6731
  {
6713
- warnOnce(nextValue.version === "10.16.7", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.7 may not work as expected.`);
6732
+ warnOnce(nextValue.version === "10.16.9", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.9 may not work as expected.`);
6714
6733
  }
6715
6734
  }
6716
6735
  else if (isMotionValue(prevValue)) {
@@ -11457,6 +11476,9 @@
11457
11476
  });
11458
11477
  };
11459
11478
  }
11479
+ function disableInstantTransitions() {
11480
+ instantAnimationState.current = false;
11481
+ }
11460
11482
 
11461
11483
  function useResetProjection() {
11462
11484
  const reset = React__namespace.useCallback(() => {
@@ -11525,6 +11547,9 @@
11525
11547
  }
11526
11548
 
11527
11549
  function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) {
11550
+ // Prevent optimised appear animations if Motion has already started animating.
11551
+ if (window.HandoffAppearAnimations === false)
11552
+ return;
11528
11553
  const id = element.dataset[optimizedAppearDataId];
11529
11554
  if (!id)
11530
11555
  return;
@@ -11725,6 +11750,7 @@
11725
11750
  exports.createScopedAnimate = createScopedAnimate;
11726
11751
  exports.cubicBezier = cubicBezier;
11727
11752
  exports.delay = delay;
11753
+ exports.disableInstantTransitions = disableInstantTransitions;
11728
11754
  exports.distance = distance;
11729
11755
  exports.distance2D = distance2D;
11730
11756
  exports.domAnimation = domAnimation;
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=s(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),c="undefined"!=typeof document,u=c?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1});function d(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"==typeof t||Array.isArray(t)}function p(t){return"object"==typeof t&&"function"==typeof t.start}const f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],g=["initial",...f];function y(t){return p(t.animate)||g.some(e=>m(t[e]))}function v(t){return Boolean(y(t)||t.variants)}function x(t){const{initial:n,animate:s}=function(t,e){if(y(t)){const{initial:e,animate:n}=t;return{initial:!1===e||m(e)?e:void 0,animate:m(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:s}),[P(n),P(s)])}function P(t){return Array.isArray(t)?t.join(" "):t}const w={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},E={};for(const t in w)E[t]={isEnabled:e=>w[t].some(t=>!!e[t])};function b(t){for(const e in t)E[e]={...E[e],...t[e]}}const S=e.createContext({}),T=e.createContext({}),A=Symbol.for("motionComponentSymbol");function C({preloadedFeatures:t,createVisualElement:n,useRender:s,useVisualState:o,Component:m}){t&&b(t);const p=e.forwardRef((function(p,f){let g;const y={...e.useContext(r),...p,layoutId:V(p)},{isStatic:v}=y,P=x(p),w=o(p,v);if(!v&&c){P.visualElement=function(t,n,s,i){const{visualElement:o}=e.useContext(a),c=e.useContext(h),d=e.useContext(l),m=e.useContext(r).reducedMotion,p=e.useRef();i=i||c.renderer,!p.current&&i&&(p.current=i(t,{visualState:n,parent:o,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m}));const f=p.current;e.useInsertionEffect(()=>{f&&f.update(s,d)});const g=e.useRef(Boolean(window.HandoffAppearAnimations));return u(()=>{f&&(f.render(),g.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(f.updateFeatures(),!g.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,g.current=!1)}),f}(m,w,y,n);const s=e.useContext(T),i=e.useContext(h).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,i,t,s))}return i.createElement(a.Provider,{value:P},g&&P.visualElement?i.createElement(g,{visualElement:P.visualElement,...y}):null,s(m,p,function(t,n,s){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):d(s)&&(s.current=e))},[n])}(w,P.visualElement,f),w,v,P.visualElement))}));return p[A]=m,p}function V({layoutId:t}){const n=e.useContext(S).id;return n&&void 0!==t?n+"-"+t:t}function M(t){function e(e,n={}){return C(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const D=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function L(t){return"string"==typeof t&&!t.includes("-")&&!!(D.indexOf(t)>-1||/[A-Z]/.test(t))}const R={};function k(t){Object.assign(R,t)}const B=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],j=new Set(B);function F(t,{layout:e,layoutId:n}){return j.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!R[t]||"opacity"===t)}const O=t=>Boolean(t&&t.getVelocity),I={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},U=B.length;function W(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<U;e++){const n=B[e];if(void 0!==t[n]){o+=`${I[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const N=t=>e=>"string"==typeof e&&e.startsWith(t),z=N("--"),H=N("var(--"),$=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Y=(t,e,n)=>Math.min(Math.max(n,t),e),X={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},G={...X,transform:t=>Y(0,1,t)},q={...X,default:1},Z=t=>Math.round(1e5*t)/1e5,K=/(-)?([\d]*\.?[\d])+/g,_=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,J=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Q(t){return"string"==typeof t}const tt=t=>({test:e=>Q(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),et=tt("deg"),nt=tt("%"),st=tt("px"),it=tt("vh"),ot=tt("vw"),rt={...nt,parse:t=>nt.parse(t)/100,transform:t=>nt.transform(100*t)},at={...X,transform:Math.round},lt={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:q,scaleX:q,scaleY:q,scaleZ:q,skew:et,skewX:et,skewY:et,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:G,originX:rt,originY:rt,originZ:st,zIndex:at,fillOpacity:G,strokeOpacity:G,numOctaves:at};function ct(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const t in e){const n=e[t];if(z(t)){o[t]=n;continue}const s=lt[t],h=$(n,s);if(j.has(t)){if(l=!0,r[t]=h,!u)continue;n!==(s.default||0)&&(u=!1)}else t.startsWith("origin")?(c=!0,a[t]=h):i[t]=h}if(e.transform||(l||s?i.transform=W(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const ut=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ht(t,e,n){for(const s in e)O(e[s])||F(s,n)||(t[s]=e[s])}function dt(t,n,s){const i={};return ht(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,s){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return ct(e,n,{enableHardwareAcceleration:!s},t),Object.assign({},e.vars,e.style)},[n])}(t,n,s)),t.transformValues?t.transformValues(i):i}function mt(t,e,n){const s={},i=dt(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const pt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ft(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||pt.has(t)}let gt=t=>!ft(t);function yt(t){t&&(gt=e=>e.startsWith("on")?!ft(e):t(e))}try{yt(require("@emotion/is-prop-valid").default)}catch(t){}function vt(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(gt(i)||!0===n&&ft(i)||!e&&!ft(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function xt(t,e,n){return"string"==typeof t?t:st.transform(e+n*t)}const Pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},wt={offset:"strokeDashoffset",array:"strokeDasharray"};function Et(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,d){if(ct(t,c,u,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:m,style:p,dimensions:f}=t;m.transform&&(f&&(p.transform=m.transform),delete m.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${xt(e,t.x,t.width)} ${xt(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(m.x=e),void 0!==n&&(m.y=n),void 0!==s&&(m.scale=s),void 0!==r&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Pt:wt;t[o.offset]=st.transform(-s);const r=st.transform(e),a=st.transform(n);t[o.array]=`${r} ${a}`}(m,r,a,l,!1)}const bt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),St=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Tt(t,n,s,i){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Et(e,n,{enableHardwareAcceleration:!1},St(i),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};ht(e,t.style,t),o.style={...e,...o.style}}return o}function At(t=!1){return(n,s,i,{latestValues:o},r)=>{const a=(L(n)?Tt:mt)(s,o,r,n),l={...vt(s,"string"==typeof n,t),...a,ref:i},{children:c}=s,u=e.useMemo(()=>O(c)?c.get():c,[c]);return e.createElement(n,{...l,children:u})}}const Ct=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Vt(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Mt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Dt(t,e,n,s){Vt(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Mt.has(n)?n:Ct(n),e.attrs[n])}function Lt(t,e){const{style:n}=t,s={};for(const i in n)(O(n[i])||e.style&&O(e.style[i])||F(i,t))&&(s[i]=n[i]);return s}function Rt(t,e){const n=Lt(t,e);for(const s in t)if(O(t[s])||O(e[s])){n[-1!==B.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function kt(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}function Bt(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const jt=t=>Array.isArray(t);function Ft(t){const e=O(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Ot=t=>(n,s)=>{const i=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:It(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,i,o);return s?r():Bt(r)};function It(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=Ft(o[t]);let{initial:r,animate:a}=t;const l=y(t),c=v(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!p(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=kt(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]})}return i}const Ut=t=>t;class Wt{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const Nt=["prepare","read","update","preRender","render","postRender"];const{schedule:zt,cancel:Ht,state:$t,steps:Yt}=function(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Nt.reduce((t,e)=>(t[e]=function(t){let e=new Wt,n=new Wt,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&i,c=l?e:n;return o&&r.add(t),c.add(t)&&l&&i&&(s=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let n=0;n<s;n++){const s=e.order[n];s(l),r.has(s)&&(a.schedule(s),t())}i=!1,o&&(o=!1,a.process(l))}}};return a}(()=>n=!0),t),{}),r=t=>o[t].process(i),a=()=>{const o=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,Nt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))};return{schedule:Nt.reduce((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(a)),l.schedule(e,o,r)),e},{}),cancel:t=>Nt.forEach(e=>o[e].cancel(t)),state:i,steps:o}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ut,!0),Xt={useVisualState:Ot({scrapeMotionValuesFromProps:Rt,createRenderState:bt,onMount:(t,e,{renderState:n,latestValues:s})=>{zt.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),zt.render(()=>{Et(n,s,{enableHardwareAcceleration:!1},St(e.tagName),t.transformTemplate),Dt(e,n)})}})},Gt={useVisualState:Ot({scrapeMotionValuesFromProps:Lt,createRenderState:ut})};function qt(t,{forwardMotionProps:e=!1},n,s){return{...L(t)?Xt:Gt,preloadedFeatures:n,useRender:At(e),createVisualElement:s,Component:t}}function Zt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Kt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function _t(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Jt=t=>e=>Kt(e)&&t(e,_t(e));function Qt(t,e,n,s){return Zt(t,e,Jt(n),s)}const te=(t,e)=>n=>e(t(n)),ee=(...t)=>t.reduce(te);function ne(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const se=ne("dragHorizontal"),ie=ne("dragVertical");function oe(t){let e=!1;if("y"===t)e=ie();else if("x"===t)e=se();else{const t=se(),n=ie();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function re(){const t=oe(!0);return!t||(t(),!1)}class ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}function le(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return Qt(t.current,n,(n,i)=>{if("touch"===n.type||re())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&zt.update(()=>o[s](n,i))},{passive:!t.getProps()[s]})}const ce=(t,e)=>!!e&&(t===e||ce(t,e.parentElement));function ue(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,_t(n))}const he=new WeakMap,de=new WeakMap,me=t=>{const e=he.get(t.target);e&&e(t)},pe=t=>{t.forEach(me)};function fe(t,e,n){const s=function({root:t,...e}){const n=t||document;de.has(n)||de.set(n,{});const s=de.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(pe,{root:t,...e})),s[i]}(e);return he.set(t,n),s.observe(t),()=>{he.delete(t),s.unobserve(t)}}const ge={some:0,all:1};const ye={inView:{Feature:class extends ae{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:ge[s]};return fe(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ae{constructor(){super(...arguments),this.removeStartListeners=Ut,this.removeEndListeners=Ut,this.removeAccessibleListeners=Ut,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=Qt(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();zt.update(()=>{ce(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),i=Qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ee(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Zt(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Zt(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&ue("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&zt.update(()=>n(t,e))})}),ue("down",(t,e)=>{this.startPress(t,e)})}),e=Zt(this.node.current,"blur",()=>{this.isPressing&&ue("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=ee(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&zt.update(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!re()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&zt.update(()=>n(t,e))}mount(){const t=this.node.getProps(),e=Qt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Zt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ee(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ae{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ee(Zt(this.node.current,"focus",()=>this.onFocus()),Zt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ae{mount(){this.unmount=ee(le(this.node,!0),le(this.node,!1))}unmount(){}}}};function ve(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function xe(t,e,n){const s=t.getProps();return kt(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}const Pe="data-"+Ct("framerAppearId");let we=Ut,Ee=Ut;const be=t=>1e3*t,Se=t=>t/1e3,Te={current:!1},Ae=t=>Array.isArray(t)&&"number"==typeof t[0];function Ce(t){return Boolean(!t||"string"==typeof t&&Me[t]||Ae(t)||Array.isArray(t)&&t.every(Ce))}const Ve=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Me={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ve([0,.65,.55,1]),circOut:Ve([.55,0,1,.45]),backIn:Ve([.31,.01,.66,-.59]),backOut:Ve([.33,1.53,.69,.99])};function De(t){if(t)return Ae(t)?Ve(t):Array.isArray(t)?t.map(De):Me[t]}function Le(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=De(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Re=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ke(t,e,n,s){if(t===e&&n===s)return Ut;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=Re(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Re(i(t),e,s)}const Be=ke(.42,0,1,1),je=ke(0,0,.58,1),Fe=ke(.42,0,.58,1),Oe=t=>Array.isArray(t)&&"number"!=typeof t[0],Ie=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ue=t=>e=>1-t(1-e),We=t=>1-Math.sin(Math.acos(t)),Ne=Ue(We),ze=Ie(Ne),He=ke(.33,1.53,.69,.99),$e=Ue(He),Ye=Ie($e),Xe=t=>(t*=2)<1?.5*$e(t):.5*(2-Math.pow(2,-10*(t-1))),Ge={linear:Ut,easeIn:Be,easeInOut:Fe,easeOut:je,circIn:We,circInOut:ze,circOut:Ne,backIn:$e,backInOut:Ye,backOut:He,anticipate:Xe},qe=t=>{if(Array.isArray(t)){Ee(4===t.length);const[e,n,s,i]=t;return ke(e,n,s,i)}return"string"==typeof t?(Ee(void 0!==Ge[t]),Ge[t]):t},Ze=(t,e)=>n=>Boolean(Q(n)&&J.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ke=(t,e,n)=>s=>{if(!Q(s))return s;const[i,o,r,a]=s.match(K);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},_e={...X,transform:t=>Math.round((t=>Y(0,255,t))(t))},Je={test:Ze("rgb","red"),parse:Ke("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+_e.transform(t)+", "+_e.transform(e)+", "+_e.transform(n)+", "+Z(G.transform(s))+")"};const Qe={test:Ze("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:Je.transform},tn={test:Ze("hsl","hue"),parse:Ke("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+nt.transform(Z(e))+", "+nt.transform(Z(n))+", "+Z(G.transform(s))+")"},en={test:t=>Je.test(t)||Qe.test(t)||tn.test(t),parse:t=>Je.test(t)?Je.parse(t):tn.test(t)?tn.parse(t):Qe.parse(t),transform:t=>Q(t)?t:t.hasOwnProperty("red")?Je.transform(t):tn.transform(t)},nn=(t,e,n)=>-n*t+n*e+t;function sn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const on=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},rn=[Qe,Je,tn];function an(t){const e=(n=t,rn.find(t=>t.test(n)));var n;Ee(Boolean(e));let s=e.parse(t);return e===tn&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=sn(a,s,t+1/3),o=sn(a,s,t),r=sn(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const ln=(t,e)=>{const n=an(t),s=an(e),i={...n};return t=>(i.red=on(n.red,s.red,t),i.green=on(n.green,s.green,t),i.blue=on(n.blue,s.blue,t),i.alpha=nn(n.alpha,s.alpha,t),Je.transform(i))};const cn={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:Ut},un={regex:_,countKey:"Colors",token:"${c}",parse:en.parse},hn={regex:K,countKey:"Numbers",token:"${n}",parse:X.parse};function dn(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function mn(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&dn(n,cn),dn(n,un),dn(n,hn),n}function pn(t){return mn(t).values}function fn(t){const{values:e,numColors:n,numVars:s,tokenised:i}=mn(t),o=e.length;return t=>{let e=i;for(let i=0;i<o;i++)e=i<s?e.replace(cn.token,t[i]):i<s+n?e.replace(un.token,en.transform(t[i])):e.replace(hn.token,Z(t[i]));return e}}const gn=t=>"number"==typeof t?0:t;const yn={test:function(t){var e,n;return isNaN(t)&&Q(t)&&((null===(e=t.match(K))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(_))||void 0===n?void 0:n.length)||0)>0},parse:pn,createTransformer:fn,getAnimatableNone:function(t){const e=pn(t);return fn(t)(e.map(gn))}},vn=(t,e)=>n=>""+(n>0?e:t);function xn(t,e){return"number"==typeof t?n=>nn(t,e,n):en.test(t)?ln(t,e):t.startsWith("var(")?vn(t,e):En(t,e)}const Pn=(t,e)=>{const n=[...t],s=n.length,i=t.map((t,n)=>xn(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}},wn=(t,e)=>{const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=xn(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},En=(t,e)=>{const n=yn.createTransformer(e),s=mn(t),i=mn(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?ee(Pn(s.values,i.values),n):(we(!0),vn(t,e))},bn=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Sn=(t,e)=>n=>nn(t,e,n);function Tn(t,e,n){const s=[],i=n||("number"==typeof(o=t[0])?Sn:"string"==typeof o?en.test(o)?ln:En:Array.isArray(o)?Pn:"object"==typeof o?wn:Sn);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Ut:e;o=ee(t,o)}s.push(o)}return s}function An(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Ee(o===e.length),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Tn(e,s,i),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=bn(t[n],t[n+1],e);return r[n](s)};return n?e=>l(Y(t[0],t[o-1],e)):l}function Cn(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=bn(0,e,s);t.push(nn(n,1,i))}}function Vn(t){const e=[0];return Cn(e,t.length-1),e}function Mn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Oe(s)?s.map(qe):qe(s),o={done:!1,value:e[0]},r=An(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Vn(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Fe).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function Dn(t,e){return e?t*(1e3/e):0}function Ln(t,e,n){const s=Math.max(e-5,0);return Dn(n-t(s),e-s)}function Rn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;we(t<=be(10));let r=1-e;r=Y(.05,1,r),t=Y(.01,10,Se(t)),r<1?(i=e=>{const s=e*r,i=s*t;return.001-(s-n)/kn(e,r)*Math.exp(-i)},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-s),c=kn(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((o-a)*l)/c}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,o,5/t);if(t=be(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}function kn(t,e){return t*Math.sqrt(1-e*e)}const Bn=["duration","bounce"],jn=["stiffness","damping","mass"];function Fn(t,e){return e.some(e=>void 0!==t[e])}function On({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Fn(t,jn)&&Fn(t,Bn)){const n=Rn(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s),m=u?-Se(u):0,p=l/(2*Math.sqrt(a*c)),f=o-i,g=Se(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),p<1){const t=kn(g,p);v=e=>{const n=Math.exp(-p*g*e);return o-n*((m+p*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===p)v=t=>o-Math.exp(-g*t)*(f+(m+g*f)*t);else{const t=g*Math.sqrt(p*p-1);v=e=>{const n=Math.exp(-p*g*e),s=Math.min(t*e,300);return o-n*((m+p*g*f)*Math.sinh(s)+t*f*Math.cosh(s))/t}}return{calculatedDuration:d&&h||null,next:t=>{const s=v(t);if(d)r.done=t>=h;else{let i=m;0!==t&&(i=p<1?Ln(v,t,s):0);const a=Math.abs(i)<=n,l=Math.abs(o-s)<=e;r.done=a&&l}return r.value=r.done?o:s,r}}}function In({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=h+p,g=void 0===r?f:r(f);g!==f&&(p=g-h);const y=t=>-p*Math.exp(-t/s),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let P,w;const E=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=On({keyframes:[d.value,m(d.value)],velocity:Ln(v,t,d.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),E(t)),void 0!==P&&t>P?w.next(t-P):(!e&&x(t),d)}}}const Un=t=>{const e=({timestamp:e})=>t(e);return{start:()=>zt.update(e,!0),stop:()=>Ht(e),now:()=>$t.isProcessing?$t.timestamp:performance.now()}};function Wn(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const Nn={decay:In,inertia:In,tween:Mn,keyframes:Mn,spring:On};function zn({autoplay:t=!0,delay:e=0,driver:n=Un,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let m,p,f=1,g=!1;const y=()=>{p=new Promise(t=>{m=t})};let v;y();const x=Nn[i]||Mn;let P;x!==Mn&&"number"!=typeof s[0]&&(P=An([0,100],s,{clamp:!1}),s=[0,100]);const w=x({...d,keyframes:s});let E;"mirror"===a&&(E=x({...d,keyframes:[...s].reverse(),velocity:-(d.velocity||0)}));let b="idle",S=null,T=null,A=null;null===w.calculatedDuration&&o&&(w.calculatedDuration=Wn(w));const{calculatedDuration:C}=w;let V=1/0,M=1/0;null!==C&&(V=C+r,M=V*(o+1)-r);let D=0;const L=t=>{if(null===T)return;f>0&&(T=Math.min(T,t)),f<0&&(T=Math.min(t-M/f,T)),D=null!==S?S:Math.round(t-T)*f;const n=D-e*(f>=0?1:-1),i=f>=0?n<0:n>M;D=Math.max(n,0),"finished"===b&&null===S&&(D=M);let l=D,c=w;if(o){const t=D/V;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);const s=Boolean(e%2);s&&("reverse"===a?(n=1-n,r&&(n-=r/V)):"mirror"===a&&(c=E));let i=Y(0,1,n);D>M&&(i="reverse"===a&&s?1:0),l=i*V}const u=i?{done:!1,value:s[0]}:c.next(l);P&&(u.value=P(u.value));let{done:d}=u;i||null===C||(d=f>=0?D>=M:D<=0);const m=null===S&&("finished"===b||"running"===b&&d);return h&&h(u.value),m&&B(),u},R=()=>{v&&v.stop(),v=void 0},k=()=>{b="idle",R(),m(),y(),T=A=null},B=()=>{b="finished",u&&u(),R(),m()},j=()=>{if(g)return;v||(v=n(L));const t=v.now();l&&l(),null!==S?T=t-S:T&&"finished"!==b||(T=t),"finished"===b&&y(),A=T,S=null,b="running",v.start()};t&&j();const F={then:(t,e)=>p.then(t,e),get time(){return Se(D)},set time(t){t=be(t),D=t,null===S&&v&&0!==f?T=v.now()-t/f:S=t},get duration(){const t=null===w.calculatedDuration?Wn(w):w.calculatedDuration;return Se(t)},get speed(){return f},set speed(t){t!==f&&v&&(f=t,F.time=Se(D))},get state(){return b},play:j,pause:()=>{b="paused",S=D},stop:()=>{g=!0,"idle"!==b&&(b="idle",c&&c(),k())},cancel:()=>{null!==A&&L(A),k()},complete:()=>{b="finished"},sample:t=>(T=0,L(t))};return F}function Hn(t){let e;return()=>(void 0===e&&(e=t()),e)}const $n=Hn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Yn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Xn(t,e,{onUpdate:n,onComplete:s,...i}){if(!($n()&&Yn.has(e)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let o,r,a=!1;const l=()=>{r=new Promise(t=>{o=t})};l();let{keyframes:c,duration:u=300,ease:h,times:d}=i;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!Ce(e.ease))(e,i)){const t=zn({...i,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;d=void 0,c=n,u=s-10,h="linear"}const m=Le(t.owner.current,e,c,{...i,duration:u,ease:h,times:d});i.syncStart&&(m.startTime=$t.isProcessing?$t.timestamp:document.timeline?document.timeline.currentTime:performance.now());const p=()=>m.cancel(),f=()=>{zt.update(p),o(),l()};m.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,i)),s&&s(),f()};return{then:(t,e)=>r.then(t,e),attachTimeline:t=>(m.timeline=t,m.onfinish=null,Ut),get time(){return Se(m.currentTime||0)},set time(t){m.currentTime=be(t)},get speed(){return m.playbackRate},set speed(t){m.playbackRate=t},get duration(){return Se(u)},play:()=>{a||(m.play(),Ht(p))},pause:()=>m.pause(),stop:()=>{if(a=!0,"idle"===m.playState)return;const{currentTime:e}=m;if(e){const n=zn({...i,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}f()},complete:()=>m.finish(),cancel:f}}const Gn={type:"spring",stiffness:500,damping:25,restSpeed:10},qn={type:"keyframes",duration:.8},Zn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kn=(t,{keyframes:e})=>e.length>2?qn:j.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Gn:Zn,_n=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!yn.test(e)&&"0"!==e||e.startsWith("url("))),Jn=new Set(["brightness","contrast","saturate","opacity"]);function Qn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(K)||[];if(!s)return t;const i=n.replace(s,"");let o=Jn.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ts=/([a-z-]*)\(.*?\)/g,es={...yn,getAnimatableNone:t=>{const e=t.match(ts);return e?e.map(Qn).join(" "):t}},ns={...lt,color:en,backgroundColor:en,outlineColor:en,fill:en,stroke:en,borderColor:en,borderTopColor:en,borderRightColor:en,borderBottomColor:en,borderLeftColor:en,filter:es,WebkitFilter:es},ss=t=>ns[t];function is(t,e){let n=ss(t);return n!==es&&(n=yn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const os=t=>/^0[^.\s]+$/.test(t);function rs(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||os(t):void 0}function as(t,e){return t[e]||t.default||t}const ls=(t,e,n,s={})=>i=>{const o=as(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a-=be(r);const l=function(t,e,n,s){const i=_n(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==s.from?s.from:t.get();let a=void 0;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?r:o[t-1]),rs(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(i&&l.length&&a)for(let t=0;t<l.length;t++){o[l[t]]=is(e,a)}return o}(e,t,n,o),c=l[0],u=l[l.length-1],h=_n(t,c),d=_n(t,u);we(h===d);let m={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(o)||(m={...m,...Kn(t,m)}),m.duration&&(m.duration=be(m.duration)),m.repeatDelay&&(m.repeatDelay=be(m.repeatDelay)),!h||!d||Te.current||!1===o.type)return function({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:Ut,pause:Ut,stop:Ut,then:t=>(t(),Promise.resolve()),cancel:Ut,complete:Ut});return e?zn({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}(Te.current?{...m,delay:0}:m);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Xn(e,t,m);if(n)return n}return zn(m)};function cs(t){return Boolean(O(t)&&t.add)}const us=t=>/^\-?\d*\.?\d+$/.test(t);function hs(t,e){-1===t.indexOf(e)&&t.push(e)}function ds(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ms{constructor(){this.subscriptions=[]}add(t){return hs(this.subscriptions,t),()=>ds(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ps={current:void 0};class fs{constructor(t,e={}){var n;this.version="10.16.7",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=$t;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,zt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>zt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ms);const n=this.events[t].add(e);return"change"===t?()=>{n(),zt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ps.current&&ps.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Dn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gs(t,e){return new fs(t,e)}const ys=t=>e=>e.test(t),vs=[X,st,nt,et,ot,it,{test:t=>"auto"===t,parse:t=>t}],xs=t=>vs.find(ys(t)),Ps=[...vs,en,yn];function ws(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gs(n))}function Es(t,e){const n=xe(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const e in o){ws(t,e,(r=o[e],jt(r)?r[r.length-1]||0:r))}var r}function bs(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&Es(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{bs(t,e)})})}function Ss(t,e,n){var s,i;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;var a;if(r)for(let l=0;l<r;l++){const r=o[l],c=e[r];let u=null;Array.isArray(c)&&(u=c[0]),null===u&&(u=null!==(i=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==i?i:e[r]),null!=u&&("string"==typeof u&&(us(u)||os(u))?u=parseFloat(u):(a=u,!Ps.find(ys(a))&&yn.test(c)&&(u=is(r,c))),t.addValue(r,gs(u,{owner:t})),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}function Ts(t,e){if(!e)return;return(e[t]||e.default||e).from}function As(t,e,n){const s={};for(const i in t){const t=Ts(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}function Cs({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Vs(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(o=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e),i=a[e];if(!s||void 0===i||u&&Cs(u,e))continue;const r={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[Pe];n&&(r.elapsed=window.HandoffAppearAnimations(n,e,s,zt),r.syncStart=!0)}s.start(ls(e,s,i,t.shouldReduceMotion&&j.has(e)?{type:!1}:r));const h=s.animation;cs(l)&&(l.add(e),h.then(()=>l.remove(e))),c.push(h)}return r&&Promise.all(c).then(()=>{r&&Es(t,r)}),c}function Ms(t,e,n={}){const s=xe(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Vs(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=i;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Ds).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Ms(t,e,{...o,delay:n+l(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+s,r,a,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Ds(t,e){return t.sortNodePosition(e)}function Ls(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map(e=>Ms(t,e,n));s=Promise.all(i)}else if("string"==typeof e)s=Ms(t,e,n);else{const i="function"==typeof e?xe(t,e,n.custom):e;s=Promise.all(Vs(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const Rs=[...f].reverse(),ks=f.length;function Bs(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ls(t,e,n)))}(t);const n={animate:Fs(!0),whileInView:Fs(),whileHover:Fs(),whileTap:Fs(),whileDrag:Fs(),whileFocus:Fs(),exit:Fs()};let s=!0;const i=(e,n)=>{const s=xe(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<ks;e++){const f=Rs[e],g=n[f],y=void 0!==a[f]?a[f]:l[f],v=m(y),x=f===r?g.isActive:null;!1===x&&(d=e);let P=y===l[f]&&y!==a[f]&&v;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys={...h},!g.isActive&&null===x||!y&&!g.prevProp||p(y)||"boolean"==typeof y)continue;const w=js(g.prevProp,y);let E=w||f===r&&g.isActive&&!P&&v||e>d&&v;const b=Array.isArray(y)?y:[y];let S=b.reduce(i,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,A={...T,...S},C=t=>{E=!0,u.delete(t),g.needsAnimating[t]=!0};for(const t in A){const e=S[t],n=T[t];h.hasOwnProperty(t)||(e!==n?jt(e)&&jt(n)?!ve(e,n)||w?C(t):g.protectedKeys[t]=!0:void 0!==e?C(t):u.add(t):void 0!==e&&u.has(t)?C(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),s&&t.blockInitialAnimation&&(E=!1),E&&!P&&c.push(...b.map(t=>({animation:t,options:{type:f,...o}})))}if(u.size){const e={};u.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let f=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),s=!1,f?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,s,i){var r;if(n[e].isActive===s)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const a=o(i,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function js(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ve(e,t)}function Fs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Os=0;const Is={animation:{Feature:class extends ae{constructor(t){super(t),t.animationState||(t.animationState=Bs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),p(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ae{constructor(){super(...arguments),this.id=Os++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Us=(t,e)=>Math.abs(t-e);function Ws(t,e){const n=Us(t.x,e.x),s=Us(t.y,e.y);return Math.sqrt(n**2+s**2)}class Ns{constructor(t,e,{transformPagePoint:n,contextWindow:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=$s(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ws(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=$t;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=zs(e,this.transformPagePoint),zt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:s}=this.handlers,i=$s("pointercancel"===t.type?this.lastMoveEventInfo:zs(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,i),s&&s(t,i)},!Kt(t))return;this.handlers=e,this.transformPagePoint=n,this.contextWindow=s||window;const i=zs(_t(t),this.transformPagePoint),{point:o}=i,{timestamp:r}=$t;this.history=[{...o,timestamp:r}];const{onSessionStart:a}=e;a&&a(t,$s(i,this.history)),this.removeListeners=ee(Qt(this.contextWindow,"pointermove",this.handlePointerMove),Qt(this.contextWindow,"pointerup",this.handlePointerUp),Qt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ht(this.updatePoint)}}function zs(t,e){return e?{point:e(t.point)}:t}function Hs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function $s({point:t},e){return{point:t,delta:Hs(t,Xs(e)),offset:Hs(t,Ys(e)),velocity:Gs(e,.1)}}function Ys(t){return t[0]}function Xs(t){return t[t.length-1]}function Gs(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Xs(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>be(e)));)n--;if(!s)return{x:0,y:0};const o=Se(i.timestamp-s.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function qs(t){return t.max-t.min}function Zs(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ks(t,e,n,s=.5){t.origin=s,t.originPoint=nn(e.min,e.max,t.origin),t.scale=qs(n)/qs(e),(Zs(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=nn(n.min,n.max,t.origin)-t.originPoint,(Zs(t.translate)||isNaN(t.translate))&&(t.translate=0)}function _s(t,e,n,s){Ks(t.x,e.x,n.x,s?s.originX:void 0),Ks(t.y,e.y,n.y,s?s.originY:void 0)}function Js(t,e,n){t.min=n.min+e.min,t.max=t.min+qs(e)}function Qs(t,e,n){t.min=e.min-n.min,t.max=t.min+qs(e)}function ti(t,e,n){Qs(t.x,e.x,n.x),Qs(t.y,e.y,n.y)}function ei(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ni(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const si=.35;function ii(t,e,n){return{min:oi(t,e),max:oi(t,n)}}function oi(t,e){return"number"==typeof t?t:t[e]||0}const ri=()=>({x:{min:0,max:0},y:{min:0,max:0}});function ai(t){return[t("x"),t("y")]}function li({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ci(t){return void 0===t||1===t}function ui({scale:t,scaleX:e,scaleY:n}){return!ci(t)||!ci(e)||!ci(n)}function hi(t){return ui(t)||di(t)||t.z||t.rotate||t.rotateX||t.rotateY}function di(t){return mi(t.x)||mi(t.y)}function mi(t){return t&&"0%"!==t}function pi(t,e,n){return n+e*(t-n)}function fi(t,e,n,s,i){return void 0!==i&&(t=pi(t,i,s)),pi(t,n,s)+e}function gi(t,e=0,n=1,s,i){t.min=fi(t.min,e,n,s,i),t.max=fi(t.max,e,n,s,i)}function yi(t,{x:e,y:n}){gi(t.x,e.translate,e.scale,e.originPoint),gi(t.y,n.translate,n.scale,n.originPoint)}function vi(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function xi(t,e){t.min=t.min+e,t.max=t.max+e}function Pi(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=nn(t.min,t.max,o);gi(t,e[n],e[s],r,e.scale)}const wi=["x","scaleX","originX"],Ei=["y","scaleY","originY"];function bi(t,e){Pi(t.x,e,wi),Pi(t.y,e,Ei)}function Si(t,e){return li(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}const Ti=({current:t})=>t?t.ownerDocument.defaultView:null,Ai=new WeakMap;class Ci{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Ns(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(_t(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=oe(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ai(t=>{let e=this.getAxisMotionValue(t).get()||0;if(nt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=qs(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),i&&zt.update(()=>i(t,e),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:Ti(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&zt.update(()=>i(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!Vi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?nn(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?nn(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&d(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!s)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:ei(t.x,n,i),y:ei(t.y,e,s)}}(s.layoutBox,e),this.elastic=function(t=si){return!1===t?t=0:!0===t&&(t=si),{x:ii(t,"left","right"),y:ii(t,"top","bottom")}}(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ai(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(s.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!d(t))return!1;const n=t.current;Ee(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=Si(t,n),{scroll:i}=e;return i&&(xi(s.x,i.offset.x),xi(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ni(t.x,e.x),y:ni(t.y,e.y)}}(s.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=li(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=ai(r=>{if(!Vi(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=s?200:1e6,u=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(ls(t,n,0,e))}stopAnimation(){ai(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){ai(e=>{const{drag:n}=this.getProps();if(!Vi(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-nn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!d(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ai(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=qs(t),i=qs(e);return i>s?n=bn(e.min,e.max-s,t.min):s>i&&(n=bn(t.min,t.max-i,e.min)),Y(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ai(e=>{if(!Vi(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(nn(i,o,s[e]))})}addListeners(){if(!this.visualElement.current)return;Ai.set(this.visualElement,this);const t=Qt(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();d(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=Zt(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(ai(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=si,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function Vi(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Mi=t=>(e,n)=>{t&&zt.update(()=>t(e,n))};const Di=["TopLeft","TopRight","BottomLeft","BottomRight"],Li=Di.length,Ri=t=>"string"==typeof t?parseFloat(t):t,ki=t=>"number"==typeof t||st.test(t);function Bi(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ji=Oi(0,.5,Ne),Fi=Oi(.5,.95,Ut);function Oi(t,e,n){return s=>s<t?0:s>e?1:n(bn(t,e,s))}function Ii(t,e){t.min=e.min,t.max=e.max}function Ui(t,e){Ii(t.x,e.x),Ii(t.y,e.y)}function Wi(t,e,n,s,i){return t=pi(t-=e,1/n,s),void 0!==i&&(t=pi(t,1/i,s)),t}function Ni(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){if(nt.test(e)){e=parseFloat(e);e=nn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=nn(o.min,o.max,s);t===o&&(a-=e),t.min=Wi(t.min,e,n,a,i),t.max=Wi(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const zi=["x","scaleX","originX"],Hi=["y","scaleY","originY"];function $i(t,e,n,s){Ni(t.x,e,zi,n?n.x:void 0,s?s.x:void 0),Ni(t.y,e,Hi,n?n.y:void 0,s?s.y:void 0)}function Yi(t){return 0===t.translate&&1===t.scale}function Xi(t){return Yi(t.x)&&Yi(t.y)}function Gi(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function qi(t){return qs(t.x)/qs(t.y)}class Zi{constructor(){this.members=[]}add(t){hs(this.members,t),t.scheduleRender()}remove(t){if(ds(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ki(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const _i=(t,e)=>t.depth-e.depth;class Ji{constructor(){this.children=[],this.isDirty=!1}add(t){hs(this.children,t),this.isDirty=!0}remove(t){ds(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_i),this.isDirty=!1,this.children.forEach(t)}}const Qi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function to(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Ht(s),t(o-e))};return zt.read(s,!0),()=>Ht(s)}function eo(t,e,n){var s;if("string"==typeof t){let i=document;e&&(Ee(Boolean(e.current)),i=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=i.querySelectorAll(t)),t=n[t]):t=i.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const no=new WeakMap;function so(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return zt.update(s,!0),()=>Ht(s)}const io=Hn(()=>void 0!==window.ScrollTimeline);class oo{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!io()||!e.attachTimeline)return e.pause(),so(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ro(t){return t instanceof SVGElement&&"svg"!==t.tagName}const ao=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function lo(t,e,n=1){Ee(n<=4);const[s,i]=function(t){const e=ao.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return us(t)?parseFloat(t):t}return H(i)?lo(i,e,n+1):i}const co=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),uo=t=>co.has(t),ho=t=>t===X||t===st,mo=(t,e)=>parseFloat(t.split(", ")[e]),po=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return mo(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?mo(e[1],t):0}},fo=new Set(["x","y","z"]),go=B.filter(t=>!fo.has(t));const yo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:po(4,13),y:po(5,14)};yo.translateX=yo.x,yo.translateY=yo.y;const vo=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(uo);let o=[],r=!1;const a=[];if(i.forEach(i=>{const l=t.getValue(i);if(!t.hasValue(i))return;let c=n[i],u=xs(c);const h=e[i];let d;if(jt(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],u=xs(c);for(let n=e;n<t&&null!==h[n];n++)d?Ee(xs(h[n])===d):(d=xs(h[n]),Ee(d===u||ho(u)&&ho(d)))}else d=xs(h);if(u!==d)if(ho(u)&&ho(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===st&&(e[i]=h.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==d?void 0:d.transform)&&(0===c||0===h)?0===c?l.set(d.transform(c)):e[i]=u.transform(h):(r||(o=function(t){const e=[];return go.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(i),s[i]=void 0!==s[i]?s[i]:e[i],l.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=yo[t](s,o)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=yo[n](l,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),c&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:s}}return{target:e,transitionEnd:s}};function xo(t,e,n,s){return(t=>Object.keys(t).some(uo))(e)?vo(t,e,n,s):{target:e,transitionEnd:s}}const Po=(t,e,n,s)=>{const i=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!H(e))return;const n=lo(e,s);n&&t.set(n)});for(const t in e){const i=e[t];if(!H(i))continue;const o=lo(i,s);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=i))}return{target:e,transitionEnd:n}}(t,e,s);return xo(t,e=i.target,n,s=i.transitionEnd)},wo={current:null},Eo={current:!1};function bo(){if(Eo.current=!0,c)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>wo.current=t.matches;t.addListener(e),e()}else wo.current=!1}const So=Object.keys(E),To=So.length,Ao=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Co=g.length;class Vo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>zt.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==r[t]&&O(e)&&(e.set(r[t],!1),cs(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,no.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Eo.current||bo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||wo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){no.delete(this.current),this.projection&&this.projection.unmount(),Ht(this.notifyUpdate),Ht(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=j.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&zt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i){let o,r;for(let t=0;t<To;t++){const n=So[t],{isEnabled:s,Feature:i,ProjectionNode:a,MeasureLayout:l}=E[n];a&&(o=a),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(r=l))}if(!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||r&&d(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ao.length;e++){const n=Ao[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(O(o))t.addValue(i,o),cs(s)&&s.add(i);else if(O(r))t.addValue(i,gs(o,{owner:t})),cs(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,gs(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Co;t++){const n=g[t],s=this.props[n];(m(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=gs(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=kt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||O(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new ms),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Mo extends Vo{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},i){let o=As(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),o&&(o=s(o))),i){Ss(this,n,o);const t=Po(this,n,o,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Do extends Mo{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(j.has(e)){const t=ss(e);return t&&t.default||0}return e=Mt.has(e)?e:Ct(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Rt(t,e)}build(t,e,n,s){Et(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){Dt(t,e,0,s)}mount(t){this.isSVGTag=St(t.tagName),super.mount(t)}}class Lo extends Mo{readValueFromInstance(t,e){if(j.has(e)){const t=ss(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(z(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Si(t,e)}build(t,e,n,s){ct(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Lt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;O(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Vt(t,e,n,s)}}function Ro(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ro(t)?new Do(e,{enableHardwareAcceleration:!1}):new Lo(e,{enableHardwareAcceleration:!0});n.mount(t),no.set(t,n)}function ko(t,e,n){const s=O(t)?t:gs(t);return s.start(ls("",s,e,n)),s.animation}function Bo(t,e=100){const n=On({keyframes:[0,e],...t}),s=Math.min(Wn(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:Se(s)}}function jo(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}const Fo=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Oo(t,e){return Oe(t)?t[Fo(0,t.length,e)]:t}function Io(t,e,n,s,i,o){!function(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(ds(t,i),s--)}}(t,i,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:nn(i,o,s[r]),easing:Oo(n,r)})}function Uo(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Wo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function No(t,e){return e[t]||(e[t]=[]),e[t]}function zo(t){return Array.isArray(t)?t:[t]}function Ho(t,e){return t[e]?{...t,...t[e]}:{...t}}const $o=t=>"number"==typeof t,Yo=t=>t.every($o);function Xo(t,e,n,s){const i=eo(t,s),o=i.length;Ee(Boolean(o));const r=[];for(let t=0;t<o;t++){const s=i[t];no.has(s)||Ro(s);const a=no.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...Vs(a,{...e,transition:l},{}))}return new oo(r)}function Go(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const i=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let c=0,u=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,u);continue}if(!Array.isArray(o)){l.set(o.name,jo(u,o.at,c,l));continue}let[d,m,p={}]=o;void 0!==p.at&&(u=jo(u,p.at,c,l));let f=0;const g=(t,n,s,o=0,r=0)=>{const a=zo(t),{delay:l=0,times:c=Vn(a),type:d="keyframes",...m}=n;let{ease:p=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&Yo(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...m};void 0!==g&&(e.duration=be(g));const n=Bo(e,t);p=n.ease,g=n.duration}null!=g||(g=i);const x=u+y,P=x+g;1===c.length&&0===c[0]&&(c[1]=1);const w=c.length-a.length;w>0&&Cn(c,w),1===a.length&&a.unshift(null),Io(s,a,p,c,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(O(d)){g(m,p,No("default",Wo(d,r)))}else{const t=eo(d,s,a),e=t.length;for(let n=0;n<e;n++){m=m,p=p;const s=Wo(t[n],r);for(const t in m)g(m[t],Ho(p,t),No(t,s),n,e)}c=u,u+=f}}return r.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Uo);const a=[],l=[],c=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];a.push(n),l.push(bn(0,h,e)),c.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const u=o.get(s);u.keyframes[i]=a,u.transition[i]={...e,duration:h,ease:c,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let i;i=O(n)?ko(n,t.default,e.default):Xo(n,t,e),s.push(i)}),new oo(s)}const qo=t=>function(e,n,s){let i;var o;return o=e,i=Array.isArray(o)&&Array.isArray(o[0])?Go(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?Xo(e,n,s,t):ko(e,n,s),t&&t.animations.push(i),i},Zo=qo(),Ko=new WeakMap;let _o;function Jo({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=Ko.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Qo(t){t.forEach(Jo)}function tr(t,e){_o||"undefined"!=typeof ResizeObserver&&(_o=new ResizeObserver(Qo));const n=eo(t);return n.forEach(t=>{let n=Ko.get(t);n||(n=new Set,Ko.set(t,n)),n.add(e),null==_o||_o.observe(t)}),()=>{n.forEach(t=>{const n=Ko.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==_o||_o.unobserve(t)})}}const er=new Set;let nr;function sr(t){return er.add(t),nr||(nr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};er.forEach(t=>t(e))},window.addEventListener("resize",nr)),()=>{er.delete(t),!er.size&&nr&&(nr=void 0)}}const ir={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function or(t,e,n,s){const i=n[e],{length:o,position:r}=ir[e],a=i.current,l=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=bn(0,i.scrollLength,i.current);const c=s-l;i.velocity=c>50?0:Dn(i.current-a,c)}const rr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ar={start:0,center:.5,end:1};function lr(t,e,n=0){let s=0;if(void 0!==ar[t]&&(t=ar[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const cr=[0,0];function ur(t,e,n,s){let i=Array.isArray(t)?t:cr,o=0,r=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,ar[t]?t:"0"]),o=lr(i[0],n,s),r=lr(i[1],e),o-r}const hr={x:0,y:0};function dr(t,e,n){let{offset:s=rr.All}=n;const{target:i=t,axis:o="y"}=n,r="y"===o?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,o=s.parentNode;for(;!i;)"svg"===o.tagName&&(i=o),o=s.parentNode;s=i}}return n}(i,t):hr,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=ur(s[t],c[r],l[r],a[o]);u||n===e[o].interpolatorOffsets[t]||(u=!0),e[o].offset[t]=n}u&&(e[o].interpolate=An(e[o].offset,Vn(s)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function mr(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){or(t,"x",e,n),or(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&dr(t,n,s)},notify:()=>e(n)}}const pr=new WeakMap,fr=new WeakMap,gr=new WeakMap,yr=t=>t===document.documentElement?window:t;function vr(t,{container:e=document.documentElement,...n}={}){let s=gr.get(e);s||(s=new Set,gr.set(e,s));const i=mr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!pr.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update($t.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{zt.read(t,!1,!0),zt.update(n,!1,!0),zt.update(i,!1,!0)};pr.set(e,a);const l=yr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&fr.set(e,(r=a,"function"==typeof(o=e)?sr(o):tr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=pr.get(e);return zt.read(a,!1,!0),()=>{var t;Ht(a);const n=gr.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=pr.get(e);pr.delete(e),s&&(yr(e).removeEventListener("scroll",s),null===(t=fr.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const xr=new Map;function Pr({source:t=document.documentElement,axis:e="y"}={}){xr.has(t)||xr.set(t,{});const n=xr.get(t);return n[e]||(n[e]=io()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=vr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const wr={some:0,all:1};function Er(t,e,{root:n,margin:s,amount:i="some"}={}){const o=eo(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:wr[i]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function br(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=An(i,o,{mixer:(l=o[0],(t=>"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(s):a}const Sr=zt,Tr=Nt.reduce((t,e)=>(t[e]=t=>Ht(t),t),{}),Ar=["","X","Y","Z"],Cr={visibility:"hidden"};let Vr=0;const Mr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Dr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Vr++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Mr.totalNodes=Mr.resolvedTargetDeltas=Mr.recalculatedProjection=0,this.nodes.forEach(kr),this.nodes.forEach(Wr),this.nodes.forEach(Nr),this.nodes.forEach(Br),t=Mr,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ji)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ms),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ro(e),this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=to(s,250),Qi.hasAnimatedSinceResize&&(Qi.hasAnimatedSinceResize=!1,this.nodes.forEach(Ur))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||Gr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Gi(this.targetLayout,s)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...as(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Ur(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ht(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Fr);this.isUpdating||this.nodes.forEach(Or),this.isUpdating=!1,this.nodes.forEach(Ir),this.nodes.forEach(Lr),this.nodes.forEach(Rr),this.clearAllSnapshots();const t=performance.now();$t.delta=Y(0,1e3/60,t-$t.timestamp),$t.timestamp=t,$t.isProcessing=!0,Yt.update.process($t),Yt.preRender.process($t),Yt.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(jr),this.sharedNodes.forEach(Hr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!Xi(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||hi(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),Kr((s=n).x),Kr(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(xi(e.x,n.offset.x),xi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ui(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){Ui(e,t);const{scroll:n}=this.root;n&&(xi(e.x,-n.offset.x),xi(e.y,-n.offset.y))}xi(e.x,i.offset.x),xi(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ui(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&bi(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),hi(s.latestValues)&&bi(n,s.latestValues)}return hi(this.latestValues)&&bi(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ui(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!hi(n.latestValues))continue;ui(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};Ui(s,n.measurePageBox()),$i(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return hi(this.latestValues)&&$i(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const s=Boolean(this.resumingFrom)||this!==n;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ti(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ui(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,Js(r.x,a.x,l.x),Js(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ui(this.target,this.layout.layoutBox),yi(this.target,this.targetDelta)):Ui(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ti(this.relativeTargetOrigin,this.target,t.target),Ui(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Mr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!ui(this.parent.latestValues)&&!di(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===$t.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;Ui(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&bi(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,yi(t,r)),s&&hi(o.latestValues)&&bi(t,o.latestValues))}e.x=vi(e.x),e.y=vi(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox);const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const c=this.projectionTransform;_s(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=Ki(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Mr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Xr));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,m,p,f,g;$r(o.x,t.x,n),$r(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ti(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=r,g=n,Yr(m.x,p.x,f.x,g),Yr(m.y,p.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ui(h,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=nn(0,void 0!==n.opacity?n.opacity:1,ji(s)),t.opacityExit=nn(void 0!==e.opacity?e.opacity:1,0,Fi(s))):o&&(t.opacity=nn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<Li;i++){const o=`border${Di[i]}Radius`;let r=Bi(e,o),a=Bi(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ki(r)===ki(a)?(t[o]=Math.max(nn(Ri(r),Ri(a),s),0),(nt.test(a)||nt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=nn(e.rotate||0,n.rotate||0,s))}(i,s,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ht(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zt.update(()=>{Qi.hasAnimatedSinceResize=!0,this.currentAnimation=ko(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&_r(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=qs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=qs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}Ui(e,n),bi(e,i),_s(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Zi);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<Ar.length;e++){const i="rotate"+Ar[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Cr;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ft(null==t?void 0:t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ft(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!hi(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=Ki(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in R){if(void 0===r[t])continue;const{correct:e,applyTo:n}=R[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?Ft(null==t?void 0:t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Fr),this.root.sharedNodes.clear()}}}function Lr(t){t.updateLayout()}function Rr(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?ai(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=qs(s);s.min=e[t].min,s.max=s.min+i}):_r(i,n.layoutBox,e)&&ai(s=>{const i=o?n.measuredBox[s]:n.layoutBox[s],r=qs(e[s]);i.max=i.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};_s(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?_s(a,t.applyTransform(s,!0),n.measuredBox):_s(a,e,n.layoutBox);const l=!Xi(r);let c=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};ti(r,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ti(a,e,o.layoutBox),Gi(r,a)||(c=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function kr(t){Mr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Br(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jr(t){t.clearSnapshot()}function Fr(t){t.clearMeasurements()}function Or(t){t.isLayoutDirty=!1}function Ir(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ur(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Wr(t){t.resolveTargetDelta()}function Nr(t){t.calcProjection()}function zr(t){t.resetRotation()}function Hr(t){t.removeLeadSnapshot()}function $r(t,e,n){t.translate=nn(e.translate,0,n),t.scale=nn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Yr(t,e,n,s){t.min=nn(e.min,n.min,s),t.max=nn(e.max,n.max,s)}function Xr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Gr={duration:.45,ease:[.4,0,.1,1]},qr=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),Zr=qr("applewebkit/")&&!qr("chrome/")?Math.round:Ut;function Kr(t){t.min=Zr(t.min),t.max=Zr(t.max)}function _r(t,e,n){return"position"===t||"preserve-aspect"===t&&!Zs(qi(e),qi(n),.2)}const Jr=Dr({attachResizeListener:(t,e)=>Zt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qr={current:void 0},ta=Dr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Qr.current){const t=new Jr({});t.mount(window),t.setOptions({layoutScroll:!0}),Qr.current=t}return Qr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ea=t=>!t.isLayoutDirty&&t.willUpdate(!1);function na(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ea);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}function sa(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ia={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!st.test(t))return t;t=parseFloat(t)}return`${sa(t,e.target.x)}% ${sa(t,e.target.y)}%`}},oa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=yn.parse(t);if(i.length>5)return s;const o=yn.createTransformer(t),r="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=nn(a,l,.5);return"number"==typeof i[2+r]&&(i[2+r]/=c),"number"==typeof i[3+r]&&(i[3+r]/=c),o(i)}};function ra(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=e.useId();e.useEffect(()=>i(o),[]);return!n&&s?[!1,()=>s&&s(o)]:[!0]}class aa extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;k(ca),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Qi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||zt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function la(t){const[n,s]=ra(),i=e.useContext(S);return o.default.createElement(aa,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(T),isPresent:n,safeToRemove:s})}const ca={borderRadius:{...ia,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ia,borderTopRightRadius:ia,borderBottomLeftRadius:ia,borderBottomRightRadius:ia,boxShadow:oa},ua={pan:{Feature:class extends ae{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new Ns(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Mi(t),onStart:Mi(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&zt.update(()=>s(t,e))}}}mount(){this.removePointerDownListener=Qt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ae{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new Ci(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ta,MeasureLayout:la}},ha=(t,e)=>L(t)?new Do(e,{enableHardwareAcceleration:!1}):new Lo(e,{enableHardwareAcceleration:!0}),da={layout:{ProjectionNode:ta,MeasureLayout:la}},ma={...Is,...ye,...ua,...da},pa=M((t,e)=>qt(t,e,ma,ha));const fa=M(qt);function ga(){const t=e.useRef(!1);return u(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function ya(){const t=ga(),[n,s]=e.useState(0),i=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>zt.postRender(i),[i]),n]}class va extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function xa({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[n]),i.createElement(va,{isPresent:n,childRef:o,sizeRef:r},i.cloneElement(t,{ref:o}))}const Pa=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:c})=>{const u=Bt(wa),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===c&&(t=i.createElement(xa,{isPresent:s},t)),i.createElement(l.Provider,{value:d},t)};function wa(){return new Map}function Ea(t){return e.useEffect(()=>()=>t(),[])}const ba=t=>t.key||"";function Sa(t){return"function"==typeof t}const Ta=e.createContext(null),Aa=t=>!0===t,Ca=({children:t,id:n,inherit:s=!0})=>{const o=e.useContext(S),r=e.useContext(Ta),[a,l]=ya(),c=e.useRef(null),u=o.id||r;null===c.current&&((t=>Aa(!0===t)||"id"===t)(s)&&u&&(n=n?u+"-"+n:u),c.current={id:n,group:Aa(s)&&o.group||na()});const h=e.useMemo(()=>({...c.current,forceRender:a}),[l]);return i.createElement(S.Provider,{value:h},t)},Va=e.createContext(null);function Ma(t){return t.value}function Da(t,e){return t.layout.min-e.layout.min}function La(t){const n=Bt(()=>gs(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function Ra(t,e){const n=La(e()),s=()=>n.set(e());return s(),u(()=>{const e=()=>zt.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),Ht(s)}}),n}function ka(t,e,n,s){if("function"==typeof t)return function(t){ps.current=[],t();const e=Ra(ps.current,t);return ps.current=void 0,e}(t);const i="function"==typeof e?e:br(e,n,s);return Array.isArray(t)?Ba(t,i):Ba([t],([t])=>i(t))}function Ba(t,e){const n=Bt(()=>[]);return Ra(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function ja(t,e=0){return O(t)?t:La(e)}const Fa={Group:e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:o,values:r,...a},l){const c=Bt(()=>pa(n)),u=[],h=e.useRef(!1);Ee(Boolean(r));const d={axis:s,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[s]:u.push({value:t,layout:e[s]}),u.sort(Da)},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],l=r.layout,c=nn(l.min,l.max,.5);return 1===o&&a.layout.max+n>c||-1===o&&a.layout.min+n<c?function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}(t,i,i+o):t}(u,t,e,n);u!==s&&(h.current=!0,o(s.map(Ma).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(c,{...a,ref:l,ignoreStrict:!0},i.createElement(Va.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},c){const u=Bt(()=>pa(o)),h=e.useContext(Va),d={x:ja(n.x),y:ja(n.y)},m=ka([d.x,d.y],([t,e])=>t||e?1:"unset");Ee(Boolean(h));const{axis:p,registerItem:f,updateOrder:g}=h;return i.createElement(u,{drag:p,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:m},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[p]&&g(s,d[p].get(),n[p]),r&&r(t,e)},onLayoutMeasure:t=>f(s,t),ref:c,ignoreStrict:!0},t)}))},Oa={renderer:ha,...Is,...ye},Ia={...Oa,...ua,...da};function Ua(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])}function Wa(t,e){we(Boolean(!e||e.current))}const Na=()=>({scrollX:gs(0),scrollY:gs(0),scrollXProgress:gs(0),scrollYProgress:gs(0)});function za({container:t,target:n,layoutEffect:s=!0,...i}={}){const o=Bt(Na);return(s?u:e.useEffect)(()=>(Wa(0,n),Wa(0,t),vr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(i.offset)]),o}function Ha(t){const n=e.useRef(0),{isStatic:s}=e.useContext(r);e.useEffect(()=>{if(s)return;const e=({timestamp:e,delta:s})=>{n.current||(n.current=e),t(e-n.current,s)};return zt.update(e,!0),()=>Ht(e)},[t])}class $a extends fs{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;j.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||z(t)||"willChange"===t||(e=Ct(t)),e&&(hs(this.members,e),this.update())}remove(t){j.has(t)?(this.transforms.delete(t),this.transforms.size||ds(this.members,"transform")):ds(this.members,Ct(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Ya(){!Eo.current&&bo();const[t]=e.useState(wo.current);return t}function Xa(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){Ee(t);const i=[];return e.forEach(t=>{i.push(Ls(t,n,{transitionOverride:s}))}),Promise.all(i)},set:n=>(Ee(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?bs(t,e):"string"==typeof e?bs(t,[e]):Es(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function Ga(){const t=Bt(Xa);return u(t.mount,[]),t}const qa=Ga;class Za{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Ka=()=>new Za;function _a(t){return null!==t&&"object"==typeof t&&A in t}function Ja(){return Qa}function Qa(t){Qr.current&&(Qr.current.isUpdating=!1,Qr.current.blockUpdate(),t&&t())}const tl=(t,e)=>`${t}: ${e}`,el=new Map;function nl(t,e,n,s){const i=tl(t,j.has(e)?"transform":e),o=el.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,l=()=>{el.delete(i);try{r.cancel()}catch(t){}};return null!==a?(s.render(l),performance.now()-a||0):(l(),0)}const sl=()=>({});class il extends Vo{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return Ss(this,n,As(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const ol=Ot({scrapeMotionValuesFromProps:sl,createRenderState:sl});const rl=t=>t>.001?1/t:1e5;let al=!1;let ll=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{Ee(!r);const c=e.useContext(S).forceRender||ya()[0],h=ga(),d=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=d;const p=e.useRef(new Map).current,f=e.useRef(m),g=e.useRef(new Map).current,y=e.useRef(!0);if(u(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=ba(t);e.set(n,t)})}(d,g),f.current=m}),Ea(()=>{y.current=!0,g.clear(),p.clear()}),y.current)return i.createElement(i.Fragment,null,m.map(t=>i.createElement(Pa,{key:ba(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:l},t)));m=[...m];const v=f.current.map(ba),x=d.map(ba),P=v.length;for(let t=0;t<P;t++){const e=v[t];-1!==x.indexOf(e)||p.has(e)||p.set(e,void 0)}return"wait"===l&&p.size&&(m=[]),p.forEach((t,e)=>{if(-1!==x.indexOf(e))return;const s=g.get(e);if(!s)return;const r=v.indexOf(e);let u=t;if(!u){const t=()=>{p.delete(e);const t=Array.from(g.keys()).filter(t=>!x.includes(t));if(t.forEach(t=>g.delete(t)),f.current=d.filter(n=>{const s=ba(n);return s===e||t.includes(s)}),!p.size){if(!1===h.current)return;c(),o&&o()}};u=i.createElement(Pa,{key:ba(s),isPresent:!1,onExitComplete:t,custom:n,presenceAffectsLayout:a,mode:l},s),p.set(e,u)}m.splice(r,0,u)}),m=m.map(t=>{const e=t.key;return p.has(e)?t:i.createElement(Pa,{key:ba(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),i.createElement(i.Fragment,null,p.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{Ee(!1)},[]),i.createElement(Ca,{id:Bt(()=>"asl-"+ll++)},t)),t.DeprecatedLayoutGroupContext=Ta,t.DragControls=Za,t.FlatTree=Ji,t.LayoutGroup=Ca,t.LayoutGroupContext=S,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,o]=e.useState(!Sa(n)),r=e.useRef(void 0);if(!Sa(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{Sa(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,o(!0)})},[]),i.createElement(h.Provider,{value:{renderer:r.current,strict:s}},t)},t.MotionConfig=function({children:t,isValidProp:n,...s}){n&&yt(n),(s={...e.useContext(r),...s}).isStatic=Bt(()=>s.isStatic);const o=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return i.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=fs,t.PresenceContext=l,t.Reorder=Fa,t.SwitchLayoutGroupContext=T,t.VisualElement=Vo,t.addPointerEvent=Qt,t.addPointerInfo=Jt,t.addScaleCorrector=k,t.animate=Zo,t.animateValue=zn,t.animateVisualElement=Ls,t.animationControls=Xa,t.animations=Is,t.anticipate=Xe,t.backIn=$e,t.backInOut=Ye,t.backOut=He,t.buildTransform=W,t.calcLength=qs,t.cancelFrame=Ht,t.cancelSync=Tr,t.checkTargetForNewValues=Ss,t.circIn=We,t.circInOut=ze,t.circOut=Ne,t.clamp=Y,t.color=en,t.complex=yn,t.createBox=ri,t.createDomMotionComponent=function(t){return C(qt(t,{forwardMotionProps:!1},ma,ha))},t.createMotionComponent=C,t.createScopedAnimate=qo,t.cubicBezier=ke,t.delay=to,t.distance=Us,t.distance2D=Ws,t.domAnimation=Oa,t.domMax=Ia,t.easeIn=Be,t.easeInOut=Fe,t.easeOut=je,t.filterProps=vt,t.frame=zt,t.frameData=$t,t.inView=Er,t.interpolate=An,t.invariant=Ee,t.isBrowser=c,t.isDragActive=re,t.isMotionComponent=_a,t.isMotionValue=O,t.isValidMotionProp=ft,t.m=fa,t.makeUseVisualState=Ot,t.mirrorEasing=Ie,t.mix=nn,t.motion=pa,t.motionValue=gs,t.optimizedAppearDataAttribute=Pe,t.pipe=ee,t.progress=bn,t.px=st,t.resolveMotionValue=Ft,t.reverseEasing=Ue,t.scroll=function(t,e){const n=Pr(e);return"function"==typeof t?so(t,n):t.attachTimeline(n)},t.scrollInfo=vr,t.spring=On,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-i);let l=t*a;if(s){const e=o*t;l=qe(s)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,s,i){const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=nl;const r=tl(o,e),a=Le(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});el.set(r,{animation:a,startTime:null});const l=()=>{a.cancel();const o=Le(t,e,n,s);document.timeline&&(o.startTime=document.timeline.currentTime),el.set(r,{animation:o,startTime:performance.now()}),i&&i(o)};a.ready?a.ready.then(l).catch(Ut):l()},t.steps=Yt,t.sync=Sr,t.transform=br,t.unwrapMotionComponent=function(t){if(_a(t))return t[A]},t.useAnimate=function(){const t=Bt(()=>({current:null,animations:[]})),e=Bt(()=>qo(t));return Ea(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=qa,t.useAnimationControls=Ga,t.useAnimationFrame=Ha,t.useCycle=function(...t){const n=e.useRef(0),[s,i]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?Fo(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),i=ol({},!1),o=Bt(()=>new il({props:{},visualState:i,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{s({...t})}},null)},[s,o]),[n,Bt(()=>t=>Ls(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=La(1),s=La(1);const{visualElement:i}=e.useContext(a);return Ee(!(!t&&!i)),we(al),al=!0,t?(n=t.scaleX||n,s=t.scaleY||s):i&&(n=i.getValue("scaleX",1),s=i.getValue("scaleY",1)),{scaleX:ka(n,rl),scaleY:ka(s,rl)}},t.useDomEvent=function(t,n,s,i){e.useEffect(()=>{const e=t.current;if(s&&e)return Zt(e,n,s,i)},[t,n,s,i])},t.useDragControls=function(){return Bt(Ka)},t.useElementScroll=function(t){return za({container:t})},t.useForceUpdate=ya,t.useInView=function(t,{root:n,margin:s,amount:i,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:i};return Er(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,s,o]),r},t.useInstantLayoutTransition=Ja,t.useInstantTransition=function(){const[t,n]=ya(),s=Ja(),i=e.useRef();return e.useEffect(()=>{zt.postRender(()=>zt.postRender(()=>{n===i.current&&(Te.current=!1)}))},[n]),e=>{s(()=>{Te.current=!0,t(),e(),i.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=u,t.useMotionTemplate=function(t,...e){const n=t.length;return Ra(e.filter(O),(function(){let s="";for(let i=0;i<n;i++){s+=t[i];const n=e[i];n&&(s+=O(n)?n.get():n)}return s}))},t.useMotionValue=La,t.useMotionValueEvent=Ua,t.usePresence=ra,t.useReducedMotion=Ya,t.useReducedMotionConfig=function(){const t=Ya(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=Qr.current;t&&t.resetTree()},[])},t.useScroll=za,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),i=e.useRef(null),o=La(O(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>{if(s)return e(t);if(a(),i.current=zn({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),!$t.isProcessing){const t=performance.now()-$t.timestamp;t<30&&(i.current.time=Se(t))}return o.get()},a),[JSON.stringify(n)]),u(()=>{if(O(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=La(0);return Ha(e=>t.set(e)),t},t.useTransform=ka,t.useUnmountEffect=Ea,t.useVelocity=function(t){const e=La(t.getVelocity());return Ua(t,"velocityChange",t=>{e.set(t)}),e},t.useViewportScroll=function(){return za()},t.useWillChange=function(){return Bt(()=>new $a("auto"))},t.visualElementStore=no,t.warning=we,t.wrap=Fo,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=s(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),c="undefined"!=typeof document,u=c?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1});function d(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"==typeof t||Array.isArray(t)}function p(t){return"object"==typeof t&&"function"==typeof t.start}const f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],g=["initial",...f];function y(t){return p(t.animate)||g.some(e=>m(t[e]))}function v(t){return Boolean(y(t)||t.variants)}function x(t){const{initial:n,animate:s}=function(t,e){if(y(t)){const{initial:e,animate:n}=t;return{initial:!1===e||m(e)?e:void 0,animate:m(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:s}),[P(n),P(s)])}function P(t){return Array.isArray(t)?t.join(" "):t}const w={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},E={};for(const t in w)E[t]={isEnabled:e=>w[t].some(t=>!!e[t])};function b(t){for(const e in t)E[e]={...E[e],...t[e]}}const S=e.createContext({}),T=e.createContext({}),A=Symbol.for("motionComponentSymbol");function C({preloadedFeatures:t,createVisualElement:n,useRender:s,useVisualState:o,Component:m}){t&&b(t);const p=e.forwardRef((function(p,f){let g;const y={...e.useContext(r),...p,layoutId:V(p)},{isStatic:v}=y,P=x(p),w=o(p,v);if(!v&&c){P.visualElement=function(t,n,s,i){const{visualElement:o}=e.useContext(a),c=e.useContext(h),d=e.useContext(l),m=e.useContext(r).reducedMotion,p=e.useRef();i=i||c.renderer,!p.current&&i&&(p.current=i(t,{visualState:n,parent:o,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m}));const f=p.current;e.useInsertionEffect(()=>{f&&f.update(s,d)});const g=e.useRef(Boolean(window.HandoffAppearAnimations));return u(()=>{f&&(f.render(),g.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(f.updateFeatures(),!g.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=!1,g.current=!1)}),f}(m,w,y,n);const s=e.useContext(T),i=e.useContext(h).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,i,t,s))}return i.createElement(a.Provider,{value:P},g&&P.visualElement?i.createElement(g,{visualElement:P.visualElement,...y}):null,s(m,p,function(t,n,s){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):d(s)&&(s.current=e))},[n])}(w,P.visualElement,f),w,v,P.visualElement))}));return p[A]=m,p}function V({layoutId:t}){const n=e.useContext(S).id;return n&&void 0!==t?n+"-"+t:t}function M(t){function e(e,n={}){return C(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const D=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function L(t){return"string"==typeof t&&!t.includes("-")&&!!(D.indexOf(t)>-1||/[A-Z]/.test(t))}const R={};function k(t){Object.assign(R,t)}const B=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],j=new Set(B);function F(t,{layout:e,layoutId:n}){return j.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!R[t]||"opacity"===t)}const O=t=>Boolean(t&&t.getVelocity),I={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},U=B.length;function W(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<U;e++){const n=B[e];if(void 0!==t[n]){o+=`${I[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const N=t=>e=>"string"==typeof e&&e.startsWith(t),z=N("--"),H=N("var(--"),$=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Y=(t,e,n)=>Math.min(Math.max(n,t),e),X={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},G={...X,transform:t=>Y(0,1,t)},q={...X,default:1},Z=t=>Math.round(1e5*t)/1e5,K=/(-)?([\d]*\.?[\d])+/g,_=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,J=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Q(t){return"string"==typeof t}const tt=t=>({test:e=>Q(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),et=tt("deg"),nt=tt("%"),st=tt("px"),it=tt("vh"),ot=tt("vw"),rt={...nt,parse:t=>nt.parse(t)/100,transform:t=>nt.transform(100*t)},at={...X,transform:Math.round},lt={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:q,scaleX:q,scaleY:q,scaleZ:q,skew:et,skewX:et,skewY:et,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:G,originX:rt,originY:rt,originZ:st,zIndex:at,fillOpacity:G,strokeOpacity:G,numOctaves:at};function ct(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const t in e){const n=e[t];if(z(t)){o[t]=n;continue}const s=lt[t],h=$(n,s);if(j.has(t)){if(l=!0,r[t]=h,!u)continue;n!==(s.default||0)&&(u=!1)}else t.startsWith("origin")?(c=!0,a[t]=h):i[t]=h}if(e.transform||(l||s?i.transform=W(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const ut=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ht(t,e,n){for(const s in e)O(e[s])||F(s,n)||(t[s]=e[s])}function dt(t,n,s){const i={};return ht(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,s){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return ct(e,n,{enableHardwareAcceleration:!s},t),Object.assign({},e.vars,e.style)},[n])}(t,n,s)),t.transformValues?t.transformValues(i):i}function mt(t,e,n){const s={},i=dt(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const pt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ft(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||pt.has(t)}let gt=t=>!ft(t);function yt(t){t&&(gt=e=>e.startsWith("on")?!ft(e):t(e))}try{yt(require("@emotion/is-prop-valid").default)}catch(t){}function vt(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(gt(i)||!0===n&&ft(i)||!e&&!ft(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function xt(t,e,n){return"string"==typeof t?t:st.transform(e+n*t)}const Pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},wt={offset:"strokeDashoffset",array:"strokeDasharray"};function Et(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,d){if(ct(t,c,u,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:m,style:p,dimensions:f}=t;m.transform&&(f&&(p.transform=m.transform),delete m.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${xt(e,t.x,t.width)} ${xt(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(m.x=e),void 0!==n&&(m.y=n),void 0!==s&&(m.scale=s),void 0!==r&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Pt:wt;t[o.offset]=st.transform(-s);const r=st.transform(e),a=st.transform(n);t[o.array]=`${r} ${a}`}(m,r,a,l,!1)}const bt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),St=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Tt(t,n,s,i){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Et(e,n,{enableHardwareAcceleration:!1},St(i),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};ht(e,t.style,t),o.style={...e,...o.style}}return o}function At(t=!1){return(n,s,i,{latestValues:o},r)=>{const a=(L(n)?Tt:mt)(s,o,r,n),l={...vt(s,"string"==typeof n,t),...a,ref:i},{children:c}=s,u=e.useMemo(()=>O(c)?c.get():c,[c]);return e.createElement(n,{...l,children:u})}}const Ct=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Vt(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Mt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Dt(t,e,n,s){Vt(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Mt.has(n)?n:Ct(n),e.attrs[n])}function Lt(t,e){const{style:n}=t,s={};for(const i in n)(O(n[i])||e.style&&O(e.style[i])||F(i,t))&&(s[i]=n[i]);return s}function Rt(t,e){const n=Lt(t,e);for(const s in t)if(O(t[s])||O(e[s])){n[-1!==B.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function kt(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}function Bt(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const jt=t=>Array.isArray(t);function Ft(t){const e=O(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Ot=t=>(n,s)=>{const i=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:It(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,i,o);return s?r():Bt(r)};function It(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=Ft(o[t]);let{initial:r,animate:a}=t;const l=y(t),c=v(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!p(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=kt(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]})}return i}const Ut=t=>t;class Wt{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const Nt=["prepare","read","update","preRender","render","postRender"];const{schedule:zt,cancel:Ht,state:$t,steps:Yt}=function(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Nt.reduce((t,e)=>(t[e]=function(t){let e=new Wt,n=new Wt,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&i,c=l?e:n;return o&&r.add(t),c.add(t)&&l&&i&&(s=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let n=0;n<s;n++){const s=e.order[n];s(l),r.has(s)&&(a.schedule(s),t())}i=!1,o&&(o=!1,a.process(l))}}};return a}(()=>n=!0),t),{}),r=t=>o[t].process(i),a=()=>{const o=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,Nt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))};return{schedule:Nt.reduce((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(a)),l.schedule(e,o,r)),e},{}),cancel:t=>Nt.forEach(e=>o[e].cancel(t)),state:i,steps:o}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ut,!0),Xt={useVisualState:Ot({scrapeMotionValuesFromProps:Rt,createRenderState:bt,onMount:(t,e,{renderState:n,latestValues:s})=>{zt.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),zt.render(()=>{Et(n,s,{enableHardwareAcceleration:!1},St(e.tagName),t.transformTemplate),Dt(e,n)})}})},Gt={useVisualState:Ot({scrapeMotionValuesFromProps:Lt,createRenderState:ut})};function qt(t,{forwardMotionProps:e=!1},n,s){return{...L(t)?Xt:Gt,preloadedFeatures:n,useRender:At(e),createVisualElement:s,Component:t}}function Zt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Kt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function _t(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Jt=t=>e=>Kt(e)&&t(e,_t(e));function Qt(t,e,n,s){return Zt(t,e,Jt(n),s)}const te=(t,e)=>n=>e(t(n)),ee=(...t)=>t.reduce(te);function ne(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const se=ne("dragHorizontal"),ie=ne("dragVertical");function oe(t){let e=!1;if("y"===t)e=ie();else if("x"===t)e=se();else{const t=se(),n=ie();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function re(){const t=oe(!0);return!t||(t(),!1)}class ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}function le(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return Qt(t.current,n,(n,i)=>{if("touch"===n.type||re())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&zt.update(()=>o[s](n,i))},{passive:!t.getProps()[s]})}const ce=(t,e)=>!!e&&(t===e||ce(t,e.parentElement));function ue(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,_t(n))}const he=new WeakMap,de=new WeakMap,me=t=>{const e=he.get(t.target);e&&e(t)},pe=t=>{t.forEach(me)};function fe(t,e,n){const s=function({root:t,...e}){const n=t||document;de.has(n)||de.set(n,{});const s=de.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(pe,{root:t,...e})),s[i]}(e);return he.set(t,n),s.observe(t),()=>{he.delete(t),s.unobserve(t)}}const ge={some:0,all:1};const ye={inView:{Feature:class extends ae{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:ge[s]};return fe(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ae{constructor(){super(...arguments),this.removeStartListeners=Ut,this.removeEndListeners=Ut,this.removeAccessibleListeners=Ut,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=Qt(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();zt.update(()=>{ce(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)})},{passive:!(n.onTap||n.onPointerUp)}),i=Qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ee(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Zt(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Zt(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&ue("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&zt.update(()=>n(t,e))})}),ue("down",(t,e)=>{this.startPress(t,e)})}),e=Zt(this.node.current,"blur",()=>{this.isPressing&&ue("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=ee(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&zt.update(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!re()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&zt.update(()=>n(t,e))}mount(){const t=this.node.getProps(),e=Qt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Zt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ee(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ae{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ee(Zt(this.node.current,"focus",()=>this.onFocus()),Zt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ae{mount(){this.unmount=ee(le(this.node,!0),le(this.node,!1))}unmount(){}}}};function ve(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function xe(t,e,n){const s=t.getProps();return kt(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}const Pe="data-"+Ct("framerAppearId");let we=Ut,Ee=Ut;const be=t=>1e3*t,Se=t=>t/1e3,Te={current:!1},Ae=t=>Array.isArray(t)&&"number"==typeof t[0];function Ce(t){return Boolean(!t||"string"==typeof t&&Me[t]||Ae(t)||Array.isArray(t)&&t.every(Ce))}const Ve=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Me={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ve([0,.65,.55,1]),circOut:Ve([.55,0,1,.45]),backIn:Ve([.31,.01,.66,-.59]),backOut:Ve([.33,1.53,.69,.99])};function De(t){if(t)return Ae(t)?Ve(t):Array.isArray(t)?t.map(De):Me[t]}function Le(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=De(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Re=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ke(t,e,n,s){if(t===e&&n===s)return Ut;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=Re(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Re(i(t),e,s)}const Be=ke(.42,0,1,1),je=ke(0,0,.58,1),Fe=ke(.42,0,.58,1),Oe=t=>Array.isArray(t)&&"number"!=typeof t[0],Ie=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ue=t=>e=>1-t(1-e),We=t=>1-Math.sin(Math.acos(t)),Ne=Ue(We),ze=Ie(Ne),He=ke(.33,1.53,.69,.99),$e=Ue(He),Ye=Ie($e),Xe=t=>(t*=2)<1?.5*$e(t):.5*(2-Math.pow(2,-10*(t-1))),Ge={linear:Ut,easeIn:Be,easeInOut:Fe,easeOut:je,circIn:We,circInOut:ze,circOut:Ne,backIn:$e,backInOut:Ye,backOut:He,anticipate:Xe},qe=t=>{if(Array.isArray(t)){Ee(4===t.length);const[e,n,s,i]=t;return ke(e,n,s,i)}return"string"==typeof t?(Ee(void 0!==Ge[t]),Ge[t]):t},Ze=(t,e)=>n=>Boolean(Q(n)&&J.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ke=(t,e,n)=>s=>{if(!Q(s))return s;const[i,o,r,a]=s.match(K);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},_e={...X,transform:t=>Math.round((t=>Y(0,255,t))(t))},Je={test:Ze("rgb","red"),parse:Ke("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+_e.transform(t)+", "+_e.transform(e)+", "+_e.transform(n)+", "+Z(G.transform(s))+")"};const Qe={test:Ze("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:Je.transform},tn={test:Ze("hsl","hue"),parse:Ke("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+nt.transform(Z(e))+", "+nt.transform(Z(n))+", "+Z(G.transform(s))+")"},en={test:t=>Je.test(t)||Qe.test(t)||tn.test(t),parse:t=>Je.test(t)?Je.parse(t):tn.test(t)?tn.parse(t):Qe.parse(t),transform:t=>Q(t)?t:t.hasOwnProperty("red")?Je.transform(t):tn.transform(t)},nn=(t,e,n)=>-n*t+n*e+t;function sn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const on=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},rn=[Qe,Je,tn];function an(t){const e=(n=t,rn.find(t=>t.test(n)));var n;Ee(Boolean(e));let s=e.parse(t);return e===tn&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=sn(a,s,t+1/3),o=sn(a,s,t),r=sn(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const ln=(t,e)=>{const n=an(t),s=an(e),i={...n};return t=>(i.red=on(n.red,s.red,t),i.green=on(n.green,s.green,t),i.blue=on(n.blue,s.blue,t),i.alpha=nn(n.alpha,s.alpha,t),Je.transform(i))};const cn={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:Ut},un={regex:_,countKey:"Colors",token:"${c}",parse:en.parse},hn={regex:K,countKey:"Numbers",token:"${n}",parse:X.parse};function dn(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function mn(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&dn(n,cn),dn(n,un),dn(n,hn),n}function pn(t){return mn(t).values}function fn(t){const{values:e,numColors:n,numVars:s,tokenised:i}=mn(t),o=e.length;return t=>{let e=i;for(let i=0;i<o;i++)e=i<s?e.replace(cn.token,t[i]):i<s+n?e.replace(un.token,en.transform(t[i])):e.replace(hn.token,Z(t[i]));return e}}const gn=t=>"number"==typeof t?0:t;const yn={test:function(t){var e,n;return isNaN(t)&&Q(t)&&((null===(e=t.match(K))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(_))||void 0===n?void 0:n.length)||0)>0},parse:pn,createTransformer:fn,getAnimatableNone:function(t){const e=pn(t);return fn(t)(e.map(gn))}},vn=(t,e)=>n=>""+(n>0?e:t);function xn(t,e){return"number"==typeof t?n=>nn(t,e,n):en.test(t)?ln(t,e):t.startsWith("var(")?vn(t,e):En(t,e)}const Pn=(t,e)=>{const n=[...t],s=n.length,i=t.map((t,n)=>xn(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}},wn=(t,e)=>{const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=xn(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},En=(t,e)=>{const n=yn.createTransformer(e),s=mn(t),i=mn(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?ee(Pn(s.values,i.values),n):(we(!0),vn(t,e))},bn=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Sn=(t,e)=>n=>nn(t,e,n);function Tn(t,e,n){const s=[],i=n||("number"==typeof(o=t[0])?Sn:"string"==typeof o?en.test(o)?ln:En:Array.isArray(o)?Pn:"object"==typeof o?wn:Sn);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Ut:e;o=ee(t,o)}s.push(o)}return s}function An(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Ee(o===e.length),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Tn(e,s,i),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=bn(t[n],t[n+1],e);return r[n](s)};return n?e=>l(Y(t[0],t[o-1],e)):l}function Cn(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=bn(0,e,s);t.push(nn(n,1,i))}}function Vn(t){const e=[0];return Cn(e,t.length-1),e}function Mn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Oe(s)?s.map(qe):qe(s),o={done:!1,value:e[0]},r=An(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Vn(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Fe).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function Dn(t,e){return e?t*(1e3/e):0}function Ln(t,e,n){const s=Math.max(e-5,0);return Dn(n-t(s),e-s)}function Rn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;we(t<=be(10));let r=1-e;r=Y(.05,1,r),t=Y(.01,10,Se(t)),r<1?(i=e=>{const s=e*r,i=s*t;return.001-(s-n)/kn(e,r)*Math.exp(-i)},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-s),c=kn(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((o-a)*l)/c}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,o,5/t);if(t=be(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}function kn(t,e){return t*Math.sqrt(1-e*e)}const Bn=["duration","bounce"],jn=["stiffness","damping","mass"];function Fn(t,e){return e.some(e=>void 0!==t[e])}function On({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Fn(t,jn)&&Fn(t,Bn)){const n=Rn(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s),m=u?-Se(u):0,p=l/(2*Math.sqrt(a*c)),f=o-i,g=Se(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),p<1){const t=kn(g,p);v=e=>{const n=Math.exp(-p*g*e);return o-n*((m+p*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===p)v=t=>o-Math.exp(-g*t)*(f+(m+g*f)*t);else{const t=g*Math.sqrt(p*p-1);v=e=>{const n=Math.exp(-p*g*e),s=Math.min(t*e,300);return o-n*((m+p*g*f)*Math.sinh(s)+t*f*Math.cosh(s))/t}}return{calculatedDuration:d&&h||null,next:t=>{const s=v(t);if(d)r.done=t>=h;else{let i=m;0!==t&&(i=p<1?Ln(v,t,s):0);const a=Math.abs(i)<=n,l=Math.abs(o-s)<=e;r.done=a&&l}return r.value=r.done?o:s,r}}}function In({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=h+p,g=void 0===r?f:r(f);g!==f&&(p=g-h);const y=t=>-p*Math.exp(-t/s),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let P,w;const E=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=On({keyframes:[d.value,m(d.value)],velocity:Ln(v,t,d.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),E(t)),void 0!==P&&t>P?w.next(t-P):(!e&&x(t),d)}}}const Un=t=>{const e=({timestamp:e})=>t(e);return{start:()=>zt.update(e,!0),stop:()=>Ht(e),now:()=>$t.isProcessing?$t.timestamp:performance.now()}};function Wn(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const Nn={decay:In,inertia:In,tween:Mn,keyframes:Mn,spring:On};function zn({autoplay:t=!0,delay:e=0,driver:n=Un,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let m,p,f=1,g=!1;const y=()=>{p=new Promise(t=>{m=t})};let v;y();const x=Nn[i]||Mn;let P;x!==Mn&&"number"!=typeof s[0]&&(P=An([0,100],s,{clamp:!1}),s=[0,100]);const w=x({...d,keyframes:s});let E;"mirror"===a&&(E=x({...d,keyframes:[...s].reverse(),velocity:-(d.velocity||0)}));let b="idle",S=null,T=null,A=null;null===w.calculatedDuration&&o&&(w.calculatedDuration=Wn(w));const{calculatedDuration:C}=w;let V=1/0,M=1/0;null!==C&&(V=C+r,M=V*(o+1)-r);let D=0;const L=t=>{if(null===T)return;f>0&&(T=Math.min(T,t)),f<0&&(T=Math.min(t-M/f,T)),D=null!==S?S:Math.round(t-T)*f;const n=D-e*(f>=0?1:-1),i=f>=0?n<0:n>M;D=Math.max(n,0),"finished"===b&&null===S&&(D=M);let l=D,c=w;if(o){const t=D/V;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);const s=Boolean(e%2);s&&("reverse"===a?(n=1-n,r&&(n-=r/V)):"mirror"===a&&(c=E));let i=Y(0,1,n);D>M&&(i="reverse"===a&&s?1:0),l=i*V}const u=i?{done:!1,value:s[0]}:c.next(l);P&&(u.value=P(u.value));let{done:d}=u;i||null===C||(d=f>=0?D>=M:D<=0);const m=null===S&&("finished"===b||"running"===b&&d);return h&&h(u.value),m&&B(),u},R=()=>{v&&v.stop(),v=void 0},k=()=>{b="idle",R(),m(),y(),T=A=null},B=()=>{b="finished",u&&u(),R(),m()},j=()=>{if(g)return;v||(v=n(L));const t=v.now();l&&l(),null!==S?T=t-S:T&&"finished"!==b||(T=t),"finished"===b&&y(),A=T,S=null,b="running",v.start()};t&&j();const F={then:(t,e)=>p.then(t,e),get time(){return Se(D)},set time(t){t=be(t),D=t,null===S&&v&&0!==f?T=v.now()-t/f:S=t},get duration(){const t=null===w.calculatedDuration?Wn(w):w.calculatedDuration;return Se(t)},get speed(){return f},set speed(t){t!==f&&v&&(f=t,F.time=Se(D))},get state(){return b},play:j,pause:()=>{b="paused",S=D},stop:()=>{g=!0,"idle"!==b&&(b="idle",c&&c(),k())},cancel:()=>{null!==A&&L(A),k()},complete:()=>{b="finished"},sample:t=>(T=0,L(t))};return F}function Hn(t){let e;return()=>(void 0===e&&(e=t()),e)}const $n=Hn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Yn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Xn(t,e,{onUpdate:n,onComplete:s,...i}){if(!($n()&&Yn.has(e)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let o,r,a=!1;const l=()=>{r=new Promise(t=>{o=t})};l();let{keyframes:c,duration:u=300,ease:h,times:d}=i;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!Ce(e.ease))(e,i)){const t=zn({...i,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;d=void 0,c=n,u=s-10,h="linear"}const m=Le(t.owner.current,e,c,{...i,duration:u,ease:h,times:d});i.syncStart&&(m.startTime=$t.isProcessing?$t.timestamp:document.timeline?document.timeline.currentTime:performance.now());const p=()=>m.cancel(),f=()=>{zt.update(p),o(),l()};m.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,i)),s&&s(),f()};return{then:(t,e)=>r.then(t,e),attachTimeline:t=>(m.timeline=t,m.onfinish=null,Ut),get time(){return Se(m.currentTime||0)},set time(t){m.currentTime=be(t)},get speed(){return m.playbackRate},set speed(t){m.playbackRate=t},get duration(){return Se(u)},play:()=>{a||(m.play(),Ht(p))},pause:()=>m.pause(),stop:()=>{if(a=!0,"idle"===m.playState)return;const{currentTime:e}=m;if(e){const n=zn({...i,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}f()},complete:()=>m.finish(),cancel:f}}const Gn={type:"spring",stiffness:500,damping:25,restSpeed:10},qn={type:"keyframes",duration:.8},Zn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kn=(t,{keyframes:e})=>e.length>2?qn:j.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Gn:Zn,_n=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!yn.test(e)&&"0"!==e||e.startsWith("url("))),Jn=new Set(["brightness","contrast","saturate","opacity"]);function Qn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(K)||[];if(!s)return t;const i=n.replace(s,"");let o=Jn.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ts=/([a-z-]*)\(.*?\)/g,es={...yn,getAnimatableNone:t=>{const e=t.match(ts);return e?e.map(Qn).join(" "):t}},ns={...lt,color:en,backgroundColor:en,outlineColor:en,fill:en,stroke:en,borderColor:en,borderTopColor:en,borderRightColor:en,borderBottomColor:en,borderLeftColor:en,filter:es,WebkitFilter:es},ss=t=>ns[t];function is(t,e){let n=ss(t);return n!==es&&(n=yn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const os=t=>/^0[^.\s]+$/.test(t);function rs(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||os(t):void 0}function as(t,e){return t[e]||t.default||t}const ls=(t,e,n,s={})=>i=>{const o=as(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a-=be(r);const l=function(t,e,n,s){const i=_n(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==s.from?s.from:t.get();let a=void 0;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?r:o[t-1]),rs(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(i&&l.length&&a)for(let t=0;t<l.length;t++){o[l[t]]=is(e,a)}return o}(e,t,n,o),c=l[0],u=l[l.length-1],h=_n(t,c),d=_n(t,u);we(h===d);let m={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(o)||(m={...m,...Kn(t,m)}),m.duration&&(m.duration=be(m.duration)),m.repeatDelay&&(m.repeatDelay=be(m.repeatDelay)),!h||!d||Te.current||!1===o.type)return function({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:Ut,pause:Ut,stop:Ut,then:t=>(t(),Promise.resolve()),cancel:Ut,complete:Ut});return e?zn({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}(Te.current?{...m,delay:0}:m);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Xn(e,t,m);if(n)return n}return zn(m)};function cs(t){return Boolean(O(t)&&t.add)}const us=t=>/^\-?\d*\.?\d+$/.test(t);function hs(t,e){-1===t.indexOf(e)&&t.push(e)}function ds(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ms{constructor(){this.subscriptions=[]}add(t){return hs(this.subscriptions,t),()=>ds(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ps={current:void 0};class fs{constructor(t,e={}){var n;this.version="10.16.9",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=$t;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,zt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>zt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ms);const n=this.events[t].add(e);return"change"===t?()=>{n(),zt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ps.current&&ps.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Dn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gs(t,e){return new fs(t,e)}const ys=t=>e=>e.test(t),vs=[X,st,nt,et,ot,it,{test:t=>"auto"===t,parse:t=>t}],xs=t=>vs.find(ys(t)),Ps=[...vs,en,yn];function ws(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gs(n))}function Es(t,e){const n=xe(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const e in o){ws(t,e,(r=o[e],jt(r)?r[r.length-1]||0:r))}var r}function bs(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&Es(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{bs(t,e)})})}function Ss(t,e,n){var s,i;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;var a;if(r)for(let l=0;l<r;l++){const r=o[l],c=e[r];let u=null;Array.isArray(c)&&(u=c[0]),null===u&&(u=null!==(i=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==i?i:e[r]),null!=u&&("string"==typeof u&&(us(u)||os(u))?u=parseFloat(u):(a=u,!Ps.find(ys(a))&&yn.test(c)&&(u=is(r,c))),t.addValue(r,gs(u,{owner:t})),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}function Ts(t,e){if(!e)return;return(e[t]||e.default||e).from}function As(t,e,n){const s={};for(const i in t){const t=Ts(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}function Cs({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Vs(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(o=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e),i=a[e];if(!s||void 0===i||u&&Cs(u,e))continue;const r={delay:n,elapsed:0,...as(o||{},e)};let h=!0;if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[Pe];n&&(h=!1,r.elapsed=window.HandoffAppearAnimations(n,e,s,zt),r.syncStart=!0)}let d=h&&i===s.get();if("spring"===r.type&&(s.getVelocity()||r.velocity)&&(d=!1),d)continue;if(h&&i===s.get()&&("spring"!==r.type||!s.getVelocity()&&!r.velocity))continue;s.start(ls(e,s,i,t.shouldReduceMotion&&j.has(e)?{type:!1}:r));const m=s.animation;cs(l)&&(l.add(e),m.then(()=>l.remove(e))),c.push(m)}return r&&Promise.all(c).then(()=>{r&&Es(t,r)}),c}function Ms(t,e,n={}){const s=xe(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Vs(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=i;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Ds).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Ms(t,e,{...o,delay:n+l(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+s,r,a,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Ds(t,e){return t.sortNodePosition(e)}function Ls(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map(e=>Ms(t,e,n));s=Promise.all(i)}else if("string"==typeof e)s=Ms(t,e,n);else{const i="function"==typeof e?xe(t,e,n.custom):e;s=Promise.all(Vs(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const Rs=[...f].reverse(),ks=f.length;function Bs(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ls(t,e,n)))}(t);const n={animate:Fs(!0),whileInView:Fs(),whileHover:Fs(),whileTap:Fs(),whileDrag:Fs(),whileFocus:Fs(),exit:Fs()};let s=!0;const i=(e,n)=>{const s=xe(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<ks;e++){const f=Rs[e],g=n[f],y=void 0!==a[f]?a[f]:l[f],v=m(y),x=f===r?g.isActive:null;!1===x&&(d=e);let P=y===l[f]&&y!==a[f]&&v;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys={...h},!g.isActive&&null===x||!y&&!g.prevProp||p(y)||"boolean"==typeof y)continue;const w=js(g.prevProp,y);let E=w||f===r&&g.isActive&&!P&&v||e>d&&v;const b=Array.isArray(y)?y:[y];let S=b.reduce(i,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,A={...T,...S},C=t=>{E=!0,u.delete(t),g.needsAnimating[t]=!0};for(const t in A){const e=S[t],n=T[t];h.hasOwnProperty(t)||(e!==n?jt(e)&&jt(n)?!ve(e,n)||w?C(t):g.protectedKeys[t]=!0:void 0!==e?C(t):u.add(t):void 0!==e&&u.has(t)?C(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),s&&t.blockInitialAnimation&&(E=!1),E&&!P&&c.push(...b.map(t=>({animation:t,options:{type:f,...o}})))}if(u.size){const e={};u.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let f=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),s=!1,f?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,s,i){var r;if(n[e].isActive===s)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const a=o(i,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function js(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ve(e,t)}function Fs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Os=0;const Is={animation:{Feature:class extends ae{constructor(t){super(t),t.animationState||(t.animationState=Bs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),p(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ae{constructor(){super(...arguments),this.id=Os++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Us=(t,e)=>Math.abs(t-e);function Ws(t,e){const n=Us(t.x,e.x),s=Us(t.y,e.y);return Math.sqrt(n**2+s**2)}class Ns{constructor(t,e,{transformPagePoint:n,contextWindow:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=$s(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ws(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=$t;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=zs(e,this.transformPagePoint),zt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:s}=this.handlers,i=$s("pointercancel"===t.type?this.lastMoveEventInfo:zs(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,i),s&&s(t,i)},!Kt(t))return;this.handlers=e,this.transformPagePoint=n,this.contextWindow=s||window;const i=zs(_t(t),this.transformPagePoint),{point:o}=i,{timestamp:r}=$t;this.history=[{...o,timestamp:r}];const{onSessionStart:a}=e;a&&a(t,$s(i,this.history)),this.removeListeners=ee(Qt(this.contextWindow,"pointermove",this.handlePointerMove),Qt(this.contextWindow,"pointerup",this.handlePointerUp),Qt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ht(this.updatePoint)}}function zs(t,e){return e?{point:e(t.point)}:t}function Hs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function $s({point:t},e){return{point:t,delta:Hs(t,Xs(e)),offset:Hs(t,Ys(e)),velocity:Gs(e,.1)}}function Ys(t){return t[0]}function Xs(t){return t[t.length-1]}function Gs(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Xs(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>be(e)));)n--;if(!s)return{x:0,y:0};const o=Se(i.timestamp-s.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function qs(t){return t.max-t.min}function Zs(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ks(t,e,n,s=.5){t.origin=s,t.originPoint=nn(e.min,e.max,t.origin),t.scale=qs(n)/qs(e),(Zs(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=nn(n.min,n.max,t.origin)-t.originPoint,(Zs(t.translate)||isNaN(t.translate))&&(t.translate=0)}function _s(t,e,n,s){Ks(t.x,e.x,n.x,s?s.originX:void 0),Ks(t.y,e.y,n.y,s?s.originY:void 0)}function Js(t,e,n){t.min=n.min+e.min,t.max=t.min+qs(e)}function Qs(t,e,n){t.min=e.min-n.min,t.max=t.min+qs(e)}function ti(t,e,n){Qs(t.x,e.x,n.x),Qs(t.y,e.y,n.y)}function ei(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ni(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const si=.35;function ii(t,e,n){return{min:oi(t,e),max:oi(t,n)}}function oi(t,e){return"number"==typeof t?t:t[e]||0}const ri=()=>({x:{min:0,max:0},y:{min:0,max:0}});function ai(t){return[t("x"),t("y")]}function li({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ci(t){return void 0===t||1===t}function ui({scale:t,scaleX:e,scaleY:n}){return!ci(t)||!ci(e)||!ci(n)}function hi(t){return ui(t)||di(t)||t.z||t.rotate||t.rotateX||t.rotateY}function di(t){return mi(t.x)||mi(t.y)}function mi(t){return t&&"0%"!==t}function pi(t,e,n){return n+e*(t-n)}function fi(t,e,n,s,i){return void 0!==i&&(t=pi(t,i,s)),pi(t,n,s)+e}function gi(t,e=0,n=1,s,i){t.min=fi(t.min,e,n,s,i),t.max=fi(t.max,e,n,s,i)}function yi(t,{x:e,y:n}){gi(t.x,e.translate,e.scale,e.originPoint),gi(t.y,n.translate,n.scale,n.originPoint)}function vi(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function xi(t,e){t.min=t.min+e,t.max=t.max+e}function Pi(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=nn(t.min,t.max,o);gi(t,e[n],e[s],r,e.scale)}const wi=["x","scaleX","originX"],Ei=["y","scaleY","originY"];function bi(t,e){Pi(t.x,e,wi),Pi(t.y,e,Ei)}function Si(t,e){return li(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}const Ti=({current:t})=>t?t.ownerDocument.defaultView:null,Ai=new WeakMap;class Ci{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Ns(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(_t(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=oe(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ai(t=>{let e=this.getAxisMotionValue(t).get()||0;if(nt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=qs(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),i&&zt.update(()=>i(t,e),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:Ti(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&zt.update(()=>i(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!Vi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?nn(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?nn(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&d(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!s)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:ei(t.x,n,i),y:ei(t.y,e,s)}}(s.layoutBox,e),this.elastic=function(t=si){return!1===t?t=0:!0===t&&(t=si),{x:ii(t,"left","right"),y:ii(t,"top","bottom")}}(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ai(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(s.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!d(t))return!1;const n=t.current;Ee(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=Si(t,n),{scroll:i}=e;return i&&(xi(s.x,i.offset.x),xi(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ni(t.x,e.x),y:ni(t.y,e.y)}}(s.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=li(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=ai(r=>{if(!Vi(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=s?200:1e6,u=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(ls(t,n,0,e))}stopAnimation(){ai(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){ai(e=>{const{drag:n}=this.getProps();if(!Vi(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-nn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!d(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ai(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=qs(t),i=qs(e);return i>s?n=bn(e.min,e.max-s,t.min):s>i&&(n=bn(t.min,t.max-i,e.min)),Y(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ai(e=>{if(!Vi(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(nn(i,o,s[e]))})}addListeners(){if(!this.visualElement.current)return;Ai.set(this.visualElement,this);const t=Qt(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();d(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=Zt(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(ai(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=si,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function Vi(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Mi=t=>(e,n)=>{t&&zt.update(()=>t(e,n))};const Di=["TopLeft","TopRight","BottomLeft","BottomRight"],Li=Di.length,Ri=t=>"string"==typeof t?parseFloat(t):t,ki=t=>"number"==typeof t||st.test(t);function Bi(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ji=Oi(0,.5,Ne),Fi=Oi(.5,.95,Ut);function Oi(t,e,n){return s=>s<t?0:s>e?1:n(bn(t,e,s))}function Ii(t,e){t.min=e.min,t.max=e.max}function Ui(t,e){Ii(t.x,e.x),Ii(t.y,e.y)}function Wi(t,e,n,s,i){return t=pi(t-=e,1/n,s),void 0!==i&&(t=pi(t,1/i,s)),t}function Ni(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){if(nt.test(e)){e=parseFloat(e);e=nn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=nn(o.min,o.max,s);t===o&&(a-=e),t.min=Wi(t.min,e,n,a,i),t.max=Wi(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const zi=["x","scaleX","originX"],Hi=["y","scaleY","originY"];function $i(t,e,n,s){Ni(t.x,e,zi,n?n.x:void 0,s?s.x:void 0),Ni(t.y,e,Hi,n?n.y:void 0,s?s.y:void 0)}function Yi(t){return 0===t.translate&&1===t.scale}function Xi(t){return Yi(t.x)&&Yi(t.y)}function Gi(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function qi(t){return qs(t.x)/qs(t.y)}class Zi{constructor(){this.members=[]}add(t){hs(this.members,t),t.scheduleRender()}remove(t){if(ds(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ki(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const _i=(t,e)=>t.depth-e.depth;class Ji{constructor(){this.children=[],this.isDirty=!1}add(t){hs(this.children,t),this.isDirty=!0}remove(t){ds(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_i),this.isDirty=!1,this.children.forEach(t)}}const Qi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function to(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Ht(s),t(o-e))};return zt.read(s,!0),()=>Ht(s)}function eo(t,e,n){var s;if("string"==typeof t){let i=document;e&&(Ee(Boolean(e.current)),i=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=i.querySelectorAll(t)),t=n[t]):t=i.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const no=new WeakMap;function so(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return zt.update(s,!0),()=>Ht(s)}const io=Hn(()=>void 0!==window.ScrollTimeline);class oo{constructor(t){this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!io()||!e.attachTimeline)return e.pause(),so(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ro(t){return t instanceof SVGElement&&"svg"!==t.tagName}const ao=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function lo(t,e,n=1){Ee(n<=4);const[s,i]=function(t){const e=ao.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return us(t)?parseFloat(t):t}return H(i)?lo(i,e,n+1):i}const co=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),uo=t=>co.has(t),ho=t=>t===X||t===st,mo=(t,e)=>parseFloat(t.split(", ")[e]),po=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return mo(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?mo(e[1],t):0}},fo=new Set(["x","y","z"]),go=B.filter(t=>!fo.has(t));const yo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:po(4,13),y:po(5,14)};yo.translateX=yo.x,yo.translateY=yo.y;const vo=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(uo);let o=[],r=!1;const a=[];if(i.forEach(i=>{const l=t.getValue(i);if(!t.hasValue(i))return;let c=n[i],u=xs(c);const h=e[i];let d;if(jt(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],u=xs(c);for(let n=e;n<t&&null!==h[n];n++)d?Ee(xs(h[n])===d):(d=xs(h[n]),Ee(d===u||ho(u)&&ho(d)))}else d=xs(h);if(u!==d)if(ho(u)&&ho(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===st&&(e[i]=h.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==d?void 0:d.transform)&&(0===c||0===h)?0===c?l.set(d.transform(c)):e[i]=u.transform(h):(r||(o=function(t){const e=[];return go.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(i),s[i]=void 0!==s[i]?s[i]:e[i],l.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=yo[t](s,o)}),e.render();const l=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=yo[n](l,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),c&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:s}}return{target:e,transitionEnd:s}};function xo(t,e,n,s){return(t=>Object.keys(t).some(uo))(e)?vo(t,e,n,s):{target:e,transitionEnd:s}}const Po=(t,e,n,s)=>{const i=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!H(e))return;const n=lo(e,s);n&&t.set(n)});for(const t in e){const i=e[t];if(!H(i))continue;const o=lo(i,s);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=i))}return{target:e,transitionEnd:n}}(t,e,s);return xo(t,e=i.target,n,s=i.transitionEnd)},wo={current:null},Eo={current:!1};function bo(){if(Eo.current=!0,c)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>wo.current=t.matches;t.addListener(e),e()}else wo.current=!1}const So=Object.keys(E),To=So.length,Ao=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Co=g.length;class Vo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>zt.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==r[t]&&O(e)&&(e.set(r[t],!1),cs(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,no.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Eo.current||bo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||wo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){no.delete(this.current),this.projection&&this.projection.unmount(),Ht(this.notifyUpdate),Ht(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=j.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&zt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i){let o,r;for(let t=0;t<To;t++){const n=So[t],{isEnabled:s,Feature:i,ProjectionNode:a,MeasureLayout:l}=E[n];a&&(o=a),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(r=l))}if(!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||r&&d(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ao.length;e++){const n=Ao[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(O(o))t.addValue(i,o),cs(s)&&s.add(i);else if(O(r))t.addValue(i,gs(o,{owner:t})),cs(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,gs(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Co;t++){const n=g[t],s=this.props[n];(m(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=gs(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=kt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||O(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new ms),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Mo extends Vo{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},i){let o=As(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),o&&(o=s(o))),i){Ss(this,n,o);const t=Po(this,n,o,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Do extends Mo{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(j.has(e)){const t=ss(e);return t&&t.default||0}return e=Mt.has(e)?e:Ct(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Rt(t,e)}build(t,e,n,s){Et(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){Dt(t,e,0,s)}mount(t){this.isSVGTag=St(t.tagName),super.mount(t)}}class Lo extends Mo{readValueFromInstance(t,e){if(j.has(e)){const t=ss(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(z(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Si(t,e)}build(t,e,n,s){ct(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Lt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;O(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Vt(t,e,n,s)}}function Ro(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ro(t)?new Do(e,{enableHardwareAcceleration:!1}):new Lo(e,{enableHardwareAcceleration:!0});n.mount(t),no.set(t,n)}function ko(t,e,n){const s=O(t)?t:gs(t);return s.start(ls("",s,e,n)),s.animation}function Bo(t,e=100){const n=On({keyframes:[0,e],...t}),s=Math.min(Wn(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:Se(s)}}function jo(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}const Fo=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Oo(t,e){return Oe(t)?t[Fo(0,t.length,e)]:t}function Io(t,e,n,s,i,o){!function(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(ds(t,i),s--)}}(t,i,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:nn(i,o,s[r]),easing:Oo(n,r)})}function Uo(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Wo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function No(t,e){return e[t]||(e[t]=[]),e[t]}function zo(t){return Array.isArray(t)?t:[t]}function Ho(t,e){return t[e]?{...t,...t[e]}:{...t}}const $o=t=>"number"==typeof t,Yo=t=>t.every($o);function Xo(t,e,n,s){const i=eo(t,s),o=i.length;Ee(Boolean(o));const r=[];for(let t=0;t<o;t++){const s=i[t];no.has(s)||Ro(s);const a=no.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...Vs(a,{...e,transition:l},{}))}return new oo(r)}function Go(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const i=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let c=0,u=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,u);continue}if(!Array.isArray(o)){l.set(o.name,jo(u,o.at,c,l));continue}let[d,m,p={}]=o;void 0!==p.at&&(u=jo(u,p.at,c,l));let f=0;const g=(t,n,s,o=0,r=0)=>{const a=zo(t),{delay:l=0,times:c=Vn(a),type:d="keyframes",...m}=n;let{ease:p=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&Yo(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...m};void 0!==g&&(e.duration=be(g));const n=Bo(e,t);p=n.ease,g=n.duration}null!=g||(g=i);const x=u+y,P=x+g;1===c.length&&0===c[0]&&(c[1]=1);const w=c.length-a.length;w>0&&Cn(c,w),1===a.length&&a.unshift(null),Io(s,a,p,c,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(O(d)){g(m,p,No("default",Wo(d,r)))}else{const t=eo(d,s,a),e=t.length;for(let n=0;n<e;n++){m=m,p=p;const s=Wo(t[n],r);for(const t in m)g(m[t],Ho(p,t),No(t,s),n,e)}c=u,u+=f}}return r.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Uo);const a=[],l=[],c=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];a.push(n),l.push(bn(0,h,e)),c.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const u=o.get(s);u.keyframes[i]=a,u.transition[i]={...e,duration:h,ease:c,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let i;i=O(n)?ko(n,t.default,e.default):Xo(n,t,e),s.push(i)}),new oo(s)}const qo=t=>function(e,n,s){let i;var o;return o=e,i=Array.isArray(o)&&Array.isArray(o[0])?Go(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?Xo(e,n,s,t):ko(e,n,s),t&&t.animations.push(i),i},Zo=qo(),Ko=new WeakMap;let _o;function Jo({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=Ko.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Qo(t){t.forEach(Jo)}function tr(t,e){_o||"undefined"!=typeof ResizeObserver&&(_o=new ResizeObserver(Qo));const n=eo(t);return n.forEach(t=>{let n=Ko.get(t);n||(n=new Set,Ko.set(t,n)),n.add(e),null==_o||_o.observe(t)}),()=>{n.forEach(t=>{const n=Ko.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==_o||_o.unobserve(t)})}}const er=new Set;let nr;function sr(t){return er.add(t),nr||(nr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};er.forEach(t=>t(e))},window.addEventListener("resize",nr)),()=>{er.delete(t),!er.size&&nr&&(nr=void 0)}}const ir={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function or(t,e,n,s){const i=n[e],{length:o,position:r}=ir[e],a=i.current,l=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=bn(0,i.scrollLength,i.current);const c=s-l;i.velocity=c>50?0:Dn(i.current-a,c)}const rr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ar={start:0,center:.5,end:1};function lr(t,e,n=0){let s=0;if(void 0!==ar[t]&&(t=ar[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const cr=[0,0];function ur(t,e,n,s){let i=Array.isArray(t)?t:cr,o=0,r=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,ar[t]?t:"0"]),o=lr(i[0],n,s),r=lr(i[1],e),o-r}const hr={x:0,y:0};function dr(t,e,n){let{offset:s=rr.All}=n;const{target:i=t,axis:o="y"}=n,r="y"===o?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,o=s.parentNode;for(;!i;)"svg"===o.tagName&&(i=o),o=s.parentNode;s=i}}return n}(i,t):hr,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=ur(s[t],c[r],l[r],a[o]);u||n===e[o].interpolatorOffsets[t]||(u=!0),e[o].offset[t]=n}u&&(e[o].interpolate=An(e[o].offset,Vn(s)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function mr(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){or(t,"x",e,n),or(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&dr(t,n,s)},notify:()=>e(n)}}const pr=new WeakMap,fr=new WeakMap,gr=new WeakMap,yr=t=>t===document.documentElement?window:t;function vr(t,{container:e=document.documentElement,...n}={}){let s=gr.get(e);s||(s=new Set,gr.set(e,s));const i=mr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!pr.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update($t.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{zt.read(t,!1,!0),zt.update(n,!1,!0),zt.update(i,!1,!0)};pr.set(e,a);const l=yr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&fr.set(e,(r=a,"function"==typeof(o=e)?sr(o):tr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=pr.get(e);return zt.read(a,!1,!0),()=>{var t;Ht(a);const n=gr.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=pr.get(e);pr.delete(e),s&&(yr(e).removeEventListener("scroll",s),null===(t=fr.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const xr=new Map;function Pr({source:t=document.documentElement,axis:e="y"}={}){xr.has(t)||xr.set(t,{});const n=xr.get(t);return n[e]||(n[e]=io()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=vr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const wr={some:0,all:1};function Er(t,e,{root:n,margin:s,amount:i="some"}={}){const o=eo(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:wr[i]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function br(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=An(i,o,{mixer:(l=o[0],(t=>"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(s):a}const Sr=zt,Tr=Nt.reduce((t,e)=>(t[e]=t=>Ht(t),t),{}),Ar=["","X","Y","Z"],Cr={visibility:"hidden"};let Vr=0;const Mr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Dr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Vr++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Mr.totalNodes=Mr.resolvedTargetDeltas=Mr.recalculatedProjection=0,this.nodes.forEach(kr),this.nodes.forEach(Wr),this.nodes.forEach(Nr),this.nodes.forEach(Br),t=Mr,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ji)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ms),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ro(e),this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=to(s,250),Qi.hasAnimatedSinceResize&&(Qi.hasAnimatedSinceResize=!1,this.nodes.forEach(Ur))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||Gr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Gi(this.targetLayout,s)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...as(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Ur(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ht(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Fr);this.isUpdating||this.nodes.forEach(Or),this.isUpdating=!1,this.nodes.forEach(Ir),this.nodes.forEach(Lr),this.nodes.forEach(Rr),this.clearAllSnapshots();const t=performance.now();$t.delta=Y(0,1e3/60,t-$t.timestamp),$t.timestamp=t,$t.isProcessing=!0,Yt.update.process($t),Yt.preRender.process($t),Yt.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(jr),this.sharedNodes.forEach(Hr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!Xi(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||hi(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),Kr((s=n).x),Kr(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(xi(e.x,n.offset.x),xi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ui(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){Ui(e,t);const{scroll:n}=this.root;n&&(xi(e.x,-n.offset.x),xi(e.y,-n.offset.y))}xi(e.x,i.offset.x),xi(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ui(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&bi(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),hi(s.latestValues)&&bi(n,s.latestValues)}return hi(this.latestValues)&&bi(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ui(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!hi(n.latestValues))continue;ui(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};Ui(s,n.measurePageBox()),$i(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return hi(this.latestValues)&&$i(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const s=Boolean(this.resumingFrom)||this!==n;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ti(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ui(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,Js(r.x,a.x,l.x),Js(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ui(this.target,this.layout.layoutBox),yi(this.target,this.targetDelta)):Ui(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ti(this.relativeTargetOrigin,this.target,t.target),Ui(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Mr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!ui(this.parent.latestValues)&&!di(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===$t.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;Ui(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&bi(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,yi(t,r)),s&&hi(o.latestValues)&&bi(t,o.latestValues))}e.x=vi(e.x),e.y=vi(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox);const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const c=this.projectionTransform;_s(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=Ki(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Mr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Xr));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,m,p,f,g;$r(o.x,t.x,n),$r(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ti(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=r,g=n,Yr(m.x,p.x,f.x,g),Yr(m.y,p.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ui(h,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=nn(0,void 0!==n.opacity?n.opacity:1,ji(s)),t.opacityExit=nn(void 0!==e.opacity?e.opacity:1,0,Fi(s))):o&&(t.opacity=nn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<Li;i++){const o=`border${Di[i]}Radius`;let r=Bi(e,o),a=Bi(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ki(r)===ki(a)?(t[o]=Math.max(nn(Ri(r),Ri(a),s),0),(nt.test(a)||nt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=nn(e.rotate||0,n.rotate||0,s))}(i,s,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ht(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zt.update(()=>{Qi.hasAnimatedSinceResize=!0,this.currentAnimation=ko(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&_r(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=qs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=qs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}Ui(e,n),bi(e,i),_s(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Zi);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<Ar.length;e++){const i="rotate"+Ar[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Cr;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ft(null==t?void 0:t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ft(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!hi(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=Ki(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in R){if(void 0===r[t])continue;const{correct:e,applyTo:n}=R[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?Ft(null==t?void 0:t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Fr),this.root.sharedNodes.clear()}}}function Lr(t){t.updateLayout()}function Rr(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?ai(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=qs(s);s.min=e[t].min,s.max=s.min+i}):_r(i,n.layoutBox,e)&&ai(s=>{const i=o?n.measuredBox[s]:n.layoutBox[s],r=qs(e[s]);i.max=i.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};_s(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?_s(a,t.applyTransform(s,!0),n.measuredBox):_s(a,e,n.layoutBox);const l=!Xi(r);let c=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};ti(r,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ti(a,e,o.layoutBox),Gi(r,a)||(c=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function kr(t){Mr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Br(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jr(t){t.clearSnapshot()}function Fr(t){t.clearMeasurements()}function Or(t){t.isLayoutDirty=!1}function Ir(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ur(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Wr(t){t.resolveTargetDelta()}function Nr(t){t.calcProjection()}function zr(t){t.resetRotation()}function Hr(t){t.removeLeadSnapshot()}function $r(t,e,n){t.translate=nn(e.translate,0,n),t.scale=nn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Yr(t,e,n,s){t.min=nn(e.min,n.min,s),t.max=nn(e.max,n.max,s)}function Xr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Gr={duration:.45,ease:[.4,0,.1,1]},qr=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),Zr=qr("applewebkit/")&&!qr("chrome/")?Math.round:Ut;function Kr(t){t.min=Zr(t.min),t.max=Zr(t.max)}function _r(t,e,n){return"position"===t||"preserve-aspect"===t&&!Zs(qi(e),qi(n),.2)}const Jr=Dr({attachResizeListener:(t,e)=>Zt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qr={current:void 0},ta=Dr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Qr.current){const t=new Jr({});t.mount(window),t.setOptions({layoutScroll:!0}),Qr.current=t}return Qr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ea=t=>!t.isLayoutDirty&&t.willUpdate(!1);function na(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ea);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}function sa(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ia={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!st.test(t))return t;t=parseFloat(t)}return`${sa(t,e.target.x)}% ${sa(t,e.target.y)}%`}},oa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=yn.parse(t);if(i.length>5)return s;const o=yn.createTransformer(t),r="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=nn(a,l,.5);return"number"==typeof i[2+r]&&(i[2+r]/=c),"number"==typeof i[3+r]&&(i[3+r]/=c),o(i)}};function ra(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=e.useId();e.useEffect(()=>i(o),[]);return!n&&s?[!1,()=>s&&s(o)]:[!0]}class aa extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;k(ca),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Qi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||zt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function la(t){const[n,s]=ra(),i=e.useContext(S);return o.default.createElement(aa,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(T),isPresent:n,safeToRemove:s})}const ca={borderRadius:{...ia,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ia,borderTopRightRadius:ia,borderBottomLeftRadius:ia,borderBottomRightRadius:ia,boxShadow:oa},ua={pan:{Feature:class extends ae{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new Ns(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Mi(t),onStart:Mi(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&zt.update(()=>s(t,e))}}}mount(){this.removePointerDownListener=Qt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ae{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new Ci(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ta,MeasureLayout:la}},ha=(t,e)=>L(t)?new Do(e,{enableHardwareAcceleration:!1}):new Lo(e,{enableHardwareAcceleration:!0}),da={layout:{ProjectionNode:ta,MeasureLayout:la}},ma={...Is,...ye,...ua,...da},pa=M((t,e)=>qt(t,e,ma,ha));const fa=M(qt);function ga(){const t=e.useRef(!1);return u(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function ya(){const t=ga(),[n,s]=e.useState(0),i=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>zt.postRender(i),[i]),n]}class va extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function xa({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[n]),i.createElement(va,{isPresent:n,childRef:o,sizeRef:r},i.cloneElement(t,{ref:o}))}const Pa=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:c})=>{const u=Bt(wa),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===c&&(t=i.createElement(xa,{isPresent:s},t)),i.createElement(l.Provider,{value:d},t)};function wa(){return new Map}function Ea(t){return e.useEffect(()=>()=>t(),[])}const ba=t=>t.key||"";function Sa(t){return"function"==typeof t}const Ta=e.createContext(null),Aa=t=>!0===t,Ca=({children:t,id:n,inherit:s=!0})=>{const o=e.useContext(S),r=e.useContext(Ta),[a,l]=ya(),c=e.useRef(null),u=o.id||r;null===c.current&&((t=>Aa(!0===t)||"id"===t)(s)&&u&&(n=n?u+"-"+n:u),c.current={id:n,group:Aa(s)&&o.group||na()});const h=e.useMemo(()=>({...c.current,forceRender:a}),[l]);return i.createElement(S.Provider,{value:h},t)},Va=e.createContext(null);function Ma(t){return t.value}function Da(t,e){return t.layout.min-e.layout.min}function La(t){const n=Bt(()=>gs(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function Ra(t,e){const n=La(e()),s=()=>n.set(e());return s(),u(()=>{const e=()=>zt.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),Ht(s)}}),n}function ka(t,e,n,s){if("function"==typeof t)return function(t){ps.current=[],t();const e=Ra(ps.current,t);return ps.current=void 0,e}(t);const i="function"==typeof e?e:br(e,n,s);return Array.isArray(t)?Ba(t,i):Ba([t],([t])=>i(t))}function Ba(t,e){const n=Bt(()=>[]);return Ra(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function ja(t,e=0){return O(t)?t:La(e)}const Fa={Group:e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:o,values:r,...a},l){const c=Bt(()=>pa(n)),u=[],h=e.useRef(!1);Ee(Boolean(r));const d={axis:s,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[s]:u.push({value:t,layout:e[s]}),u.sort(Da)},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],l=r.layout,c=nn(l.min,l.max,.5);return 1===o&&a.layout.max+n>c||-1===o&&a.layout.min+n<c?function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}(t,i,i+o):t}(u,t,e,n);u!==s&&(h.current=!0,o(s.map(Ma).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(c,{...a,ref:l,ignoreStrict:!0},i.createElement(Va.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},c){const u=Bt(()=>pa(o)),h=e.useContext(Va),d={x:ja(n.x),y:ja(n.y)},m=ka([d.x,d.y],([t,e])=>t||e?1:"unset");Ee(Boolean(h));const{axis:p,registerItem:f,updateOrder:g}=h;return i.createElement(u,{drag:p,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:m},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[p]&&g(s,d[p].get(),n[p]),r&&r(t,e)},onLayoutMeasure:t=>f(s,t),ref:c,ignoreStrict:!0},t)}))},Oa={renderer:ha,...Is,...ye},Ia={...Oa,...ua,...da};function Ua(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])}function Wa(t,e){we(Boolean(!e||e.current))}const Na=()=>({scrollX:gs(0),scrollY:gs(0),scrollXProgress:gs(0),scrollYProgress:gs(0)});function za({container:t,target:n,layoutEffect:s=!0,...i}={}){const o=Bt(Na);return(s?u:e.useEffect)(()=>(Wa(0,n),Wa(0,t),vr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(i.offset)]),o}function Ha(t){const n=e.useRef(0),{isStatic:s}=e.useContext(r);e.useEffect(()=>{if(s)return;const e=({timestamp:e,delta:s})=>{n.current||(n.current=e),t(e-n.current,s)};return zt.update(e,!0),()=>Ht(e)},[t])}class $a extends fs{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;j.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||z(t)||"willChange"===t||(e=Ct(t)),e&&(hs(this.members,e),this.update())}remove(t){j.has(t)?(this.transforms.delete(t),this.transforms.size||ds(this.members,"transform")):ds(this.members,Ct(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Ya(){!Eo.current&&bo();const[t]=e.useState(wo.current);return t}function Xa(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){Ee(t);const i=[];return e.forEach(t=>{i.push(Ls(t,n,{transitionOverride:s}))}),Promise.all(i)},set:n=>(Ee(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?bs(t,e):"string"==typeof e?bs(t,[e]):Es(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function Ga(){const t=Bt(Xa);return u(t.mount,[]),t}const qa=Ga;class Za{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Ka=()=>new Za;function _a(t){return null!==t&&"object"==typeof t&&A in t}function Ja(){return Qa}function Qa(t){Qr.current&&(Qr.current.isUpdating=!1,Qr.current.blockUpdate(),t&&t())}const tl=(t,e)=>`${t}: ${e}`,el=new Map;function nl(t,e,n,s){const i=tl(t,j.has(e)?"transform":e),o=el.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,l=()=>{el.delete(i);try{r.cancel()}catch(t){}};return null!==a?(s.render(l),performance.now()-a||0):(l(),0)}const sl=()=>({});class il extends Vo{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return Ss(this,n,As(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const ol=Ot({scrapeMotionValuesFromProps:sl,createRenderState:sl});const rl=t=>t>.001?1/t:1e5;let al=!1;let ll=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{Ee(!r);const c=e.useContext(S).forceRender||ya()[0],h=ga(),d=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=d;const p=e.useRef(new Map).current,f=e.useRef(m),g=e.useRef(new Map).current,y=e.useRef(!0);if(u(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=ba(t);e.set(n,t)})}(d,g),f.current=m}),Ea(()=>{y.current=!0,g.clear(),p.clear()}),y.current)return i.createElement(i.Fragment,null,m.map(t=>i.createElement(Pa,{key:ba(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:l},t)));m=[...m];const v=f.current.map(ba),x=d.map(ba),P=v.length;for(let t=0;t<P;t++){const e=v[t];-1!==x.indexOf(e)||p.has(e)||p.set(e,void 0)}return"wait"===l&&p.size&&(m=[]),p.forEach((t,e)=>{if(-1!==x.indexOf(e))return;const s=g.get(e);if(!s)return;const r=v.indexOf(e);let u=t;if(!u){const t=()=>{p.delete(e);const t=Array.from(g.keys()).filter(t=>!x.includes(t));if(t.forEach(t=>g.delete(t)),f.current=d.filter(n=>{const s=ba(n);return s===e||t.includes(s)}),!p.size){if(!1===h.current)return;c(),o&&o()}};u=i.createElement(Pa,{key:ba(s),isPresent:!1,onExitComplete:t,custom:n,presenceAffectsLayout:a,mode:l},s),p.set(e,u)}m.splice(r,0,u)}),m=m.map(t=>{const e=t.key;return p.has(e)?t:i.createElement(Pa,{key:ba(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),i.createElement(i.Fragment,null,p.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{Ee(!1)},[]),i.createElement(Ca,{id:Bt(()=>"asl-"+ll++)},t)),t.DeprecatedLayoutGroupContext=Ta,t.DragControls=Za,t.FlatTree=Ji,t.LayoutGroup=Ca,t.LayoutGroupContext=S,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,o]=e.useState(!Sa(n)),r=e.useRef(void 0);if(!Sa(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{Sa(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,o(!0)})},[]),i.createElement(h.Provider,{value:{renderer:r.current,strict:s}},t)},t.MotionConfig=function({children:t,isValidProp:n,...s}){n&&yt(n),(s={...e.useContext(r),...s}).isStatic=Bt(()=>s.isStatic);const o=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return i.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=fs,t.PresenceContext=l,t.Reorder=Fa,t.SwitchLayoutGroupContext=T,t.VisualElement=Vo,t.addPointerEvent=Qt,t.addPointerInfo=Jt,t.addScaleCorrector=k,t.animate=Zo,t.animateValue=zn,t.animateVisualElement=Ls,t.animationControls=Xa,t.animations=Is,t.anticipate=Xe,t.backIn=$e,t.backInOut=Ye,t.backOut=He,t.buildTransform=W,t.calcLength=qs,t.cancelFrame=Ht,t.cancelSync=Tr,t.checkTargetForNewValues=Ss,t.circIn=We,t.circInOut=ze,t.circOut=Ne,t.clamp=Y,t.color=en,t.complex=yn,t.createBox=ri,t.createDomMotionComponent=function(t){return C(qt(t,{forwardMotionProps:!1},ma,ha))},t.createMotionComponent=C,t.createScopedAnimate=qo,t.cubicBezier=ke,t.delay=to,t.disableInstantTransitions=function(){Te.current=!1},t.distance=Us,t.distance2D=Ws,t.domAnimation=Oa,t.domMax=Ia,t.easeIn=Be,t.easeInOut=Fe,t.easeOut=je,t.filterProps=vt,t.frame=zt,t.frameData=$t,t.inView=Er,t.interpolate=An,t.invariant=Ee,t.isBrowser=c,t.isDragActive=re,t.isMotionComponent=_a,t.isMotionValue=O,t.isValidMotionProp=ft,t.m=fa,t.makeUseVisualState=Ot,t.mirrorEasing=Ie,t.mix=nn,t.motion=pa,t.motionValue=gs,t.optimizedAppearDataAttribute=Pe,t.pipe=ee,t.progress=bn,t.px=st,t.resolveMotionValue=Ft,t.reverseEasing=Ue,t.scroll=function(t,e){const n=Pr(e);return"function"==typeof t?so(t,n):t.attachTimeline(n)},t.scrollInfo=vr,t.spring=On,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-i);let l=t*a;if(s){const e=o*t;l=qe(s)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,s,i){if(!1===window.HandoffAppearAnimations)return;const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=nl;const r=tl(o,e),a=Le(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});el.set(r,{animation:a,startTime:null});const l=()=>{a.cancel();const o=Le(t,e,n,s);document.timeline&&(o.startTime=document.timeline.currentTime),el.set(r,{animation:o,startTime:performance.now()}),i&&i(o)};a.ready?a.ready.then(l).catch(Ut):l()},t.steps=Yt,t.sync=Sr,t.transform=br,t.unwrapMotionComponent=function(t){if(_a(t))return t[A]},t.useAnimate=function(){const t=Bt(()=>({current:null,animations:[]})),e=Bt(()=>qo(t));return Ea(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=qa,t.useAnimationControls=Ga,t.useAnimationFrame=Ha,t.useCycle=function(...t){const n=e.useRef(0),[s,i]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?Fo(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),i=ol({},!1),o=Bt(()=>new il({props:{},visualState:i,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{s({...t})}},null)},[s,o]),[n,Bt(()=>t=>Ls(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=La(1),s=La(1);const{visualElement:i}=e.useContext(a);return Ee(!(!t&&!i)),we(al),al=!0,t?(n=t.scaleX||n,s=t.scaleY||s):i&&(n=i.getValue("scaleX",1),s=i.getValue("scaleY",1)),{scaleX:ka(n,rl),scaleY:ka(s,rl)}},t.useDomEvent=function(t,n,s,i){e.useEffect(()=>{const e=t.current;if(s&&e)return Zt(e,n,s,i)},[t,n,s,i])},t.useDragControls=function(){return Bt(Ka)},t.useElementScroll=function(t){return za({container:t})},t.useForceUpdate=ya,t.useInView=function(t,{root:n,margin:s,amount:i,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:i};return Er(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,s,o]),r},t.useInstantLayoutTransition=Ja,t.useInstantTransition=function(){const[t,n]=ya(),s=Ja(),i=e.useRef();return e.useEffect(()=>{zt.postRender(()=>zt.postRender(()=>{n===i.current&&(Te.current=!1)}))},[n]),e=>{s(()=>{Te.current=!0,t(),e(),i.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=u,t.useMotionTemplate=function(t,...e){const n=t.length;return Ra(e.filter(O),(function(){let s="";for(let i=0;i<n;i++){s+=t[i];const n=e[i];n&&(s+=O(n)?n.get():n)}return s}))},t.useMotionValue=La,t.useMotionValueEvent=Ua,t.usePresence=ra,t.useReducedMotion=Ya,t.useReducedMotionConfig=function(){const t=Ya(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=Qr.current;t&&t.resetTree()},[])},t.useScroll=za,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),i=e.useRef(null),o=La(O(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>{if(s)return e(t);if(a(),i.current=zn({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),!$t.isProcessing){const t=performance.now()-$t.timestamp;t<30&&(i.current.time=Se(t))}return o.get()},a),[JSON.stringify(n)]),u(()=>{if(O(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=La(0);return Ha(e=>t.set(e)),t},t.useTransform=ka,t.useUnmountEffect=Ea,t.useVelocity=function(t){const e=La(t.getVelocity());return Ua(t,"velocityChange",t=>{e.set(t)}),e},t.useViewportScroll=function(){return za()},t.useWillChange=function(){return Bt(()=>new $a("auto"))},t.visualElementStore=no,t.warning=we,t.wrap=Fo,Object.defineProperty(t,"__esModule",{value:!0})}));
package/dist/index.d.ts CHANGED
@@ -4818,6 +4818,7 @@ interface ScaleCorrectorMap {
4818
4818
  declare function addScaleCorrector(correctors: ScaleCorrectorMap): void;
4819
4819
 
4820
4820
  declare function useInstantTransition(): (callback: () => void) => void;
4821
+ declare function disableInstantTransitions(): void;
4821
4822
 
4822
4823
  declare function useInstantLayoutTransition(): (cb?: (() => void) | undefined) => void;
4823
4824
 
@@ -4981,4 +4982,4 @@ declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMoti
4981
4982
 
4982
4983
  declare const AnimateSharedLayout: React$1.FunctionComponent<React$1.PropsWithChildren<unknown>>;
4983
4984
 
4984
- export { AbsoluteKeyframe, AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationDefinition, AnimationLifecycles, AnimationOptionsWithValueOverrides, AnimationPlaybackControls, AnimationPlaybackLifecycles, AnimationPlaybackOptions, AnimationProps, AnimationScope, AnimationSequence, AnimationType, At, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, CSSStyleDeclarationWithTransform, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DOMKeyframesDefinition, DOMSegment, DOMSegmentWithTransition, DecayOptions, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, DynamicAnimationOptions, DynamicOption, Easing, EasingDefinition, EasingFunction, EasingModifier, ElementOrSelector, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, MotionValueSegment, MotionValueSegmentWithTransition, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedAnimationDefinition, ResolvedAnimationDefinitions, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGKeyframesDefinition, SVGMotionProps, SVGPathKeyframesDefinition, SVGPathTransitions, SVGTransitions, ScrapeMotionValuesFromProps, ScrollMotionValues, Segment, SequenceLabel, SequenceLabelWithTime, SequenceMap, SequenceOptions, SequenceTime, SingleTarget, Spring, SpringOptions, StyleKeyframesDefinition, StyleTransitions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition$1 as Transition, Tween, UnresolvedValueKeyframe, ValueAnimationOptions, ValueAnimationTransition, ValueKeyframe, ValueKeyframesDefinition, ValueSequence, ValueTarget, ValueType, VariableKeyframesDefinition, VariableTransitions, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, cancelFrame, cancelSync, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, createScopedAnimate, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frame, frameData, inView, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mirrorEasing, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, reverseEasing, scroll, scrollInfo, spring, stagger, startOptimizedAppearAnimation, steps, sync, transform, unwrapMotionComponent, useAnimate, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, visualElementStore, warning, wrap };
4985
+ export { AbsoluteKeyframe, AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationDefinition, AnimationLifecycles, AnimationOptionsWithValueOverrides, AnimationPlaybackControls, AnimationPlaybackLifecycles, AnimationPlaybackOptions, AnimationProps, AnimationScope, AnimationSequence, AnimationType, At, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, CSSStyleDeclarationWithTransform, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DOMKeyframesDefinition, DOMSegment, DOMSegmentWithTransition, DecayOptions, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, DynamicAnimationOptions, DynamicOption, Easing, EasingDefinition, EasingFunction, EasingModifier, ElementOrSelector, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, MotionValueSegment, MotionValueSegmentWithTransition, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedAnimationDefinition, ResolvedAnimationDefinitions, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGKeyframesDefinition, SVGMotionProps, SVGPathKeyframesDefinition, SVGPathTransitions, SVGTransitions, ScrapeMotionValuesFromProps, ScrollMotionValues, Segment, SequenceLabel, SequenceLabelWithTime, SequenceMap, SequenceOptions, SequenceTime, SingleTarget, Spring, SpringOptions, StyleKeyframesDefinition, StyleTransitions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition$1 as Transition, Tween, UnresolvedValueKeyframe, ValueAnimationOptions, ValueAnimationTransition, ValueKeyframe, ValueKeyframesDefinition, ValueSequence, ValueTarget, ValueType, VariableKeyframesDefinition, VariableTransitions, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, cancelFrame, cancelSync, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, createScopedAnimate, cubicBezier, delay, disableInstantTransitions, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frame, frameData, inView, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mirrorEasing, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, reverseEasing, scroll, scrollInfo, spring, stagger, startOptimizedAppearAnimation, steps, sync, transform, unwrapMotionComponent, useAnimate, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, visualElementStore, warning, wrap };
@@ -965,7 +965,7 @@
965
965
  * This will be replaced by the build step with the latest version number.
966
966
  * When MotionValues are provided to motion components, warn if versions are mixed.
967
967
  */
968
- this.version = "10.16.7";
968
+ this.version = "10.16.9";
969
969
  /**
970
970
  * Duration, in milliseconds, since last updating frame.
971
971
  *
@@ -3717,7 +3717,7 @@
3717
3717
  * and warn against mismatches.
3718
3718
  */
3719
3719
  {
3720
- warnOnce(nextValue.version === "10.16.7", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.7 may not work as expected.`);
3720
+ warnOnce(nextValue.version === "10.16.9", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.9 may not work as expected.`);
3721
3721
  }
3722
3722
  }
3723
3723
  else if (isMotionValue(prevValue)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "10.16.7",
3
+ "version": "10.16.9",
4
4
  "description": "A simple and powerful JavaScript animation library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -85,23 +85,23 @@
85
85
  "bundlesize": [
86
86
  {
87
87
  "path": "./dist/size-rollup-motion.js",
88
- "maxSize": "30.91 kB"
88
+ "maxSize": "31 kB"
89
89
  },
90
90
  {
91
91
  "path": "./dist/size-rollup-m.js",
92
- "maxSize": "5.29 kB"
92
+ "maxSize": "5.3 kB"
93
93
  },
94
94
  {
95
95
  "path": "./dist/size-rollup-dom-animation.js",
96
- "maxSize": "15 kB"
96
+ "maxSize": "15.1 kB"
97
97
  },
98
98
  {
99
99
  "path": "./dist/size-rollup-dom-max.js",
100
- "maxSize": "26.35 kB"
100
+ "maxSize": "26.4 kB"
101
101
  },
102
102
  {
103
103
  "path": "./dist/size-rollup-animate.js",
104
- "maxSize": "16.4 kB"
104
+ "maxSize": "16.5 kB"
105
105
  },
106
106
  {
107
107
  "path": "./dist/size-webpack-m.js",
@@ -109,12 +109,12 @@
109
109
  },
110
110
  {
111
111
  "path": "./dist/size-webpack-dom-animation.js",
112
- "maxSize": "19.6 kB"
112
+ "maxSize": "19.7 kB"
113
113
  },
114
114
  {
115
115
  "path": "./dist/size-webpack-dom-max.js",
116
- "maxSize": "31.62 kB"
116
+ "maxSize": "31.8 kB"
117
117
  }
118
118
  ],
119
- "gitHead": "6155da9f38f4b0c2f66447f960e157324bbffaea"
119
+ "gitHead": "137b359aa042780e5f35664ae8627be5a75d55e8"
120
120
  }