framer-motion 7.7.3 → 7.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +313 -237
- package/dist/es/animation/legacy-popmotion/index.mjs +3 -3
- package/dist/es/animation/legacy-popmotion/spring.mjs +20 -28
- package/dist/es/animation/optimized-appear/data-id.mjs +6 -0
- package/dist/es/animation/optimized-appear/handoff.mjs +34 -0
- package/dist/es/animation/optimized-appear/start.mjs +15 -0
- package/dist/es/animation/optimized-appear/store-id.mjs +3 -0
- package/dist/es/animation/utils/transitions.mjs +19 -24
- package/dist/es/animation/waapi/easing.mjs +3 -0
- package/dist/es/animation/waapi/index.mjs +16 -0
- package/dist/es/animation/waapi/supports.mjs +17 -0
- package/dist/es/index.mjs +3 -0
- package/dist/es/render/utils/animation.mjs +13 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/utils/delay.mjs +3 -0
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +313 -237
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +32 -2
- package/dist/projection.dev.js +59 -70
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -1
- package/dist/three-entry.d.ts +3 -1
- package/package.json +11 -9
package/dist/index.d.ts
CHANGED
|
@@ -138,6 +138,8 @@ declare function motionValue<V>(init: V): MotionValue<V>;
|
|
|
138
138
|
|
|
139
139
|
declare type EasingFunction = (v: number) => number;
|
|
140
140
|
declare type EasingModifier = (easing: EasingFunction) => EasingFunction;
|
|
141
|
+
declare type BezierDefinition = [number, number, number, number];
|
|
142
|
+
declare type EasingDefinition = BezierDefinition | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate";
|
|
141
143
|
/**
|
|
142
144
|
* The easing function to use. Set as one of:
|
|
143
145
|
*
|
|
@@ -147,7 +149,7 @@ declare type EasingModifier = (easing: EasingFunction) => EasingFunction;
|
|
|
147
149
|
*
|
|
148
150
|
* @public
|
|
149
151
|
*/
|
|
150
|
-
declare type Easing =
|
|
152
|
+
declare type Easing = EasingDefinition | EasingFunction;
|
|
151
153
|
|
|
152
154
|
/**
|
|
153
155
|
* @public
|
|
@@ -3866,6 +3868,13 @@ declare function useTransform<I, O>(input: MotionValue<I>, transformer: SingleTr
|
|
|
3866
3868
|
*/
|
|
3867
3869
|
declare function useTransform<I, O>(input: MotionValue<string>[] | MotionValue<number>[] | MotionValue<string | number>[], transformer: MultiTransformer<I, O>): MotionValue<O>;
|
|
3868
3870
|
|
|
3871
|
+
interface Animation$1<V> {
|
|
3872
|
+
next: (t: number) => {
|
|
3873
|
+
value: V;
|
|
3874
|
+
done: boolean;
|
|
3875
|
+
};
|
|
3876
|
+
flipTarget: () => void;
|
|
3877
|
+
}
|
|
3869
3878
|
interface PhysicsSpringOptions {
|
|
3870
3879
|
velocity: number;
|
|
3871
3880
|
stiffness: number;
|
|
@@ -4204,6 +4213,9 @@ declare function buildTransform({ transform, transformKeys, }: Pick<HTMLRenderSt
|
|
|
4204
4213
|
declare const clamp: (min: number, max: number, v: number) => number;
|
|
4205
4214
|
|
|
4206
4215
|
declare type DelayedFunction = (overshoot: number) => void;
|
|
4216
|
+
/**
|
|
4217
|
+
* Timeout defined in ms
|
|
4218
|
+
*/
|
|
4207
4219
|
declare function delay(callback: DelayedFunction, timeout: number): () => void;
|
|
4208
4220
|
|
|
4209
4221
|
declare const distance: (a: number, b: number) => number;
|
|
@@ -4215,6 +4227,24 @@ declare const pipe: (...transformers: Function[]) => Function;
|
|
|
4215
4227
|
|
|
4216
4228
|
declare const wrap: (min: number, max: number, v: number) => number;
|
|
4217
4229
|
|
|
4230
|
+
interface NativeAnimationOptions {
|
|
4231
|
+
delay?: number;
|
|
4232
|
+
duration?: number;
|
|
4233
|
+
ease?: EasingDefinition;
|
|
4234
|
+
}
|
|
4235
|
+
|
|
4236
|
+
declare function startOptimizedAppearAnimation(element: HTMLElement, name: string, keyframes: string[] | number[], options: NativeAnimationOptions): Animation | undefined;
|
|
4237
|
+
|
|
4238
|
+
declare const optimizedAppearDataAttribute: string;
|
|
4239
|
+
|
|
4240
|
+
/**
|
|
4241
|
+
* This is based on the spring implementation of Wobble https://github.com/skevy/wobble
|
|
4242
|
+
*/
|
|
4243
|
+
declare function spring({ from, to, restSpeed, restDelta, ...options }: SpringOptions): Animation$1<number>;
|
|
4244
|
+
declare namespace spring {
|
|
4245
|
+
var needsInterpolation: (a: any, b: any) => boolean;
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4218
4248
|
interface NodeGroup {
|
|
4219
4249
|
add: (node: IProjectionNode) => void;
|
|
4220
4250
|
remove: (node: IProjectionNode) => void;
|
|
@@ -4274,4 +4304,4 @@ interface ScaleMotionValues {
|
|
|
4274
4304
|
*/
|
|
4275
4305
|
declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMotionValues;
|
|
4276
4306
|
|
|
4277
|
-
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycles, AnimationOptions$1 as AnimationOptions, AnimationPlaybackControls, AnimationProps, AnimationType, Axis, AxisDelta, BoundingBox, Box, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DragControls, DragElastic, DragHandlers, DraggableProps, Easing, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureComponent, FeatureComponents, FeatureDefinition, FeatureDefinitions, FeatureNames, FeatureProps, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, IProjectionNode, Inertia, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, LoadedFeatures, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, Variant, VariantLabels, Variants, VisualElement, VisualState, addPointerEvent, addScaleCorrector, animate, animateVisualElement, animationControls, animations, buildTransform, calcLength, checkTargetForNewValues, clamp, createBox, createDomMotionComponent, createMotionComponent, delay, distance, distance2D, domAnimation, domMax, filterProps, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, pipe, resolveMotionValue, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, useWillChange, wrap, wrapHandler };
|
|
4307
|
+
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycles, AnimationOptions$1 as AnimationOptions, AnimationPlaybackControls, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DragControls, DragElastic, DragHandlers, DraggableProps, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureComponent, FeatureComponents, FeatureDefinition, FeatureDefinitions, FeatureNames, FeatureProps, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, IProjectionNode, Inertia, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, LoadedFeatures, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, Variant, VariantLabels, Variants, VisualElement, VisualState, addPointerEvent, addScaleCorrector, animate, animateVisualElement, animationControls, animations, buildTransform, calcLength, checkTargetForNewValues, clamp, createBox, createDomMotionComponent, createMotionComponent, delay, distance, distance2D, domAnimation, domMax, filterProps, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, resolveMotionValue, spring, startOptimizedAppearAnimation, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, useWillChange, wrap, wrapHandler };
|
package/dist/projection.dev.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Projection = {}, global.
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Projection = {}, global.React));
|
|
5
5
|
})(this, (function (exports, react) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
* This will be replaced by the build step with the latest version number.
|
|
241
241
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
242
242
|
*/
|
|
243
|
-
this.version = "7.
|
|
243
|
+
this.version = "7.8.0";
|
|
244
244
|
/**
|
|
245
245
|
* Duration, in milliseconds, since last updating frame.
|
|
246
246
|
*
|
|
@@ -1093,19 +1093,6 @@
|
|
|
1093
1093
|
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
|
|
1094
1094
|
};
|
|
1095
1095
|
|
|
1096
|
-
function delay(callback, timeout) {
|
|
1097
|
-
const start = performance.now();
|
|
1098
|
-
const checkElapsed = ({ timestamp }) => {
|
|
1099
|
-
const elapsed = timestamp - start;
|
|
1100
|
-
if (elapsed >= timeout) {
|
|
1101
|
-
cancelSync.read(checkElapsed);
|
|
1102
|
-
callback(elapsed - timeout);
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1105
|
-
sync.read(checkElapsed, true);
|
|
1106
|
-
return () => cancelSync.read(checkElapsed);
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
1096
|
/*
|
|
1110
1097
|
Value in range from progress
|
|
1111
1098
|
|
|
@@ -1522,6 +1509,7 @@
|
|
|
1522
1509
|
}
|
|
1523
1510
|
return springOptions;
|
|
1524
1511
|
}
|
|
1512
|
+
const velocitySampleDuration = 5;
|
|
1525
1513
|
/**
|
|
1526
1514
|
* This is based on the spring implementation of Wobble https://github.com/skevy/wobble
|
|
1527
1515
|
*/
|
|
@@ -1533,11 +1521,10 @@
|
|
|
1533
1521
|
const state = { done: false, value: from };
|
|
1534
1522
|
let { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);
|
|
1535
1523
|
let resolveSpring = zero;
|
|
1536
|
-
let
|
|
1524
|
+
let initialVelocity = velocity ? -(velocity / 1000) : 0.0;
|
|
1525
|
+
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
1537
1526
|
function createSpring() {
|
|
1538
|
-
const initialVelocity = velocity ? -(velocity / 1000) : 0.0;
|
|
1539
1527
|
const initialDelta = to - from;
|
|
1540
|
-
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
1541
1528
|
const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;
|
|
1542
1529
|
/**
|
|
1543
1530
|
* If we're working within what looks like a 0-1 range, change the default restDelta
|
|
@@ -1559,29 +1546,6 @@
|
|
|
1559
1546
|
Math.sin(angularFreq * t) +
|
|
1560
1547
|
initialDelta * Math.cos(angularFreq * t)));
|
|
1561
1548
|
};
|
|
1562
|
-
resolveVelocity = (t) => {
|
|
1563
|
-
// TODO Resolve these calculations with the above
|
|
1564
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
1565
|
-
return (dampingRatio *
|
|
1566
|
-
undampedAngularFreq *
|
|
1567
|
-
envelope *
|
|
1568
|
-
((Math.sin(angularFreq * t) *
|
|
1569
|
-
(initialVelocity +
|
|
1570
|
-
dampingRatio *
|
|
1571
|
-
undampedAngularFreq *
|
|
1572
|
-
initialDelta)) /
|
|
1573
|
-
angularFreq +
|
|
1574
|
-
initialDelta * Math.cos(angularFreq * t)) -
|
|
1575
|
-
envelope *
|
|
1576
|
-
(Math.cos(angularFreq * t) *
|
|
1577
|
-
(initialVelocity +
|
|
1578
|
-
dampingRatio *
|
|
1579
|
-
undampedAngularFreq *
|
|
1580
|
-
initialDelta) -
|
|
1581
|
-
angularFreq *
|
|
1582
|
-
initialDelta *
|
|
1583
|
-
Math.sin(angularFreq * t)));
|
|
1584
|
-
};
|
|
1585
1549
|
}
|
|
1586
1550
|
else if (dampingRatio === 1) {
|
|
1587
1551
|
// Critically damped spring
|
|
@@ -1615,7 +1579,21 @@
|
|
|
1615
1579
|
next: (t) => {
|
|
1616
1580
|
const current = resolveSpring(t);
|
|
1617
1581
|
if (!isResolvedFromDuration) {
|
|
1618
|
-
|
|
1582
|
+
let currentVelocity = initialVelocity;
|
|
1583
|
+
if (t !== 0) {
|
|
1584
|
+
/**
|
|
1585
|
+
* We only need to calculate velocity for under-damped springs
|
|
1586
|
+
* as over- and critically-damped springs can't overshoot, so
|
|
1587
|
+
* checking only for displacement is enough.
|
|
1588
|
+
*/
|
|
1589
|
+
if (dampingRatio < 1) {
|
|
1590
|
+
const prevT = Math.max(0, t - velocitySampleDuration);
|
|
1591
|
+
currentVelocity = velocityPerSecond(current - resolveSpring(prevT), t - prevT);
|
|
1592
|
+
}
|
|
1593
|
+
else {
|
|
1594
|
+
currentVelocity = 0;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1619
1597
|
const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
|
|
1620
1598
|
const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;
|
|
1621
1599
|
state.done =
|
|
@@ -1628,7 +1606,7 @@
|
|
|
1628
1606
|
return state;
|
|
1629
1607
|
},
|
|
1630
1608
|
flipTarget: () => {
|
|
1631
|
-
|
|
1609
|
+
initialVelocity = -initialVelocity;
|
|
1632
1610
|
[from, to] = [to, from];
|
|
1633
1611
|
createSpring();
|
|
1634
1612
|
},
|
|
@@ -1731,7 +1709,7 @@
|
|
|
1731
1709
|
latest = interpolateFromNumber(latest);
|
|
1732
1710
|
isComplete = isForwardPlayback ? state.done : elapsed <= 0;
|
|
1733
1711
|
}
|
|
1734
|
-
onUpdate
|
|
1712
|
+
onUpdate && onUpdate(latest);
|
|
1735
1713
|
if (isComplete) {
|
|
1736
1714
|
if (repeatCount === 0) {
|
|
1737
1715
|
computedDuration =
|
|
@@ -1746,14 +1724,14 @@
|
|
|
1746
1724
|
}
|
|
1747
1725
|
}
|
|
1748
1726
|
function play() {
|
|
1749
|
-
onPlay
|
|
1727
|
+
onPlay && onPlay();
|
|
1750
1728
|
driverControls = driver(update);
|
|
1751
1729
|
driverControls.start();
|
|
1752
1730
|
}
|
|
1753
1731
|
autoplay && play();
|
|
1754
1732
|
return {
|
|
1755
1733
|
stop: () => {
|
|
1756
|
-
onStop
|
|
1734
|
+
onStop && onStop();
|
|
1757
1735
|
driverControls.stop();
|
|
1758
1736
|
},
|
|
1759
1737
|
};
|
|
@@ -1839,6 +1817,22 @@
|
|
|
1839
1817
|
};
|
|
1840
1818
|
}
|
|
1841
1819
|
|
|
1820
|
+
/**
|
|
1821
|
+
* Timeout defined in ms
|
|
1822
|
+
*/
|
|
1823
|
+
function delay(callback, timeout) {
|
|
1824
|
+
const start = performance.now();
|
|
1825
|
+
const checkElapsed = ({ timestamp }) => {
|
|
1826
|
+
const elapsed = timestamp - start;
|
|
1827
|
+
if (elapsed >= timeout) {
|
|
1828
|
+
cancelSync.read(checkElapsed);
|
|
1829
|
+
callback(elapsed - timeout);
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
sync.read(checkElapsed, true);
|
|
1833
|
+
return () => cancelSync.read(checkElapsed);
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1842
1836
|
/**
|
|
1843
1837
|
* Decide whether a transition is defined on a given Transition.
|
|
1844
1838
|
* This filters out orchestration options and returns true
|
|
@@ -1925,6 +1919,9 @@
|
|
|
1925
1919
|
*/
|
|
1926
1920
|
function getAnimation(key, value, target, transition, onComplete) {
|
|
1927
1921
|
const valueTransition = getValueTransition(transition, key) || {};
|
|
1922
|
+
const { elapsed = 0 } = transition;
|
|
1923
|
+
valueTransition.elapsed =
|
|
1924
|
+
elapsed - secondsToMilliseconds(transition.delay || 0);
|
|
1928
1925
|
let origin = valueTransition.from !== undefined ? valueTransition.from : value.get();
|
|
1929
1926
|
const isTargetAnimatable = isAnimatable(key, target);
|
|
1930
1927
|
if (origin === "none" && isTargetAnimatable && typeof target === "string") {
|
|
@@ -1952,20 +1949,23 @@
|
|
|
1952
1949
|
onComplete,
|
|
1953
1950
|
onUpdate: (v) => value.set(v),
|
|
1954
1951
|
};
|
|
1955
|
-
|
|
1952
|
+
const animation = valueTransition.type === "inertia" ||
|
|
1956
1953
|
valueTransition.type === "decay"
|
|
1957
1954
|
? inertia({ ...options, ...valueTransition })
|
|
1958
1955
|
: animate$1({
|
|
1959
1956
|
...getPopmotionAnimationOptions(valueTransition, options, key),
|
|
1960
1957
|
onUpdate: (v) => {
|
|
1961
1958
|
options.onUpdate(v);
|
|
1962
|
-
valueTransition.onUpdate &&
|
|
1959
|
+
valueTransition.onUpdate &&
|
|
1960
|
+
valueTransition.onUpdate(v);
|
|
1963
1961
|
},
|
|
1964
1962
|
onComplete: () => {
|
|
1965
1963
|
options.onComplete();
|
|
1966
|
-
valueTransition.onComplete &&
|
|
1964
|
+
valueTransition.onComplete &&
|
|
1965
|
+
valueTransition.onComplete();
|
|
1967
1966
|
},
|
|
1968
1967
|
});
|
|
1968
|
+
return () => animation.stop();
|
|
1969
1969
|
}
|
|
1970
1970
|
function set() {
|
|
1971
1971
|
const finalTarget = resolveFinalValueInKeyframes(target);
|
|
@@ -1973,13 +1973,16 @@
|
|
|
1973
1973
|
onComplete();
|
|
1974
1974
|
valueTransition.onUpdate && valueTransition.onUpdate(finalTarget);
|
|
1975
1975
|
valueTransition.onComplete && valueTransition.onComplete();
|
|
1976
|
-
return
|
|
1976
|
+
return () => { };
|
|
1977
1977
|
}
|
|
1978
|
-
|
|
1978
|
+
const useInstantAnimation = !isOriginAnimatable ||
|
|
1979
1979
|
!isTargetAnimatable ||
|
|
1980
|
-
valueTransition.type === false
|
|
1981
|
-
|
|
1982
|
-
|
|
1980
|
+
valueTransition.type === false;
|
|
1981
|
+
return useInstantAnimation
|
|
1982
|
+
? valueTransition.elapsed
|
|
1983
|
+
? () => delay(set, -valueTransition.elapsed)
|
|
1984
|
+
: set()
|
|
1985
|
+
: start();
|
|
1983
1986
|
}
|
|
1984
1987
|
function isZero(value) {
|
|
1985
1988
|
return (value === 0 ||
|
|
@@ -2004,21 +2007,7 @@
|
|
|
2004
2007
|
transition = { type: false };
|
|
2005
2008
|
}
|
|
2006
2009
|
return value.start((onComplete) => {
|
|
2007
|
-
|
|
2008
|
-
const animation = getAnimation(key, value, target, transition, onComplete);
|
|
2009
|
-
const delayBy = getDelayFromTransition(transition, key);
|
|
2010
|
-
const start = () => (controls = animation());
|
|
2011
|
-
let cancelDelay;
|
|
2012
|
-
if (delayBy) {
|
|
2013
|
-
cancelDelay = delay(start, secondsToMilliseconds(delayBy));
|
|
2014
|
-
}
|
|
2015
|
-
else {
|
|
2016
|
-
start();
|
|
2017
|
-
}
|
|
2018
|
-
return () => {
|
|
2019
|
-
cancelDelay && cancelDelay();
|
|
2020
|
-
controls && controls.stop();
|
|
2021
|
-
};
|
|
2010
|
+
return getAnimation(key, value, target, { ...transition, delay: getDelayFromTransition(transition, key) }, onComplete);
|
|
2022
2011
|
});
|
|
2023
2012
|
}
|
|
2024
2013
|
|
|
@@ -4877,7 +4866,7 @@
|
|
|
4877
4866
|
* and warn against mismatches.
|
|
4878
4867
|
*/
|
|
4879
4868
|
{
|
|
4880
|
-
warnOnce(nextValue.version === "7.
|
|
4869
|
+
warnOnce(nextValue.version === "7.8.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.8.0 may not work as expected.`);
|
|
4881
4870
|
}
|
|
4882
4871
|
}
|
|
4883
4872
|
else if (isMotionValue(prevValue)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t}from"react";const e=t(null),a="undefined"!=typeof document;function r(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function n(t){return"string"==typeof t||Array.isArray(t)}function s(t){return"object"==typeof t&&"function"==typeof t.start}const o=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function i(t){return s(t.animate)||o.some(e=>n(t[e]))}function f(t){return Boolean(i(t)||t.variants)}const c=t=>({isEnabled:e=>t.some(t=>!!e[t])}),l={measureLayout:c(["layout","layoutId","drag"]),animation:c(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:c(["exit"]),drag:c(["drag","dragControls"]),focus:c(["whileFocus"]),hover:c(["whileHover","onHoverStart","onHoverEnd"]),tap:c(["whileTap","onTap","onTapStart","onTapCancel"]),pan:c(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:c(["whileInView","onViewportEnter","onViewportLeave"])},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 u(t){return"string"==typeof t&&!t.includes("-")&&!!(d.indexOf(t)>-1||/[A-Z]/.test(t))}const p={},m=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],g=new Set(m);function h(t,{layout:e,layoutId:a}){return g.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!p[t]||"opacity"===t)}const y=t=>!!(null==t?void 0:t.getVelocity),v={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w=(t,e)=>m.indexOf(t)-m.indexOf(e);function x(t){return t.startsWith("--")}const b=(t,e)=>e&&"number"==typeof t?e.transform(t):t,k=(t,e,a)=>Math.min(Math.max(a,t),e),L={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},O={...L,transform:t=>k(0,1,t)},T={...L,default:1},X=t=>Math.round(1e5*t)/1e5,Y=/(-)?([\d]*\.?[\d])+/g,$=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function A(t){return"string"==typeof t}const P=t=>({test:e=>A(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),S=P("deg"),W=P("%"),Z=P("px"),R=P("vh"),C=P("vw"),H={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(100*t)},V={...L,transform:Math.round},j={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,size:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,rotate:S,rotateX:S,rotateY:S,rotateZ:S,scale:T,scaleX:T,scaleY:T,scaleZ:T,skew:S,skewX:S,skewY:S,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:O,originX:H,originY:H,originZ:Z,zIndex:V,fillOpacity:O,strokeOpacity:O,numOctaves:V};function z(t,e,a,r){const{style:n,vars:s,transform:o,transformKeys:i,transformOrigin:f}=t;i.length=0;let c=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(x(t)){s[t]=a;continue}const r=j[t],u=b(a,r);if(g.has(t)){if(c=!0,o[t]=u,i.push(t),!d)continue;a!==(r.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,f[t]=u):n[t]=u}if(e.transform||(c||r?n.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:r=!0},n,s){let o="";e.sort(w);for(const a of e)o+=`${v[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,n?"":o):r&&n&&(o="none"),o}(t,a,d,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=f;n.transformOrigin=`${t} ${e} ${a}`}}function F(t,e,a){return"string"==typeof t?t:Z.transform(e+a*t)}const I={offset:"stroke-dashoffset",array:"stroke-dasharray"},D={offset:"strokeDashoffset",array:"strokeDasharray"};function E(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(z(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:p,dimensions:m}=t;u.transform&&(m&&(p.transform=u.transform),delete u.transform),m&&(void 0!==r||void 0!==n||p.transform)&&(p.transformOrigin=function(t,e,a){return`${F(e,t.x,t.width)} ${F(a,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(u.x=e),void 0!==a&&(u.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?I:D;t[s.offset]=Z.transform(-r);const o=Z.transform(e),i=Z.transform(a);t[s.array]=`${o} ${i}`}(u,s,o,i,!1)}const M=t=>"string"==typeof t&&"svg"===t.toLowerCase(),K=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function q(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const N=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 U(t,e,a,r){q(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(N.has(a)?a:K(a),e.attrs[a])}function G(t){const{style:e}=t,a={};for(const r in e)(y(e[r])||h(r,t))&&(a[r]=e[r]);return a}function J(t){const e=G(t);for(const a in t)if(y(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}function Q(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const _=t=>Array.isArray(t),tt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),et=t=>_(t)?t[t.length-1]||0:t;export{$ as A,_ as B,j as C,et as D,Z as E,S as F,C as G,R as H,g as I,
|
|
1
|
+
import{createContext as t}from"react";const e=t(null),a="undefined"!=typeof document;function r(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function n(t){return"string"==typeof t||Array.isArray(t)}function s(t){return"object"==typeof t&&"function"==typeof t.start}const o=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function i(t){return s(t.animate)||o.some(e=>n(t[e]))}function f(t){return Boolean(i(t)||t.variants)}const c=t=>({isEnabled:e=>t.some(t=>!!e[t])}),l={measureLayout:c(["layout","layoutId","drag"]),animation:c(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:c(["exit"]),drag:c(["drag","dragControls"]),focus:c(["whileFocus"]),hover:c(["whileHover","onHoverStart","onHoverEnd"]),tap:c(["whileTap","onTap","onTapStart","onTapCancel"]),pan:c(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:c(["whileInView","onViewportEnter","onViewportLeave"])},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 u(t){return"string"==typeof t&&!t.includes("-")&&!!(d.indexOf(t)>-1||/[A-Z]/.test(t))}const p={},m=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],g=new Set(m);function h(t,{layout:e,layoutId:a}){return g.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!p[t]||"opacity"===t)}const y=t=>!!(null==t?void 0:t.getVelocity),v={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w=(t,e)=>m.indexOf(t)-m.indexOf(e);function x(t){return t.startsWith("--")}const b=(t,e)=>e&&"number"==typeof t?e.transform(t):t,k=(t,e,a)=>Math.min(Math.max(a,t),e),L={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},O={...L,transform:t=>k(0,1,t)},T={...L,default:1},X=t=>Math.round(1e5*t)/1e5,Y=/(-)?([\d]*\.?[\d])+/g,$=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function A(t){return"string"==typeof t}const P=t=>({test:e=>A(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),S=P("deg"),W=P("%"),Z=P("px"),R=P("vh"),C=P("vw"),H={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(100*t)},V={...L,transform:Math.round},j={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,size:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,rotate:S,rotateX:S,rotateY:S,rotateZ:S,scale:T,scaleX:T,scaleY:T,scaleZ:T,skew:S,skewX:S,skewY:S,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:O,originX:H,originY:H,originZ:Z,zIndex:V,fillOpacity:O,strokeOpacity:O,numOctaves:V};function z(t,e,a,r){const{style:n,vars:s,transform:o,transformKeys:i,transformOrigin:f}=t;i.length=0;let c=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(x(t)){s[t]=a;continue}const r=j[t],u=b(a,r);if(g.has(t)){if(c=!0,o[t]=u,i.push(t),!d)continue;a!==(r.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,f[t]=u):n[t]=u}if(e.transform||(c||r?n.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:r=!0},n,s){let o="";e.sort(w);for(const a of e)o+=`${v[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,n?"":o):r&&n&&(o="none"),o}(t,a,d,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=f;n.transformOrigin=`${t} ${e} ${a}`}}function F(t,e,a){return"string"==typeof t?t:Z.transform(e+a*t)}const I={offset:"stroke-dashoffset",array:"stroke-dasharray"},D={offset:"strokeDashoffset",array:"strokeDasharray"};function E(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(z(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:p,dimensions:m}=t;u.transform&&(m&&(p.transform=u.transform),delete u.transform),m&&(void 0!==r||void 0!==n||p.transform)&&(p.transformOrigin=function(t,e,a){return`${F(e,t.x,t.width)} ${F(a,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(u.x=e),void 0!==a&&(u.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?I:D;t[s.offset]=Z.transform(-r);const o=Z.transform(e),i=Z.transform(a);t[s.array]=`${o} ${i}`}(u,s,o,i,!1)}const M=t=>"string"==typeof t&&"svg"===t.toLowerCase(),K=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function q(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const N=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 U(t,e,a,r){q(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(N.has(a)?a:K(a),e.attrs[a])}function G(t){const{style:e}=t,a={};for(const r in e)(y(e[r])||h(r,t))&&(a[r]=e[r]);return a}function J(t){const e=G(t);for(const a in t)if(y(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}function Q(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const _=t=>Array.isArray(t),tt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),et=t=>_(t)?t[t.length-1]||0:t;export{$ as A,_ as B,j as C,et as D,Z as E,S as F,C as G,R as H,g as I,K as J,m as K,x as L,q as M,N,e as P,r as a,i as b,n as c,y as d,h as e,l as f,z as g,E as h,a as i,M as j,u as k,tt as l,f as m,s as n,U as o,G as p,A as q,Q as r,J as s,B as t,Y as u,X as v,O as w,L as x,k as y,W as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext as t,useId as e,useEffect as n,useRef as r,createElement as o}from"react";import{P as s,q as i,t as a,u,v as l,w as c,x as p,y as d,z as h,A as f,B as m,C as v,D as g,E as y,F as b,G as V,H as w,r as A,d as S,I as M,n as C,c as x,i as E,J as T,f as P,b as F,m as I,a as k,K as O,g as N,p as D,L as R,M as U,N as B,s as j,h as z,o as L,j as q,k as H}from"./size-rollup-dom-animation-assets.js";function W(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const $=t=>1e3*t;const K=t=>t,Y=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function X(t,e,n,r){if(t===e&&n===r)return K;const o=e=>function(t,e,n,r,o){let s,i,a=0;do{i=e+(n-e)/2,s=Y(i,r,o)-t,s>0?n=i:e=i}while(Math.abs(s)>1e-7&&++a<12);return i}(e,0,1,t,n);return t=>0===t||1===t?t:Y(o(t),e,r)}const G=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Z=t=>e=>1-t(1-e),J=t=>t*t,_=Z(J),Q=G(J),tt=t=>1-Math.sin(Math.acos(t)),et=Z(tt),nt=G(et),rt=(t=1.525)=>e=>e*e*((t+1)*e-t),ot=rt(),st=Z(ot),it=G(ot),at=(t=>{const e=rt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(),ut={linear:K,easeIn:J,easeInOut:Q,easeOut:_,circIn:tt,circInOut:nt,circOut:et,backIn:ot,backInOut:it,backOut:st,anticipate:at},lt=t=>{if(Array.isArray(t)){t.length;const[e,n,r,o]=t;return X(e,n,r,o)}return"string"==typeof t?ut[t]:t},ct=(t,e)=>n=>Boolean(i(n)&&a.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),pt=(t,e,n)=>r=>{if(!i(r))return r;const[o,s,a,l]=r.match(u);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}},dt={...p,transform:t=>Math.round((t=>d(0,255,t))(t))},ht={test:ct("rgb","red"),parse:pt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+dt.transform(t)+", "+dt.transform(e)+", "+dt.transform(n)+", "+l(c.transform(r))+")"};const ft={test:ct("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:ht.transform},mt={test:ct("hsl","hue"),parse:pt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+h.transform(l(e))+", "+h.transform(l(n))+", "+l(c.transform(r))+")"},vt={test:t=>ht.test(t)||ft.test(t)||mt.test(t),parse:t=>ht.test(t)?ht.parse(t):mt.test(t)?mt.parse(t):ft.parse(t),transform:t=>i(t)?t:t.hasOwnProperty("red")?ht.transform(t):mt.transform(t)};function gt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,r=0;const o=t.match(f);o&&(n=o.length,t=t.replace(f,"${c}"),e.push(...o.map(vt.parse)));const s=t.match(u);return s&&(r=s.length,t=t.replace(u,"${n}"),e.push(...s.map(p.parse))),{values:e,numColors:n,numNumbers:r,tokenised:t}}function yt(t){return gt(t).values}function bt(t){const{values:e,numColors:n,tokenised:r}=gt(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?vt.transform(t[r]):l(t[r]));return e}}const Vt=t=>"number"==typeof t?0:t;const wt={test:function(t){var e,n;return isNaN(t)&&i(t)&&((null===(e=t.match(u))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(f))||void 0===n?void 0:n.length)||0)>0},parse:yt,createTransformer:bt,getAnimatableNone:function(t){const e=yt(t);return bt(t)(e.map(Vt))}},At=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!wt.test(e)||e.startsWith("url("))),St=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Mt=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),Ct=()=>({type:"keyframes",ease:"linear",duration:.3}),xt=t=>({type:"keyframes",duration:.8,values:t}),Et={x:St,y:St,z:St,rotate:St,rotateX:St,rotateY:St,rotateZ:St,scaleX:Mt,scaleY:Mt,scale:Mt,opacity:Ct,backgroundColor:Ct,color:Ct,default:Mt},Tt=(t,e)=>{let n;return n=m(e)?xt:Et[t]||Et.default,{to:e,...n(e)}},Pt=new Set(["brightness","contrast","saturate","opacity"]);function Ft(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(u)||[];if(!r)return t;const o=n.replace(r,"");let s=Pt.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+o+")"}const It=/([a-z-]*)\(.*?\)/g,kt={...wt,getAnimatableNone:t=>{const e=t.match(It);return e?e.map(Ft).join(" "):t}},Ot={...v,color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:kt,WebkitFilter:kt},Nt=t=>Ot[t];function Dt(t,e){var n;let r=Nt(t);return r!==kt&&(r=wt),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}const Rt=!1,Ut="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Bt="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Ut()),1/60*1e3);const jt={delta:0,timestamp:0};let zt=!0,Lt=!1,qt=!1;const Ht=["read","update","preRender","render","postRender"],Wt=Ht.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const u=a&&o,l=u?e:n;return s&&i.add(t),-1===l.indexOf(t)&&(l.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:u=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),i.has(r)&&(a.schedule(r),t())}o=!1,s&&(s=!1,a.process(u))}}};return a}(()=>Lt=!0),t),{}),$t=Ht.reduce((t,e)=>{const n=Wt[e];return t[e]=(t,e=!1,r=!1)=>(Lt||Gt(),n.schedule(t,e,r)),t},{}),Kt=Ht.reduce((t,e)=>(t[e]=Wt[e].cancel,t),{});Ht.reduce((t,e)=>(t[e]=()=>Wt[e].process(jt),t),{});const Yt=t=>Wt[t].process(jt),Xt=t=>{Lt=!1,jt.delta=zt?1/60*1e3:Math.max(Math.min(t-jt.timestamp,40),1),jt.timestamp=t,qt=!0,Ht.forEach(Yt),qt=!1,Lt&&(zt=!1,Bt(Xt))},Gt=()=>{Lt=!0,zt=!0,qt||Bt(Xt)};const Zt=(t,e,n)=>-n*t+n*e+t;function Jt(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 _t=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},Qt=[ft,ht,mt];function te(t){const e=(n=t,Qt.find(t=>t.test(n)));var n;let r=e.parse(t);return e===mt&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,s=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;o=Jt(a,r,t+1/3),s=Jt(a,r,t),i=Jt(a,r,t-1/3)}else o=s=i=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*i),alpha:r}}(r)),r}const ee=(t,e)=>{const n=te(t),r=te(e),o={...n};return t=>(o.red=_t(n.red,r.red,t),o.green=_t(n.green,r.green,t),o.blue=_t(n.blue,r.blue,t),o.alpha=Zt(n.alpha,r.alpha,t),ht.transform(o))},ne=(t,e)=>n=>e(t(n)),re=(...t)=>t.reduce(ne);function oe(t,e){return"number"==typeof t?n=>Zt(t,e,n):vt.test(t)?ee(t,e):ae(t,e)}const se=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>oe(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},ie=(t,e)=>{const n={...t,...e},r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=oe(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}},ae=(t,e)=>{const n=wt.createTransformer(e),r=gt(t),o=gt(e);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?re(se(r.values,o.values),n):n=>""+(n>0?e:t)},ue=(t,e)=>n=>Zt(t,e,n);function le(t,e,n){const r=[],o=n||("number"==typeof(s=t[0])?ue:"string"==typeof s?vt.test(s)?ee:ae:Array.isArray(s)?se:"object"==typeof s?ie:ue);var s;const i=t.length-1;for(let n=0;n<i;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=re(t,s)}r.push(s)}return r}function ce(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const s=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const i=le(e,r,o),a=i.length,u=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=((t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r})(t[n],t[n+1],e);return i[n](r)};return n?e=>u(d(t[0],t[s-1],e)):u}function pe(t,e){return t.map(()=>e||Q).splice(0,t.length-1)}function de({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,s,i=1-e;i=d(.05,1,i),t=d(.01,10,t/1e3),i<1?(o=e=>{const r=e*i,o=r*t;return.001-(r-n)/he(e,i)*Math.exp(-o)},s=e=>{const r=e*i*t,s=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=he(Math.pow(e,2),i);return(.001-o(e)>0?-1:1)*((s-a)*u)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}function he(t,e){return t*Math.sqrt(1-e*e)}const fe=["duration","bounce"],me=["stiffness","damping","mass"];function ve(t,e){return e.some(e=>void 0!==t[e])}function ge({from:t=0,to:e=1,restSpeed:n=2,restDelta:r=.01,...o}){const s={done:!1,value:t};let{stiffness:i,damping:a,mass:u,velocity:l,duration:c,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ve(t,me)&&ve(t,fe)){const n=de(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(o),d=ye,h=ye;function f(){const n=l?-l/1e3:0,o=e-t,s=a/(2*Math.sqrt(i*u)),c=Math.sqrt(i/u)/1e3;if(void 0===r&&(r=Math.min(Math.abs(e-t)/100,.4)),s<1){const t=he(c,s);d=r=>{const i=Math.exp(-s*c*r);return e-i*((n+s*c*o)/t*Math.sin(t*r)+o*Math.cos(t*r))},h=e=>{const r=Math.exp(-s*c*e);return s*c*r*(Math.sin(t*e)*(n+s*c*o)/t+o*Math.cos(t*e))-r*(Math.cos(t*e)*(n+s*c*o)-t*o*Math.sin(t*e))}}else if(1===s)d=t=>e-Math.exp(-c*t)*(o+(n+c*o)*t);else{const t=c*Math.sqrt(s*s-1);d=r=>{const i=Math.exp(-s*c*r),a=Math.min(t*r,300);return e-i*((n+s*c*o)*Math.sinh(a)+t*o*Math.cosh(a))/t}}}return f(),{next:t=>{const o=d(t);if(p)s.done=t>=c;else{const i=1e3*h(t),a=Math.abs(i)<=n,u=Math.abs(e-o)<=r;s.done=a&&u}return s.value=s.done?e:o,s},flipTarget:()=>{l=-l,[t,e]=[e,t],f()}}}ge.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ye=t=>0;const be={decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:s}){const i={done:!1,value:e};let a=n*t;const u=e+a,l=void 0===s?u:s(u);return l!==u&&(a=l-e),{next:t=>{const e=-a*Math.exp(-t/r);return i.done=!(e>o||e<-o),i.value=i.done?l:l+e,i},flipTarget:()=>{}}},keyframes:function({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const s={done:!1,value:t},i=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(r&&r.length===i.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(i),o);function u(){return ce(a,i,{ease:Array.isArray(n)?n:pe(i,n)})}let l=u();return{next:t=>(s.value=l(t),s.done=t>=o,s),flipTarget:()=>{i.reverse(),l=u()}}},spring:ge};function Ve(t,e,n=0){return t-e-n}const we=t=>{const e=({delta:e})=>t(e);return{start:()=>$t.update(e,!0),stop:()=>Kt.update(e)}};function Ae({from:t,autoplay:e=!0,driver:n=we,elapsed:r=0,repeat:o=0,repeatType:s="loop",repeatDelay:i=0,onPlay:a,onStop:u,onComplete:l,onRepeat:c,onUpdate:p,type:d="keyframes",...h}){var f,m;let v,g,y,{to:b}=h,V=0,w=h.duration,A=!1,S=!0;const M=be[Array.isArray(b)?"keyframes":d];(null===(m=(f=M).needsInterpolation)||void 0===m?void 0:m.call(f,t,b))&&(y=ce([0,100],[t,b],{clamp:!1}),t=0,b=100);const C=M({...h,from:t,to:b});function x(){V++,"reverse"===s?(S=V%2==0,r=function(t,e=0,n=0,r=!0){return r?Ve(e+-t,e,n):e-(t-e)+n}(r,w,i,S)):(r=Ve(r,w,i),"mirror"===s&&C.flipTarget()),A=!1,c&&c()}function E(t){if(S||(t=-t),r+=t,!A){const t=C.next(Math.max(0,r));g=t.value,y&&(g=y(g)),A=S?t.done:r<=0}null==p||p(g),A&&(0===V&&(w=void 0!==w?w:r),V<o?function(t,e,n,r){return r?t>=e+n:t<=-n}(r,w,i,S)&&x():(v.stop(),l&&l()))}return e&&(null==a||a(),v=n(E),v.start()),{stop:()=>{null==u||u(),v.stop()}}}function Se(t,e){return e?t*(1e3/e):0}function Me({ease:t,times:e,...n}){const r={...n};return e&&(r.offset=e),n.duration&&(r.duration=$(n.duration)),n.repeatDelay&&(r.repeatDelay=$(n.repeatDelay)),t&&(r.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(lt):lt(t)),"tween"===n.type&&(r.type="keyframes"),"spring"!==n.type&&(r.type="keyframes"),r}function Ce(t,e,n){return Array.isArray(e.to)&&void 0===t.duration&&(t.duration=.8),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:u,...l}){return!!Object.keys(l).length}(t)||(t={...t,...Tt(n,e.to)}),{...e,...Me(t)}}function xe(t,e,n,r,o){const s=Pe(r,t)||{};let i=void 0!==s.from?s.from:e.get();const a=At(t,n);"none"===i&&a&&"string"==typeof n?i=Dt(t,n):Ee(i)&&"string"==typeof n?i=Te(n):!Array.isArray(n)&&Ee(n)&&"string"==typeof i&&(n=Te(i));return At(t,i)&&a&&!1!==s.type?function(){const r={from:i,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:t=>e.set(t)};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:s=750,bounceStiffness:i=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:p,onComplete:d,onStop:h}){let f;function m(t){return void 0!==n&&t<n||void 0!==r&&t>r}function v(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function g(t){null==f||f.stop(),f=Ae({...t,driver:c,onUpdate:e=>{var n;null==p||p(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:h})}function y(t){g({type:"spring",stiffness:i,damping:a,restDelta:u,...t})}if(m(t))y({from:t,velocity:e,to:v(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const i=v(r),a=i===n?-1:1;let c,p;const d=t=>{c=p,p=t,e=Se(t-c,jt.delta),(1===a&&t>i||-1===a&&t<i)&&y({from:t,to:i,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:u,modifyTarget:l,onUpdate:m(r)?d:void 0})}return{stop:()=>null==f?void 0:f.stop()}}({...r,...s}):Ae({...Ce(s,r,t),onUpdate:t=>{r.onUpdate(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{r.onComplete(),s.onComplete&&s.onComplete()}})}:function(){const t=g(n);return e.set(t),o(),s.onUpdate&&s.onUpdate(t),s.onComplete&&s.onComplete(),{stop:()=>{}}}}function Ee(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Te(t){return"number"==typeof t?0:Dt("",t)}function Pe(t,e){return t[e]||t.default||t}function Fe(t,e,n,r={}){return Rt&&(r={type:!1}),e.start(o=>{let s;const i=xe(t,e,n,r,o),a=function(t,e){const n=Pe(t,e)||{};return void 0!==n.delay?n.delay:void 0!==t.delay?t.delay:0}(r,t),u=()=>s=i();let l;return a?l=function(t,e){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=e&&(Kt.read(r),t(s-e))};return $t.read(r,!0),()=>Kt.read(r)}(u,$(a)):u(),()=>{l&&l(),s&&s.stop()}})}const Ie=t=>/^0[^.\s]+$/.test(t);class ke{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Oe{constructor(t){var e;this.version="7.7.3",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ke,this.velocityUpdateSubscribers=new ke,this.renderSubscribers=new ke,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:r}=jt;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,$t.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>$t.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Se(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Ne(t){return new Oe(t)}const De=t=>e=>e.test(t),Re=[p,y,h,b,V,w,{test:t=>"auto"===t,parse:t=>t}],Ue=t=>Re.find(De(t)),Be=[...Re,vt,wt],je=t=>Be.find(De(t));function ze(t,e,n){const r=t.getProps();return A(r,e,void 0!==n?n:r.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))}function Le(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ne(n))}function qe(t,e){if(!e)return;return(e[t]||e.default||e).from}function He(t){return Boolean(S(t)&&t.add)}function We(t,e,n={}){var r;const o=ze(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>$e(t,o,n):()=>Promise.resolve(),a=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:a}=s;return function(t,e,n=0,r=0,o=1,s){const i=[],a=(t.variantChildren.size-1)*r,u=1===o?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Ke).forEach((t,r)=>{i.push(We(t,e,{...s,delay:n+u(r)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(i)}(t,e,o+r,i,a,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[t,e]="beforeChildren"===u?[i,a]:[a,i];return t().then(e)}return Promise.all([i(),a(n.delay)])}function $e(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=t.getDefaultTransition(),transitionEnd:a,...u}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(i=r);const c=[],p=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in u){const r=t.getValue(e),o=u[e];if(!r||void 0===o||p&&Ye(p,e))continue;let s={delay:n,...i};t.shouldReduceMotion&&M.has(e)&&(s={...s,type:!1,delay:0});let a=Fe(e,r,o,s);He(l)&&(l.add(e),a=a.then(()=>l.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&function(t,e){const n=ze(t,e);let{transitionEnd:r={},transition:o={},...s}=n?t.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const e in s){Le(t,e,g(s[e]))}}(t,a)})}function Ke(t,e){return t.sortNodePosition(e)}function Ye({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}var Xe;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Xe||(Xe={}));const Ge=[Xe.Animate,Xe.InView,Xe.Focus,Xe.Hover,Xe.Tap,Xe.Drag,Xe.Exit],Ze=[...Ge].reverse(),Je=Ge.length;function _e(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>We(t,e,n));r=Promise.all(o)}else if("string"==typeof e)r=We(t,e,n);else{const o="function"==typeof e?ze(t,e,n.custom):e;r=$e(t,o,n)}return r.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function Qe(t){let e=_e(t);const n={[Xe.Animate]:en(!0),[Xe.InView]:en(),[Xe.Hover]:en(),[Xe.Tap]:en(),[Xe.Drag]:en(),[Xe.Focus]:en(),[Xe.Exit]:en()};let r=!0;const o=(e,n)=>{const r=ze(t,n);if(r){const{transition:t,transitionEnd:n,...o}=r;e={...e,...o,...n}}return e};function s(s,i){const a=t.getProps(),u=t.getVariantContext(!0)||{},l=[],c=new Set;let p={},d=1/0;for(let e=0;e<Je;e++){const h=Ze[e],f=n[h],v=void 0!==a[h]?a[h]:u[h],g=x(v),y=h===i?f.isActive:null;!1===y&&(d=e);let b=v===u[h]&&v!==a[h]&&g;if(b&&r&&t.manuallyAnimateOnMount&&(b=!1),f.protectedKeys={...p},!f.isActive&&null===y||!v&&!f.prevProp||C(v)||"boolean"==typeof v)continue;const V=tn(f.prevProp,v);let w=V||h===i&&f.isActive&&!b&&g||e>d&&g;const A=Array.isArray(v)?v:[v];let S=A.reduce(o,{});!1===y&&(S={});const{prevResolvedValues:M={}}=f,E={...M,...S},T=t=>{w=!0,c.delete(t),f.needsAnimating[t]=!0};for(const t in E){const e=S[t],n=M[t];p.hasOwnProperty(t)||(e!==n?m(e)&&m(n)?!W(e,n)||V?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):c.add(t):void 0!==e&&c.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=v,f.prevResolvedValues=S,f.isActive&&(p={...p,...S}),r&&t.blockInitialAnimation&&(w=!1),w&&!b&&l.push(...A.map(t=>({animation:t,options:{type:h,...s}})))}if(c.size){const e={};c.forEach(n=>{const r=t.getBaseTarget(n);void 0!==r&&(e[n]=r)}),l.push({animation:e})}let h=Boolean(l.length);return r&&!1===a.initial&&!t.manuallyAnimateOnMount&&(h=!1),r=!1,h?e(l):Promise.resolve()}return{animateChanges:s,setActive:function(e,r,o){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)}),n[e].isActive=r;const a=s(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function tn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!W(e,t)}function en(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const nn=t=>e=>(t(e),null),rn={animation:nn(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=Qe(t)),C(e)&&n(()=>e.subscribe(t),[e])}),exit:nn(r=>{const{custom:o,visualElement:i}=r,[a,u]=function(){const r=t(s);if(null===r)return[!0,null];const{isPresent:o,onExitComplete:i,register:a}=r,u=e();return n(()=>a(u),[]),!o&&i?[!1,()=>i&&i(u)]:[!0]}(),l=t(s);n(()=>{i.isPresent=a;const t=i.animationState&&i.animationState.setActive(Xe.Exit,!a,{custom:l&&l.custom||o});t&&!a&&t.then(u)},[a])})};function on(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function sn(t,e,r,o){n(()=>{const n=t.current;if(r&&n)return on(n,e,r,o)},[t,e,r,o])}function an(t){return!!t.touches}const un={pageX:0,pageY:0};function ln(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||un;return{x:n[e+"X"],y:n[e+"Y"]}}function cn(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}const pn=(t,e=!1)=>{const n=e=>t(e,function(t,e="page"){return{point:an(t)?ln(t,e):cn(t,e)}}(e));return e?(r=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&r(t)}):n;var r},dn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},hn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function fn(t){return E&&null===window.onpointerdown?t:E&&null===window.ontouchstart?hn[t]:E&&null===window.onmousedown?dn[t]:t}function mn(t,e,n,r){return on(t,fn(e),pn(n,"pointerdown"===e),r)}function vn(t,e,n,r){return sn(t,fn(e),n&&pn(n,"pointerdown"===e),r)}function gn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const yn=gn("dragHorizontal"),bn=gn("dragVertical");function Vn(){const t=function(t){let e=!1;if("y"===t)e=bn();else if("x"===t)e=yn();else{const t=yn(),n=bn();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function wn(t,e,n){return(r,o)=>{(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!Vn()&&(t.animationState&&t.animationState.setActive(Xe.Hover,e),n&&n(r,o))}}const An=(t,e)=>!!e&&(t===e||An(t,e.parentElement));const Sn=("undefined"==typeof process||process.env,"production"),Mn=new Set;const Cn=new WeakMap,xn=new WeakMap,En=t=>{const e=Cn.get(t.target);e&&e(t)},Tn=t=>{t.forEach(En)};function Pn(t,e,n){const r=function({root:t,...e}){const n=t||document;xn.has(n)||xn.set(n,{});const r=xn.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(Tn,{root:t,...e})),r[o]}(e);return Cn.set(t,n),r.observe(t),()=>{Cn.delete(t),r.unobserve(t)}}const Fn={some:0,all:1};function In(t,e,r,{root:o,margin:s,amount:i="some",once:a}){n(()=>{if(!t||!r.current)return;const n={root:null==o?void 0:o.current,rootMargin:s,threshold:"number"==typeof i?i:Fn[i]};return Pn(r.current,n,t=>{const{isIntersecting:n}=t;if(e.isInView===n)return;if(e.isInView=n,a&&!n&&e.hasEnteredView)return;n&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Xe.InView,n);const o=r.getProps(),s=n?o.onViewportEnter:o.onViewportLeave;s&&s(t)})},[t,o,s,i])}function kn(t,e,r,{fallback:o=!0}){n(()=>{var n,s;t&&o&&("production"!==Sn&&(n="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||Mn.has(n)||(console.warn(n),s&&console.warn(s),Mn.add(n))),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:t}=r.getProps();t&&t(null),r.animationState&&r.animationState.setActive(Xe.InView,!0)}))},[t])}const On={inView:nn((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:o,viewport:s={}}){const i=r({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||o);s.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?kn:In)(a,i.current,t,s)})),tap:nn((function({onTap:t,onTapStart:e,onTapCancel:o,whileTap:s,visualElement:i}){const a=t||e||o||s,u=r(!1),l=r(null),c={passive:!(e||t||o||m)};function p(){l.current&&l.current(),l.current=null}function d(){return p(),u.current=!1,i.animationState&&i.animationState.setActive(Xe.Tap,!1),!Vn()}function h(e,n){d()&&(An(i.current,e.target)?t&&t(e,n):o&&o(e,n))}function f(t,e){d()&&o&&o(t,e)}function m(t,n){p(),u.current||(u.current=!0,l.current=re(mn(window,"pointerup",h,c),mn(window,"pointercancel",f,c)),i.animationState&&i.animationState.setActive(Xe.Tap,!0),e&&e(t,n))}var v;vn(i,"pointerdown",a?m:void 0,c),v=p,n(()=>()=>v(),[])})),focus:nn((function({whileFocus:t,visualElement:e}){const{animationState:n}=e;sn(e,"focus",t?()=>{n&&n.setActive(Xe.Focus,!0)}:void 0),sn(e,"blur",t?()=>{n&&n.setActive(Xe.Focus,!1)}:void 0)})),hover:nn((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:r}){vn(r,"pointerenter",t||n?wn(r,!0,t):void 0,{passive:!t}),vn(r,"pointerleave",e||n?wn(r,!1,e):void 0,{passive:!e})}))};function Nn(t){return"string"==typeof t&&t.startsWith("var(--")}const Dn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Rn(t,e,n=1){const[r,o]=function(t){const e=Dn.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);return s?s.trim():Nn(o)?Rn(o,e,n+1):o}const Un=new Set(["width","height","top","left","right","bottom","x","y"]),Bn=t=>Un.has(t),jn=(t,e)=>{t.set(e,!1),t.set(e)},zn=t=>t===p||t===y;var Ln;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Ln||(Ln={}));const qn=(t,e)=>parseFloat(t.split(", ")[e]),Hn=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return qn(o[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?qn(e[1],t):0}},Wn=new Set(["x","y","z"]),$n=T.filter(t=>!Wn.has(t));const Kn={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:Hn(4,13),y:Hn(5,14)},Yn=(t,e,n={},r={})=>{e={...e},r={...r};const o=Object.keys(e).filter(Bn);let s=[],i=!1;const a=[];if(o.forEach(o=>{const u=t.getValue(o);if(!t.hasValue(o))return;let l=n[o],c=Ue(l);const p=e[o];let d;if(m(p)){const t=p.length,e=null===p[0]?1:0;l=p[e],c=Ue(l);for(let n=e;n<t;n++)d?Ue(p[n]):d=Ue(p[n])}else d=Ue(p);if(c!==d)if(zn(c)&&zn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[o]=parseFloat(p):Array.isArray(p)&&d===y&&(e[o]=p.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===l||0===p)?0===l?u.set(d.transform(l)):e[o]=c.transform(p):(i||(s=function(t){const e=[];return $n.forEach(n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),i=!0),a.push(o),r[o]=void 0!==r[o]?r[o]:e[o],jn(u,p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const r=e.measureViewportBox(),o=e.current,s=getComputedStyle(o),{display:i}=s,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Kn[t](r,s)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const r=e.getValue(n);jn(r,a[n]),t[n]=Kn[n](u,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),E&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:e,transitionEnd:r}};function Xn(t,e,n,r){return(t=>Object.keys(t).some(Bn))(e)?Yn(t,e,n,r):{target:e,transitionEnd:r}}const Gn=(t,e,n,r)=>{const o=function(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!Nn(e))return;const n=Rn(e,r);n&&t.set(n)});for(const t in e){const o=e[t];if(!Nn(o))continue;const s=Rn(o,r);s&&(e[t]=s,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,r);return Xn(t,e=o.target,n,r=o.transitionEnd)},Zn={current:null},Jn={current:!1};const _n=Object.keys(P),Qn=_n.length,tr=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const er=["initial",...Ge],nr=er.length;class rr extends class{constructor({parent:t,props:e,reducedMotionConfig:n,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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=()=>$t.render(this.render,!1,!0);const{latestValues:s,renderState:i}=r;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=i,this.parent=t,this.props=e,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=F(e),this.isVariantNode=I(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:a,...u}=this.scrapeMotionValuesFromProps(e);for(const t in u){const e=u[t];void 0!==s[t]&&S(e)&&(e.set(s[t],!1),He(a)&&a.add(t))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var e;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(e=this.parent)||void 0===e?void 0:e.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Jn.current||function(){if(Jn.current=!0,E)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Zn.current=t.matches;t.addListener(e),e()}else Zn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Zn.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,e,n;null===(t=this.projection)||void 0===t||t.unmount(),Kt.update(this.notifyUpdate),Kt.render(this.render),this.valueSubscriptions.forEach(t=>t()),null===(e=this.removeFromVariantTree)||void 0===e||e.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const t in this.events)this.events[t].clear();this.current=null}bindToMotionValue(t,e){const n=M.has(t),r=e.onChange(e=>{this.latestValues[t]=e,this.props.onUpdate&&$t.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{r(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,e,n,r,s,i){const a=[];for(let e=0;e<Qn;e++){const n=_n[e],{isEnabled:r,Component:s}=P[n];r(t)&&s&&a.push(o(s,{key:n,...t,visualElement:this}))}if(!this.projection&&s){this.projection=new s(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:o,dragConstraints:a,layoutScroll:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(o)||a&&k(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u})}return a}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)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let e=0;e<tr.length;e++){const n=tr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=t["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(t,e,n){const{willChange:r}=e;for(const o in e){const s=e[o],i=n[o];if(S(s))t.addValue(o,s),He(r)&&r.add(o);else if(S(i))t.addValue(o,Ne(s)),He(r)&&r.remove(o);else if(i!==s)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(s)}else{const e=t.getStaticValue(o);t.addValue(o,Ne(void 0!==e?e:s))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var e;return null===(e=this.props.variants)||void 0===e?void 0:e[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:null===(t=this.parent)||void 0===t?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var e,n;if(t)return null===(e=this.parent)||void 0===e?void 0:e.getVariantContext();if(!this.isControllingVariants){const t=(null===(n=this.parent)||void 0===n?void 0:n.getVariantContext())||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const r={};for(let t=0;t<nr;t++){const e=er[t],n=this.props[e];(x(n)||!1===n)&&(r[e]=n)}return r}addVariantChild(t){var e;const n=this.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)}addValue(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latestValues[t]=e.get(),this.bindToMotionValue(t,e)}removeValue(t){var e;this.values.delete(t),null===(e=this.valueSubscriptions.get(t))||void 0===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=Ne(e),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?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,r="string"==typeof n||"object"==typeof n?null===(e=A(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||S(o)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new ke),this.events[t].add(e)}notify(t,...e){var n;null===(n=this.events[t])||void 0===n||n.notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:r},o){let s=function(t,e,n){var r;const o={};for(const s in t){const t=qe(s,e);o[s]=void 0!==t?t:null===(r=n.getValue(s))||void 0===r?void 0:r.get()}return o}(n,t||{},this);if(r&&(e&&(e=r(e)),n&&(n=r(n)),s&&(s=r(s))),o){!function(t,e,n){var r,o;const s=Object.keys(e).filter(e=>!t.hasValue(e)),i=s.length;if(i)for(let a=0;a<i;a++){const i=s[a],u=e[i];let l=null;Array.isArray(u)&&(l=u[0]),null===l&&(l=null!==(o=null!==(r=n[i])&&void 0!==r?r:t.readValue(i))&&void 0!==o?o:e[i]),null!=l&&("string"==typeof l&&(/^\-?\d*\.?\d+$/.test(l)||Ie(l))?l=parseFloat(l):!je(l)&&wt.test(u)&&(l=Dt(i,u)),t.addValue(i,Ne(l)),void 0===n[i]&&(n[i]=l),null!==l&&t.setBaseTarget(i,l))}}(this,n,s);const t=Gn(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class or extends rr{readValueFromInstance(t,e){if(M.has(e)){const t=Nt(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),o=(O(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,r){N(t,e,n,r.transformTemplate)}scrapeMotionValuesFromProps(t){return D(t)}renderInstance(t,e,n,r){R(t,e,n,r)}}class sr extends rr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){var n;return M.has(e)?(null===(n=Nt(e))||void 0===n?void 0:n.default)||0:(e=U.has(e)?e:B(e),t.getAttribute(e))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t){return j(t)}build(t,e,n,r){z(t,e,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,e,n,r){L(t,e,n,r)}mount(t){this.isSVGTag=q(t.tagName),super.mount(t)}}const ir={renderer:(t,e)=>H(t)?new sr(e,{enableHardwareAcceleration:!1}):new or(e,{enableHardwareAcceleration:!0}),...rn,...On};export{ir as domAnimation};
|
|
1
|
+
import{useContext as t,useId as e,useEffect as n,useRef as r,createElement as o}from"react";import{P as s,q as i,t as a,u,v as l,w as c,x as p,y as d,z as h,A as f,B as m,C as v,D as g,E as y,F as b,G as w,H as V,r as A,d as S,I as M,J as C,n as x,c as E,i as T,K as P,f as F,b as I,m as k,a as O,L as N,g as D,p as R,M as U,N as B,s as j,h as z,o as L,j as q,k as H}from"./size-rollup-dom-animation-assets.js";function $(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const W=t=>1e3*t;const K=t=>t,Y=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function X(t,e,n,r){if(t===e&&n===r)return K;const o=e=>function(t,e,n,r,o){let s,i,a=0;do{i=e+(n-e)/2,s=Y(i,r,o)-t,s>0?n=i:e=i}while(Math.abs(s)>1e-7&&++a<12);return i}(e,0,1,t,n);return t=>0===t||1===t?t:Y(o(t),e,r)}const G=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Z=t=>e=>1-t(1-e),J=t=>t*t,_=Z(J),Q=G(J),tt=t=>1-Math.sin(Math.acos(t)),et=Z(tt),nt=G(et),rt=(t=1.525)=>e=>e*e*((t+1)*e-t),ot=rt(),st=Z(ot),it=G(ot),at=(t=>{const e=rt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(),ut={linear:K,easeIn:J,easeInOut:Q,easeOut:_,circIn:tt,circInOut:nt,circOut:et,backIn:ot,backInOut:it,backOut:st,anticipate:at},lt=t=>{if(Array.isArray(t)){t.length;const[e,n,r,o]=t;return X(e,n,r,o)}return"string"==typeof t?ut[t]:t},ct=(t,e)=>n=>Boolean(i(n)&&a.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),pt=(t,e,n)=>r=>{if(!i(r))return r;const[o,s,a,l]=r.match(u);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}},dt={...p,transform:t=>Math.round((t=>d(0,255,t))(t))},ht={test:ct("rgb","red"),parse:pt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+dt.transform(t)+", "+dt.transform(e)+", "+dt.transform(n)+", "+l(c.transform(r))+")"};const ft={test:ct("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:ht.transform},mt={test:ct("hsl","hue"),parse:pt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+h.transform(l(e))+", "+h.transform(l(n))+", "+l(c.transform(r))+")"},vt={test:t=>ht.test(t)||ft.test(t)||mt.test(t),parse:t=>ht.test(t)?ht.parse(t):mt.test(t)?mt.parse(t):ft.parse(t),transform:t=>i(t)?t:t.hasOwnProperty("red")?ht.transform(t):mt.transform(t)};function gt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,r=0;const o=t.match(f);o&&(n=o.length,t=t.replace(f,"${c}"),e.push(...o.map(vt.parse)));const s=t.match(u);return s&&(r=s.length,t=t.replace(u,"${n}"),e.push(...s.map(p.parse))),{values:e,numColors:n,numNumbers:r,tokenised:t}}function yt(t){return gt(t).values}function bt(t){const{values:e,numColors:n,tokenised:r}=gt(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?vt.transform(t[r]):l(t[r]));return e}}const wt=t=>"number"==typeof t?0:t;const Vt={test:function(t){var e,n;return isNaN(t)&&i(t)&&((null===(e=t.match(u))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(f))||void 0===n?void 0:n.length)||0)>0},parse:yt,createTransformer:bt,getAnimatableNone:function(t){const e=yt(t);return bt(t)(e.map(wt))}},At=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Vt.test(e)||e.startsWith("url("))),St=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Mt=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),Ct=()=>({type:"keyframes",ease:"linear",duration:.3}),xt=t=>({type:"keyframes",duration:.8,values:t}),Et={x:St,y:St,z:St,rotate:St,rotateX:St,rotateY:St,rotateZ:St,scaleX:Mt,scaleY:Mt,scale:Mt,opacity:Ct,backgroundColor:Ct,color:Ct,default:Mt},Tt=(t,e)=>{let n;return n=m(e)?xt:Et[t]||Et.default,{to:e,...n(e)}},Pt=new Set(["brightness","contrast","saturate","opacity"]);function Ft(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(u)||[];if(!r)return t;const o=n.replace(r,"");let s=Pt.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+o+")"}const It=/([a-z-]*)\(.*?\)/g,kt={...Vt,getAnimatableNone:t=>{const e=t.match(It);return e?e.map(Ft).join(" "):t}},Ot={...v,color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:kt,WebkitFilter:kt},Nt=t=>Ot[t];function Dt(t,e){var n;let r=Nt(t);return r!==kt&&(r=Vt),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}const Rt=!1,Ut=(t,e,n)=>-n*t+n*e+t;function Bt(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 jt=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},zt=[ft,ht,mt];function Lt(t){const e=(n=t,zt.find(t=>t.test(n)));var n;let r=e.parse(t);return e===mt&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,s=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;o=Bt(a,r,t+1/3),s=Bt(a,r,t),i=Bt(a,r,t-1/3)}else o=s=i=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*i),alpha:r}}(r)),r}const qt=(t,e)=>{const n=Lt(t),r=Lt(e),o={...n};return t=>(o.red=jt(n.red,r.red,t),o.green=jt(n.green,r.green,t),o.blue=jt(n.blue,r.blue,t),o.alpha=Ut(n.alpha,r.alpha,t),ht.transform(o))},Ht=(t,e)=>n=>e(t(n)),$t=(...t)=>t.reduce(Ht);function Wt(t,e){return"number"==typeof t?n=>Ut(t,e,n):vt.test(t)?qt(t,e):Xt(t,e)}const Kt=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>Wt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},Yt=(t,e)=>{const n={...t,...e},r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=Wt(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}},Xt=(t,e)=>{const n=Vt.createTransformer(e),r=gt(t),o=gt(e);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?$t(Kt(r.values,o.values),n):n=>""+(n>0?e:t)},Gt=(t,e)=>n=>Ut(t,e,n);function Zt(t,e,n){const r=[],o=n||("number"==typeof(s=t[0])?Gt:"string"==typeof s?vt.test(s)?qt:Xt:Array.isArray(s)?Kt:"object"==typeof s?Yt:Gt);var s;const i=t.length-1;for(let n=0;n<i;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=$t(t,s)}r.push(s)}return r}function Jt(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const s=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const i=Zt(e,r,o),a=i.length,u=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=((t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r})(t[n],t[n+1],e);return i[n](r)};return n?e=>u(d(t[0],t[s-1],e)):u}function _t(t,e){return t.map(()=>e||Q).splice(0,t.length-1)}function Qt({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,s,i=1-e;i=d(.05,1,i),t=d(.01,10,t/1e3),i<1?(o=e=>{const r=e*i,o=r*t;return.001-(r-n)/te(e,i)*Math.exp(-o)},s=e=>{const r=e*i*t,s=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=te(Math.pow(e,2),i);return(.001-o(e)>0?-1:1)*((s-a)*u)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}function te(t,e){return t*Math.sqrt(1-e*e)}function ee(t,e){return e?t*(1e3/e):0}const ne=["duration","bounce"],re=["stiffness","damping","mass"];function oe(t,e){return e.some(e=>void 0!==t[e])}function se({from:t=0,to:e=1,restSpeed:n=2,restDelta:r=.01,...o}){const s={done:!1,value:t};let{stiffness:i,damping:a,mass:u,velocity:l,duration:c,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!oe(t,re)&&oe(t,ne)){const n=Qt(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(o),d=ie,h=l?-l/1e3:0;const f=a/(2*Math.sqrt(i*u));function m(){const n=e-t,o=Math.sqrt(i/u)/1e3;if(void 0===r&&(r=Math.min(Math.abs(e-t)/100,.4)),f<1){const t=te(o,f);d=r=>{const s=Math.exp(-f*o*r);return e-s*((h+f*o*n)/t*Math.sin(t*r)+n*Math.cos(t*r))}}else if(1===f)d=t=>e-Math.exp(-o*t)*(n+(h+o*n)*t);else{const t=o*Math.sqrt(f*f-1);d=r=>{const s=Math.exp(-f*o*r),i=Math.min(t*r,300);return e-s*((h+f*o*n)*Math.sinh(i)+t*n*Math.cosh(i))/t}}}return m(),{next:t=>{const o=d(t);if(p)s.done=t>=c;else{let i=h;if(0!==t)if(f<1){const e=Math.max(0,t-5);i=ee(o-d(e),t-e)}else i=0;const a=Math.abs(i)<=n,u=Math.abs(e-o)<=r;s.done=a&&u}return s.value=s.done?e:o,s},flipTarget:()=>{h=-h,[t,e]=[e,t],m()}}}se.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ie=t=>0;const ae="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),ue="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(ae()),1/60*1e3);const le={delta:0,timestamp:0};let ce=!0,pe=!1,de=!1;const he=["read","update","preRender","render","postRender"],fe=he.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const u=a&&o,l=u?e:n;return s&&i.add(t),-1===l.indexOf(t)&&(l.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:u=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),i.has(r)&&(a.schedule(r),t())}o=!1,s&&(s=!1,a.process(u))}}};return a}(()=>pe=!0),t),{}),me=he.reduce((t,e)=>{const n=fe[e];return t[e]=(t,e=!1,r=!1)=>(pe||be(),n.schedule(t,e,r)),t},{}),ve=he.reduce((t,e)=>(t[e]=fe[e].cancel,t),{});he.reduce((t,e)=>(t[e]=()=>fe[e].process(le),t),{});const ge=t=>fe[t].process(le),ye=t=>{pe=!1,le.delta=ce?1/60*1e3:Math.max(Math.min(t-le.timestamp,40),1),le.timestamp=t,de=!0,he.forEach(ge),de=!1,pe&&(ce=!1,ue(ye))},be=()=>{pe=!0,ce=!0,de||ue(ye)},we={decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:s}){const i={done:!1,value:e};let a=n*t;const u=e+a,l=void 0===s?u:s(u);return l!==u&&(a=l-e),{next:t=>{const e=-a*Math.exp(-t/r);return i.done=!(e>o||e<-o),i.value=i.done?l:l+e,i},flipTarget:()=>{}}},keyframes:function({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const s={done:!1,value:t},i=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(r&&r.length===i.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(i),o);function u(){return Jt(a,i,{ease:Array.isArray(n)?n:_t(i,n)})}let l=u();return{next:t=>(s.value=l(t),s.done=t>=o,s),flipTarget:()=>{i.reverse(),l=u()}}},spring:se};function Ve(t,e,n=0){return t-e-n}const Ae=t=>{const e=({delta:e})=>t(e);return{start:()=>me.update(e,!0),stop:()=>ve.update(e)}};function Se({from:t,autoplay:e=!0,driver:n=Ae,elapsed:r=0,repeat:o=0,repeatType:s="loop",repeatDelay:i=0,onPlay:a,onStop:u,onComplete:l,onRepeat:c,onUpdate:p,type:d="keyframes",...h}){var f,m;let v,g,y,{to:b}=h,w=0,V=h.duration,A=!1,S=!0;const M=we[Array.isArray(b)?"keyframes":d];(null===(m=(f=M).needsInterpolation)||void 0===m?void 0:m.call(f,t,b))&&(y=Jt([0,100],[t,b],{clamp:!1}),t=0,b=100);const C=M({...h,from:t,to:b});function x(){w++,"reverse"===s?(S=w%2==0,r=function(t,e=0,n=0,r=!0){return r?Ve(e+-t,e,n):e-(t-e)+n}(r,V,i,S)):(r=Ve(r,V,i),"mirror"===s&&C.flipTarget()),A=!1,c&&c()}function E(t){if(S||(t=-t),r+=t,!A){const t=C.next(Math.max(0,r));g=t.value,y&&(g=y(g)),A=S?t.done:r<=0}p&&p(g),A&&(0===w&&(V=void 0!==V?V:r),w<o?function(t,e,n,r){return r?t>=e+n:t<=-n}(r,V,i,S)&&x():(v.stop(),l&&l()))}return e&&(a&&a(),v=n(E),v.start()),{stop:()=>{u&&u(),v.stop()}}}function Me({ease:t,times:e,...n}){const r={...n};return e&&(r.offset=e),n.duration&&(r.duration=W(n.duration)),n.repeatDelay&&(r.repeatDelay=W(n.repeatDelay)),t&&(r.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(lt):lt(t)),"tween"===n.type&&(r.type="keyframes"),"spring"!==n.type&&(r.type="keyframes"),r}function Ce(t,e){const n=Fe(t,e)||{};return void 0!==n.delay?n.delay:void 0!==t.delay?t.delay:0}function xe(t,e,n){return Array.isArray(e.to)&&void 0===t.duration&&(t.duration=.8),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:u,...l}){return!!Object.keys(l).length}(t)||(t={...t,...Tt(n,e.to)}),{...e,...Me(t)}}function Ee(t,e,n,r,o){const s=Fe(r,t)||{},{elapsed:i=0}=r;s.elapsed=i-W(r.delay||0);let a=void 0!==s.from?s.from:e.get();const u=At(t,n);"none"===a&&u&&"string"==typeof n?a=Dt(t,n):Te(a)&&"string"==typeof n?a=Pe(n):!Array.isArray(n)&&Te(n)&&"string"==typeof a&&(n=Pe(a));function l(){const t=g(n);return e.set(t),o(),s.onUpdate&&s.onUpdate(t),s.onComplete&&s.onComplete(),()=>{}}return!At(t,a)||!u||!1===s.type?s.elapsed?()=>function(t,e){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=e&&(ve.read(r),t(s-e))};return me.read(r,!0),()=>ve.read(r)}(l,-s.elapsed):l():function(){const r={from:a,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:t=>e.set(t)},i="inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:s=750,bounceStiffness:i=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:p,onComplete:d,onStop:h}){let f;function m(t){return void 0!==n&&t<n||void 0!==r&&t>r}function v(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function g(t){null==f||f.stop(),f=Se({...t,driver:c,onUpdate:e=>{var n;null==p||p(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:h})}function y(t){g({type:"spring",stiffness:i,damping:a,restDelta:u,...t})}if(m(t))y({from:t,velocity:e,to:v(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const i=v(r),a=i===n?-1:1;let c,p;const d=t=>{c=p,p=t,e=ee(t-c,le.delta),(1===a&&t>i||-1===a&&t<i)&&y({from:t,to:i,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:u,modifyTarget:l,onUpdate:m(r)?d:void 0})}return{stop:()=>null==f?void 0:f.stop()}}({...r,...s}):Se({...xe(s,r,t),onUpdate:t=>{r.onUpdate(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{r.onComplete(),s.onComplete&&s.onComplete()}});return()=>i.stop()}()}function Te(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Pe(t){return"number"==typeof t?0:Dt("",t)}function Fe(t,e){return t[e]||t.default||t}function Ie(t,e,n,r={}){return Rt&&(r={type:!1}),e.start(o=>Ee(t,e,n,{...r,delay:Ce(r,t)},o))}const ke=t=>/^0[^.\s]+$/.test(t);class Oe{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Ne{constructor(t){var e;this.version="7.8.0",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Oe,this.velocityUpdateSubscribers=new Oe,this.renderSubscribers=new Oe,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:r}=le;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,me.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>me.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ee(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function De(t){return new Ne(t)}const Re=t=>e=>e.test(t),Ue=[p,y,h,b,w,V,{test:t=>"auto"===t,parse:t=>t}],Be=t=>Ue.find(Re(t)),je=[...Ue,vt,Vt],ze=t=>je.find(Re(t));function Le(t,e,n){const r=t.getProps();return A(r,e,void 0!==n?n:r.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))}function qe(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,De(n))}function He(t,e){if(!e)return;return(e[t]||e.default||e).from}function $e(t){return Boolean(S(t)&&t.add)}function We(t,e){const{MotionAppearAnimations:n}=window,r=((t,e)=>`${t}: ${e}`)(t,M.has(e)?"transform":e),o=n&&n.get(r);return o?(me.render(()=>{try{o.cancel(),n.delete(r)}catch(t){}}),o.currentTime||0):0}const Ke="data-"+C("framerAppearId");function Ye(t,e,n={}){var r;const o=Le(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Xe(t,o,n):()=>Promise.resolve(),a=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:a}=s;return function(t,e,n=0,r=0,o=1,s){const i=[],a=(t.variantChildren.size-1)*r,u=1===o?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Ge).forEach((t,r)=>{i.push(Ye(t,e,{...s,delay:n+u(r)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(i)}(t,e,o+r,i,a,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[t,e]="beforeChildren"===u?[i,a]:[a,i];return t().then(e)}return Promise.all([i(),a(n.delay)])}function Xe(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=t.getDefaultTransition(),transitionEnd:a,...u}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(i=r);const c=[],p=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in u){const r=t.getValue(e),o=u[e];if(!r||void 0===o||p&&Ze(p,e))continue;let s={delay:n,elapsed:0,...i};if(t.shouldReduceMotion&&M.has(e)&&(s={...s,type:!1,delay:0}),!r.hasAnimated){const n=t.getProps()[Ke];n&&(s.elapsed=We(n,e))}let a=Ie(e,r,o,s);$e(l)&&(l.add(e),a=a.then(()=>l.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&function(t,e){const n=Le(t,e);let{transitionEnd:r={},transition:o={},...s}=n?t.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const e in s){qe(t,e,g(s[e]))}}(t,a)})}function Ge(t,e){return t.sortNodePosition(e)}function Ze({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}var Je;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Je||(Je={}));const _e=[Je.Animate,Je.InView,Je.Focus,Je.Hover,Je.Tap,Je.Drag,Je.Exit],Qe=[..._e].reverse(),tn=_e.length;function en(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Ye(t,e,n));r=Promise.all(o)}else if("string"==typeof e)r=Ye(t,e,n);else{const o="function"==typeof e?Le(t,e,n.custom):e;r=Xe(t,o,n)}return r.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function nn(t){let e=en(t);const n={[Je.Animate]:on(!0),[Je.InView]:on(),[Je.Hover]:on(),[Je.Tap]:on(),[Je.Drag]:on(),[Je.Focus]:on(),[Je.Exit]:on()};let r=!0;const o=(e,n)=>{const r=Le(t,n);if(r){const{transition:t,transitionEnd:n,...o}=r;e={...e,...o,...n}}return e};function s(s,i){const a=t.getProps(),u=t.getVariantContext(!0)||{},l=[],c=new Set;let p={},d=1/0;for(let e=0;e<tn;e++){const h=Qe[e],f=n[h],v=void 0!==a[h]?a[h]:u[h],g=E(v),y=h===i?f.isActive:null;!1===y&&(d=e);let b=v===u[h]&&v!==a[h]&&g;if(b&&r&&t.manuallyAnimateOnMount&&(b=!1),f.protectedKeys={...p},!f.isActive&&null===y||!v&&!f.prevProp||x(v)||"boolean"==typeof v)continue;const w=rn(f.prevProp,v);let V=w||h===i&&f.isActive&&!b&&g||e>d&&g;const A=Array.isArray(v)?v:[v];let S=A.reduce(o,{});!1===y&&(S={});const{prevResolvedValues:M={}}=f,C={...M,...S},T=t=>{V=!0,c.delete(t),f.needsAnimating[t]=!0};for(const t in C){const e=S[t],n=M[t];p.hasOwnProperty(t)||(e!==n?m(e)&&m(n)?!$(e,n)||w?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):c.add(t):void 0!==e&&c.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=v,f.prevResolvedValues=S,f.isActive&&(p={...p,...S}),r&&t.blockInitialAnimation&&(V=!1),V&&!b&&l.push(...A.map(t=>({animation:t,options:{type:h,...s}})))}if(c.size){const e={};c.forEach(n=>{const r=t.getBaseTarget(n);void 0!==r&&(e[n]=r)}),l.push({animation:e})}let h=Boolean(l.length);return r&&!1===a.initial&&!t.manuallyAnimateOnMount&&(h=!1),r=!1,h?e(l):Promise.resolve()}return{animateChanges:s,setActive:function(e,r,o){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)}),n[e].isActive=r;const a=s(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function rn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!$(e,t)}function on(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const sn=t=>e=>(t(e),null),an={animation:sn(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=nn(t)),x(e)&&n(()=>e.subscribe(t),[e])}),exit:sn(r=>{const{custom:o,visualElement:i}=r,[a,u]=function(){const r=t(s);if(null===r)return[!0,null];const{isPresent:o,onExitComplete:i,register:a}=r,u=e();return n(()=>a(u),[]),!o&&i?[!1,()=>i&&i(u)]:[!0]}(),l=t(s);n(()=>{i.isPresent=a;const t=i.animationState&&i.animationState.setActive(Je.Exit,!a,{custom:l&&l.custom||o});t&&!a&&t.then(u)},[a])})};function un(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function ln(t,e,r,o){n(()=>{const n=t.current;if(r&&n)return un(n,e,r,o)},[t,e,r,o])}function cn(t){return!!t.touches}const pn={pageX:0,pageY:0};function dn(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||pn;return{x:n[e+"X"],y:n[e+"Y"]}}function hn(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}const fn=(t,e=!1)=>{const n=e=>t(e,function(t,e="page"){return{point:cn(t)?dn(t,e):hn(t,e)}}(e));return e?(r=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&r(t)}):n;var r},mn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},vn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function gn(t){return T&&null===window.onpointerdown?t:T&&null===window.ontouchstart?vn[t]:T&&null===window.onmousedown?mn[t]:t}function yn(t,e,n,r){return un(t,gn(e),fn(n,"pointerdown"===e),r)}function bn(t,e,n,r){return ln(t,gn(e),n&&fn(n,"pointerdown"===e),r)}function wn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Vn=wn("dragHorizontal"),An=wn("dragVertical");function Sn(){const t=function(t){let e=!1;if("y"===t)e=An();else if("x"===t)e=Vn();else{const t=Vn(),n=An();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function Mn(t,e,n){return(r,o)=>{(function(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent})(r)&&!Sn()&&(t.animationState&&t.animationState.setActive(Je.Hover,e),n&&n(r,o))}}const Cn=(t,e)=>!!e&&(t===e||Cn(t,e.parentElement));const xn=("undefined"==typeof process||process.env,"production"),En=new Set;const Tn=new WeakMap,Pn=new WeakMap,Fn=t=>{const e=Tn.get(t.target);e&&e(t)},In=t=>{t.forEach(Fn)};function kn(t,e,n){const r=function({root:t,...e}){const n=t||document;Pn.has(n)||Pn.set(n,{});const r=Pn.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(In,{root:t,...e})),r[o]}(e);return Tn.set(t,n),r.observe(t),()=>{Tn.delete(t),r.unobserve(t)}}const On={some:0,all:1};function Nn(t,e,r,{root:o,margin:s,amount:i="some",once:a}){n(()=>{if(!t||!r.current)return;const n={root:null==o?void 0:o.current,rootMargin:s,threshold:"number"==typeof i?i:On[i]};return kn(r.current,n,t=>{const{isIntersecting:n}=t;if(e.isInView===n)return;if(e.isInView=n,a&&!n&&e.hasEnteredView)return;n&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Je.InView,n);const o=r.getProps(),s=n?o.onViewportEnter:o.onViewportLeave;s&&s(t)})},[t,o,s,i])}function Dn(t,e,r,{fallback:o=!0}){n(()=>{var n,s;t&&o&&("production"!==xn&&(n="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||En.has(n)||(console.warn(n),s&&console.warn(s),En.add(n))),requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:t}=r.getProps();t&&t(null),r.animationState&&r.animationState.setActive(Je.InView,!0)}))},[t])}const Rn={inView:sn((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:o,viewport:s={}}){const i=r({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||o);s.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?Dn:Nn)(a,i.current,t,s)})),tap:sn((function({onTap:t,onTapStart:e,onTapCancel:o,whileTap:s,visualElement:i}){const a=t||e||o||s,u=r(!1),l=r(null),c={passive:!(e||t||o||m)};function p(){l.current&&l.current(),l.current=null}function d(){return p(),u.current=!1,i.animationState&&i.animationState.setActive(Je.Tap,!1),!Sn()}function h(e,n){d()&&(Cn(i.current,e.target)?t&&t(e,n):o&&o(e,n))}function f(t,e){d()&&o&&o(t,e)}function m(t,n){p(),u.current||(u.current=!0,l.current=$t(yn(window,"pointerup",h,c),yn(window,"pointercancel",f,c)),i.animationState&&i.animationState.setActive(Je.Tap,!0),e&&e(t,n))}var v;bn(i,"pointerdown",a?m:void 0,c),v=p,n(()=>()=>v(),[])})),focus:sn((function({whileFocus:t,visualElement:e}){const{animationState:n}=e;ln(e,"focus",t?()=>{n&&n.setActive(Je.Focus,!0)}:void 0),ln(e,"blur",t?()=>{n&&n.setActive(Je.Focus,!1)}:void 0)})),hover:sn((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:r}){bn(r,"pointerenter",t||n?Mn(r,!0,t):void 0,{passive:!t}),bn(r,"pointerleave",e||n?Mn(r,!1,e):void 0,{passive:!e})}))};function Un(t){return"string"==typeof t&&t.startsWith("var(--")}const Bn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function jn(t,e,n=1){const[r,o]=function(t){const e=Bn.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);return s?s.trim():Un(o)?jn(o,e,n+1):o}const zn=new Set(["width","height","top","left","right","bottom","x","y"]),Ln=t=>zn.has(t),qn=(t,e)=>{t.set(e,!1),t.set(e)},Hn=t=>t===p||t===y;var $n;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}($n||($n={}));const Wn=(t,e)=>parseFloat(t.split(", ")[e]),Kn=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Wn(o[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?Wn(e[1],t):0}},Yn=new Set(["x","y","z"]),Xn=P.filter(t=>!Yn.has(t));const Gn={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:Kn(4,13),y:Kn(5,14)},Zn=(t,e,n={},r={})=>{e={...e},r={...r};const o=Object.keys(e).filter(Ln);let s=[],i=!1;const a=[];if(o.forEach(o=>{const u=t.getValue(o);if(!t.hasValue(o))return;let l=n[o],c=Be(l);const p=e[o];let d;if(m(p)){const t=p.length,e=null===p[0]?1:0;l=p[e],c=Be(l);for(let n=e;n<t;n++)d?Be(p[n]):d=Be(p[n])}else d=Be(p);if(c!==d)if(Hn(c)&&Hn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[o]=parseFloat(p):Array.isArray(p)&&d===y&&(e[o]=p.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===l||0===p)?0===l?u.set(d.transform(l)):e[o]=c.transform(p):(i||(s=function(t){const e=[];return Xn.forEach(n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),i=!0),a.push(o),r[o]=void 0!==r[o]?r[o]:e[o],qn(u,p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const r=e.measureViewportBox(),o=e.current,s=getComputedStyle(o),{display:i}=s,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Gn[t](r,s)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const r=e.getValue(n);qn(r,a[n]),t[n]=Gn[n](u,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),T&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:e,transitionEnd:r}};function Jn(t,e,n,r){return(t=>Object.keys(t).some(Ln))(e)?Zn(t,e,n,r):{target:e,transitionEnd:r}}const _n=(t,e,n,r)=>{const o=function(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!Un(e))return;const n=jn(e,r);n&&t.set(n)});for(const t in e){const o=e[t];if(!Un(o))continue;const s=jn(o,r);s&&(e[t]=s,n&&void 0===n[t]&&(n[t]=o))}return{target:e,transitionEnd:n}}(t,e,r);return Jn(t,e=o.target,n,r=o.transitionEnd)},Qn={current:null},tr={current:!1};const er=Object.keys(F),nr=er.length,rr=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const or=["initial",..._e],sr=or.length;class ir extends class{constructor({parent:t,props:e,reducedMotionConfig:n,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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=()=>me.render(this.render,!1,!0);const{latestValues:s,renderState:i}=r;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=i,this.parent=t,this.props=e,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=I(e),this.isVariantNode=k(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:a,...u}=this.scrapeMotionValuesFromProps(e);for(const t in u){const e=u[t];void 0!==s[t]&&S(e)&&(e.set(s[t],!1),$e(a)&&a.add(t))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var e;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(e=this.parent)||void 0===e?void 0:e.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),tr.current||function(){if(tr.current=!0,T)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qn.current=t.matches;t.addListener(e),e()}else Qn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Qn.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,e,n;null===(t=this.projection)||void 0===t||t.unmount(),ve.update(this.notifyUpdate),ve.render(this.render),this.valueSubscriptions.forEach(t=>t()),null===(e=this.removeFromVariantTree)||void 0===e||e.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const t in this.events)this.events[t].clear();this.current=null}bindToMotionValue(t,e){const n=M.has(t),r=e.onChange(e=>{this.latestValues[t]=e,this.props.onUpdate&&me.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{r(),o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,e,n,r,s,i){const a=[];for(let e=0;e<nr;e++){const n=er[e],{isEnabled:r,Component:s}=F[n];r(t)&&s&&a.push(o(s,{key:n,...t,visualElement:this}))}if(!this.projection&&s){this.projection=new s(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:o,dragConstraints:a,layoutScroll:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(o)||a&&O(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u})}return a}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)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let e=0;e<rr.length;e++){const n=rr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=t["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(t,e,n){const{willChange:r}=e;for(const o in e){const s=e[o],i=n[o];if(S(s))t.addValue(o,s),$e(r)&&r.add(o);else if(S(i))t.addValue(o,De(s)),$e(r)&&r.remove(o);else if(i!==s)if(t.hasValue(o)){const e=t.getValue(o);!e.hasAnimated&&e.set(s)}else{const e=t.getStaticValue(o);t.addValue(o,De(void 0!==e?e:s))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var e;return null===(e=this.props.variants)||void 0===e?void 0:e[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:null===(t=this.parent)||void 0===t?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var e,n;if(t)return null===(e=this.parent)||void 0===e?void 0:e.getVariantContext();if(!this.isControllingVariants){const t=(null===(n=this.parent)||void 0===n?void 0:n.getVariantContext())||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const r={};for(let t=0;t<sr;t++){const e=or[t],n=this.props[e];(E(n)||!1===n)&&(r[e]=n)}return r}addVariantChild(t){var e;const n=this.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)}addValue(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latestValues[t]=e.get(),this.bindToMotionValue(t,e)}removeValue(t){var e;this.values.delete(t),null===(e=this.valueSubscriptions.get(t))||void 0===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=De(e),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?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,r="string"==typeof n||"object"==typeof n?null===(e=A(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||S(o)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new Oe),this.events[t].add(e)}notify(t,...e){var n;null===(n=this.events[t])||void 0===n||n.notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:r},o){let s=function(t,e,n){var r;const o={};for(const s in t){const t=He(s,e);o[s]=void 0!==t?t:null===(r=n.getValue(s))||void 0===r?void 0:r.get()}return o}(n,t||{},this);if(r&&(e&&(e=r(e)),n&&(n=r(n)),s&&(s=r(s))),o){!function(t,e,n){var r,o;const s=Object.keys(e).filter(e=>!t.hasValue(e)),i=s.length;if(i)for(let a=0;a<i;a++){const i=s[a],u=e[i];let l=null;Array.isArray(u)&&(l=u[0]),null===l&&(l=null!==(o=null!==(r=n[i])&&void 0!==r?r:t.readValue(i))&&void 0!==o?o:e[i]),null!=l&&("string"==typeof l&&(/^\-?\d*\.?\d+$/.test(l)||ke(l))?l=parseFloat(l):!ze(l)&&Vt.test(u)&&(l=Dt(i,u)),t.addValue(i,De(l)),void 0===n[i]&&(n[i]=l),null!==l&&t.setBaseTarget(i,l))}}(this,n,s);const t=_n(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class ar extends ir{readValueFromInstance(t,e){if(M.has(e)){const t=Nt(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),o=(N(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,r){D(t,e,n,r.transformTemplate)}scrapeMotionValuesFromProps(t){return R(t)}renderInstance(t,e,n,r){U(t,e,n,r)}}class ur extends ir{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){var n;return M.has(e)?(null===(n=Nt(e))||void 0===n?void 0:n.default)||0:(e=B.has(e)?e:C(e),t.getAttribute(e))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t){return j(t)}build(t,e,n,r){z(t,e,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,e,n,r){L(t,e,n,r)}mount(t){this.isSVGTag=q(t.tagName),super.mount(t)}}const lr={renderer:(t,e)=>H(t)?new ur(e,{enableHardwareAcceleration:!1}):new ar(e,{enableHardwareAcceleration:!0}),...an,...Rn};export{lr as domAnimation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t,useRef as e}from"react";const a=t({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),r=t(null),n="undefined"!=typeof document;function s(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function o(t){return"string"==typeof t||Array.isArray(t)}function i(t){return"object"==typeof t&&"function"==typeof t.start}const f=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function c(t){return i(t.animate)||f.some(e=>o(t[e]))}function l(t){return Boolean(c(t)||t.variants)}const d=t=>({isEnabled:e=>t.some(t=>!!e[t])}),u={measureLayout:d(["layout","layoutId","drag"]),animation:d(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:d(["exit"]),drag:d(["drag","dragControls"]),focus:d(["whileFocus"]),hover:d(["whileHover","onHoverStart","onHoverEnd"]),tap:d(["whileTap","onTap","onTapStart","onTapCancel"]),pan:d(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:d(["whileInView","onViewportEnter","onViewportLeave"])};function p(t){const a=e(null);return null===a.current&&(a.current=t()),a.current}const m={hasAnimatedSinceResize:!0,hasEverUpdated:!1},g=t({}),h=t({}),y=["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 v(t){return"string"==typeof t&&!t.includes("-")&&!!(y.indexOf(t)>-1||/[A-Z]/.test(t))}const w={};function x(t){Object.assign(w,t)}const b=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],k=new Set(b);function O(t,{layout:e,layoutId:a}){return k.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!w[t]||"opacity"===t)}const L=t=>!!(null==t?void 0:t.getVelocity),T={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},S=(t,e)=>b.indexOf(t)-b.indexOf(e);function X(t){return t.startsWith("--")}const Y=(t,e)=>e&&"number"==typeof t?e.transform(t):t,$=(t,e,a)=>Math.min(Math.max(a,t),e),P={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},A={...P,transform:t=>$(0,1,t)},B={...P,default:1},R=t=>Math.round(1e5*t)/1e5,V=/(-)?([\d]*\.?[\d])+/g,W=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Z=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function j(t){return"string"==typeof t}const z=t=>({test:e=>j(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),C=z("deg"),H=z("%"),E=z("px"),F=z("vh"),I=z("vw"),M={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(100*t)},D={...P,transform:Math.round},U={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,radius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,size:E,top:E,right:E,bottom:E,left:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,rotate:C,rotateX:C,rotateY:C,rotateZ:C,scale:B,scaleX:B,scaleY:B,scaleZ:B,skew:C,skewX:C,skewY:C,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:A,originX:M,originY:M,originZ:E,zIndex:D,fillOpacity:A,strokeOpacity:A,numOctaves:D};function K(t,e,a,r){const{style:n,vars:s,transform:o,transformKeys:i,transformOrigin:f}=t;i.length=0;let c=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(X(t)){s[t]=a;continue}const r=U[t],u=Y(a,r);if(k.has(t)){if(c=!0,o[t]=u,i.push(t),!d)continue;a!==(r.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,f[t]=u):n[t]=u}if(e.transform||(c||r?n.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:r=!0},n,s){let o="";e.sort(S);for(const a of e)o+=`${T[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,n?"":o):r&&n&&(o="none"),o}(t,a,d,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=f;n.transformOrigin=`${t} ${e} ${a}`}}function q(t,e,a){return"string"==typeof t?t:E.transform(e+a*t)}const N={offset:"stroke-dashoffset",array:"stroke-dasharray"},G={offset:"strokeDashoffset",array:"strokeDasharray"};function J(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(K(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:p,dimensions:m}=t;u.transform&&(m&&(p.transform=u.transform),delete u.transform),m&&(void 0!==r||void 0!==n||p.transform)&&(p.transformOrigin=function(t,e,a){return`${q(e,t.x,t.width)} ${q(a,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(u.x=e),void 0!==a&&(u.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?N:G;t[s.offset]=E.transform(-r);const o=E.transform(e),i=E.transform(a);t[s.array]=`${o} ${i}`}(u,s,o,i,!1)}const Q=t=>"string"==typeof t&&"svg"===t.toLowerCase(),_=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function tt(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const et=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 at(t,e,a,r){tt(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(et.has(a)?a:_(a),e.attrs[a])}function rt(t){const{style:e}=t,a={};for(const r in e)(L(e[r])||O(r,t))&&(a[r]=e[r]);return a}function nt(t){const e=rt(t);for(const a in t)if(L(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}function st(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const ot=t=>Array.isArray(t),it=t=>ot(t)?t[t.length-1]||0:t;function ft(t){const e=L(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{P as A,H as B,W as C,ot as D,U as E,it as F,E as G,x as H,w as I,C as J,I as K,g as L,a as M,F as N,b as O,r as P,k as Q,
|
|
1
|
+
import{createContext as t,useRef as e}from"react";const a=t({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),r=t(null),n="undefined"!=typeof document;function s(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function o(t){return"string"==typeof t||Array.isArray(t)}function i(t){return"object"==typeof t&&"function"==typeof t.start}const f=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function c(t){return i(t.animate)||f.some(e=>o(t[e]))}function l(t){return Boolean(c(t)||t.variants)}const d=t=>({isEnabled:e=>t.some(t=>!!e[t])}),u={measureLayout:d(["layout","layoutId","drag"]),animation:d(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:d(["exit"]),drag:d(["drag","dragControls"]),focus:d(["whileFocus"]),hover:d(["whileHover","onHoverStart","onHoverEnd"]),tap:d(["whileTap","onTap","onTapStart","onTapCancel"]),pan:d(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:d(["whileInView","onViewportEnter","onViewportLeave"])};function p(t){const a=e(null);return null===a.current&&(a.current=t()),a.current}const m={hasAnimatedSinceResize:!0,hasEverUpdated:!1},g=t({}),h=t({}),y=["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 v(t){return"string"==typeof t&&!t.includes("-")&&!!(y.indexOf(t)>-1||/[A-Z]/.test(t))}const w={};function x(t){Object.assign(w,t)}const b=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],k=new Set(b);function O(t,{layout:e,layoutId:a}){return k.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!w[t]||"opacity"===t)}const L=t=>!!(null==t?void 0:t.getVelocity),T={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},S=(t,e)=>b.indexOf(t)-b.indexOf(e);function X(t){return t.startsWith("--")}const Y=(t,e)=>e&&"number"==typeof t?e.transform(t):t,$=(t,e,a)=>Math.min(Math.max(a,t),e),P={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},A={...P,transform:t=>$(0,1,t)},B={...P,default:1},R=t=>Math.round(1e5*t)/1e5,V=/(-)?([\d]*\.?[\d])+/g,W=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Z=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function j(t){return"string"==typeof t}const z=t=>({test:e=>j(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),C=z("deg"),H=z("%"),E=z("px"),F=z("vh"),I=z("vw"),M={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(100*t)},D={...P,transform:Math.round},U={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,radius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,size:E,top:E,right:E,bottom:E,left:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,rotate:C,rotateX:C,rotateY:C,rotateZ:C,scale:B,scaleX:B,scaleY:B,scaleZ:B,skew:C,skewX:C,skewY:C,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:A,originX:M,originY:M,originZ:E,zIndex:D,fillOpacity:A,strokeOpacity:A,numOctaves:D};function K(t,e,a,r){const{style:n,vars:s,transform:o,transformKeys:i,transformOrigin:f}=t;i.length=0;let c=!1,l=!1,d=!0;for(const t in e){const a=e[t];if(X(t)){s[t]=a;continue}const r=U[t],u=Y(a,r);if(k.has(t)){if(c=!0,o[t]=u,i.push(t),!d)continue;a!==(r.default||0)&&(d=!1)}else t.startsWith("origin")?(l=!0,f[t]=u):n[t]=u}if(e.transform||(c||r?n.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:a=!0,allowTransformNone:r=!0},n,s){let o="";e.sort(S);for(const a of e)o+=`${T[a]||a}(${t[a]}) `;return a&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,n?"":o):r&&n&&(o="none"),o}(t,a,d,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=f;n.transformOrigin=`${t} ${e} ${a}`}}function q(t,e,a){return"string"==typeof t?t:E.transform(e+a*t)}const N={offset:"stroke-dashoffset",array:"stroke-dasharray"},G={offset:"strokeDashoffset",array:"strokeDasharray"};function J(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(K(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:p,dimensions:m}=t;u.transform&&(m&&(p.transform=u.transform),delete u.transform),m&&(void 0!==r||void 0!==n||p.transform)&&(p.transformOrigin=function(t,e,a){return`${q(e,t.x,t.width)} ${q(a,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(u.x=e),void 0!==a&&(u.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?N:G;t[s.offset]=E.transform(-r);const o=E.transform(e),i=E.transform(a);t[s.array]=`${o} ${i}`}(u,s,o,i,!1)}const Q=t=>"string"==typeof t&&"svg"===t.toLowerCase(),_=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function tt(t,{style:e,vars:a},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in a)t.style.setProperty(e,a[e])}const et=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 at(t,e,a,r){tt(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(et.has(a)?a:_(a),e.attrs[a])}function rt(t){const{style:e}=t,a={};for(const r in e)(L(e[r])||O(r,t))&&(a[r]=e[r]);return a}function nt(t){const e=rt(t);for(const a in t)if(L(t[a])){e["x"===a||"y"===a?"attr"+a.toUpperCase():a]=t[a]}return e}function st(t,e,a,r={},n={}){return"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==a?a:t.custom,r,n)),e}const ot=t=>Array.isArray(t),it=t=>ot(t)?t[t.length-1]||0:t;function ft(t){const e=L(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{P as A,H as B,W as C,ot as D,U as E,it as F,E as G,x as H,w as I,C as J,I as K,g as L,a as M,F as N,b as O,r as P,k as Q,_ as R,h as S,X as T,tt as U,et as V,s as a,c as b,o as c,L as d,O as e,u as f,m as g,K as h,n as i,J as j,Q as k,v as l,l as m,i as n,st as o,at as p,rt as q,ft as r,nt as s,$ as t,p as u,j as v,Z as w,V as x,R as y,A as z};
|