framer-motion 9.1.0 → 9.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +15 -15
  2. package/dist/cjs/index.js +605 -116
  3. package/dist/es/animation/hooks/animation-controls.mjs +1 -1
  4. package/dist/es/animation/index.mjs +1 -1
  5. package/dist/es/animation/legacy-popmotion/find-spring.mjs +1 -1
  6. package/dist/es/animation/legacy-popmotion/keyframes.mjs +3 -8
  7. package/dist/es/animation/utils/easing.mjs +1 -1
  8. package/dist/es/components/AnimateSharedLayout.mjs +2 -2
  9. package/dist/es/components/Reorder/Group.mjs +1 -1
  10. package/dist/es/components/Reorder/Item.mjs +1 -1
  11. package/dist/es/gestures/drag/VisualElementDragControls.mjs +3 -4
  12. package/dist/es/gestures/focus.mjs +2 -3
  13. package/dist/es/gestures/hover.mjs +1 -2
  14. package/dist/es/gestures/press.mjs +2 -3
  15. package/dist/es/index.mjs +1 -0
  16. package/dist/es/motion/features/animation/exit.mjs +1 -2
  17. package/dist/es/motion/features/viewport/index.mjs +2 -3
  18. package/dist/es/render/VisualElement.mjs +3 -4
  19. package/dist/es/render/dom/resize/handle-element.mjs +64 -0
  20. package/dist/es/render/dom/resize/handle-window.mjs +30 -0
  21. package/dist/es/render/dom/resize/index.mjs +8 -0
  22. package/dist/es/render/dom/scroll/index.mjs +74 -0
  23. package/dist/es/render/dom/scroll/info.mjs +56 -0
  24. package/dist/es/render/dom/scroll/offsets/edge.mjs +45 -0
  25. package/dist/es/render/dom/scroll/offsets/index.mjs +54 -0
  26. package/dist/es/render/dom/scroll/offsets/inset.mjs +25 -0
  27. package/dist/es/render/dom/scroll/offsets/offset.mjs +35 -0
  28. package/dist/es/render/dom/scroll/offsets/presets.mjs +20 -0
  29. package/dist/es/render/dom/scroll/on-scroll-handler.mjs +38 -0
  30. package/dist/es/render/dom/utils/css-variables-conversion.mjs +5 -7
  31. package/dist/es/render/dom/utils/is-css-variable.mjs +4 -7
  32. package/dist/es/render/dom/utils/resolve-element.mjs +21 -0
  33. package/dist/es/render/dom/utils/unit-conversion.mjs +2 -11
  34. package/dist/es/render/dom/viewport/index.mjs +52 -0
  35. package/dist/es/render/html/HTMLVisualElement.mjs +2 -2
  36. package/dist/es/render/html/utils/build-styles.mjs +2 -2
  37. package/dist/es/render/utils/animation-state.mjs +16 -21
  38. package/dist/es/render/utils/is-controlling-variants.mjs +1 -10
  39. package/dist/es/render/utils/motion-values.mjs +1 -1
  40. package/dist/es/render/utils/variant-props.mjs +12 -0
  41. package/dist/es/utils/errors.mjs +18 -0
  42. package/dist/es/utils/interpolate.mjs +1 -1
  43. package/dist/es/utils/mix-color.mjs +1 -1
  44. package/dist/es/utils/mix-complex.mjs +1 -1
  45. package/dist/es/utils/offsets/default.mjs +9 -0
  46. package/dist/es/utils/offsets/fill.mjs +12 -0
  47. package/dist/es/utils/offsets/time.mjs +5 -0
  48. package/dist/es/utils/use-in-view.mjs +1 -1
  49. package/dist/es/value/index.mjs +1 -1
  50. package/dist/es/value/use-inverted-scale.mjs +1 -1
  51. package/dist/es/value/use-scroll.mjs +2 -2
  52. package/dist/es/value/use-will-change/index.mjs +2 -2
  53. package/dist/framer-motion.dev.js +238 -370
  54. package/dist/framer-motion.js +1 -1
  55. package/dist/index.d.ts +12 -3
  56. package/dist/projection.dev.js +53 -78
  57. package/dist/size-rollup-dom-animation-assets.js +1 -1
  58. package/dist/size-rollup-dom-animation.js +1 -1
  59. package/dist/size-rollup-dom-max-assets.js +1 -1
  60. package/dist/size-rollup-dom-max.js +1 -1
  61. package/dist/size-rollup-m.js +1 -1
  62. package/dist/size-rollup-motion.js +1 -1
  63. package/dist/size-webpack-dom-animation.js +1 -1
  64. package/dist/size-webpack-dom-max.js +1 -1
  65. package/dist/size-webpack-m.js +1 -1
  66. package/dist/three-entry.d.ts +1 -1
  67. package/package.json +9 -11
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import * as React$1 from 'react';
3
3
  import { SVGAttributes, CSSProperties, RefObject, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, ReactHTML, DetailedHTMLFactory, HTMLAttributes, useEffect } from 'react';
4
- import { ScrollOptions, InViewOptions } from '@motionone/dom';
5
4
 
6
5
  declare type EasingFunction = (v: number) => number;
7
6
  declare type EasingModifier = (easing: EasingFunction) => EasingFunction;
@@ -1246,7 +1245,7 @@ interface FeatureBundle extends FeaturePackages {
1246
1245
  declare type LazyFeatureBundle$1 = () => Promise<FeatureBundle>;
1247
1246
  declare type RenderComponent<Instance, RenderState> = (Component: string | React$1.ComponentType<React$1.PropsWithChildren<unknown>>, props: MotionProps, projectionId: number | undefined, ref: React$1.Ref<Instance>, visualState: VisualState<Instance, RenderState>, isStatic: boolean, visualElement?: VisualElement<Instance>) => any;
1248
1247
 
1249
- declare enum AnimationType {
1248
+ declare const enum AnimationType {
1250
1249
  Animate = "animate",
1251
1250
  Hover = "whileHover",
1252
1251
  Tap = "whileTap",
@@ -4244,6 +4243,12 @@ declare function usePresence(): AlwaysPresent | Present | NotPresent;
4244
4243
  */
4245
4244
  declare function useIsPresent(): boolean;
4246
4245
 
4246
+ interface InViewOptions {
4247
+ root?: Element | Document;
4248
+ margin?: string;
4249
+ amount?: "any" | "all" | number;
4250
+ }
4251
+
4247
4252
  interface Options extends Omit<InViewOptions, "root" | "amount"> {
4248
4253
  root?: RefObject<Element>;
4249
4254
  once?: boolean;
@@ -4323,6 +4328,10 @@ declare function delay(callback: DelayedFunction, timeout: number): () => void;
4323
4328
  declare const distance: (a: number, b: number) => number;
4324
4329
  declare function distance2D(a: Point, b: Point): number;
4325
4330
 
4331
+ declare type DevMessage = (check: boolean, message: string) => void;
4332
+ declare let warning: DevMessage;
4333
+ declare let invariant: DevMessage;
4334
+
4326
4335
  declare type Mix<T> = (v: number) => T;
4327
4336
  declare type MixerFactory<T> = (from: T, to: T) => Mix<T>;
4328
4337
  interface InterpolateOptions<T> {
@@ -4541,4 +4550,4 @@ interface ScaleMotionValues {
4541
4550
  */
4542
4551
  declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMotionValues;
4543
4552
 
4544
- export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$2 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, PlaybackControls, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inertia, interpolate, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, useWillChange, wrap };
4553
+ export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$2 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, PlaybackControls, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inertia, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useVisualElementContext, useWillChange, warning, wrap };
@@ -161,19 +161,21 @@
161
161
  onNextFrame(processFrame);
162
162
  };
163
163
 
164
- var warning = function () { };
165
- var invariant = function () { };
166
- {
167
- warning = function (check, message) {
168
- if (!check && typeof console !== 'undefined') {
169
- console.warn(message);
170
- }
171
- };
172
- invariant = function (check, message) {
173
- if (!check) {
174
- throw new Error(message);
175
- }
176
- };
164
+ const noop = (any) => any;
165
+
166
+ let warning = noop;
167
+ let invariant = noop;
168
+ {
169
+ warning = (check, message) => {
170
+ if (!check && typeof console !== "undefined") {
171
+ console.warn(message);
172
+ }
173
+ };
174
+ invariant = (check, message) => {
175
+ if (!check) {
176
+ throw new Error(message);
177
+ }
178
+ };
177
179
  }
178
180
 
179
181
  /**
@@ -671,7 +673,23 @@
671
673
  : interpolator;
672
674
  }
673
675
 
674
- const noop = (any) => any;
676
+ function fillOffset(offset, remaining) {
677
+ const min = offset[offset.length - 1];
678
+ for (let i = 1; i <= remaining; i++) {
679
+ const offsetProgress = progress(0, remaining, i);
680
+ offset.push(mix(min, 1, offsetProgress));
681
+ }
682
+ }
683
+
684
+ function defaultOffset(arr) {
685
+ const offset = [0];
686
+ fillOffset(offset, arr.length - 1);
687
+ return offset;
688
+ }
689
+
690
+ function convertOffsetToTimes(offset, duration) {
691
+ return offset.map((o) => o * duration);
692
+ }
675
693
 
676
694
  /*
677
695
  Bezier function generator
@@ -765,13 +783,6 @@
765
783
  function defaultEasing(values, easing) {
766
784
  return values.map(() => easing || easeInOut).splice(0, values.length - 1);
767
785
  }
768
- function defaultOffset(values) {
769
- const numValues = values.length;
770
- return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0);
771
- }
772
- function convertOffsetToTimes(offset, duration) {
773
- return offset.map((o) => o * duration);
774
- }
775
786
  function keyframes({ keyframes: keyframeValues, ease = easeInOut, times, duration = 300, }) {
776
787
  keyframeValues = [...keyframeValues];
777
788
  /**
@@ -1956,7 +1967,7 @@
1956
1967
  * This will be replaced by the build step with the latest version number.
1957
1968
  * When MotionValues are provided to motion components, warn if versions are mixed.
1958
1969
  */
1959
- this.version = "9.1.0";
1970
+ this.version = "9.1.2";
1960
1971
  /**
1961
1972
  * Duration, in milliseconds, since last updating frame.
1962
1973
  *
@@ -4343,9 +4354,10 @@
4343
4354
  },
4344
4355
  };
4345
4356
 
4346
- function isCSSVariable$1(value) {
4347
- return typeof value === "string" && value.startsWith("var(--");
4348
- }
4357
+ const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token);
4358
+ const isCSSVariableName = checkStringStartsWith("--");
4359
+ const isCSSVariableToken = checkStringStartsWith("var(--");
4360
+
4349
4361
  /**
4350
4362
  * Parse Framer's special CSS variable format into a CSS token and a fallback.
4351
4363
  *
@@ -4375,7 +4387,7 @@
4375
4387
  if (resolved) {
4376
4388
  return resolved.trim();
4377
4389
  }
4378
- else if (isCSSVariable$1(fallback)) {
4390
+ else if (isCSSVariableToken(fallback)) {
4379
4391
  // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.
4380
4392
  return getVariableValue(fallback, element, depth + 1);
4381
4393
  }
@@ -4400,7 +4412,7 @@
4400
4412
  // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
4401
4413
  visualElement.values.forEach((value) => {
4402
4414
  const current = value.get();
4403
- if (!isCSSVariable$1(current))
4415
+ if (!isCSSVariableToken(current))
4404
4416
  return;
4405
4417
  const resolved = getVariableValue(current, element);
4406
4418
  if (resolved)
@@ -4410,7 +4422,7 @@
4410
4422
  // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`
4411
4423
  for (const key in target) {
4412
4424
  const current = target[key];
4413
- if (!isCSSVariable$1(current))
4425
+ if (!isCSSVariableToken(current))
4414
4426
  continue;
4415
4427
  const resolved = getVariableValue(current, element);
4416
4428
  if (!resolved)
@@ -4479,13 +4491,6 @@
4479
4491
  },
4480
4492
  };
4481
4493
 
4482
- /**
4483
- * Returns true if the provided key is a CSS variable
4484
- */
4485
- function isCSSVariable(key) {
4486
- return key.startsWith("--");
4487
- }
4488
-
4489
4494
  /**
4490
4495
  * Provided a value and a ValueType, returns the value as that value type.
4491
4496
  */
@@ -4513,7 +4518,7 @@
4513
4518
  /**
4514
4519
  * If this is a CSS variable we don't do any further processing.
4515
4520
  */
4516
- if (isCSSVariable(key)) {
4521
+ if (isCSSVariableName(key)) {
4517
4522
  vars[key] = value;
4518
4523
  continue;
4519
4524
  }
@@ -4776,15 +4781,6 @@
4776
4781
  return Object.keys(target).some(isPositionalKey);
4777
4782
  };
4778
4783
  const isNumOrPxType = (v) => v === number || v === px;
4779
- var BoundingBoxDimension;
4780
- (function (BoundingBoxDimension) {
4781
- BoundingBoxDimension["width"] = "width";
4782
- BoundingBoxDimension["height"] = "height";
4783
- BoundingBoxDimension["left"] = "left";
4784
- BoundingBoxDimension["right"] = "right";
4785
- BoundingBoxDimension["top"] = "top";
4786
- BoundingBoxDimension["bottom"] = "bottom";
4787
- })(BoundingBoxDimension || (BoundingBoxDimension = {}));
4788
4784
  const getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(", ")[pos]);
4789
4785
  const getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform }) => {
4790
4786
  if (transform === "none" || !transform)
@@ -5030,40 +5026,20 @@
5030
5026
  return typeof v === "string" || Array.isArray(v);
5031
5027
  }
5032
5028
 
5033
- var AnimationType;
5034
- (function (AnimationType) {
5035
- AnimationType["Animate"] = "animate";
5036
- AnimationType["Hover"] = "whileHover";
5037
- AnimationType["Tap"] = "whileTap";
5038
- AnimationType["Drag"] = "whileDrag";
5039
- AnimationType["Focus"] = "whileFocus";
5040
- AnimationType["InView"] = "whileInView";
5041
- AnimationType["Exit"] = "exit";
5042
- })(AnimationType || (AnimationType = {}));
5043
-
5044
5029
  const variantPriorityOrder = [
5045
- AnimationType.Animate,
5046
- AnimationType.InView,
5047
- AnimationType.Focus,
5048
- AnimationType.Hover,
5049
- AnimationType.Tap,
5050
- AnimationType.Drag,
5051
- AnimationType.Exit,
5030
+ "animate" /* AnimationType.Animate */,
5031
+ "whileInView" /* AnimationType.InView */,
5032
+ "whileFocus" /* AnimationType.Focus */,
5033
+ "whileHover" /* AnimationType.Hover */,
5034
+ "whileTap" /* AnimationType.Tap */,
5035
+ "whileDrag" /* AnimationType.Drag */,
5036
+ "exit" /* AnimationType.Exit */,
5052
5037
  ];
5038
+ const variantProps = ["initial", ...variantPriorityOrder];
5053
5039
 
5054
- const variantProps$1 = [
5055
- "initial",
5056
- "animate",
5057
- "exit",
5058
- "whileHover",
5059
- "whileDrag",
5060
- "whileTap",
5061
- "whileFocus",
5062
- "whileInView",
5063
- ];
5064
5040
  function isControllingVariants(props) {
5065
5041
  return (isAnimationControls(props.animate) ||
5066
- variantProps$1.some((name) => isVariantLabel(props[name])));
5042
+ variantProps.some((name) => isVariantLabel(props[name])));
5067
5043
  }
5068
5044
  function isVariantNode(props) {
5069
5045
  return Boolean(isControllingVariants(props) || props.variants);
@@ -5098,7 +5074,7 @@
5098
5074
  * and warn against mismatches.
5099
5075
  */
5100
5076
  {
5101
- warnOnce(nextValue.version === "9.1.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 9.1.0 may not work as expected.`);
5077
+ warnOnce(nextValue.version === "9.1.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 9.1.2 may not work as expected.`);
5102
5078
  }
5103
5079
  }
5104
5080
  else if (isMotionValue(prevValue)) {
@@ -5174,6 +5150,7 @@
5174
5150
  "LayoutAnimationStart",
5175
5151
  "LayoutAnimationComplete",
5176
5152
  ];
5153
+ const numVariantProps = variantProps.length;
5177
5154
  /**
5178
5155
  * A VisualElement is an imperative abstraction around UI elements such as
5179
5156
  * HTMLElement, SVGElement, Three.Object3D etc.
@@ -5643,8 +5620,6 @@
5643
5620
  }
5644
5621
  }
5645
5622
  }
5646
- const variantProps = ["initial", ...variantPriorityOrder];
5647
- const numVariantProps = variantProps.length;
5648
5623
 
5649
5624
  class DOMVisualElement extends VisualElement {
5650
5625
  sortInstanceNodePosition(a, b) {
@@ -5700,7 +5675,7 @@
5700
5675
  }
5701
5676
  else {
5702
5677
  const computedStyle = getComputedStyle$1(instance);
5703
- const value = (isCSSVariable(key)
5678
+ const value = (isCSSVariableName(key)
5704
5679
  ? computedStyle.getPropertyValue(key)
5705
5680
  : computedStyle[key]) || 0;
5706
5681
  return typeof value === "string" ? value.trim() : value;
@@ -1 +1 @@
1
- const t="undefined"!=typeof document;function e(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function a(t){return"string"==typeof t||Array.isArray(t)}function r(t){return"object"==typeof t&&"function"==typeof t.start}const n=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function s(t){return r(t.animate)||n.some(e=>a(t[e]))}function o(t){return Boolean(s(t)||t.variants)}const i={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},f={};for(const t in i)f[t]={isEnabled:e=>i[t].some(t=>!!e[t])};const c=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function l(t){return"string"==typeof t&&!t.includes("-")&&!!(c.indexOf(t)>-1||/[A-Z]/.test(t))}const d={},p=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],u=new Set(p);function g(t,{layout:e,layoutId:a}){return u.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!d[t]||"opacity"===t)}const h=t=>Boolean(t&&t.getVelocity),m={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y=p.length;function v(t){return t.startsWith("--")}const w=(t,e)=>e&&"number"==typeof t?e.transform(t):t,b=(t,e,a)=>Math.min(Math.max(a,t),e),x={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},k={...x,transform:t=>b(0,1,t)},L={...x,default:1},T=t=>Math.round(1e5*t)/1e5,X=/(-)?([\d]*\.?[\d])+/g,Y=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,$=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function B(t){return"string"==typeof t}const O=t=>({test:e=>B(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),A=O("deg"),S=O("%"),W=O("px"),Z=O("vh"),P=O("vw"),R={...S,parse:t=>S.parse(t)/100,transform:t=>S.transform(100*t)},C={...x,transform:Math.round},H={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,size:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,rotate:A,rotateX:A,rotateY:A,rotateZ:A,scale:L,scaleX:L,scaleY:L,scaleZ:L,skew:A,skewX:A,skewY:A,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:k,originX:R,originY:R,originZ:W,zIndex:C,fillOpacity:k,strokeOpacity:k,numOctaves:C};function V(t,e,a,r){const{style:n,vars:s,transform:o,transformOrigin:i}=t;let f=!1,c=!1,l=!0;for(const t in e){const a=e[t];if(v(t)){s[t]=a;continue}const r=H[t],d=w(a,r);if(u.has(t)){if(f=!0,o[t]=d,!l)continue;a!==(r.default||0)&&(l=!1)}else t.startsWith("origin")?(c=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<y;e++){const a=p[e];if(void 0!==t[a]){s+=`${m[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,l,r):n.transform&&(n.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;n.transformOrigin=`${t} ${e} ${a}`}}function j(t,e,a){return"string"==typeof t?t:W.transform(e+a*t)}const z={offset:"stroke-dashoffset",array:"stroke-dasharray"},F={offset:"strokeDashoffset",array:"strokeDasharray"};function I(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(V(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:u,dimensions:g}=t;p.transform&&(g&&(u.transform=p.transform),delete p.transform),g&&(void 0!==r||void 0!==n||u.transform)&&(u.transformOrigin=function(t,e,a){return`${j(e,t.x,t.width)} ${j(a,t.y,t.height)}`}(g,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(p.x=e),void 0!==a&&(p.y=a),void 0!==s&&function(t,e,a=1,r=0,n=!0){t.pathLength=1;const s=n?z:F;t[s.offset]=W.transform(-r);const o=W.transform(e),i=W.transform(a);t[s.array]=`${o} ${i}`}(p,s,o,i,!1)}const D=t=>"string"==typeof t&&"svg"===t.toLowerCase(),E=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function M(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 q=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 N(t,e,a,r){M(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(q.has(a)?a:E(a),e.attrs[a])}function U(t,e){const{style:a}=t,r={};for(const n in a)(h(a[n])||e.style&&h(e.style[n])||g(n,t))&&(r[n]=a[n]);return r}function G(t,e){const a=U(t,e);for(const r in t)if(h(t[r])||h(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}function J(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 K=t=>Array.isArray(t),Q=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),_=t=>K(t)?t[t.length-1]||0:t;export{Y as A,H as B,W as C,A as D,P as E,Z as F,_ as G,E as H,u as I,K as J,p as K,v as L,M,q as N,e as a,s as b,a as c,h as d,g as e,f,V as g,I as h,t as i,D as j,l as k,Q as l,o as m,r as n,N as o,U as p,B as q,J as r,G as s,$ as t,X as u,T as v,k as w,x,b as y,S as z};
1
+ const t="undefined"!=typeof document;function e(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function a(t){return"string"==typeof t||Array.isArray(t)}function r(t){return"object"==typeof t&&"function"==typeof t.start}const n=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function s(t){return r(t.animate)||n.some(e=>a(t[e]))}function o(t){return Boolean(s(t)||t.variants)}const i={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},f={};for(const t in i)f[t]={isEnabled:e=>i[t].some(t=>!!e[t])};const l=["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 c(t){return"string"==typeof t&&!t.includes("-")&&!!(l.indexOf(t)>-1||/[A-Z]/.test(t))}const d={},p=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],u=new Set(p);function g(t,{layout:e,layoutId:a}){return u.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!d[t]||"opacity"===t)}const h=t=>Boolean(t&&t.getVelocity),m={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y=p.length;const v=t=>e=>"string"==typeof e&&e.startsWith(t),w=v("--"),b=v("var(--"),x=(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]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,B=/^(#[0-9a-f]{3,8}|(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,transformOrigin:i}=t;let f=!1,l=!1,c=!0;for(const t in e){const a=e[t];if(w(t)){s[t]=a;continue}const r=j[t],d=x(a,r);if(u.has(t)){if(f=!0,o[t]=d,!c)continue;a!==(r.default||0)&&(c=!1)}else t.startsWith("origin")?(l=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<y;e++){const a=p[e];if(void 0!==t[a]){s+=`${m[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,c,r):n.transform&&(n.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;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},l,c,d){if(z(t,f,l,d),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:u,dimensions:g}=t;p.transform&&(g&&(u.transform=p.transform),delete p.transform),g&&(void 0!==r||void 0!==n||u.transform)&&(u.transformOrigin=function(t,e,a){return`${F(e,t.x,t.width)} ${F(a,t.y,t.height)}`}(g,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(p.x=e),void 0!==a&&(p.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}`}(p,s,o,i,!1)}const M=t=>"string"==typeof t&&"svg"===t.toLowerCase(),q=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function N(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 U=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 G(t,e,a,r){N(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(U.has(a)?a:q(a),e.attrs[a])}function J(t,e){const{style:a}=t,r={};for(const n in a)(h(a[n])||e.style&&h(e.style[n])||g(n,t))&&(r[n]=a[n]);return r}function K(t,e){const a=J(t,e);for(const r in t)if(h(t[r])||h(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}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,j as B,Z as C,S as D,C as E,R as F,et as G,q as H,u as I,_ as J,b as K,p as L,n as M,w as N,N as O,U as P,e as a,s as b,a as c,h as d,g as e,f,z as g,E as h,t as i,M as j,c as k,tt as l,o as m,r as n,G as o,J as p,A as q,Q as r,K 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{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as v,H as g,I as y,n as b,J as V,c as w,K as A,i as P,f as C,b as x,m as S,a as M,L as T,g as E,p as F,M as k,N as I,s as O,h as N,o as D,j as L,k as R}from"./size-rollup-dom-animation-assets.js";function j(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const B=t=>/^0[^.\s]+$/.test(t),U={delta:0,timestamp:0},z="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),H="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(z()),1/60*1e3);let q=!0,$=!1,W=!1;const K=["read","update","preRender","render","postRender"],G=K.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>$=!0),t),{}),J=K.reduce((t,e)=>{const n=G[e];return t[e]=(t,e=!1,s=!1)=>($||_(),n.schedule(t,e,s)),t},{}),Y=K.reduce((t,e)=>(t[e]=G[e].cancel,t),{});K.reduce((t,e)=>(t[e]=()=>G[e].process(U),t),{});const Z=t=>G[t].process(U),X=t=>{$=!1,U.delta=q?1/60*1e3:Math.max(Math.min(t-U.timestamp,40),1),U.timestamp=t,W=!0,K.forEach(Z),W=!1,$&&(q=!1,H(X))},_=()=>{$=!0,q=!0,W||H(X)};class Q{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 s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tt(t,e){return e?t*(1e3/e):0}class et{constructor(t,e={}){var n;this.version="9.1.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=U;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,J.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>J.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Q);const n=this.events[t].add(e);return"change"===t?()=>{n(),J.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(t,e){return new et(t,e)}const st=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),rt=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},it={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ot={test:st("rgb","red"),parse:rt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+it.transform(t)+", "+it.transform(e)+", "+it.transform(n)+", "+s(r.transform(i))+")"};const at={test:st("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ot.transform},ut={test:st("hsl","hue"),parse:rt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},ct={test:t=>ot.test(t)||at.test(t)||ut.test(t),parse:t=>ot.test(t)?ot.parse(t):ut.test(t)?ut.parse(t):at.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ot.transform(e):ut.transform(e)};function lt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(ct.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function ht(t){return lt(t).values}function pt(t){const{values:e,numColors:n,tokenised:r}=lt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?ct.transform(t[r]):s(t[r]));return e}}const dt=t=>"number"==typeof t?0:t;const ft={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:ht,createTransformer:pt,getAnimatableNone:function(t){const e=ht(t);return pt(t)(e.map(dt))}},mt=new Set(["brightness","contrast","saturate","opacity"]);function vt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=mt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const gt=/([a-z-]*)\(.*?\)/g,yt={...ft,getAnimatableNone:t=>{const e=t.match(gt);return e?e.map(vt).join(" "):t}},bt={...c,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:yt,WebkitFilter:yt},Vt=t=>bt[t];function wt(t,e){let n=Vt(t);return n!==yt&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const At=t=>e=>e.test(t),Pt=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],Ct=t=>Pt.find(At(t)),xt=[...Pt,ct,ft],St=t=>xt.find(At(t));function Mt(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Tt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,nt(n))}function Et(t,e){if(!e)return;return(e[t]||e.default||e).from}function Ft(t){return Boolean(v(t)&&t.add)}const kt="data-"+g("framerAppearId");const It=t=>1e3*t,Ot=!1,Nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dt=t=>e=>1-t(1-e),Lt=t=>t*t,Rt=Dt(Lt),jt=Nt(Lt),Bt=(t,e,n)=>-n*t+n*e+t;function Ut(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 zt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Ht=[at,ot,ut];function qt(t){const e=(n=t,Ht.find(t=>t.test(n)));var n;let s=e.parse(t);return e===ut&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Ut(a,s,t+1/3),i=Ut(a,s,t),o=Ut(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const $t=(t,e)=>{const n=qt(t),s=qt(e),r={...n};return t=>(r.red=zt(n.red,s.red,t),r.green=zt(n.green,s.green,t),r.blue=zt(n.blue,s.blue,t),r.alpha=Bt(n.alpha,s.alpha,t),ot.transform(r))},Wt=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Wt);function Gt(t,e){return"number"==typeof t?n=>Bt(t,e,n):ct.test(t)?$t(t,e):Zt(t,e)}const Jt=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>Gt(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},Yt=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Gt(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Zt=(t,e)=>{const n=ft.createTransformer(e),s=lt(t),r=lt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Kt(Jt(s.values,r.values),n):n=>""+(n>0?e:t)},Xt=(t,e)=>n=>Bt(t,e,n);function _t(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?Xt:"string"==typeof i?ct.test(i)?$t:Zt:Array.isArray(i)?Jt:"object"==typeof i?Yt:Xt);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Kt(t,i)}s.push(i)}return s}function Qt(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;e.length,!s||!Array.isArray(s)||s.length,t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=_t(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=((t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s})(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}const te=t=>t,ee=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ne(t,e,n,s){if(t===e&&n===s)return te;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ee(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ee(r(t),e,s)}const se=t=>1-Math.sin(Math.acos(t)),re=Dt(se),ie=Nt(re),oe=ne(.33,1.53,.69,.99),ae=Dt(oe),ue=Nt(ae),ce={linear:te,easeIn:Lt,easeInOut:jt,easeOut:Rt,circIn:se,circInOut:ie,circOut:re,backIn:ae,backInOut:ue,backOut:oe,anticipate:t=>(t*=2)<1?.5*ae(t):.5*(2-Math.pow(2,-10*(t-1)))},le=t=>{if(Array.isArray(t)){t.length;const[e,n,s,r]=t;return ne(e,n,s,r)}return"string"==typeof t?ce[t]:t};function he({keyframes:t,ease:e=jt,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(le):le(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(t),s);function a(){return Qt(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||jt).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function pe({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/de(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=de(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function de(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({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,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=pe(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=ye,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function v(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=de(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return v(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=tt(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],v()}}}ge.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const ye=t=>0;const be={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:he,tween:he,spring:ge};function Ve(t,e,n=0){return t-e-n}const we=t=>{const e=({delta:e})=>t(e);return{start:()=>J.update(e,!0),stop:()=>Y.update(e)}};function Ae({duration:t,driver:e=we,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let v,g,y=0,b=t,V=!1,w=!0;const A=be[o.length>2?"keyframes":d]||he,P=o[0],C=o[o.length-1];let x={done:!1,value:P};const{needsInterpolation:S}=A;S&&S(P,C)&&(g=Qt([0,100],[P,C],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(w=y%2==0,n=function(t,e=0,n=0,s=!0){return s?Ve(e+-t,e,n):e-(t-e)+n}(n,b,i,w)):(n=Ve(n,b,i),"mirror"===r&&M.flipTarget()),V=!1,h&&h()}function E(t){w||(t=-t),n+=t,V||(x=M.next(Math.max(0,n)),g&&(x.value=g(x.value)),V=w?x.done:n<=0),p&&p(x.value),V&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,w)&&T():(v&&v.stop(),l&&l()))}return a&&(u&&u(),v=e(E),v.start()),{stop:()=>{c&&c(),v&&v.stop()},set currentTime(t){n=m,E(t)},sample:e=>{n=m;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let r=0;for(E(0);r<=e;){const t=e-r;E(Math.min(t,s)),r+=s}return x}}}const Pe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ce={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pe([0,.65,.55,1]),circOut:Pe([.55,0,1,.45]),backIn:Pe([.31,.01,.66,-.59]),backOut:Pe([.33,1.53,.69,.99])};function xe(t){if(t)return Array.isArray(t)?Pe(t):Ce[t]}const Se={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Me={},Te={};for(const t in Se)Te[t]=()=>(void 0===Me[t]&&(Me[t]=Se[t]()),Me[t]);const Ee=new Set(["opacity","clipPath","filter","transform"]);function Fe(t,e,{onUpdate:n,onComplete:s,...r}){if(!(Te.waapi()&&Ee.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if("spring"===r.type||!(!(c=r.ease)||Array.isArray(c)||"string"==typeof c&&Ce[c])){if(r.repeat===1/0)return;const t=Ae({...r,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}var c;const l=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){return t.animate({[e]:n,offset:u},{delay:s,duration:r,easing:xe(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),J.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(t){l.currentTime=t},stop:()=>{const{currentTime:e}=l;if(e){const n=Ae({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}J.update(()=>l.cancel())}}}function ke(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(Y.read(s),t(i-e))};return J.read(s,!0),()=>Y.read(s)}function Ie({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:ke(r,-e)}:r()}const Oe={type:"spring",stiffness:500,damping:25,restSpeed:10},Ne={type:"keyframes",duration:.8},De={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Le=(t,{keyframes:e})=>e.length>2?Ne:y.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Oe:De,Re=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ft.test(e)||e.startsWith("url(")));function je(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Be(t){return"number"==typeof t?0:wt("",t)}const Ue=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=It(o);const u=function(t,e,n,s){const r=Re(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=wt(e,n):je(i)&&"string"==typeof n?i=Be(n):!Array.isArray(n)&&je(n)&&"string"==typeof i&&(n=Be(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=Re(t,c),p=Re(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||Ot||!1===i.type)return Ie(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function v(t){return void 0!==n&&t<n||void 0!==s&&t>s}function g(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Ae({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(v(f))b({velocity:e,keyframes:[f,g(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=g(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=tt(t-a,U.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:v(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...Le(t,d)}),d.duration&&(d.duration=It(d.duration)),d.repeatDelay&&(d.repeatDelay=It(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Fe(e,t,d);if(n)return n}return Ae(d)};function ze(t,e,n={}){const s=Mt(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>He(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(qe).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(ze(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function He(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&$e(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[kt];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,J))}let h=s.start(Ue(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));Ft(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=Mt(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Tt(t,e,m(i[e]))}}(t,o)})}function qe(t,e){return t.sortNodePosition(e)}function $e({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}var We;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(We||(We={}));const Ke=[We.Animate,We.InView,We.Focus,We.Hover,We.Tap,We.Drag,We.Exit],Ge=[...Ke].reverse(),Je=Ke.length;function Ye(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>ze(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=ze(t,e,n);else{const r="function"==typeof e?Mt(t,e,n.custom):e;s=He(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function Ze(t){let e=Ye(t);const n={[We.Animate]:_e(!0),[We.InView]:_e(),[We.Hover]:_e(),[We.Tap]:_e(),[We.Drag]:_e(),[We.Focus]:_e(),[We.Exit]:_e()};let s=!0;const r=(e,n)=>{const s=Mt(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<Je;e++){const d=Ge[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],v=w(m),g=d===o?f.isActive:null;!1===g&&(p=e);let y=m===u[d]&&m!==a[d]&&v;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===g||!m&&!f.prevProp||b(m)||"boolean"==typeof m)continue;const A=Xe(f.prevProp,m);let P=A||d===o&&f.isActive&&!y&&v||e>p&&v;const C=Array.isArray(m)?m:[m];let x=C.reduce(r,{});!1===g&&(x={});const{prevResolvedValues:S={}}=f,M={...S,...x},T=t=>{P=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=x[t],n=S[t];h.hasOwnProperty(t)||(e!==n?V(e)&&V(n)?!j(e,n)||A?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=x,f.isActive&&(h={...h,...x}),s&&t.blockInitialAnimation&&(P=!1),P&&!y&&c.push(...C.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){if(n[e].isActive===s)return Promise.resolve();t.variantChildren&&t.variantChildren.forEach(t=>{t.animationState&&t.animationState.setActive(e,s)}),n[e].isActive=s;const o=i(r,e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Xe(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!j(e,t)}function _e(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class Qe{constructor(t){this.isMounted=!1,this.node=t}update(){}}let tn=0;const en={animation:{Feature:class extends Qe{constructor(t){super(t),t.animationState||(t.animationState=Ze(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),b(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends Qe{constructor(){super(...arguments),this.id=tn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive(We.Exit,!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function nn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function sn(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function rn(t,e,n,s){return nn(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,sn(e)))(n),s)}function on(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const an=on("dragHorizontal"),un=on("dragVertical");function cn(){const t=function(t){let e=!1;if("y"===t)e=un();else if("x"===t)e=an();else{const t=an(),n=un();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function ln(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return rn(t.current,n,(n,r)=>{if("touch"===n.type||cn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive(We.Hover,e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const hn=(t,e)=>!!e&&(t===e||hn(t,e.parentElement));function pn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,sn(n))}const dn=new WeakMap,fn=new WeakMap,mn=t=>{const e=dn.get(t.target);e&&e(t)},vn=t=>{t.forEach(mn)};function gn(t,e,n){const s=function({root:t,...e}){const n=t||document;fn.has(n)||fn.set(n,{});const s=fn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(vn,{root:t,...e})),s[r]}(e);return dn.set(t,n),s.observe(t),()=>{dn.delete(t),s.unobserve(t)}}const yn={some:0,all:1};const bn={inView:{Feature:class extends Qe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive(We.InView,!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r,fallback:i=!0}=t;if("undefined"==typeof IntersectionObserver)return void(i&&this.viewportFallback());const o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:yn[s]};return gn(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(We.InView,e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Qe{constructor(){super(...arguments),this.removeStartListeners=te,this.removeEndListeners=te,this.removeAccessibleListeners=te,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=rn(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();hn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=rn(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Kt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=nn(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=nn(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&pn("up",this.node.getProps().onTap)}),pn("down",(t,e)=>{this.startPress(t,e)})}),e=nn(this.node.current,"blur",()=>{this.isPressing&&pn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Kt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive(We.Tap,!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(We.Tap,!1),!cn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=rn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=nn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Kt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Qe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive(We.Focus,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(We.Focus,!1),this.isActive=!1)}mount(){this.unmount=Kt(nn(this.node.current,"focus",()=>this.onFocus()),nn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Qe{mount(){this.unmount=Kt(ln(this.node,!0),ln(this.node,!1))}unmount(){}}}};function Vn(t){return"string"==typeof t&&t.startsWith("var(--")}const wn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function An(t,e,n=1){const[s,r]=function(t){const e=wn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():Vn(r)?An(r,e,n+1):r}const Pn=new Set(["width","height","top","left","right","bottom","x","y"]),Cn=t=>Pn.has(t),xn=t=>t===i||t===l;var Sn;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Sn||(Sn={}));const Mn=(t,e)=>parseFloat(t.split(", ")[e]),Tn=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return Mn(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?Mn(e[1],t):0}},En=new Set(["x","y","z"]),Fn=A.filter(t=>!En.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:Tn(4,13),y:Tn(5,14)},In=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(Cn);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=Ct(c);const p=e[r];let d;if(V(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=Ct(c);for(let n=e;n<t;n++)d?Ct(p[n]):d=Ct(p[n])}else d=Ct(p);if(h!==d)if(xn(h)&&xn(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return Fn.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=kn[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=kn[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),P&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function On(t,e,n,s){return(t=>Object.keys(t).some(Cn))(e)?In(t,e,n,s):{target:e,transitionEnd:s}}const Nn=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!Vn(e))return;const n=An(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!Vn(r))continue;const i=An(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return On(t,e=r.target,n,s=r.transitionEnd)},Dn={current:null},Ln={current:!1};const Rn=Object.keys(C),jn=Rn.length,Bn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const Un=["initial",...Ke],zn=Un.length;class Hn extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>J.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=x(e),this.isVariantNode=S(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&v(e)&&(e.set(o[t],!1),Ft(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Ln.current||function(){if(Ln.current=!0,P)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Dn.current=t.matches;t.addListener(e),e()}else Dn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Dn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Y.update(this.notifyUpdate),Y.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&J.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<jn;t++){const n=Rn[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=C[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&M(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Bn.length;e++){const n=Bn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(v(i))t.addValue(r,i),Ft(s)&&s.add(r);else if(v(o))t.addValue(r,nt(i,{owner:t})),Ft(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,nt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<zn;t++){const n=Un[t],s=this.props[n];(w(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=nt(e,{owner:this}),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,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||v(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new Q),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=Et(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||B(c))?c=parseFloat(c):!St(c)&&ft.test(u)&&(c=wt(o,u)),t.addValue(o,nt(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=Nn(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class qn extends Hn{readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(T(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){E(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return F(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;v(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){k(t,e,n,s)}}class $n extends Hn{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=Vt(e);return t&&t.default||0}return e=I.has(e)?e:g(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return O(t,e)}build(t,e,n,s){N(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){D(t,e,n,s)}mount(t){this.isSVGTag=L(t.tagName),super.mount(t)}}const Wn={renderer:(t,e)=>R(t)?new $n(e,{enableHardwareAcceleration:!1}):new qn(e,{enableHardwareAcceleration:!0}),...en,...bn};export{Wn as domAnimation};
1
+ import{q as t,t as e,u as n,v as s,w as r,x as i,y as o,z as a,A as u,B as c,C as l,D as h,E as p,F as d,r as f,G as m,d as v,H as g,I as y,n as b,J as w,c as V,K as A,L as P,i as C,f as S,M as x,b as M,m as T,a as E,N as F,g as k,p as I,O,P as N,s as D,h as L,o as R,j,k as B}from"./size-rollup-dom-animation-assets.js";function U(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const z=t=>/^0[^.\s]+$/.test(t),q={delta:0,timestamp:0},H="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),$="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(H()),1/60*1e3);let W=!0,K=!1,G=!1;const J=["read","update","preRender","render","postRender"],Y=J.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const u=a&&r,c=u?e:n;return i&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&r&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:u=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(u),o.has(s)&&(a.schedule(s),t())}r=!1,i&&(i=!1,a.process(u))}}};return a}(()=>K=!0),t),{}),Z=J.reduce((t,e)=>{const n=Y[e];return t[e]=(t,e=!1,s=!1)=>(K||tt(),n.schedule(t,e,s)),t},{}),X=J.reduce((t,e)=>(t[e]=Y[e].cancel,t),{});J.reduce((t,e)=>(t[e]=()=>Y[e].process(q),t),{});const _=t=>Y[t].process(q),Q=t=>{K=!1,q.delta=W?1/60*1e3:Math.max(Math.min(t-q.timestamp,40),1),q.timestamp=t,G=!0,J.forEach(_),G=!1,K&&(W=!1,$(Q))},tt=()=>{K=!0,W=!0,G||$(Q)};class et{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 s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function nt(t,e){return e?t*(1e3/e):0}class st{constructor(t,e={}){var n;this.version="9.1.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=q;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Z.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Z.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new et);const n=this.events[t].add(e);return"change"===t?()=>{n(),Z.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?nt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rt(t,e){return new st(t,e)}const it=(n,s)=>r=>Boolean(t(r)&&e.test(r)&&r.startsWith(n)||s&&Object.prototype.hasOwnProperty.call(r,s)),ot=(e,s,r)=>i=>{if(!t(i))return i;const[o,a,u,c]=i.match(n);return{[e]:parseFloat(o),[s]:parseFloat(a),[r]:parseFloat(u),alpha:void 0!==c?parseFloat(c):1}},at={...i,transform:t=>Math.round((t=>o(0,255,t))(t))},ut={test:it("rgb","red"),parse:ot("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+at.transform(t)+", "+at.transform(e)+", "+at.transform(n)+", "+s(r.transform(i))+")"};const ct={test:it("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:ut.transform},lt={test:it("hsl","hue"),parse:ot("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+a.transform(s(e))+", "+a.transform(s(n))+", "+s(r.transform(i))+")"},ht={test:t=>ut.test(t)||ct.test(t)||lt.test(t),parse:t=>ut.test(t)?ut.parse(t):lt.test(t)?lt.parse(t):ct.parse(t),transform:e=>t(e)?e:e.hasOwnProperty("red")?ut.transform(e):lt.transform(e)};function pt(t){"number"==typeof t&&(t=""+t);const e=[];let s=0,r=0;const o=t.match(u);o&&(s=o.length,t=t.replace(u,"${c}"),e.push(...o.map(ht.parse)));const a=t.match(n);return a&&(r=a.length,t=t.replace(n,"${n}"),e.push(...a.map(i.parse))),{values:e,numColors:s,numNumbers:r,tokenised:t}}function dt(t){return pt(t).values}function ft(t){const{values:e,numColors:n,tokenised:r}=pt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?ht.transform(t[r]):s(t[r]));return e}}const mt=t=>"number"==typeof t?0:t;const vt={test:function(e){var s,r;return isNaN(e)&&t(e)&&((null===(s=e.match(n))||void 0===s?void 0:s.length)||0)+((null===(r=e.match(u))||void 0===r?void 0:r.length)||0)>0},parse:dt,createTransformer:ft,getAnimatableNone:function(t){const e=dt(t);return ft(t)(e.map(mt))}},gt=new Set(["brightness","contrast","saturate","opacity"]);function yt(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=s.match(n)||[];if(!r)return t;const i=s.replace(r,"");let o=gt.has(e)?1:0;return r!==s&&(o*=100),e+"("+o+i+")"}const bt=/([a-z-]*)\(.*?\)/g,wt={...vt,getAnimatableNone:t=>{const e=t.match(bt);return e?e.map(yt).join(" "):t}},Vt={...c,color:ht,backgroundColor:ht,outlineColor:ht,fill:ht,stroke:ht,borderColor:ht,borderTopColor:ht,borderRightColor:ht,borderBottomColor:ht,borderLeftColor:ht,filter:wt,WebkitFilter:wt},At=t=>Vt[t];function Pt(t,e){let n=At(t);return n!==wt&&(n=vt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ct=t=>e=>e.test(t),St=[i,l,a,h,p,d,{test:t=>"auto"===t,parse:t=>t}],xt=t=>St.find(Ct(t)),Mt=[...St,ht,vt],Tt=t=>Mt.find(Ct(t));function Et(t,e,n){const s=t.getProps();return f(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function Ft(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,rt(n))}function kt(t,e){if(!e)return;return(e[t]||e.default||e).from}function It(t){return Boolean(v(t)&&t.add)}const Ot="data-"+g("framerAppearId"),Nt=t=>t;let Dt=Nt,Lt=Nt;const Rt=t=>1e3*t,jt=!1,Bt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ut=t=>e=>1-t(1-e),zt=t=>t*t,qt=Ut(zt),Ht=Bt(zt),$t=(t,e,n)=>-n*t+n*e+t;function Wt(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 Kt=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Gt=[ct,ut,lt];function Jt(t){const e=(n=t,Gt.find(t=>t.test(n)));var n;let s=e.parse(t);return e===lt&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Wt(a,s,t+1/3),i=Wt(a,s,t),o=Wt(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const Yt=(t,e)=>{const n=Jt(t),s=Jt(e),r={...n};return t=>(r.red=Kt(n.red,s.red,t),r.green=Kt(n.green,s.green,t),r.blue=Kt(n.blue,s.blue,t),r.alpha=$t(n.alpha,s.alpha,t),ut.transform(r))},Zt=(t,e)=>n=>e(t(n)),Xt=(...t)=>t.reduce(Zt);function _t(t,e){return"number"==typeof t?n=>$t(t,e,n):ht.test(t)?Yt(t,e):ee(t,e)}const Qt=(t,e)=>{const n=[...t],s=n.length,r=t.map((t,n)=>_t(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}},te=(t,e)=>{const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=_t(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}},ee=(t,e)=>{const n=vt.createTransformer(e),s=pt(t),r=pt(e);return s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?Xt(Qt(s.values,r.values),n):n=>""+(n>0?e:t)},ne=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},se=(t,e)=>n=>$t(t,e,n);function re(t,e,n){const s=[],r=n||("number"==typeof(i=t[0])?se:"string"==typeof i?ht.test(i)?Yt:ee:Array.isArray(i)?Qt:"object"==typeof i?te:se);var i;const o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Xt(t,i)}s.push(i)}return s}function ie(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;Lt(i===e.length),Lt(!s||!Array.isArray(s)||s.length===i-1),t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=re(e,s,r),u=a.length,c=e=>{let n=0;if(u>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=ne(t[n],t[n+1],e);return a[n](s)};return n?e=>c(o(t[0],t[i-1],e)):c}function oe(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=ne(0,e,s);t.push($t(n,1,r))}}(e,t.length-1),e}const ae=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ue(t,e,n,s){if(t===e&&n===s)return Nt;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ae(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ae(r(t),e,s)}const ce=t=>1-Math.sin(Math.acos(t)),le=Ut(ce),he=Bt(le),pe=ue(.33,1.53,.69,.99),de=Ut(pe),fe=Bt(de),me={linear:Nt,easeIn:zt,easeInOut:Ht,easeOut:qt,circIn:ce,circInOut:he,circOut:le,backIn:de,backInOut:fe,backOut:pe,anticipate:t=>(t*=2)<1?.5*de(t):.5*(2-Math.pow(2,-10*(t-1)))},ve=t=>{if(Array.isArray(t)){Lt(4===t.length);const[e,n,s,r]=t;return ue(e,n,s,r)}return"string"==typeof t?me[t]:t};function ge({keyframes:t,ease:e=Ht,times:n,duration:s=300}){t=[...t];const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(ve):ve(e),i={done:!1,value:t[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:oe(t),s);function a(){return ie(o,t,{ease:Array.isArray(r)?r:(e=t,n=r,e.map(()=>n||Ht).splice(0,e.length-1))});var e,n}let u=a();return{next:t=>(i.value=u(t),i.done=t>=s,i),flipTarget:()=>{t.reverse(),u=a()}}}function ye({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i;Dt(t<=1e4);let a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{const s=e*a,r=s*t;return.001-(s-n)/be(e,a)*Math.exp(-r)},i=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),c=be(Math.pow(e,2),a);return(.001-r(e)>0?-1:1)*((i-o)*u)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t*=1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}function be(t,e){return t*Math.sqrt(1-e*e)}const we=["duration","bounce"],Ve=["stiffness","damping","mass"];function Ae(t,e){return e.some(e=>void 0!==t[e])}function Pe({keyframes:t,restDelta:e,restSpeed:n,...s}){let r=t[0],i=t[t.length-1];const o={done:!1,value:r},{stiffness:a,damping:u,mass:c,velocity:l,duration:h,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Ae(t,Ve)&&Ae(t,we)){const n=ye(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let d=Ce,f=l?-l/1e3:0;const m=u/(2*Math.sqrt(a*c));function v(){const t=i-r,s=Math.sqrt(a/c)/1e3,o=Math.abs(t)<5;if(n||(n=o?.01:2),e||(e=o?.005:.5),m<1){const e=be(s,m);d=n=>{const r=Math.exp(-m*s*n);return i-r*((f+m*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===m)d=e=>i-Math.exp(-s*e)*(t+(f+s*t)*e);else{const e=s*Math.sqrt(m*m-1);d=n=>{const r=Math.exp(-m*s*n),o=Math.min(e*n,300);return i-r*((f+m*s*t)*Math.sinh(o)+e*t*Math.cosh(o))/e}}}return v(),{next:t=>{const s=d(t);if(p)o.done=t>=h;else{let r=f;if(0!==t)if(m<1){const e=Math.max(0,t-5);r=nt(s-d(e),t-e)}else r=0;const a=Math.abs(r)<=n,u=Math.abs(i-s)<=e;o.done=a&&u}return o.value=o.done?i:s,o},flipTarget:()=>{f=-f,[r,i]=[i,r],v()}}}Pe.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const Ce=t=>0;const Se={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:r=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let u=n*e;const c=o+u,l=void 0===i?c:i(c);return l!==c&&(u=l-o),{next:t=>{const e=-u*Math.exp(-t/s);return a.done=!(e>r||e<-r),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:ge,tween:ge,spring:Pe};function xe(t,e,n=0){return t-e-n}const Me=t=>{const e=({delta:e})=>t(e);return{start:()=>Z.update(e,!0),stop:()=>X.update(e)}};function Te({duration:t,driver:e=Me,elapsed:n=0,repeat:s=0,repeatType:r="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:u,onStop:c,onComplete:l,onRepeat:h,onUpdate:p,type:d="keyframes",...f}){const m=n;let v,g,y=0,b=t,w=!1,V=!0;const A=Se[o.length>2?"keyframes":d]||ge,P=o[0],C=o[o.length-1];let S={done:!1,value:P};const{needsInterpolation:x}=A;x&&x(P,C)&&(g=ie([0,100],[P,C],{clamp:!1}),o=[0,100]);const M=A({...f,duration:t,keyframes:o});function T(){y++,"reverse"===r?(V=y%2==0,n=function(t,e=0,n=0,s=!0){return s?xe(e+-t,e,n):e-(t-e)+n}(n,b,i,V)):(n=xe(n,b,i),"mirror"===r&&M.flipTarget()),w=!1,h&&h()}function E(t){V||(t=-t),n+=t,w||(S=M.next(Math.max(0,n)),g&&(S.value=g(S.value)),w=V?S.done:n<=0),p&&p(S.value),w&&(0===y&&(b=void 0!==b?b:n),y<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,b,i,V)&&T():(v&&v.stop(),l&&l()))}return a&&(u&&u(),v=e(E),v.start()),{stop:()=>{c&&c(),v&&v.stop()},set currentTime(t){n=m,E(t)},sample:e=>{n=m;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let r=0;for(E(0);r<=e;){const t=e-r;E(Math.min(t,s)),r+=s}return S}}}const Ee=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Fe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ee([0,.65,.55,1]),circOut:Ee([.55,0,1,.45]),backIn:Ee([.31,.01,.66,-.59]),backOut:Ee([.33,1.53,.69,.99])};function ke(t){if(t)return Array.isArray(t)?Ee(t):Fe[t]}const Ie={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Oe={},Ne={};for(const t in Ie)Ne[t]=()=>(void 0===Oe[t]&&(Oe[t]=Ie[t]()),Oe[t]);const De=new Set(["opacity","clipPath","filter","transform"]);function Le(t,e,{onUpdate:n,onComplete:s,...r}){if(!(Ne.waapi()&&De.has(e)&&!r.repeatDelay&&"mirror"!==r.repeatType&&0!==r.damping))return!1;let{keyframes:i,duration:o=300,elapsed:a=0,ease:u}=r;if("spring"===r.type||!(!(c=r.ease)||Array.isArray(c)||"string"==typeof c&&Fe[c])){if(r.repeat===1/0)return;const t=Te({...r,elapsed:0});let e={done:!1,value:i[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;i=n,o=s-10,u="linear"}var c;const l=function(t,e,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:u}={}){return t.animate({[e]:n,offset:u},{delay:s,duration:r,easing:ke(a),fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,i,{...r,delay:-a,duration:o,ease:u});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(i,r)),Z.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(t){l.currentTime=t},stop:()=>{const{currentTime:e}=l;if(e){const n=Te({...r,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Z.update(()=>l.cancel())}}}function Re(t,e){const n=performance.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(X.read(s),t(i-e))};return Z.read(s,!0),()=>X.read(s)}function je({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const r=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:Re(r,-e)}:r()}const Be={type:"spring",stiffness:500,damping:25,restSpeed:10},Ue={type:"keyframes",duration:.8},ze={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qe=(t,{keyframes:e})=>e.length>2?Ue:y.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Be:ze,He=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!vt.test(e)||e.startsWith("url(")));function $e(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function We(t){return"number"==typeof t?0:Pt("",t)}const Ke=(t,e,n,s={})=>r=>{const i=function(t,e){return t[e]||t.default||t}(s,t)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a-=Rt(o);const u=function(t,e,n,s){const r=He(e,n);let i=void 0!==s.from?s.from:t.get();return"none"===i&&r&&"string"==typeof n?i=Pt(e,n):$e(i)&&"string"==typeof n?i=We(n):!Array.isArray(n)&&$e(n)&&"string"==typeof i&&(n=We(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(e,t,n,i),c=u[0],l=u[u.length-1],h=He(t,c),p=He(t,l);let d={keyframes:u,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:t=>{e.set(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(!h||!p||jt||!1===i.type)return je(d);if("inertia"===i.type)return function({keyframes:t,velocity:e=0,min:n,max:s,power:r=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:h,onComplete:p,onStop:d}){const f=t[0];let m;function v(t){return void 0!==n&&t<n||void 0!==s&&t>s}function g(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function y(t){m&&m.stop(),m=Te({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:p,onStop:d})}function b(t){y({type:"spring",stiffness:o,damping:a,restDelta:u,...t})}if(v(f))b({velocity:e,keyframes:[f,g(f)]});else{let t=r*e+f;void 0!==c&&(t=c(t));const s=g(t),o=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=nt(t-a,q.delta),(1===o&&t>s||-1===o&&t<s)&&b({keyframes:[t,s],velocity:e})};y({type:"decay",keyframes:[f,0],velocity:e,timeConstant:i,power:r,restDelta:u,modifyTarget:c,onUpdate:v(t)?h:void 0})}return{stop:()=>m&&m.stop()}}(d);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:c,...l}){return!!Object.keys(l).length}(i)||(d={...d,...qe(t,d)}),d.duration&&(d.duration=Rt(d.duration)),d.repeatDelay&&(d.repeatDelay=Rt(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=Le(e,t,d);if(n)return n}return Te(d)};function Ge(t,e,n={}){const s=Et(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>Je(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,r=1,i){const o=[],a=(t.variantChildren.size-1)*s,u=1===r?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Ye).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(Ge(t,e,{...i,delay:n+u(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[i,o]:[o,i];return t().then(e)}return Promise.all([i(),o(n.delay)])}function Je(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(i=s);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e),r=a[e];if(!s||void 0===r||l&&Ze(l,e))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[Ot];n&&(o.elapsed=window.HandoffAppearAnimations(n,e,s,Z))}let h=s.start(Ke(e,s,r,t.shouldReduceMotion&&y.has(e)?{type:!1}:o));It(u)&&(u.add(e),h=h.then(()=>u.remove(e))),c.push(h)}return Promise.all(c).then(()=>{o&&function(t,e){const n=Et(t,e);let{transitionEnd:s={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const e in i){Ft(t,e,m(i[e]))}}(t,o)})}function Ye(t,e){return t.sortNodePosition(e)}function Ze({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const Xe=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_e=[...Xe].reverse(),Qe=Xe.length;function tn(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>Ge(t,e,n));s=Promise.all(r)}else if("string"==typeof e)s=Ge(t,e,n);else{const r="function"==typeof e?Et(t,e,n.custom):e;s=Je(t,r,n)}return s.then(()=>t.notify("AnimationComplete",e))}(t,e,n)))}function en(t){let e=tn(t);const n={animate:sn(!0),whileInView:sn(),whileHover:sn(),whileTap:sn(),whileDrag:sn(),whileFocus:sn(),exit:sn()};let s=!0;const r=(e,n)=>{const s=Et(t,n);if(s){const{transition:t,transitionEnd:n,...r}=s;e={...e,...r,...n}}return e};function i(i,o){const a=t.getProps(),u=t.getVariantContext(!0)||{},c=[],l=new Set;let h={},p=1/0;for(let e=0;e<Qe;e++){const d=_e[e],f=n[d],m=void 0!==a[d]?a[d]:u[d],v=V(m),g=d===o?f.isActive:null;!1===g&&(p=e);let y=m===u[d]&&m!==a[d]&&v;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...h},!f.isActive&&null===g||!m&&!f.prevProp||b(m)||"boolean"==typeof m)continue;const A=nn(f.prevProp,m);let P=A||d===o&&f.isActive&&!y&&v||e>p&&v;const C=Array.isArray(m)?m:[m];let S=C.reduce(r,{});!1===g&&(S={});const{prevResolvedValues:x={}}=f,M={...x,...S},T=t=>{P=!0,l.delete(t),f.needsAnimating[t]=!0};for(const t in M){const e=S[t],n=x[t];h.hasOwnProperty(t)||(e!==n?w(e)&&w(n)?!U(e,n)||A?T(t):f.protectedKeys[t]=!0:void 0!==e?T(t):l.add(t):void 0!==e&&l.has(t)?T(t):f.protectedKeys[t]=!0)}f.prevProp=m,f.prevResolvedValues=S,f.isActive&&(h={...h,...S}),s&&t.blockInitialAnimation&&(P=!1),P&&!y&&c.push(...C.map(t=>({animation:t,options:{type:d,...i}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),c.push({animation:e})}let d=Boolean(c.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(d=!1),s=!1,d?e(c):Promise.resolve()}return{animateChanges:i,setActive:function(e,s,r){var o;if(n[e].isActive===s)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const a=i(r,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function nn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!U(e,t)}function sn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class rn{constructor(t){this.isMounted=!1,this.node=t}update(){}}let on=0;const an={animation:{Feature:class extends rn{constructor(t){super(t),t.animationState||(t.animationState=en(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),b(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends rn{constructor(){super(...arguments),this.id=on++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&r.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function un(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function cn(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}function ln(t,e,n,s){return un(t,e,(t=>e=>(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(e)&&t(e,cn(e)))(n),s)}function hn(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const pn=hn("dragHorizontal"),dn=hn("dragVertical");function fn(){const t=function(t){let e=!1;if("y"===t)e=dn();else if("x"===t)e=pn();else{const t=pn(),n=dn();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}(!0);return!t||(t(),!1)}function mn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return ln(t.current,n,(n,r)=>{if("touch"===n.type||fn())return;const i=t.getProps();t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",e),i[s]&&i[s](n,r)},{passive:!t.getProps()[s]})}const vn=(t,e)=>!!e&&(t===e||vn(t,e.parentElement));function gn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,cn(n))}const yn=new WeakMap,bn=new WeakMap,wn=t=>{const e=yn.get(t.target);e&&e(t)},Vn=t=>{t.forEach(wn)};function An(t,e,n){const s=function({root:t,...e}){const n=t||document;bn.has(n)||bn.set(n,{});const s=bn.get(n),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(Vn,{root:t,...e})),s[r]}(e);return yn.set(t,n),s.observe(t),()=>{yn.delete(t),s.unobserve(t)}}const Pn={some:0,all:1};const Cn={inView:{Feature:class extends rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:r,fallback:i=!0}=t;if("undefined"==typeof IntersectionObserver)return void(i&&this.viewportFallback());const o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Pn[s]};return An(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),i=e?n:s;i&&i(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends rn{constructor(){super(...arguments),this.removeStartListeners=Nt,this.removeEndListeners=Nt,this.removeAccessibleListeners=Nt,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=ln(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();vn(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),r=ln(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Xt(s,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=un(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=un(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&gn("up",this.node.getProps().onTap)}),gn("down",(t,e)=>{this.startPress(t,e)})}),e=un(this.node.current,"blur",()=>{this.isPressing&&gn("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Xt(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!fn()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=ln(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=un(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Xt(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xt(un(this.node.current,"focus",()=>this.onFocus()),un(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends rn{mount(){this.unmount=Xt(mn(this.node,!0),mn(this.node,!1))}unmount(){}}}};const Sn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function xn(t,e,n=1){Lt(n<=4);const[s,r]=function(t){const e=Sn.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);return i?i.trim():A(r)?xn(r,e,n+1):r}const Mn=new Set(["width","height","top","left","right","bottom","x","y"]),Tn=t=>Mn.has(t),En=t=>t===i||t===l,Fn=(t,e)=>parseFloat(t.split(", ")[e]),kn=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return Fn(r[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?Fn(e[1],t):0}},In=new Set(["x","y","z"]),On=P.filter(t=>!In.has(t));const Nn={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)},Dn=(t,e,n={},s={})=>{e={...e},s={...s};const r=Object.keys(e).filter(Tn);let i=[],o=!1;const a=[];if(r.forEach(r=>{const u=t.getValue(r);if(!t.hasValue(r))return;let c=n[r],h=xt(c);const p=e[r];let d;if(w(p)){const t=p.length,e=null===p[0]?1:0;c=p[e],h=xt(c);for(let n=e;n<t;n++)d?Lt(xt(p[n])===d):(d=xt(p[n]),Lt(d===h||En(h)&&En(d)))}else d=xt(p);if(h!==d)if(En(h)&&En(d)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof p?e[r]=parseFloat(p):Array.isArray(p)&&d===l&&(e[r]=p.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==d?void 0:d.transform)&&(0===c||0===p)?0===c?u.set(d.transform(c)):e[r]=h.transform(p):(o||(i=function(t){const e=[];return On.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(r),s[r]=void 0!==s[r]?s[r]:e[r],u.jump(p))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const s=e.measureViewportBox(),r=e.current,i=getComputedStyle(r),{display:o}=i,a={};"none"===o&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Nn[t](s,i)}),e.render();const u=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=Nn[n](u,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),C&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:s}}return{target:e,transitionEnd:s}};function Ln(t,e,n,s){return(t=>Object.keys(t).some(Tn))(e)?Dn(t,e,n,s):{target:e,transitionEnd:s}}const Rn=(t,e,n,s)=>{const r=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!A(e))return;const n=xn(e,s);n&&t.set(n)});for(const t in e){const r=e[t];if(!A(r))continue;const i=xn(r,s);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,s);return Ln(t,e=r.target,n,s=r.transitionEnd)},jn={current:null},Bn={current:!1};const Un=Object.keys(S),zn=Un.length,qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Hn=x.length;class $n extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Z.render(this.render,!1,!0);const{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.isControllingVariants=M(e),this.isVariantNode=T(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==o[t]&&v(e)&&(e.set(o[t],!1),It(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Bn.current||function(){if(Bn.current=!0,C)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>jn.current=t.matches;t.addListener(e),e()}else jn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||jn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),X.update(this.notifyUpdate),X.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=y.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Z.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r,i){let o,a;for(let t=0;t<zn;t++){const n=Un[t],{isEnabled:s,Feature:r,ProjectionNode:i,MeasureLayout:u}=S[n];i&&(o=i),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),u&&(a=u))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&E(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:u,layoutRoot:c})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<qn.length;e++){const n=qn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(v(i))t.addValue(r,i),It(s)&&s.add(r);else if(v(o))t.addValue(r,rt(i,{owner:t})),It(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,rt(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Hn;t++){const n=x[t],s=this.props[n];(V(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=rt(e,{owner:this}),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,s="string"==typeof n||"object"==typeof n?null===(e=f(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||v(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new et),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},r){let i=function(t,e,n){const s={};for(const r in t){const t=kt(r,e);if(void 0!==t)s[r]=t;else{const t=n.getValue(r);t&&(s[r]=t.get())}}return s}(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),i&&(i=s(i))),r){!function(t,e,n){var s,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),o=i.length;if(o)for(let a=0;a<o;a++){const o=i[a],u=e[o];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(r=null!==(s=n[o])&&void 0!==s?s:t.readValue(o))&&void 0!==r?r:e[o]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||z(c))?c=parseFloat(c):!Tt(c)&&vt.test(u)&&(c=Pt(o,u)),t.addValue(o,rt(c,{owner:t})),void 0===n[o]&&(n[o]=c),null!==c&&t.setBaseTarget(o,c))}}(this,n,i);const t=Rn(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Wn extends $n{readValueFromInstance(t,e){if(y.has(e)){const t=At(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(F(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n,s){k(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return I(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;v(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){O(t,e,n,s)}}class Kn extends $n{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(y.has(e)){const t=At(e);return t&&t.default||0}return e=N.has(e)?e:g(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return D(t,e)}build(t,e,n,s){L(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){R(t,e,n,s)}mount(t){this.isSVGTag=j(t.tagName),super.mount(t)}}const Gn={renderer:(t,e)=>B(t)?new Kn(e,{enableHardwareAcceleration:!1}):new Wn(e,{enableHardwareAcceleration:!0}),...an,...Cn};export{Gn as domAnimation};
@@ -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={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},l={};for(const t in c)l[t]={isEnabled:e=>c[t].some(t=>!!e[t])};const d={hasAnimatedSinceResize:!0,hasEverUpdated:!1},u=t({}),p=t({}),g=["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 m(t){return"string"==typeof t&&!t.includes("-")&&!!(g.indexOf(t)>-1||/[A-Z]/.test(t))}const h={};function y(t){Object.assign(h,t)}const v=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],w=new Set(v);function b(t,{layout:e,layoutId:a}){return w.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!h[t]||"opacity"===t)}const x=t=>Boolean(t&&t.getVelocity),k={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},O=v.length;function T(t){return t.startsWith("--")}const L=(t,e)=>e&&"number"==typeof t?e.transform(t):t,X=(t,e,a)=>Math.min(Math.max(a,t),e),Y={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},$={...Y,transform:t=>X(0,1,t)},B={...Y,default:1},S=t=>Math.round(1e5*t)/1e5,A=/(-)?([\d]*\.?[\d])+/g,R=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,P=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function W(t){return"string"==typeof t}const Z=t=>({test:e=>W(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),V=Z("deg"),j=Z("%"),z=Z("px"),C=Z("vh"),H=Z("vw"),E={...j,parse:t=>j.parse(t)/100,transform:t=>j.transform(100*t)},F={...Y,transform:Math.round},I={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:V,rotateX:V,rotateY:V,rotateZ:V,scale:B,scaleX:B,scaleY:B,scaleZ:B,skew:V,skewX:V,skewY:V,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z:z,perspective:z,transformPerspective:z,opacity:$,originX:E,originY:E,originZ:z,zIndex:F,fillOpacity:$,strokeOpacity:$,numOctaves:F};function D(t,e,a,r){const{style:n,vars:s,transform:o,transformOrigin:i}=t;let f=!1,c=!1,l=!0;for(const t in e){const a=e[t];if(T(t)){s[t]=a;continue}const r=I[t],d=L(a,r);if(w.has(t)){if(f=!0,o[t]=d,!l)continue;a!==(r.default||0)&&(l=!1)}else t.startsWith("origin")?(c=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<O;e++){const a=v[e];if(void 0!==t[a]){s+=`${k[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,l,r):n.transform&&(n.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;n.transformOrigin=`${t} ${e} ${a}`}}function M(t,e,a){return"string"==typeof t?t:z.transform(e+a*t)}const U={offset:"stroke-dashoffset",array:"stroke-dasharray"},q={offset:"strokeDashoffset",array:"strokeDasharray"};function N(t,{attrX:e,attrY:a,originX:r,originY:n,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...f},c,l,d){if(D(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:g}=t;u.transform&&(g&&(p.transform=u.transform),delete u.transform),g&&(void 0!==r||void 0!==n||p.transform)&&(p.transformOrigin=function(t,e,a){return`${M(e,t.x,t.width)} ${M(a,t.y,t.height)}`}(g,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?U:q;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 G=t=>"string"==typeof t&&"svg"===t.toLowerCase(),J=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function K(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 Q=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 _(t,e,a,r){K(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(Q.has(a)?a:J(a),e.attrs[a])}function tt(t,e){const{style:a}=t,r={};for(const n in a)(x(a[n])||e.style&&x(e.style[n])||b(n,t))&&(r[n]=a[n]);return r}function et(t,e){const a=tt(t,e);for(const r in t)if(x(t[r])||x(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}function at(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 rt=t=>Array.isArray(t),nt=t=>rt(t)?t[t.length-1]||0:t;function st(t){const e=x(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{j as A,R as B,w as C,I as D,z as E,h as F,V as G,H,C as I,nt as J,v as K,u as L,rt as M,J as N,T as O,e as P,K as Q,y as R,p as S,Q as T,r as a,i as b,n as c,x as d,b as e,l as f,d as g,D as h,a as i,N as j,G as k,m as l,f as m,s as n,at as o,_ as p,tt as q,st as r,et as s,X as t,W as u,P as v,A as w,S as x,$ as y,Y as z};
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","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function i(t){return s(t.animate)||o.some(e=>n(t[e]))}function f(t){return Boolean(i(t)||t.variants)}const c={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},l={};for(const t in c)l[t]={isEnabled:e=>c[t].some(t=>!!e[t])};const d={hasAnimatedSinceResize:!0,hasEverUpdated:!1},p=t({}),u=t({}),g=["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 m(t){return"string"==typeof t&&!t.includes("-")&&!!(g.indexOf(t)>-1||/[A-Z]/.test(t))}const h={};function y(t){Object.assign(h,t)}const v=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],w=new Set(v);function b(t,{layout:e,layoutId:a}){return w.has(t)||t.startsWith("origin")||(e||void 0!==a)&&(!!h[t]||"opacity"===t)}const x=t=>Boolean(t&&t.getVelocity),k={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},O=v.length;const T=t=>e=>"string"==typeof e&&e.startsWith(t),L=T("--"),X=T("var(--"),Y=(t,e)=>e&&"number"==typeof t?e.transform(t):t,$=(t,e,a)=>Math.min(Math.max(a,t),e),B={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},S={...B,transform:t=>$(0,1,t)},A={...B,default:1},R=t=>Math.round(1e5*t)/1e5,P=/(-)?([\d]*\.?[\d])+/g,V=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,W=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Z(t){return"string"==typeof t}const j=t=>({test:e=>Z(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),z=j("deg"),C=j("%"),H=j("px"),E=j("vh"),F=j("vw"),I={...C,parse:t=>C.parse(t)/100,transform:t=>C.transform(100*t)},D={...B,transform:Math.round},M={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,size:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:A,scaleX:A,scaleY:A,scaleZ:A,skew:z,skewX:z,skewY:z,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:S,originX:I,originY:I,originZ:H,zIndex:D,fillOpacity:S,strokeOpacity:S,numOctaves:D};function U(t,e,a,r){const{style:n,vars:s,transform:o,transformOrigin:i}=t;let f=!1,c=!1,l=!0;for(const t in e){const a=e[t];if(L(t)){s[t]=a;continue}const r=M[t],d=Y(a,r);if(w.has(t)){if(f=!0,o[t]=d,!l)continue;a!==(r.default||0)&&(l=!1)}else t.startsWith("origin")?(c=!0,i[t]=d):n[t]=d}if(e.transform||(f||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:a=!0},r,n){let s="";for(let e=0;e<O;e++){const a=v[e];if(void 0!==t[a]){s+=`${k[a]||a}(${t[a]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):a&&r&&(s="none"),s}(t.transform,a,l,r):n.transform&&(n.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:a=0}=i;n.transformOrigin=`${t} ${e} ${a}`}}function q(t,e,a){return"string"==typeof t?t:H.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(U(t,f,c,d),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:u,dimensions:g}=t;p.transform&&(g&&(u.transform=p.transform),delete p.transform),g&&(void 0!==r||void 0!==n||u.transform)&&(u.transformOrigin=function(t,e,a){return`${q(e,t.x,t.width)} ${q(a,t.y,t.height)}`}(g,void 0!==r?r:.5,void 0!==n?n:.5)),void 0!==e&&(p.x=e),void 0!==a&&(p.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]=H.transform(-r);const o=H.transform(e),i=H.transform(a);t[s.array]=`${o} ${i}`}(p,s,o,i,!1)}const K=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Q=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function _(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 tt=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 et(t,e,a,r){_(t,e,void 0,r);for(const a in e.attrs)t.setAttribute(tt.has(a)?a:Q(a),e.attrs[a])}function at(t,e){const{style:a}=t,r={};for(const n in a)(x(a[n])||e.style&&x(e.style[n])||b(n,t))&&(r[n]=a[n]);return r}function rt(t,e){const a=at(t,e);for(const r in t)if(x(t[r])||x(e[r])){a["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return a}function nt(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 st=t=>Array.isArray(t),ot=t=>st(t)?t[t.length-1]||0:t;function it(t){const e=x(t)?t.get():t;return a=e,Boolean(a&&"object"==typeof a&&a.mix&&a.toValue)?e.toValue():e;var a}export{C as A,V as B,w as C,M as D,H as E,h as F,X as G,z as H,F as I,E as J,ot as K,p as L,v as M,st as N,o as O,e as P,L as Q,_ as R,u as S,y as T,Q as U,tt as V,r as a,i as b,n as c,x as d,b as e,l as f,d as g,U as h,a as i,J as j,K as k,m as l,f as m,s as n,nt as o,et as p,at as q,it as r,rt as s,$ as t,Z as u,W as v,P as w,R as x,S as y,B as z};