react-ui-animate 4.2.0 → 4.3.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.releaserc.json +33 -0
  2. package/README.md +129 -144
  3. package/package.json +14 -3
  4. package/dist/animation/controllers/index.d.ts +0 -8
  5. package/dist/animation/controllers/withDecay.d.ts +0 -11
  6. package/dist/animation/controllers/withDelay.d.ts +0 -4
  7. package/dist/animation/controllers/withEase.d.ts +0 -8
  8. package/dist/animation/controllers/withLoop.d.ts +0 -8
  9. package/dist/animation/controllers/withNative.d.ts +0 -5
  10. package/dist/animation/controllers/withSequence.d.ts +0 -8
  11. package/dist/animation/controllers/withSpring.d.ts +0 -12
  12. package/dist/animation/controllers/withTiming.d.ts +0 -11
  13. package/dist/animation/helpers/animationType.d.ts +0 -63
  14. package/dist/animation/helpers/getToValue.d.ts +0 -2
  15. package/dist/animation/helpers/index.d.ts +0 -2
  16. package/dist/animation/hooks/index.d.ts +0 -3
  17. package/dist/animation/hooks/useMount.d.ts +0 -10
  18. package/dist/animation/hooks/useValue.d.ts +0 -7
  19. package/dist/animation/hooks/useValues.d.ts +0 -7
  20. package/dist/animation/index.d.ts +0 -5
  21. package/dist/animation/interpolation/colors.d.ts +0 -25
  22. package/dist/animation/interpolation/index.d.ts +0 -1
  23. package/dist/animation/interpolation/interpolate.d.ts +0 -11
  24. package/dist/animation/interpolation/interpolateNumbers.d.ts +0 -8
  25. package/dist/animation/modules/MountedBlock.d.ts +0 -11
  26. package/dist/animation/modules/ScrollableBlock.d.ts +0 -11
  27. package/dist/animation/modules/index.d.ts +0 -2
  28. package/dist/animation/types.d.ts +0 -16
  29. package/dist/gestures/controllers/DragGesture.d.ts +0 -17
  30. package/dist/gestures/controllers/Gesture.d.ts +0 -20
  31. package/dist/gestures/controllers/MouseMoveGesture.d.ts +0 -13
  32. package/dist/gestures/controllers/ScrollGesture.d.ts +0 -14
  33. package/dist/gestures/controllers/WheelGesture.d.ts +0 -15
  34. package/dist/gestures/controllers/index.d.ts +0 -4
  35. package/dist/gestures/helpers/eventAttacher.d.ts +0 -11
  36. package/dist/gestures/helpers/index.d.ts +0 -1
  37. package/dist/gestures/helpers/math.d.ts +0 -34
  38. package/dist/gestures/helpers/withDefault.d.ts +0 -4
  39. package/dist/gestures/hooks/index.d.ts +0 -5
  40. package/dist/gestures/hooks/useDrag.d.ts +0 -4
  41. package/dist/gestures/hooks/useGesture.d.ts +0 -9
  42. package/dist/gestures/hooks/useMouseMove.d.ts +0 -4
  43. package/dist/gestures/hooks/useRecognizer.d.ts +0 -10
  44. package/dist/gestures/hooks/useScroll.d.ts +0 -4
  45. package/dist/gestures/hooks/useWheel.d.ts +0 -4
  46. package/dist/gestures/types/index.d.ts +0 -51
  47. package/dist/hooks/index.d.ts +0 -3
  48. package/dist/hooks/useMeasure.d.ts +0 -14
  49. package/dist/hooks/useOutsideClick.d.ts +0 -2
  50. package/dist/hooks/useWindowDimension.d.ts +0 -9
  51. package/dist/index.d.ts +0 -9
  52. package/dist/index.js +0 -2
  53. package/dist/index.js.map +0 -1
@@ -1,11 +0,0 @@
1
- import { FluidValue } from '@raidipesh78/re-motion';
2
- type ExtrapolateType = 'identity' | 'extend' | 'clamp';
3
- type ExtrapolateConfig = {
4
- extrapolate?: ExtrapolateType;
5
- extrapolateLeft?: ExtrapolateType;
6
- extrapolateRight?: ExtrapolateType;
7
- };
8
- type InterpolateReturnType<T> = T extends number ? number : ReturnType<FluidValue['interpolate']>;
9
- export declare const interpolate: <T extends number | FluidValue>(value: T, inputRange: number[], outputRange: number[] | string[], extrapolateConfig?: ExtrapolateConfig) => InterpolateReturnType<T>;
10
- export declare const bInterpolate: <T extends number | FluidValue>(value: T, minOutput: number | string, maxOutput: number | string, extrapolateConfig?: ExtrapolateConfig) => InterpolateReturnType<T>;
11
- export {};
@@ -1,8 +0,0 @@
1
- type ExtrapolateType = 'identity' | 'extend' | 'clamp';
2
- type ExtrapolateConfig = {
3
- extrapolate?: ExtrapolateType;
4
- extrapolateLeft?: ExtrapolateType;
5
- extrapolateRight?: ExtrapolateType;
6
- };
7
- export declare function interpolateNumbers(value: number, inputRange: Array<number>, outputRange: Array<number | string>, extrapolateConfig?: ExtrapolateConfig): any;
8
- export {};
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { FluidValue } from '@raidipesh78/re-motion';
3
- import { type UseMountConfig } from '../hooks';
4
- interface MountedBlockProps extends Partial<UseMountConfig> {
5
- state: boolean;
6
- children: (animation: {
7
- value: FluidValue;
8
- }) => ReactNode;
9
- }
10
- export declare const MountedBlock: ({ state, children, from, enter, exit, }: MountedBlockProps) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { FluidValue } from '@raidipesh78/re-motion';
3
- interface ScrollableBlockProps {
4
- children?: (animation: {
5
- value: FluidValue;
6
- }) => ReactNode;
7
- direction?: 'single' | 'both';
8
- threshold?: number;
9
- }
10
- export declare const ScrollableBlock: (props: ScrollableBlockProps) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,2 +0,0 @@
1
- export * from './MountedBlock';
2
- export * from './ScrollableBlock';
@@ -1,16 +0,0 @@
1
- import { FluidValue, spring } from '@raidipesh78/re-motion';
2
- export type EndCallbackResult = {
3
- finished: boolean;
4
- value?: number | string;
5
- };
6
- export type EndCallback = (result: EndCallbackResult) => void;
7
- export type Controller = ReturnType<typeof spring>;
8
- export type ToValue = (animation: FluidValue) => {
9
- controller: Controller;
10
- callback?: EndCallback;
11
- };
12
- export interface WithCallbacks {
13
- onStart?: (value: number | string) => void;
14
- onChange?: (value: number | string) => void;
15
- onRest?: (value: number | string) => void;
16
- }
@@ -1,17 +0,0 @@
1
- import { Gesture } from './Gesture';
2
- import type { Vector2 } from '../types';
3
- export declare class DragGesture extends Gesture {
4
- movementStart: Vector2;
5
- initialMovement: Vector2;
6
- movement: Vector2;
7
- previousMovement: Vector2;
8
- translation: Vector2;
9
- offset: Vector2;
10
- velocity: Vector2;
11
- _initEvents(): void;
12
- _cancelEvents(): void;
13
- _handleCallback(): void;
14
- pointerDown(e: any): void;
15
- pointerMove(e: any): void;
16
- pointerUp(): void;
17
- }
@@ -1,20 +0,0 @@
1
- export declare class Gesture {
2
- currentIndex?: number;
3
- lastTimeStamp: number;
4
- isActive: boolean;
5
- targetElement?: HTMLElement;
6
- targetElements: Array<HTMLElement>;
7
- config?: any;
8
- callback?: <T>(event: T) => void;
9
- _subscribe?: (eventKeys?: Array<string>) => void;
10
- static _VELOCITY_LIMIT: number;
11
- _initEvents(): void;
12
- _cancelEvents(): void;
13
- applyCallback(callback: <T>(event: T) => void): void;
14
- applyGesture({ targetElement, targetElements, callback, config, }: {
15
- targetElement?: any;
16
- targetElements?: any;
17
- callback: <T>(event: T) => void;
18
- config?: any;
19
- }): () => void | undefined;
20
- }
@@ -1,13 +0,0 @@
1
- import { Vector2 } from '../types';
2
- import { Gesture } from './Gesture';
3
- export declare class MouseMoveGesture extends Gesture {
4
- event?: MouseEvent;
5
- isActiveID?: any;
6
- movement: Vector2;
7
- previousMovement: Vector2;
8
- velocity: Vector2;
9
- direction: Vector2;
10
- _initEvents(): void;
11
- _handleCallback(): void;
12
- onMouseMove(e: MouseEvent): void;
13
- }
@@ -1,14 +0,0 @@
1
- import { Vector2 } from '../types';
2
- import { Gesture } from './Gesture';
3
- export declare class ScrollGesture extends Gesture {
4
- isActiveID?: any;
5
- movement: Vector2;
6
- previousMovement: Vector2;
7
- direction: Vector2;
8
- velocity: Vector2;
9
- _initEvents(): void;
10
- _handleCallback(): void;
11
- onScroll({ x, y }: Vector2): void;
12
- scrollListener(): void;
13
- scrollElementListener(): void;
14
- }
@@ -1,15 +0,0 @@
1
- import { Vector2 } from '../types';
2
- import { Gesture } from './Gesture';
3
- export declare class WheelGesture extends Gesture {
4
- isActiveID?: any;
5
- movement: Vector2;
6
- previousMovement: Vector2;
7
- direction: Vector2;
8
- velocity: Vector2;
9
- delta: Vector2;
10
- offset: Vector2;
11
- translation: Vector2;
12
- _initEvents(): void;
13
- _handleCallback(): void;
14
- onWheel(event: WheelEvent): void;
15
- }
@@ -1,4 +0,0 @@
1
- export * from './DragGesture';
2
- export * from './MouseMoveGesture';
3
- export * from './ScrollGesture';
4
- export * from './WheelGesture';
@@ -1,11 +0,0 @@
1
- type MouseEventType = 'click' | 'dblclick' | 'mousedown' | 'mousemove' | 'mouseup' | 'touchstart' | 'touchmove' | 'touchend' | 'mouseenter' | 'mouseleave' | 'mouseout' | 'mouseover' | 'scroll' | 'wheel' | 'contextmenu';
2
- type DomTargetTypes = Array<Window | Document | HTMLElement>;
3
- /**
4
- * Attach multiple document / window event / HTMLElement
5
- */
6
- export declare function attachEvents(domTargets: DomTargetTypes, events: Array<[
7
- event: MouseEventType,
8
- callback: (e: any) => void,
9
- capture?: any
10
- ]>): (eventKeys?: Array<string>) => void;
11
- export {};
@@ -1 +0,0 @@
1
- export * from './math';
@@ -1,34 +0,0 @@
1
- /**
2
- * bin(booleanValue)
3
- * returns 1 if booleanValue == true and 0 if booleanValue == false
4
- */
5
- export declare function bin(bool: boolean): 1 | 0;
6
- /**
7
- * mix(progress, a, b)
8
- * linear interpolation between a and b
9
- */
10
- export declare function mix(perc: number, val1: number, val2: number): number;
11
- /**
12
- * clamp(value, min, max)
13
- * clamps value for min and max bounds
14
- */
15
- export declare function clamp(value: number, lowerbound: number, upperbound: number): number;
16
- /**
17
- * rubberClamp(value, min, max, constant?)
18
- * constant is optional : default 0.15
19
- * clamps the value for min and max value and
20
- * extends beyond min and max values with constant
21
- * factor to create elastic rubber band effect
22
- */
23
- export declare function rubberClamp(value: number, lowerbound: number, upperbound: number, constant?: number): number;
24
- /**
25
- * snapTo(value, velocity, snapPoints[])
26
- * Calculates the final snapPoint according to given current value,
27
- * velocity and snapPoints array
28
- */
29
- export declare function snapTo(value: number, velocity: number, snapPoints: Array<number>): number;
30
- /**
31
- * move(array, moveIndex, toIndex)
32
- * move array item from moveIndex to toIndex without array modification
33
- */
34
- export declare function move(array: Array<any>, moveIndex: number, toIndex: number): any[];
@@ -1,4 +0,0 @@
1
- export declare const withDefault: (x: number, y: number) => {
2
- x: number;
3
- y: number;
4
- };
@@ -1,5 +0,0 @@
1
- export * from './useDrag';
2
- export * from './useMouseMove';
3
- export * from './useScroll';
4
- export * from './useWheel';
5
- export * from './useGesture';
@@ -1,4 +0,0 @@
1
- import { DragEventType, UseDragConfig } from '../types';
2
- export declare function useDrag(callback: (event: DragEventType) => void, config?: UseDragConfig): (index?: number) => {
3
- ref: any;
4
- };
@@ -1,9 +0,0 @@
1
- import { DragEventType, WheelEventType, ScrollEventType, MouseMoveEventType } from '../types';
2
- export declare function useGesture({ onDrag, onWheel, onScroll, onMouseMove, }: {
3
- onDrag?: (event: DragEventType) => void;
4
- onWheel?: (event: WheelEventType) => void;
5
- onScroll?: (event: ScrollEventType) => void;
6
- onMouseMove?: (event: MouseMoveEventType) => void;
7
- }): (index?: number) => {
8
- ref: any;
9
- };
@@ -1,4 +0,0 @@
1
- import { MouseMoveEventType } from '../types';
2
- export declare function useMouseMove(callback: (event: MouseMoveEventType) => void): (index?: number) => {
3
- ref: any;
4
- };
@@ -1,10 +0,0 @@
1
- type UseRecognizerHandlerType = Array<[
2
- key: 'drag' | 'wheel' | 'move' | 'scroll',
3
- gesture: any,
4
- callback: any,
5
- config?: any
6
- ]>;
7
- export declare const useRecognizer: (handlers: UseRecognizerHandlerType) => (index?: number) => {
8
- ref: any;
9
- };
10
- export {};
@@ -1,4 +0,0 @@
1
- import { ScrollEventType } from '../types';
2
- export declare function useScroll(callback: (event: ScrollEventType) => void): (index?: number) => {
3
- ref: any;
4
- };
@@ -1,4 +0,0 @@
1
- import { WheelEventType } from '../types';
2
- export declare function useWheel(callback: (event: WheelEventType) => void): (index?: number) => {
3
- ref: any;
4
- };
@@ -1,51 +0,0 @@
1
- type GenericEventType = {
2
- velocityX: number;
3
- velocityY: number;
4
- directionX: number;
5
- directionY: number;
6
- };
7
- export type DragEventType = {
8
- args: Array<number | undefined>;
9
- down: boolean;
10
- movementX: number;
11
- movementY: number;
12
- offsetX: number;
13
- offsetY: number;
14
- distanceX: number;
15
- distanceY: number;
16
- cancel: () => void;
17
- } & GenericEventType;
18
- export type MouseMoveEventType = {
19
- args: Array<number | undefined>;
20
- event: MouseEvent;
21
- target: EventTarget | undefined | null;
22
- isMoving: boolean;
23
- mouseX: number;
24
- mouseY: number;
25
- } & GenericEventType;
26
- export type ScrollEventType = {
27
- isScrolling: boolean;
28
- scrollX: number;
29
- scrollY: number;
30
- } & GenericEventType;
31
- export type WheelEventType = {
32
- target: HTMLElement | undefined | null;
33
- isWheeling: boolean;
34
- movementX: number;
35
- movementY: number;
36
- offsetX: number;
37
- offsetY: number;
38
- deltaX: number;
39
- deltaY: number;
40
- } & GenericEventType;
41
- export type UseDragConfig = {
42
- initial?: () => {
43
- movementX: number;
44
- movementY: number;
45
- };
46
- };
47
- export type Vector2 = {
48
- x: number;
49
- y: number;
50
- };
51
- export {};
@@ -1,3 +0,0 @@
1
- export * from "./useOutsideClick";
2
- export * from "./useMeasure";
3
- export * from "./useWindowDimension";
@@ -1,14 +0,0 @@
1
- import { DependencyList } from 'react';
2
- type MeasurementValue = number | Array<number>;
3
- type MeasurementType = {
4
- left: MeasurementValue;
5
- top: MeasurementValue;
6
- width: MeasurementValue;
7
- height: MeasurementValue;
8
- vLeft: MeasurementValue;
9
- vTop: MeasurementValue;
10
- };
11
- export declare function useMeasure(callback: (event: MeasurementType) => void, deps?: DependencyList): (index?: number) => {
12
- ref: import("react").MutableRefObject<null>;
13
- };
14
- export {};
@@ -1,2 +0,0 @@
1
- import { RefObject, DependencyList } from 'react';
2
- export declare function useOutsideClick(elementRef: RefObject<HTMLElement>, callback: (event: MouseEvent) => void, deps?: DependencyList): void;
@@ -1,9 +0,0 @@
1
- import { DependencyList } from 'react';
2
- type WindowDimensionType = {
3
- width: number;
4
- height: number;
5
- innerWidth: number;
6
- innerHeight: number;
7
- };
8
- export declare function useWindowDimension(callback: (event: WindowDimensionType) => void, deps?: DependencyList): void;
9
- export {};
package/dist/index.d.ts DELETED
@@ -1,9 +0,0 @@
1
- export { Easing, makeFluid as makeAnimated, fluid as animate, } from '@raidipesh78/re-motion';
2
- export { AnimationConfig, MountedBlock, ScrollableBlock } from './animation';
3
- export { interpolate, bInterpolate } from './animation';
4
- export { useValue, useMount, useValues } from './animation';
5
- export { withSpring, withTiming, withSequence, withDelay, withDecay, withLoop, withEase, } from './animation';
6
- export { useMeasure, useOutsideClick, useWindowDimension } from './hooks';
7
- export { useDrag, useGesture, useMouseMove, useScroll, useWheel, } from './gestures/hooks';
8
- export { bin, clamp, mix, rubberClamp, move, snapTo } from './gestures/helpers';
9
- export type { UseMountConfig } from './animation';
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- var e=require("@raidipesh78/re-motion"),t=require("react/jsx-runtime"),n=require("react");function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=r(n),o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)f.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return f}function u(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var c=/[+-]?\d+(\.\d+)?|[\s]?\.\d+|#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/gi,h=/#[a-f\d]{3,}|transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|burntsienna|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen/gi,d={transparent:"#00000000",aliceblue:"#f0f8ffff",antiquewhite:"#faebd7ff",aqua:"#00ffffff",aquamarine:"#7fffd4ff",azure:"#f0ffffff",beige:"#f5f5dcff",bisque:"#ffe4c4ff",black:"#000000ff",blanchedalmond:"#ffebcdff",blue:"#0000ffff",blueviolet:"#8a2be2ff",brown:"#a52a2aff",burlywood:"#deb887ff",burntsienna:"#ea7e5dff",cadetblue:"#5f9ea0ff",chartreuse:"#7fff00ff",chocolate:"#d2691eff",coral:"#ff7f50ff",cornflowerblue:"#6495edff",cornsilk:"#fff8dcff",crimson:"#dc143cff",cyan:"#00ffffff",darkblue:"#00008bff",darkcyan:"#008b8bff",darkgoldenrod:"#b8860bff",darkgray:"#a9a9a9ff",darkgreen:"#006400ff",darkgrey:"#a9a9a9ff",darkkhaki:"#bdb76bff",darkmagenta:"#8b008bff",darkolivegreen:"#556b2fff",darkorange:"#ff8c00ff",darkorchid:"#9932ccff",darkred:"#8b0000ff",darksalmon:"#e9967aff",darkseagreen:"#8fbc8fff",darkslateblue:"#483d8bff",darkslategray:"#2f4f4fff",darkslategrey:"#2f4f4fff",darkturquoise:"#00ced1ff",darkviolet:"#9400d3ff",deeppink:"#ff1493ff",deepskyblue:"#00bfffff",dimgray:"#696969ff",dimgrey:"#696969ff",dodgerblue:"#1e90ffff",firebrick:"#b22222ff",floralwhite:"#fffaf0ff",forestgreen:"#228b22ff",fuchsia:"#ff00ffff",gainsboro:"#dcdcdcff",ghostwhite:"#f8f8ffff",gold:"#ffd700ff",goldenrod:"#daa520ff",gray:"#808080ff",green:"#008000ff",greenyellow:"#adff2fff",grey:"#808080ff",honeydew:"#f0fff0ff",hotpink:"#ff69b4ff",indianred:"#cd5c5cff",indigo:"#4b0082ff",ivory:"#fffff0ff",khaki:"#f0e68cff",lavender:"#e6e6faff",lavenderblush:"#fff0f5ff",lawngreen:"#7cfc00ff",lemonchiffon:"#fffacdff",lightblue:"#add8e6ff",lightcoral:"#f08080ff",lightcyan:"#e0ffffff",lightgoldenrodyellow:"#fafad2ff",lightgray:"#d3d3d3ff",lightgreen:"#90ee90ff",lightgrey:"#d3d3d3ff",lightpink:"#ffb6c1ff",lightsalmon:"#ffa07aff",lightseagreen:"#20b2aaff",lightskyblue:"#87cefaff",lightslategray:"#778899ff",lightslategrey:"#778899ff",lightsteelblue:"#b0c4deff",lightyellow:"#ffffe0ff",lime:"#00ff00ff",limegreen:"#32cd32ff",linen:"#faf0e6ff",magenta:"#ff00ffff",maroon:"#800000ff",mediumaquamarine:"#66cdaaff",mediumblue:"#0000cdff",mediumorchid:"#ba55d3ff",mediumpurple:"#9370dbff",mediumseagreen:"#3cb371ff",mediumslateblue:"#7b68eeff",mediumspringgreen:"#00fa9aff",mediumturquoise:"#48d1ccff",mediumvioletred:"#c71585ff",midnightblue:"#191970ff",mintcream:"#f5fffaff",mistyrose:"#ffe4e1ff",moccasin:"#ffe4b5ff",navajowhite:"#ffdeadff",navy:"#000080ff",oldlace:"#fdf5e6ff",olive:"#808000ff",olivedrab:"#6b8e23ff",orange:"#ffa500ff",orangered:"#ff4500ff",orchid:"#da70d6ff",palegoldenrod:"#eee8aaff",palegreen:"#98fb98ff",paleturquoise:"#afeeeeff",palevioletred:"#db7093ff",papayawhip:"#ffefd5ff",peachpuff:"#ffdab9ff",peru:"#cd853fff",pink:"#ffc0cbff",plum:"#dda0ddff",powderblue:"#b0e0e6ff",purple:"#800080ff",rebeccapurple:"#663399ff",red:"#ff0000ff",rosybrown:"#bc8f8fff",royalblue:"#4169e1ff",saddlebrown:"#8b4513ff",salmon:"#fa8072ff",sandybrown:"#f4a460ff",seagreen:"#2e8b57ff",seashell:"#fff5eeff",sienna:"#a0522dff",silver:"#c0c0c0ff",skyblue:"#87ceebff",slateblue:"#6a5acdff",slategray:"#708090ff",slategrey:"#708090ff",snow:"#fffafaff",springgreen:"#00ff7fff",steelblue:"#4682b4ff",tan:"#d2b48cff",teal:"#008080ff",thistle:"#d8bfd8ff",tomato:"#ff6347ff",turquoise:"#40e0d0ff",violet:"#ee82eeff",wheat:"#f5deb3ff",white:"#ffffffff",whitesmoke:"#f5f5f5ff",yellow:"#ffff00ff",yellowgreen:"#9acd32ff"};function v(e){var t=function(e){return e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return"#"+t+t+n+n+r+r}))}(e),n=function(e){return 7===e.length?e+"FF":e}(t),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16),a:parseInt(r[4],16)/255}}function m(e){var t=e.r,n=e.g,r=e.b,i=e.a;return"#"+(256|t).toString(16).slice(1)+(256|n).toString(16).slice(1)+(256|r).toString(16).slice(1)+(255*i|256).toString(16).slice(1)}var p=function(e,t,n,r){var i=l(t,4),o=i[0],f=i[1],a=i[2],s=i[3],u=e;if(u<o){if("identity"===n)return u;"clamp"===n&&(u=o)}if(u>f){if("identity"===r)return u;"clamp"===r&&(u=f)}return a===s?a:o===f?e<=o?a:s:(o===-1/0?u=-u:f===1/0?u-=o:u=(u-o)/(f-o),a===-1/0?u=-u:s===1/0?u+=a:u=u*(s-a)+a,u)},g=function(e,t,n,r){var i=l(t,4),o=i[0],f=i[1],a=i[2],s=i[3];if(a.length===s.length)return a.map((function(t,i){return"string"==typeof t?function(e,t){var n=l(t,4),r=n[0],i=n[1],o=n[2],f=n[3],a=v(o),s=v(f);return m({r:p(e,[r,i,a.r,s.r],"clamp","clamp"),g:p(e,[r,i,a.g,s.g],"clamp","clamp"),b:p(e,[r,i,a.b,s.b],"clamp","clamp"),a:p(e,[r,i,a.a,s.a],"clamp","clamp")})}(e,[o,f,t,s[i]]):p(e,[o,f,t,s[i]],n,r)}));throw new Error("Array length doesn't match")},y=function(e){return e.replace(c,"$")},b=function(e){return e.match(c).map((function(e){return-1!==e.indexOf("#")?e:Number(e)}))},x=function(e){return e.replace(h,(function(e){if(-1!==e.indexOf("#"))return m(v(e));if(Object.prototype.hasOwnProperty.call(d,e))return d[e];throw new Error("String cannot be parsed!")}))};function w(e,t,n,r){var i,o,f=null==r?void 0:r.extrapolate,a=null==r?void 0:r.extrapolateLeft,u=null==r?void 0:r.extrapolateRight,c=function(e,t,n){var r=t.length,i=[];e<t[0]?i=[t[0],t[1],n[0],n[1]]:e>t[r-1]&&(i=[t[r-2],t[r-1],n[r-2],n[r-1]]);for(var o=1;o<r;++o)if(e<=t[o]){i=[t[o-1],t[o],n[o-1],n[o]];break}return i}(e,t,n),h="extend";void 0!==a?h=a:void 0!==f&&(h=f);var d,v="extend";if(void 0!==u?v=u:void 0!==f&&(v=f),n.length){if("number"==typeof n[0])return p(e,c,h,v);if(Array.isArray(n[0]))return g(e,c,h,v);var m=l(c,4),w=m[0],E=m[1],k=m[2],M=m[3],_=x(k),I=x(M),O=y(_);if(d=I,y(_).trim().replace(/\s/g,"")===y(d).trim().replace(/\s/g,"")){var T=b(_),S=b(I),L=g(e,[w,E,T,S],h,v);try{for(var C=s(L),Y=C.next();!Y.done;Y=C.next()){var A=Y.value;O=O.replace("$",A)}}catch(e){i={error:e}}finally{try{Y&&!Y.done&&(o=C.return)&&o.call(C)}finally{if(i)throw i.error}}return O}throw new Error("Output range doesn't match string format!")}throw new Error("Output range cannot be Empty")}var E=function(t,n,r,i){return t instanceof e.FluidValue?t.interpolate(n,r,i):w(t,n,r,i)},k={Timing:{BOUNCE:{duration:500,easing:e.Easing.bounce},EASE_IN:{duration:500,easing:e.Easing.in(e.Easing.ease)},EASE_OUT:{duration:500,easing:e.Easing.out(e.Easing.ease)},EASE_IN_OUT:{duration:500,easing:e.Easing.inOut(e.Easing.ease)},POWER1:{duration:500,easing:e.Easing.bezier(.17,.42,.51,.97)},POWER2:{duration:500,easing:e.Easing.bezier(.07,.11,.13,1)},POWER3:{duration:500,easing:e.Easing.bezier(.09,.7,.16,1.04)},POWER4:{duration:500,easing:e.Easing.bezier(.05,.54,0,1.03)},LINEAR:{duration:500,easing:e.Easing.linear}},Spring:{ELASTIC:{mass:1,friction:18,tension:250},EASE:{mass:1,friction:26,tension:170},STIFF:{mass:1,friction:18,tension:350},WOBBLE:{mass:1,friction:8,tension:250}}},M=function(t,n,r){return function(i){return{controller:e.spring(i,a(a({toValue:t},k.Spring.ELASTIC),n)),callback:r}}},_=function(t,n){return function(r){return{controller:e.native(r,{toValue:t}),callback:n}}},I=function(e,t,n){return M(e,a(a({},k.Spring.EASE),t),n)};function O(e){return"number"==typeof e||"string"==typeof e?_(e):e}function T(t){var r=n.useRef(new e.FluidValue(t)).current,i=n.useCallback((function(e){var t=O(e)(r),n=t.controller,i=t.callback;n.start(i)}),[]);return{set value(e){i(e)},get value(){return r},get currentValue(){return r.get()}}}var S=function(e,t){var r,i,o,f=l(n.useState(e),2),a=f[0],s=f[1],u=n.useRef({from:null!==(r=null==t?void 0:t.from)&&void 0!==r?r:0,enter:null!==(i=null==t?void 0:t.enter)&&void 0!==i?i:I(1),exit:null!==(o=null==t?void 0:t.exit)&&void 0!==o?o:I(0)}).current,c=T(u.from),h=u.enter(c.value),d=u.exit(c.value);return n.useLayoutEffect((function(){e?(s(!0),queueMicrotask((function(){h.controller.start(h.callback)}))):queueMicrotask((function(){d.controller.start((function(e){var t;null===(t=d.callback)||void 0===t||t.call(d,e),e.finished&&s(!1)}))}))}),[e]),function(e){return e({value:c.value},a)}};function L(e,t){var n=new Map;return t.forEach((function(t){var r=l(t,3),i=r[0],o=r[1],f=r[2],a=void 0!==f&&f;n.set(i,function(e,t,n,r){return void 0===r&&(r=!1),e.forEach((function(e){e.addEventListener(t,n,r)})),function(){e.forEach((function(e){e.removeEventListener(t,n,r)}))}}(e,i,o,a))})),function(e){var t,r;try{for(var i=s(n.entries()),o=i.next();!o.done;o=i.next()){var f=l(o.value,2),a=f[0],u=f[1];if(!e)return void u();-1!==e.indexOf(a)&&u()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}}function C(e,t,n){return Math.min(Math.max(e,t),n)}function Y(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}var A=function(e,t){return{x:e,y:t}},R=function(){function e(){this.lastTimeStamp=Date.now(),this.isActive=!1,this.targetElements=[]}return e.prototype._initEvents=function(){},e.prototype._cancelEvents=function(){this._subscribe&&this._subscribe()},e.prototype.applyCallback=function(e){this.callback=e},e.prototype.applyGesture=function(e){var t=this,n=e.targetElement,r=e.targetElements,i=e.callback,o=e.config;return this.targetElement=n,this.targetElements=r.map((function(e){return e.current})),this.callback=i,this.config=o,this._initEvents(),function(){return t._subscribe&&t._subscribe()}},e._VELOCITY_LIMIT=20,e}(),V=function(e){function t(){var t=e.apply(this,u([],l(arguments),!1))||this;return t.movementStart=A(0,0),t.initialMovement=A(0,0),t.movement=A(0,0),t.previousMovement=A(0,0),t.translation=A(0,0),t.offset=A(0,0),t.velocity=A(0,0),t}return f(t,e),t.prototype._initEvents=function(){(this.targetElement||this.targetElements.length>0)&&(this._subscribe=L([window],[["mousedown",this.pointerDown.bind(this)],["mousemove",this.pointerMove.bind(this)],["mouseup",this.pointerUp.bind(this)],["touchstart",this.pointerDown.bind(this),{passive:!1}],["touchmove",this.pointerMove.bind(this),{passive:!1}],["touchend",this.pointerUp.bind(this)]]))},t.prototype._cancelEvents=function(){this._subscribe&&this._subscribe(["mousedown","mousemove","touchstart","touchmove"])},t.prototype._handleCallback=function(){var e=this;this.callback&&this.callback({args:[this.currentIndex],down:this.isActive,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.translation.x,offsetY:this.translation.y,velocityX:this.velocity.x,velocityY:this.velocity.y,distanceX:Math.abs(this.movement.x),distanceY:Math.abs(this.movement.y),directionX:Math.sign(this.movement.x),directionY:Math.sign(this.movement.y),cancel:function(){e._cancelEvents()}})},t.prototype.pointerDown=function(e){var t;"touchstart"===e.type?this.movementStart={x:e.touches[0].clientX,y:e.touches[0].clientY}:this.movementStart={x:e.clientX,y:e.clientY},this.movement={x:0,y:0},this.offset={x:this.translation.x,y:this.translation.y},this.previousMovement={x:0,y:0},this.velocity={x:0,y:0};var n=this.targetElements.find((function(t){return t===e.target}));if(e.target===this.targetElement||n){this.isActive=!0,e.preventDefault(),n&&(this.currentIndex=this.targetElements.indexOf(n));var r=(null===(t=this.config)||void 0===t?void 0:t.initial)&&this.config.initial(),i=null==r?void 0:r.movementX,o=null==r?void 0:r.movementY;this.initialMovement={x:null!=i?i:0,y:null!=o?o:0},this.movement={x:this.initialMovement.x,y:this.initialMovement.y},this.previousMovement={x:this.initialMovement.x,y:this.initialMovement.y},this._handleCallback()}},t.prototype.pointerMove=function(e){if(this.isActive){e.preventDefault();var t=Date.now(),n=C(t-this.lastTimeStamp,.1,64);this.lastTimeStamp=t;var r=n/1e3;"touchmove"===e.type?this.movement={x:this.initialMovement.x+(e.touches[0].clientX-this.movementStart.x),y:this.initialMovement.y+(e.touches[0].clientY-this.movementStart.y)}:this.movement={x:this.initialMovement.x+(e.clientX-this.movementStart.x),y:this.initialMovement.y+(e.clientY-this.movementStart.y)},this.translation={x:this.offset.x+this.movement.x,y:this.offset.y+this.movement.y},this.velocity={x:C((this.movement.x-this.previousMovement.x)/r/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT),y:C((this.movement.y-this.previousMovement.y)/r/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()}},t.prototype.pointerUp=function(){this.isActive&&(this.isActive=!1,this._handleCallback(),this._cancelEvents(),this._initEvents())},t}(R),q=function(e){function t(){var t=e.apply(this,u([],l(arguments),!1))||this;return t.movement=A(0,0),t.previousMovement=A(0,0),t.velocity=A(0,0),t.direction=A(0,0),t}return f(t,e),t.prototype._initEvents=function(){this.targetElement?this._subscribe=L([this.targetElement],[["mousemove",this.onMouseMove.bind(this)]]):this.targetElements.length>0?this._subscribe=L(this.targetElements,[["mousemove",this.onMouseMove.bind(this)]]):this._subscribe=L([window],[["mousemove",this.onMouseMove.bind(this)]])},t.prototype._handleCallback=function(){var e;this.callback&&this.callback({args:[this.currentIndex],event:this.event,isMoving:this.isActive,target:null===(e=this.event)||void 0===e?void 0:e.target,mouseX:this.movement.x,mouseY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},t.prototype.onMouseMove=function(e){var t=this,n=this.targetElements.find((function(t){return t===e.target}));n&&(this.currentIndex=this.targetElements.indexOf(n)),this.event=e;var r=Date.now(),i=Math.min(r-this.lastTimeStamp,64);this.lastTimeStamp=r;var o=i/1e3,f=e.clientX,a=e.clientY;this.movement={x:f,y:a},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.direction={x:0,y:0},t.velocity={x:0,y:0},t._handleCallback()}),250);var s=this.movement.x-this.previousMovement.x,l=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(s),y:Math.sign(l)},this.velocity={x:C(s/o/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT),y:C(l/o/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t}(R),X=function(e){function t(){var t=e.apply(this,u([],l(arguments),!1))||this;return t.movement=A(0,0),t.previousMovement=A(0,0),t.direction=A(0,0),t.velocity=A(0,0),t}return f(t,e),t.prototype._initEvents=function(){this.targetElement?this._subscribe=L([this.targetElement],[["scroll",this.scrollElementListener.bind(this)]]):this._subscribe=L([window],[["scroll",this.scrollListener.bind(this)]])},t.prototype._handleCallback=function(){this.callback&&this.callback({isScrolling:this.isActive,scrollX:this.movement.x,scrollY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},t.prototype.onScroll=function(e){var t=this,n=e.x,r=e.y,i=Date.now(),o=Math.min(i-this.lastTimeStamp,64);this.lastTimeStamp=i;var f=o/1e3;this.movement={x:n,y:r},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.direction={x:0,y:0},t.velocity={x:0,y:0},t._handleCallback()}),250);var a=this.movement.x-this.previousMovement.x,s=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(a),y:Math.sign(s)},this.velocity={x:C(a/f/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT),y:C(s/f/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t.prototype.scrollListener=function(){var e=window.pageYOffset,t=window.pageXOffset;this.onScroll({x:t,y:e})},t.prototype.scrollElementListener=function(){var e,t,n=(null===(e=this.targetElement)||void 0===e?void 0:e.scrollLeft)||0,r=(null===(t=this.targetElement)||void 0===t?void 0:t.scrollTop)||0;this.onScroll({x:n,y:r})},t}(R),D=function(e){function t(){var t=e.apply(this,u([],l(arguments),!1))||this;return t.movement=A(0,0),t.previousMovement=A(0,0),t.direction=A(0,0),t.velocity=A(0,0),t.delta=A(0,0),t.offset=A(0,0),t.translation=A(0,0),t}return f(t,e),t.prototype._initEvents=function(){this.targetElement&&(this._subscribe=L([this.targetElement],[["wheel",this.onWheel.bind(this)]]))},t.prototype._handleCallback=function(){this.callback&&this.callback({target:this.targetElement,isWheeling:this.isActive,deltaX:this.delta.x,deltaY:this.delta.y,directionX:this.direction.x,directionY:this.direction.y,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.offset.x,offsetY:this.offset.y,velocityX:this.velocity.x,velocityY:this.velocity.y})},t.prototype.onWheel=function(e){var t=this,n=e.deltaX,r=e.deltaY,i=e.deltaMode,o=Date.now(),f=Math.min(o-this.lastTimeStamp,64);this.lastTimeStamp=o;var a=f/1e3;this.isActive=!0,-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.translation={x:t.offset.x,y:t.offset.y},t._handleCallback(),t.velocity={x:0,y:0},t.movement={x:0,y:0}}),200),1===i?(n*=40,r*=40):2===i&&(n*=800,r*=800),this.delta={x:n,y:r},this.movement={x:this.movement.x+n,y:this.movement.y+r},this.offset={x:this.translation.x+this.movement.x,y:this.translation.y+this.movement.y};var s=this.movement.x-this.previousMovement.x,l=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(s),y:Math.sign(l)},this.velocity={x:C(s/a/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT),y:C(l/a/1e3,-1*R._VELOCITY_LIMIT,R._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t}(R),j=function(e){var t=i.useRef(),n=i.useRef([]),r=i.useRef(new Map).current;return i.useEffect((function(){var t,n;try{for(var i=s(r.entries()),o=i.next();!o.done;o=i.next()){var f=l(o.value,2)[1],a=f.keyIndex,u=f.gesture,c=l(e[a],3)[2];u.applyCallback(c)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),[e]),i.useEffect((function(){return e.forEach((function(e,i){var o=l(e,4),f=o[0],a=o[1],s=o[2],u=o[3];queueMicrotask((function(){return r.set(f,{keyIndex:i,gesture:a,unsubscribe:a.applyGesture({targetElement:t.current,targetElements:n.current,callback:s,config:u})})}))})),function(){var e,t;try{for(var n=s(r.entries()),i=n.next();!i.done;i=n.next()){var o=l(i.value,2)[1].unsubscribe;o&&o()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}})),function(e){return null==e?{ref:t}:(n.current[e]=n.current[e]||i.createRef(),{ref:n.current[e]})}};Object.defineProperty(exports,"Easing",{enumerable:!0,get:function(){return e.Easing}}),Object.defineProperty(exports,"animate",{enumerable:!0,get:function(){return e.fluid}}),Object.defineProperty(exports,"makeAnimated",{enumerable:!0,get:function(){return e.makeFluid}}),exports.AnimationConfig=k,exports.MountedBlock=function(e){var n=e.state,r=e.children,i=e.from,o=e.enter,f=e.exit,a=S(n,{from:i,enter:o,exit:f});return t.jsx(t.Fragment,{children:a((function(e,t){return t&&r({value:e.value})}))})},exports.ScrollableBlock=function(e){var r=e.children,i=e.direction,o=void 0===i?"single":i,f=e.threshold,a=void 0===f?.2:f,s=n.useRef(null),u=T(0);return n.useLayoutEffect((function(){var e=s.current,t=new IntersectionObserver((function(e){l(e,1)[0].isIntersecting?u.value=I(1):"both"===o&&(u.value=I(0))}),{root:null,threshold:a});return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),t.jsx("div",{ref:s,children:r&&r({value:u.value})})},exports.bInterpolate=function(e,t,n,r){return E(e,[0,1],[t,n],r)},exports.bin=function(e){return e?1:0},exports.clamp=C,exports.interpolate=E,exports.mix=function(e,t,n){return t*(1-e)+n*e},exports.move=function(e,t,n){var r=e[t],i=e.length,o=t-n;if(o>0)return u(u(u(u([],l(e.slice(0,n)),!1),[r],!1),l(e.slice(n,t)),!1),l(e.slice(t+1,i)),!1);if(o<0){var f=n+1;return u(u(u(u([],l(e.slice(0,t)),!1),l(e.slice(t+1,f)),!1),[r],!1),l(e.slice(f,i)),!1)}return e},exports.rubberClamp=function(e,t,n,r){return void 0===r&&(r=.15),0===r?C(e,t,n):e<t?-Y(t-e,n-t,r)+t:e>n?+Y(e-n,n-t,r)+n:e},exports.snapTo=function(e,t,n){var r=e+.2*t,i=function(e){return Math.abs(e-r)},o=n.map(i),f=Math.min.apply(Math,u([],l(o),!1));return n.reduce((function(e,t){return i(t)===f?t:e}))},exports.useDrag=function(e,t){var n=i.useRef(new V).current;return j([["drag",n,e,t]])},exports.useGesture=function(e){var t=e.onDrag,n=e.onWheel,r=e.onScroll,o=e.onMouseMove,f=i.useRef(new V).current,a=i.useRef(new D).current,s=i.useRef(new X).current,l=i.useRef(new q).current;return j([["drag",f,t],["wheel",a,n],["scroll",s,r],["move",l,o]])},exports.useMeasure=function(e,t){var r=n.useRef(null),i=n.useRef([]),o=n.useRef(e);return n.useEffect((function(){return o.current=e,function(){o.current=function(){return!1}}}),t),n.useEffect((function(){var e=r.current||document.documentElement,t=i.current,n=new ResizeObserver((function(t){var n=l(t,1)[0].target.getBoundingClientRect(),r=n.left,i=n.top,f=n.width,a=n.height,s=window.pageXOffset,u=window.pageYOffset;if(o){if(e===document.documentElement)return;o.current({left:r+s,top:i+u,width:f,height:a,vLeft:r,vTop:i})}})),f=new ResizeObserver((function(e){var t=[],n=[],r=[],i=[],f=[],a=[];e.forEach((function(e){var o=e.target.getBoundingClientRect(),s=o.left,l=o.top,u=o.width,c=o.height,h=s+window.pageXOffset,d=l+window.pageYOffset;t.push(h),n.push(d),r.push(u),i.push(c),f.push(s),a.push(l)})),o&&o.current({left:t,top:n,width:r,height:i,vLeft:f,vTop:a})}));return e&&(e===document.documentElement&&t.length>0?t.forEach((function(e){f.observe(e.current)})):n.observe(e)),function(){e&&(e===document.documentElement&&t.length>0?t.forEach((function(e){f.unobserve(e.current)})):n.unobserve(e))}}),[]),function(e){return null==e?{ref:r}:(i.current[e]=i.current[e]||n.createRef(),{ref:i.current[e]})}},exports.useMount=S,exports.useMouseMove=function(e){var t=i.useRef(new q).current;return j([["move",t,e]])},exports.useOutsideClick=function(e,t,r){var i=n.useRef();i.current||(i.current=t),n.useEffect((function(){return i.current=t,function(){i.current=function(){return!1}}}),r),n.useEffect((function(){var t=L([document],[["mousedown",function(t){var n=t.target;n&&n.isConnected&&(e.current&&!e.current.contains(n)&&i.current&&i.current(t))}]]);return function(){return t&&t()}}),[])},exports.useScroll=function(e){var t=i.useRef(new X).current;return j([["scroll",t,e]])},exports.useValue=T,exports.useValues=function(t){var r=n.useRef(t.map((function(t){return new e.FluidValue(t)}))).current,i=n.useCallback((function(e){e.forEach((function(e,t){var n=O(e)(r[t]),i=n.controller,o=n.callback;i.start(o)}))}),[]);return{set value(e){i(e)},get value(){return r},get currentValue(){return r.map((function(e){return e.get()}))}}},exports.useWheel=function(e){var t=i.useRef(new D).current;return j([["wheel",t,e]])},exports.useWindowDimension=function(e,t){var r=n.useRef({width:0,height:0,innerWidth:0,innerHeight:0}),i=n.useRef(e);n.useEffect((function(){return i.current=e,function(){i.current=function(){return!1}}}),t),n.useEffect((function(){var e=new ResizeObserver((function(e){var t=l(e,1)[0].target,n=t.clientWidth,o=t.clientHeight,f=window.innerWidth,s=window.innerHeight;r.current={width:n,height:o,innerWidth:f,innerHeight:s},i&&i.current(a({},r.current))}));return e.observe(document.documentElement),function(){return e.unobserve(document.documentElement)}}),[])},exports.withDecay=function(t,n){return function(r){return{controller:e.decay(r,a({},t)),callback:n}}},exports.withDelay=function(t,n){return function(){return{controller:e.delay(t),callback:n}}},exports.withEase=I,exports.withLoop=function(t,n,r){return function(i){return{controller:e.loop(t(i).controller,{iterations:n}),callback:r}}},exports.withSequence=function(t,n){return function(r){return{controller:e.sequence(t.map((function(e){return e(r).controller}))),callback:n}}},exports.withSpring=M,exports.withTiming=function(t,n,r){return function(i){return{controller:e.timing(i,{toValue:t,duration:null==n?void 0:n.duration,easing:null==n?void 0:n.easing,onStart:null==n?void 0:n.onStart,onChange:null==n?void 0:n.onChange,onRest:null==n?void 0:n.onRest}),callback:r}}};
2
- //# sourceMappingURL=index.js.map