framer-motion 1.11.0 → 1.11.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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Framer Motion adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [1.11.1] 2020-06-16
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Using `useIsomorphicEffect` for `useElementScroll` and `useViewportScroll`.([@thebuilder](https://github.com/thebuilder) in [#592](https://github.com/framer/motion/pull/592))
|
|
10
|
+
|
|
5
11
|
## [1.11.0] 2020-05-15
|
|
6
12
|
|
|
7
13
|
### Added
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
"kind": "PropertySignature",
|
|
524
|
-
"docComment": "/**\n * @library\n *\n * When a `Frame` is the child of a `Stack`, the `Stack` is responsible for its layout. This makes it harder for us to know when a `Frame`'s position changes within the `Stack` and make it animate to its new position.\n *\n * By adding `positionTransition` to a `Frame`, it'll automatically animate to its new position in the `Stack`, whether the `Stack` layout has changed or the `Frame` has changed its order within it.\n *\n * It can either be set as a `Transition`, or just `true` to use the default layout transition.\n * ```jsx\n * function MyComponent({ distribution = \"space-around\" }) {\n * const spring = {\n * type: \"spring\",\n * damping: 10,\n * stiffness: 100\n * }\n *\n * return (\n * <Stack distribution={distribution}>\n * <Frame layoutTransition={spring} />\n * </Stack>\n * )\n * }\n * ```\n *\n * @motion\n *\n * If `positionTransition` is defined on a `motion` component, it will automatically animate any changes to its layout using a performant `x`/`y` transform.\n *\n * `positionTransition` can either be set as a `Transition`, or just `true` to use the default position transition, which is a snappy spring.\n *\n * It can also be set as a function that will resolve when the component has changed layout. This function should return either a `Transition`, or `true`. For advanced use-cases where you want the component to visually stay in its previous position, this function can also return `false`. This function will receive the `delta` of the changed layout.\n * ```jsx\n * const spring = {\n * type: \"spring\",\n * damping: 10,\n * stiffness: 100\n * }\n *\n * // This component will animate position when `isVisible` is toggled.\n * const MyComponent = ({
|
|
524
|
+
"docComment": "/**\n * @library\n *\n * When a `Frame` is the child of a `Stack`, the `Stack` is responsible for its layout. This makes it harder for us to know when a `Frame`'s position changes within the `Stack` and make it animate to its new position.\n *\n * By adding `positionTransition` to a `Frame`, it'll automatically animate to its new position in the `Stack`, whether the `Stack` layout has changed or the `Frame` has changed its order within it.\n *\n * It can either be set as a `Transition`, or just `true` to use the default layout transition.\n * ```jsx\n * function MyComponent({ distribution = \"space-around\" }) {\n * const spring = {\n * type: \"spring\",\n * damping: 10,\n * stiffness: 100\n * }\n *\n * return (\n * <Stack distribution={distribution}>\n * <Frame layoutTransition={spring} />\n * </Stack>\n * )\n * }\n * ```\n *\n * @motion\n *\n * If `positionTransition` is defined on a `motion` component, it will automatically animate any changes to its layout using a performant `x`/`y` transform.\n *\n * `positionTransition` can either be set as a `Transition`, or just `true` to use the default position transition, which is a snappy spring.\n *\n * It can also be set as a function that will resolve when the component has changed layout. This function should return either a `Transition`, or `true`. For advanced use-cases where you want the component to visually stay in its previous position, this function can also return `false`. This function will receive the `delta` of the changed layout.\n * ```jsx\n * const spring = {\n * type: \"spring\",\n * damping: 10,\n * stiffness: 100\n * }\n *\n * // This component will animate position when `isVisible` is toggled.\n * const MyComponent = ({ isVisible }) => {\n * return (\n * <motion.div positionTransition={spring} style={{ left: isVisible ? 0 : 100 }} />\n * )\n * }\n *\n * // This component will animate items to their new position if its place in `items` changes order.\n * const MyComponent = ({ items }) => {\n * return items.map((item) => (\n * <motion.div key={item.id} positionTransition={spring} />\n * ))\n * }\n * ```\n *\n * @public\n */\n",
|
|
525
525
|
"excerptTokens": [
|
|
526
526
|
{
|
|
527
527
|
"kind": "Reference",
|
|
@@ -2372,9 +2372,11 @@ function usePanGesture(_a, ref) {
|
|
|
2372
2372
|
onPanEnd && onPanEnd(event, info);
|
|
2373
2373
|
},
|
|
2374
2374
|
};
|
|
2375
|
-
|
|
2376
|
-
panSession.current
|
|
2377
|
-
|
|
2375
|
+
React.useEffect(function () {
|
|
2376
|
+
if (panSession.current !== null) {
|
|
2377
|
+
panSession.current.updateHandlers(handlers);
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2378
2380
|
function onPointerDown(event) {
|
|
2379
2381
|
panSession.current = new PanSession(event, handlers, {
|
|
2380
2382
|
transformPagePoint: transformPagePoint,
|
|
@@ -4445,6 +4447,9 @@ function createScrollUpdater(values, getOffsets) {
|
|
|
4445
4447
|
return update;
|
|
4446
4448
|
}
|
|
4447
4449
|
|
|
4450
|
+
var isBrowser$2 = typeof window !== "undefined";
|
|
4451
|
+
var useIsomorphicLayoutEffect = isBrowser$2 ? React.useLayoutEffect : React.useEffect;
|
|
4452
|
+
|
|
4448
4453
|
var getElementScrollOffsets = function (element) { return function () {
|
|
4449
4454
|
return {
|
|
4450
4455
|
xOffset: element.scrollLeft,
|
|
@@ -4502,7 +4507,7 @@ var getElementScrollOffsets = function (element) { return function () {
|
|
|
4502
4507
|
*/
|
|
4503
4508
|
function useElementScroll(ref) {
|
|
4504
4509
|
var values = useConstant(createScrollMotionValues);
|
|
4505
|
-
|
|
4510
|
+
useIsomorphicLayoutEffect(function () {
|
|
4506
4511
|
var element = ref.current;
|
|
4507
4512
|
heyListen.invariant(!!element, "ref provided to useScroll must be passed into a HTML element.");
|
|
4508
4513
|
if (!element)
|
|
@@ -4572,7 +4577,7 @@ function addEventListeners() {
|
|
|
4572
4577
|
* @public
|
|
4573
4578
|
*/
|
|
4574
4579
|
function useViewportScroll() {
|
|
4575
|
-
|
|
4580
|
+
useIsomorphicLayoutEffect(function () {
|
|
4576
4581
|
!hasListeners && addEventListeners();
|
|
4577
4582
|
}, []);
|
|
4578
4583
|
return viewportScrollValues;
|
package/dist/framer-motion.d.ts
CHANGED
|
@@ -552,9 +552,9 @@ export declare interface AnimationProps {
|
|
|
552
552
|
* }
|
|
553
553
|
*
|
|
554
554
|
* // This component will animate position when `isVisible` is toggled.
|
|
555
|
-
* const MyComponent = ({
|
|
555
|
+
* const MyComponent = ({ isVisible }) => {
|
|
556
556
|
* return (
|
|
557
|
-
* <motion.div positionTransition={spring} style={{ left:
|
|
557
|
+
* <motion.div positionTransition={spring} style={{ left: isVisible ? 0 : 100 }} />
|
|
558
558
|
* )
|
|
559
559
|
* }
|
|
560
560
|
*
|
|
@@ -4617,9 +4617,11 @@
|
|
|
4617
4617
|
onPanEnd && onPanEnd(event, info);
|
|
4618
4618
|
},
|
|
4619
4619
|
};
|
|
4620
|
-
|
|
4621
|
-
panSession.current
|
|
4622
|
-
|
|
4620
|
+
React.useEffect(function () {
|
|
4621
|
+
if (panSession.current !== null) {
|
|
4622
|
+
panSession.current.updateHandlers(handlers);
|
|
4623
|
+
}
|
|
4624
|
+
});
|
|
4623
4625
|
function onPointerDown(event) {
|
|
4624
4626
|
panSession.current = new PanSession(event, handlers, {
|
|
4625
4627
|
transformPagePoint: transformPagePoint,
|
|
@@ -6690,6 +6692,9 @@
|
|
|
6690
6692
|
return update;
|
|
6691
6693
|
}
|
|
6692
6694
|
|
|
6695
|
+
var isBrowser$3 = typeof window !== "undefined";
|
|
6696
|
+
var useIsomorphicLayoutEffect = isBrowser$3 ? React.useLayoutEffect : React.useEffect;
|
|
6697
|
+
|
|
6693
6698
|
var getElementScrollOffsets = function (element) { return function () {
|
|
6694
6699
|
return {
|
|
6695
6700
|
xOffset: element.scrollLeft,
|
|
@@ -6747,7 +6752,7 @@
|
|
|
6747
6752
|
*/
|
|
6748
6753
|
function useElementScroll(ref) {
|
|
6749
6754
|
var values = useConstant(createScrollMotionValues);
|
|
6750
|
-
|
|
6755
|
+
useIsomorphicLayoutEffect(function () {
|
|
6751
6756
|
var element = ref.current;
|
|
6752
6757
|
invariant(!!element, "ref provided to useScroll must be passed into a HTML element.");
|
|
6753
6758
|
if (!element)
|
|
@@ -6817,7 +6822,7 @@
|
|
|
6817
6822
|
* @public
|
|
6818
6823
|
*/
|
|
6819
6824
|
function useViewportScroll() {
|
|
6820
|
-
|
|
6825
|
+
useIsomorphicLayoutEffect(function () {
|
|
6821
6826
|
!hasListeners && addEventListeners();
|
|
6822
6827
|
}, []);
|
|
6823
6828
|
return viewportScrollValues;
|
package/dist/framer-motion.es.js
CHANGED
|
@@ -2366,9 +2366,11 @@ function usePanGesture(_a, ref) {
|
|
|
2366
2366
|
onPanEnd && onPanEnd(event, info);
|
|
2367
2367
|
},
|
|
2368
2368
|
};
|
|
2369
|
-
|
|
2370
|
-
panSession.current
|
|
2371
|
-
|
|
2369
|
+
useEffect(function () {
|
|
2370
|
+
if (panSession.current !== null) {
|
|
2371
|
+
panSession.current.updateHandlers(handlers);
|
|
2372
|
+
}
|
|
2373
|
+
});
|
|
2372
2374
|
function onPointerDown(event) {
|
|
2373
2375
|
panSession.current = new PanSession(event, handlers, {
|
|
2374
2376
|
transformPagePoint: transformPagePoint,
|
|
@@ -4439,6 +4441,9 @@ function createScrollUpdater(values, getOffsets) {
|
|
|
4439
4441
|
return update;
|
|
4440
4442
|
}
|
|
4441
4443
|
|
|
4444
|
+
var isBrowser$2 = typeof window !== "undefined";
|
|
4445
|
+
var useIsomorphicLayoutEffect = isBrowser$2 ? useLayoutEffect : useEffect;
|
|
4446
|
+
|
|
4442
4447
|
var getElementScrollOffsets = function (element) { return function () {
|
|
4443
4448
|
return {
|
|
4444
4449
|
xOffset: element.scrollLeft,
|
|
@@ -4496,7 +4501,7 @@ var getElementScrollOffsets = function (element) { return function () {
|
|
|
4496
4501
|
*/
|
|
4497
4502
|
function useElementScroll(ref) {
|
|
4498
4503
|
var values = useConstant(createScrollMotionValues);
|
|
4499
|
-
|
|
4504
|
+
useIsomorphicLayoutEffect(function () {
|
|
4500
4505
|
var element = ref.current;
|
|
4501
4506
|
invariant(!!element, "ref provided to useScroll must be passed into a HTML element.");
|
|
4502
4507
|
if (!element)
|
|
@@ -4566,7 +4571,7 @@ function addEventListeners() {
|
|
|
4566
4571
|
* @public
|
|
4567
4572
|
*/
|
|
4568
4573
|
function useViewportScroll() {
|
|
4569
|
-
|
|
4574
|
+
useIsomorphicLayoutEffect(function () {
|
|
4570
4575
|
!hasListeners && addEventListeners();
|
|
4571
4576
|
}, []);
|
|
4572
4577
|
return viewportScrollValues;
|
package/dist/framer-motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t=t||self).Motion={},t.React)}(this,function(r,C){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};var P=function(){return(P=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function b(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function S(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var t,n,w=function(){},o=0,i="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var n=Date.now(),e=Math.max(0,16.7-(n-o));o=n+e,setTimeout(function(){return t(o)},e)};(n=t=t||{}).Read="read",n.Update="update",n.Render="render",n.PostRender="postRender",n.FixedUpdate="fixedUpdate";function d(t){return m=t}function a(t){return T[t].process(y)}function O(){return y}function u(n,e){return function(t){return Math.max(Math.min(t,e),n)}}function l(t){return t%1?Number(t.toFixed(5)):t}function s(n){return{test:function(t){return"string"==typeof t&&t.endsWith(n)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+n}}}function c(t){return void 0!==t.red}function f(t){return void 0!==t.hue}function p(i){return function(t){if("string"!=typeof t)return t;for(var n,e={},r=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")).split(/,\s*/),o=0;o<4;o++)e[i[o]]=void 0!==r[o]?parseFloat(r[o]):1;return e}}var h=1/60*1e3,v=!0,m=!1,g=!1,y={delta:0,timestamp:0},x=[t.Read,t.Update,t.Render,t.PostRender],E=x.reduce(function(t,n){var r,i,a,u,s,o,c,f,l,p=(r=d,i=[],s=!(a=[]),o=u=0,c=new WeakSet,f=new WeakSet,l={cancel:function(t){var n=a.indexOf(t);c.add(t),-1!==n&&a.splice(n,1)},process:function(t){var n,e;if(s=!0,i=(n=[a,i])[0],(a=n[1]).length=0,u=i.length)for(o=0;o<u;o++)(e=i[o])(t),!0!==f.has(e)||c.has(e)||(l.schedule(e),r(!0));s=!1},schedule:function(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1),w("function"==typeof t,"Argument must be a function");var r=e&&s,o=r?i:a;c.delete(t),n&&f.add(t),-1===o.indexOf(t)&&(o.push(t),r&&(u=i.length))}});return t.sync[n]=function(t,n,e){return void 0===n&&(n=!1),void 0===e&&(e=!1),m||A(),p.schedule(t,n,e),t},t.cancelSync[n]=function(t){return p.cancel(t)},t.steps[n]=p,t},{steps:{},sync:{},cancelSync:{}}),T=E.steps,X=E.sync,Y=E.cancelSync,M=function(t){m=!1,y.delta=v?h:Math.max(Math.min(t-y.timestamp,40),1),v||(h=y.delta),y.timestamp=t,g=!0,x.forEach(a),g=!1,m&&(v=!1,i(M))},A=function(){v=m=!0,g||i(M)},R=function(){return(R=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},k=/(-)?(\d[\d\.]*)/g,V=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,D=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,L={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},B=R({},L,{transform:u(0,1)}),F=(R({},L,{default:1}),s("deg")),I=s("%"),j=s("px"),H=s("vh"),z=s("vw"),N=(R({},I,{parse:function(t){return I.parse(t)/100},transform:function(t){return I.transform(100*t)}}),u(0,255)),U=R({},L,{transform:function(t){return Math.round(N(t))}});function W(t,n){return t.startsWith(n)&&D.test(t)}function G(t){return"number"==typeof t?0:t}function _(n){return function(t){return 1-n(1-t)}}function q(n){return function(t){return t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2}}function Z(n){return function(t){return Math.pow(t,n)}}function $(n){return function(t){return t*t*((n+1)*t-n)}}function K(t){var n=$(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}}function J(t){return t}function Q(t){return 1-Math.sin(Math.acos(t))}function tt(t){var n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72}function nt(t,n){return 1-3*n+3*t}function et(t,n){return 3*n-6*t}function rt(t){return 3*t}function ot(t,n,e){return 3*nt(n,e)*t*t+2*et(n,e)*t+rt(n)}function it(t,n,e){return((nt(n,e)*t+et(n,e))*t+rt(n))*t}var at={test:function(t){return"string"==typeof t?W(t,"rgb"):c(t)},parse:p(["red","green","blue","alpha"]),transform:function(t){var n,e,r,o,i,a=t.red,u=t.green,s=t.blue,c=t.alpha,f=void 0===c?1:c;return n={red:U.transform(a),green:U.transform(u),blue:U.transform(s),alpha:l(B.transform(f))},e=n.red,r=n.green,o=n.blue,i=n.alpha,"rgba("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},ut={test:function(t){return"string"==typeof t?W(t,"hsl"):f(t)},parse:p(["hue","saturation","lightness","alpha"]),transform:function(t){var n,e,r,o,i,a=t.hue,u=t.saturation,s=t.lightness,c=t.alpha,f=void 0===c?1:c;return n={hue:Math.round(a),saturation:I.transform(l(u)),lightness:I.transform(l(s)),alpha:l(B.transform(f))},e=n.hue,r=n.saturation,o=n.lightness,i=n.alpha,"hsla("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},st=R({},at,{test:function(t){return"string"==typeof t&&W(t,"#")},parse:function(t){var n="",e="",r="";return 4<t.length?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),ct={test:function(t){return"string"==typeof t&&D.test(t)||c(t)||f(t)},parse:function(t){return at.test(t)?at.parse(t):ut.test(t)?ut.parse(t):st.test(t)?st.parse(t):t},transform:function(t){return c(t)?at.transform(t):f(t)?ut.transform(t):t}},ft="${c}",lt={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(k),r=t.match(V);return e&&(n+=e.length),r&&(n+=r.length),0<n},parse:function(t){var n=t,e=[],r=n.match(V);r&&(n=n.replace(V,ft),e.push.apply(e,r.map(ct.parse)));var o=n.match(k);return o&&e.push.apply(e,o.map(L.parse)),e},createTransformer:function(t){var r=t,o=0,n=t.match(V),i=n?n.length:0;if(n)for(var e=0;e<i;e++)r=r.replace(n[e],ft),o++;var a=r.match(k),u=a?a.length:0;if(a)for(e=0;e<u;e++)r=r.replace(a[e],"${n}"),o++;return function(t){for(var n=r,e=0;e<o;e++)n=n.replace(e<i?ft:"${n}",e<i?ct.transform(t[e]):l(t[e]));return n}},getAnimatableNone:function(t){var n=lt.parse(t);return lt.createTransformer(t)(n.map(G))}},pt=_,dt=q,ht=Z(2),vt=_(ht),mt=q(ht),gt=_(Q),yt=q(gt),bt=$(1.525),wt=_(bt),xt=q(bt),Et=K(1.525),Ct="undefined"!=typeof Float32Array;function Pt(a,n,u,e){function r(t){for(var n,e,r,o=0,i=1;10!==i&&s[i]<=t;++i)o+=.1;return n=(t-s[--i])/(s[i+1]-s[i]),.001<=(r=ot(e=o+.1*n,a,u))?function(t,n){for(var e=0,r=0;e<8;++e){if(0===(r=ot(n,a,u)))return n;n-=(it(n,a,u)-t)/r}return n}(t,e):0===r?e:function(t,n,e){for(var r,o,i=0;0<(r=it(o=n+(e-n)/2,a,u)-t)?e=o:n=o,1e-7<Math.abs(r)&&++i<10;);return o}(t,o,o+.1)}var s=Ct?new Float32Array(11):new Array(11);!function(){for(var t=0;t<11;++t)s[t]=it(.1*t,a,u)}();return function(t){return a===n&&u===e?t:0===t?0:1===t?1:it(r(t),n,e)}}function St(t){return"number"==typeof t}function Ot(r){return function(n,e,t){return void 0!==t?r(n,e,t):function(t){return r(n,e,t)}}}function Tt(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")}function Mt(t){return Tt(t)&&t.hasOwnProperty("z")}function At(t,n){return Math.abs(t-n)}function Rt(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))}function kt(n){return jt.find(function(t){return t.test(n)})}function Vt(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."}function Dt(n,e){return function(t){return e(n(t))}}var Lt=Object.freeze({reversed:_,mirrored:q,createReversedEasing:pt,createMirroredEasing:dt,createExpoIn:Z,createBackIn:$,createAnticipateEasing:K,linear:J,easeIn:ht,easeOut:vt,easeInOut:mt,circIn:Q,circOut:gt,circInOut:yt,backIn:bt,backOut:wt,backInOut:xt,anticipate:Et,bounceOut:tt,bounceIn:function(t){return 1-tt(1-t)},bounceInOut:function(t){return t<.5?.5*(1-tt(1-2*t)):.5*tt(2*t-1)+.5},cubicBezier:Pt}),Bt={x:0,y:0,z:0},Xt=Ot(function(t,n,e){return Math.min(Math.max(e,t),n)}),Yt=function(t,n,e){var r=n-t;return 0==r?1:(e-t)/r},Ft=function(t,n,e){return-e*t+e*n+t},It=function(){return(It=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},jt=[st,at,ut],Ht=function(t,n){var e=kt(t),r=kt(n);w(!!e,Vt(t)),w(!!r,Vt(n)),w(e.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var o=e.parse(t),i=r.parse(n),a=It({},o),u=e===ut?Ft:Rt;return function(t){for(var n in a)"alpha"!==n&&(a[n]=u(o[n],i[n],t));return a.alpha=Ft(o.alpha,i.alpha,t),e.transform(a)}},zt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(Dt)};function Nt(n,e){return St(n)?function(t){return Ft(n,e,t)}:ct.test(n)?Ht(n,e):_t(n,e)}var Ut=function(t,e){var r=t.slice(),o=r.length,i=t.map(function(t,n){return Nt(t,e[n])});return function(t){for(var n=0;n<o;n++)r[n]=i[n](t);return r}},Wt=function(t,n){var e=It({},t,n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=Nt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function Gt(t){for(var n=lt.parse(t),e=n.length,r=0,o=0,i=0,a=0;a<e;a++)r||"number"==typeof n[a]?r++:void 0!==n[a].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}var _t=function(t,n){var e=lt.createTransformer(n),r=Gt(t),o=Gt(n);return w(r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers,"Complex values '"+t+"' and '"+n+"' too different to mix. Ensure all colors are of the same type."),zt(Ut(r.parsed,o.parsed),e)},qt=function(n,e){return function(t){return Ft(n,e,t)}};function Zt(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?qt:"string"==typeof r?ct.test(r)?Ht:_t:Array.isArray(r)?Ut:"object"==typeof r?Wt:void 0),a=t.length-1,u=0;u<a;u++){var s=i(t[u],t[u+1]);if(n){var c=Array.isArray(n)?n[u]:n;s=zt(c,s)}o.push(s)}return o}function $t(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,u=r.mixer,s=t.length;w(s===n.length,"Both input and output ranges must be the same length"),w(!a||!Array.isArray(a)||a.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c,f,l,p,d,h,v,m,g,y=Zt(n,a,u),b=2===s?(h=y,v=(d=t)[0],m=d[1],g=h[0],function(t){return g(Yt(v,m,t))}):(f=y,l=(c=t).length,p=l-1,function(t){var n=0,e=!1;if(t<=c[0]?e=!0:t>=c[p]&&(n=p-1,e=!0),!e){for(var r=1;r<l&&!(c[r]>t||r===p);r++);n=r-1}var o=Yt(c[n],c[n+1],t);return f[n](o)});return i?zt(Xt(t[0],t[s-1]),b):b}function Kt(t,n){return n?t*(1e3/n):0}var Jt=Ot(function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t}),Qt=(Xt(0,1),tn.prototype.addChild=function(t){void 0===t&&(t={});var n=new tn(this.current,P({parent:this},t));return this.children||(this.children=new Set),this.children.add(n),n},tn.prototype.removeChild=function(t){this.children&&this.children.delete(t)},tn.prototype.subscribeTo=function(t,n){function e(){return n(r.current)}var r=this;return t.add(e),function(){return t.delete(e)}},tn.prototype.onChange=function(t){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,t)},tn.prototype.onRenderRequest=function(t){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(t),this.subscribeTo(this.renderSubscribers,t)},tn.prototype.attach=function(t){this.passiveEffect=t},tn.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},tn.prototype.get=function(){return this.current},tn.prototype.getVelocity=function(){return this.canTrackVelocity?Kt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},tn.prototype.start=function(n){var e=this;return this.stop(),new Promise(function(t){e.stopAnimation=n(t)}).then(function(){return e.clearAnimation()})},tn.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},tn.prototype.isAnimating=function(){return!!this.stopAnimation},tn.prototype.clearAnimation=function(){this.stopAnimation=null},tn.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},tn);function tn(t,n){var e,i=this,r=void 0===n?{}:n,o=r.transformer,a=r.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),i.prev=i.current,i.current=i.transformer?i.transformer(t):t,i.updateSubscribers&&i.prev!==i.current&&i.updateSubscribers.forEach(i.notifySubscriber),i.children&&i.children.forEach(i.setChild),n&&i.renderSubscribers&&i.renderSubscribers.forEach(i.notifySubscriber);var e=O(),r=e.delta,o=e.timestamp;i.lastUpdated!==o&&(i.timeDelta=r,i.lastUpdated=o,X.postRender(i.scheduleVelocityCheck))},this.notifySubscriber=function(t){t(i.current)},this.scheduleVelocityCheck=function(){return X.postRender(i.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==i.lastUpdated&&(i.prev=i.current)},this.setChild=function(t){return t.set(i.current)},this.parent=a,this.transformer=o,this.set(t,!1),this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}function nn(t,n){return new Qt(t,n)}function en(n,e){return function(t){return Math.max(Math.min(t,e),n)}}function rn(t){return t%1?Number(t.toFixed(5)):t}function on(n){return{test:function(t){return"string"==typeof t&&t.endsWith(n)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+n}}}function an(t){return void 0!==t.red}function un(t){return void 0!==t.hue}function sn(i){return function(t){if("string"!=typeof t)return t;for(var n,e={},r=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")).split(/,\s*/),o=0;o<4;o++)e[i[o]]=void 0!==r[o]?parseFloat(r[o]):1;return e}}var cn=function(){return(cn=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},fn=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,ln={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},pn=cn(cn({},ln),{transform:en(0,1)}),dn=cn(cn({},ln),{default:1}),hn=on("deg"),vn=on("%"),mn=on("px"),gn=cn(cn({},vn),{parse:function(t){return vn.parse(t)/100},transform:function(t){return vn.transform(100*t)}}),yn=en(0,255),bn=cn(cn({},ln),{transform:function(t){return Math.round(yn(t))}});function wn(t,n){return t.startsWith(n)&&fn.test(t)}function xn(t){var e=t.onRead,n=t.onRender,r=t.uncachedValues,c=void 0===r?new Set:r,o=t.useCache,f=void 0===o||o;return function(t){void 0===t&&(t={});var r=b(t,[]),o={},i=[],a=!1;function u(t,n){t.startsWith("--")&&(r.hasCSSVariable=!0);var e=o[t];o[t]=n,o[t]!==e&&(-1===i.indexOf(t)&&i.push(t),a||(a=!0,X.render(s.render)))}var s={get:function(t,n){return void 0===n&&(n=!1),!n&&f&&!c.has(t)&&void 0!==o[t]?o[t]:e(t,r)},set:function(t,n){if("string"==typeof t)u(t,n);else for(var e in t)u(e,t[e]);return this},render:function(t){return void 0===t&&(t=!1),!a&&!0!==t||(n(o,r,i),a=!1,i.length=0),this}};return s}}function En(t,n){return kn.set(t,An(n))}var Cn,Pn={test:function(t){return"string"==typeof t?wn(t,"rgb"):an(t)},parse:sn(["red","green","blue","alpha"]),transform:function(t){var n,e,r,o,i,a=t.red,u=t.green,s=t.blue,c=t.alpha,f=void 0===c?1:c;return n={red:bn.transform(a),green:bn.transform(u),blue:bn.transform(s),alpha:rn(pn.transform(f))},e=n.red,r=n.green,o=n.blue,i=n.alpha,"rgba("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},Sn={test:function(t){return"string"==typeof t?wn(t,"hsl"):un(t)},parse:sn(["hue","saturation","lightness","alpha"]),transform:function(t){var n,e,r,o,i,a=t.hue,u=t.saturation,s=t.lightness,c=t.alpha,f=void 0===c?1:c;return n={hue:Math.round(a),saturation:vn.transform(rn(u)),lightness:vn.transform(rn(s)),alpha:rn(pn.transform(f))},e=n.hue,r=n.saturation,o=n.lightness,i=n.alpha,"hsla("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},On=cn(cn({},Pn),{test:function(t){return"string"==typeof t&&wn(t,"#")},parse:function(t){var n="",e="",r="";return 4<t.length?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),Tn={test:function(t){return"string"==typeof t&&fn.test(t)||an(t)||un(t)},parse:function(t){return Pn.test(t)?Pn.parse(t):Sn.test(t)?Sn.parse(t):On.test(t)?On.parse(t):t},transform:function(t){return an(t)?Pn.transform(t):un(t)?Sn.transform(t):t}},Mn=/([a-z])([A-Z])/g,An=function(t){return t.replace(Mn,"$1-$2").toLowerCase()},Rn=new Map,kn=new Map,Vn=["Webkit","Moz","O","ms",""],Dn=Vn.length,Ln="undefined"!=typeof document,Bn=function(t,n){void 0===n&&(n=!1);var e,r=n?kn:Rn;return r.has(t)||(Ln?function(t){Cn=Cn||document.createElement("div");for(var n=0;n<Dn;n++){var e=Vn[n],r=""===e,o=r?t:e+t.charAt(0).toUpperCase()+t.slice(1);if(o in Cn.style||r){if(r&&"clipPath"===t&&kn.has(t))return;Rn.set(t,o),En(t,(r?"":"-")+An(o))}}}(t):En(e=t,e)),r.get(t)||t},Xn=["","X","Y","Z"],Yn=["translate","scale","rotate","skew","transformPerspective"].reduce(function(t,e){return Xn.reduce(function(t,n){return t.push(e+n),t},t)},["x","y","z"]),Fn=Yn.reduce(function(t,n){return t[n]=!0,t},{});function In(t){return!0===Fn[t]}function jn(t,n){return Yn.indexOf(t)-Yn.indexOf(n)}var Hn=new Set(["originX","originY","originZ"]);var zn=P(P({},ln),{transform:Math.round}),Nn={color:Tn,backgroundColor:Tn,outlineColor:Tn,fill:Tn,stroke:Tn,borderColor:Tn,borderTopColor:Tn,borderRightColor:Tn,borderBottomColor:Tn,borderLeftColor:Tn,borderWidth:mn,borderTopWidth:mn,borderRightWidth:mn,borderBottomWidth:mn,borderLeftWidth:mn,borderRadius:mn,radius:mn,borderTopLeftRadius:mn,borderTopRightRadius:mn,borderBottomRightRadius:mn,borderBottomLeftRadius:mn,width:mn,maxWidth:mn,height:mn,maxHeight:mn,size:mn,top:mn,right:mn,bottom:mn,left:mn,padding:mn,paddingTop:mn,paddingRight:mn,paddingBottom:mn,paddingLeft:mn,margin:mn,marginTop:mn,marginRight:mn,marginBottom:mn,marginLeft:mn,rotate:hn,rotateX:hn,rotateY:hn,rotateZ:hn,scale:dn,scaleX:dn,scaleY:dn,scaleZ:dn,skew:hn,skewX:hn,skewY:hn,distance:mn,translateX:mn,translateY:mn,translateZ:mn,x:mn,y:mn,z:mn,perspective:mn,opacity:pn,originX:gn,originY:gn,originZ:mn,zIndex:zn,fillOpacity:pn,strokeOpacity:pn,numOctaves:zn},Un=function(t){return Nn[t]},Wn=function(t,n){return n&&"number"==typeof t?n.transform(t):t},Gn="scrollLeft",_n="scrollTop",qn=new Set([Gn,_n]),Zn=new Set([Gn,_n,"transform"]),$n={x:"translateX",y:"translateY",z:"translateZ"};function Kn(t){return"function"==typeof t}function Jn(t,n,e,r,o,i,a){void 0===n&&(n=!0),void 0===e&&(e={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=[]),void 0===a&&(a=!1);var u,s=!0,c=!1,f=!1;for(var l in t){var p=t[l],d=Un(l),h=Wn(p,d);In(l)?(c=!0,r[l]=h,i.push(l),s&&(d.default&&p!==d.default||!d.default&&0!==p)&&(s=!1)):(u=l,Hn.has(u)?(o[l]=h,f=!0):Zn.has(l)&&Kn(h)||(e[Bn(l,a)]=h))}return!c&&"function"!=typeof t.transform||(e.transform=function(t,n,e,r,o){var i="",a=!1;e.sort(jn);for(var u=e.length,s=0;s<u;s++){var c=e[s];i+=($n[c]||c)+"("+n[c]+") ",a="z"===c||a}return!a&&o?i+="translateZ(0)":i=i.trim(),Kn(t.transform)?i=t.transform(n,r?"":i):r&&(i="none"),i}(t,r,i,s,n)),f&&(e.transformOrigin=(o.originX||"50%")+" "+(o.originY||"50%")+" "+(o.originZ||0)),e}function Qn(n,e){void 0===n&&(n=!0),void 0===e&&(e=!0);var r={},o={},i={},a=[];return function(t){return a.length=0,Jn(t,n,r,o,i,a,e),r}}var te=xn({onRead:function(t,n){var e=n.element,r=n.preparseOutput,o=Un(t);if(In(t))return o&&o.default||0;if(qn.has(t))return e[t];var i=window.getComputedStyle(e,null).getPropertyValue(Bn(t,!0))||0;return r&&o&&o.test(i)&&o.parse?o.parse(i):i},onRender:function(t,n,e){var r=n.element,o=n.buildStyles,i=n.hasCSSVariable;if(Object.assign(r.style,o(t)),i)for(var a=e.length,u=0;u<a;u++){var s=e[u];s.startsWith("--")&&r.style.setProperty(s,t[s])}-1!==e.indexOf(Gn)&&(r[Gn]=t[Gn]),-1!==e.indexOf(_n)&&(r[_n]=t[_n])},uncachedValues:qn});var ne=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),ee=.5,re=function(){return{style:{}}},oe=function(t,n){return mn.transform(t*n)},ie={x:0,y:0,width:0,height:0};function ae(t,n,e){return"string"==typeof t?t:mn.transform(n+e*t)}function ue(t,n,e,r,o,i){void 0===n&&(n=ie),void 0===r&&(r=Qn(!1,!1)),void 0===o&&(o=re()),void 0===i&&(i=!0);var a,u,s=t.attrX,c=t.attrY,f=t.originX,l=t.originY,p=t.pathLength,d=t.pathSpacing,h=void 0===d?1:d,v=t.pathOffset,m=void 0===v?0:v,g=r(b(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var y in g){if("transform"===y)o.style.transform=g[y];else o[i&&!ne.has(y)?An(y):y]=g[y]}return void 0===f&&void 0===l&&!g.transform||(o.style.transformOrigin=(u=void 0!==l?l:ee,ae(void 0!==f?f:ee,(a=n).x,a.width)+" "+ae(u,a.y,a.height))),void 0!==s&&(o.x=s),void 0!==c&&(o.y=c),void 0!==e&&void 0!==p&&(o[i?"stroke-dashoffset":"strokeDashoffset"]=oe(-m,e),o[i?"stroke-dasharray":"strokeDasharray"]=oe(p,e)+" "+oe(h,e)),o}function se(t){var n=function(t){try{return"function"==typeof(n=t).getBBox?n.getBBox():n.getBoundingClientRect()}catch(t){return{x:0,y:0,width:0,height:0}}var n}(t),e="path"===t.tagName&&t.getTotalLength?t.getTotalLength():void 0;return fe({element:t,buildAttrs:function(n,e,r){void 0===r&&(r=!0);var o=re(),i=Qn(!1,!1);return function(t){return ue(t,n,e,i,o,r)}}(n,e)})}function ce(t,n){var e,r,o;return t===window?e=le(t):(o=t)instanceof HTMLElement||"function"==typeof o.click?e=function(t,n){void 0===n&&(n={});var e=n.enableHardwareAcceleration,r=b(n,["enableHardwareAcceleration"]);return te(P({element:t,buildStyles:Qn(e),preparseOutput:!0},r))}(t,n):((r=t)instanceof SVGElement||"ownerSVGElement"in r)&&(e=se(t)),w(void 0!==e,"No valid node provided. Node must be HTMLElement, SVGElement or window."),pe.set(t,e),e}var fe=xn({onRead:function(t,n){var e=n.element;if(In(t=ne.has(t)?t:An(t))){var r=Un(t);return r&&r.default||0}return e.getAttribute(t)},onRender:function(t,n){var e=n.element,r=(0,n.buildAttrs)(t);for(var o in r)"style"===o?Object.assign(e.style,r.style):e.setAttribute(o,r[o])}}),le=xn({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var n=t.scrollTop,e=void 0===n?0:n,r=t.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,e)}}),pe=new WeakMap,de=function(t,n){return pe.has(t)?pe.get(t):ce(t,n)};function he(t,n){var e="string"==typeof t?document.querySelector(t):t;return de(e,n)}function ve(t){var n=C.useRef(null);return null===n.current&&(n.current=t()),n.current}var me=function(t){return t instanceof Qt},ge=xn({onRead:function(){return null},onRender:function(t,n){return(0,n.onUpdate)(t)}}),ye=(be.prototype.has=function(t){return this.values.has(t)},be.prototype.set=function(t,n){this.values.set(t,n),this.hasMounted&&this.bindValueToOutput(t,n)},be.prototype.get=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new Qt(n),this.set(t,e)),e},be.prototype.forEach=function(t){return this.values.forEach(t)},be.prototype.bindValueToOutput=function(n,t){var e=this,r=t.onRenderRequest(function(t){return e.output&&e.output(n,t)}),o=t.onChange(function(t){e.onUpdate&&e.onUpdate.set(n,t)});this.unsubscribers.has(n)&&this.unsubscribers.get(n)(),this.unsubscribers.set(n,function(){r(),o()})},be.prototype.setOnUpdate=function(t){this.onUpdate=void 0,t&&(this.onUpdate=ge({onUpdate:t}))},be.prototype.setTransformTemplate=function(t){this.transformTemplate!==t&&(this.transformTemplate=t,this.updateTransformTemplate())},be.prototype.getTransformTemplate=function(){return this.transformTemplate},be.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},be.prototype.mount=function(t){var e=this;this.hasMounted=!0,t&&(this.output=t),this.values.forEach(function(t,n){return e.bindValueToOutput(n,t)}),this.updateTransformTemplate()},be.prototype.unmount=function(){var r=this;this.values.forEach(function(t,n){var e=r.unsubscribers.get(n);e&&e()})},be);function be(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}function we(e){var t=ve(function(){var t=new ye;for(var n in e)me(e[n])&&!Ye.has(n)&&t.set(n,e[n]);return t});return t.setOnUpdate(e.onUpdate),t.setTransformTemplate(e.transformTemplate),t}function xe(t){return Array.isArray(t)}function Ee(t){return xe(t)?t[t.length-1]||0:t}function Ce(n){return function(t){return t.test(n)}}function Pe(t){return Ge.find(Ce(t))}function Se(t){return new Ze({init:t})}function Oe(e){function r(t,n){return void 0!==t&&!e[n](t)}var t=Object.keys(e);return{getVectorKeys:function(e){return t.reduce(function(t,n){return r(e[n],n)&&t.push(n),t},[])},testVectorProps:function(n){return n&&t.some(function(t){return r(n[t],t)})}}}function Te(n){return $e.find(function(t){return t.test(n)})}function Me(t,n){return t(n)}function Ae(t,n){var e=n.from,r=n.to,o=b(n,["from","to"]),i=Te(e)||Te(r),a=i.transform,u=i.parse;return t(P({},o,{from:"string"==typeof e?u(e):e,to:"string"==typeof r?u(r):r})).pipe(a)}function Re(i){return function(t,n){var e=n.from,r=n.to,o=b(n,["from","to"]);return t(P({},o,{from:0,to:1})).pipe(i(e,r))}}function ke(r,t){var n=Oe(t),o=n.testVectorProps,i=n.getVectorKeys;return function(t){if(!o(t))return r(t);var n=i(t),e=t[n[0]];return Qe(e)(r,t,n)}}function Ve(B){return void 0===B&&(B={}),Se(function(t){function r(t){var n;void 0===t&&(t=!1),V=rr({from:x=(n=[C,x])[0],to:C=n[1],ease:l,reverseEase:t}).start(a)}function o(){D=or(Yt(0,c,S)),V.seek(D)}function n(){L=!0,i=X.update(function(t){var n,e=t.delta;S+=e,o(),!(n=L&&c+b<S)||(!n||v||d||g)&&(S=S-c-b,v&&k<v?(k++,!0):d&&T<d?(T++,r(),!0):g&&A<g&&(r(++A%2!=0),!0))||(Y.update(i),u&&X.update(u,!1,!0))},!0)}function e(){L=!1,i&&Y.update(i)}var i,a=t.update,u=t.complete,s=B.duration,c=void 0===s?300:s,f=B.ease,l=void 0===f?vt:f,p=B.flip,d=void 0===p?0:p,h=B.loop,v=void 0===h?0:h,m=B.yoyo,g=void 0===m?0:m,y=B.repeatDelay,b=void 0===y?0:y,w=B.from,x=void 0===w?0:w,E=B.to,C=void 0===E?1:E,P=B.elapsed,S=void 0===P?0:P,O=B.flipCount,T=void 0===O?0:O,M=B.yoyoCount,A=void 0===M?0:M,R=B.loopCount,k=void 0===R?0:R,V=rr({from:x,to:C,ease:l}).start(a),D=0,L=!1;return n(),{isActive:function(){return L},getElapsed:function(){return Xt(0,c,S)},getProgress:function(){return D},stop:function(){e()},pause:function(){return e(),this},resume:function(){return L||n(),this},seek:function(t){return S=Ft(0,c,t),X.update(o,!1,!0),this},reverse:function(){return r(),this}}})}function De(r,o,i){return Se(function(t){var n=t.update,e=o.split(" ").map(function(t){return r.addEventListener(t,n,i),t});return{stop:function(){return e.forEach(function(t){return r.removeEventListener(t,n,i)})}}})}function Le(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}}function Be(t,n){return void 0===n&&(n=Le()),n.clientX=n.x=t.clientX,n.clientY=n.y=t.clientY,n.pageX=t.pageX,n.pageY=t.pageY,n}var Xe,Ye=new Set(["dragOriginX","dragOriginY"]),Fe=null,Ie=function(){return null!==Fe},je=function(){w(!Fe,"Sync render session already open"),Fe=[]},He=function(){w(null!==Fe,"No sync render session found"),Fe&&Fe.forEach(function(t){return t.render()}),Fe=null},ze=function(t){w(null!==Fe,"No sync render session found"),Fe&&Fe.push(t)},Ne=C.memo(function(t){var n=t.innerRef,r=t.values,o=t.isStatic;return C.useEffect(function(){w(n.current instanceof Element,"No `ref` found. Ensure components created with `motion.custom` forward refs using `React.forwardRef`");var e=he(n.current,{preparseOutput:!1,enableHardwareAcceleration:!o});return r.mount(function(t,n){e.set(t,n),Ie()&&ze(e)}),function(){return r.unmount()}},[]),null}),Ue=(Xe=function(t){return t.get()},function(t){var e={};return t.forEach(function(t,n){return e[n]=Xe(t)}),e}),We=new Set(["originX","originY","originZ"]),Ge=[L,j,I,F,z,H,{test:function(t){return"auto"===t},parse:function(t){return t}}],_e=S(Ge,[ct,lt]),qe=function(){return function(t,n){var e=this,r=t.middleware,o=t.onComplete;this.isActive=!0,this.update=function(t){e.observer.update&&e.updateObserver(t)},this.complete=function(){e.observer.complete&&e.isActive&&e.observer.complete(),e.onComplete&&e.onComplete(),e.isActive=!1},this.error=function(t){e.observer.error&&e.isActive&&e.observer.error(t),e.isActive=!1},this.observer=n,this.updateObserver=function(t){return n.update(t)},this.onComplete=o,n.update&&r&&r.length&&r.forEach(function(t){return e.updateObserver=t(e.updateObserver,e.complete)})}}(),Ze=function(){function n(t){void 0===t&&(t={}),this.props=t}return n.prototype.create=function(t){return new n(t)},n.prototype.start=function(t){void 0===t&&(t={});var n,e,r,o=!1,i={stop:function(){}},a=this.props,u=a.init,s=b(a,["init"]),c=u((n=t,e=function(){o=!0,i.stop()},r=s.middleware,new qe({middleware:r,onComplete:e},"function"==typeof n?{update:n}:n)));return i=c?P({},i,c):i,o&&i.stop(),i},n.prototype.applyMiddleware=function(t){return this.create(P({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},n.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=1===t.length?t[0]:zt.apply(void 0,t);return this.applyMiddleware(function(n){return function(t){return n(e(t))}})},n}(),$e=[j,I,F,H,z],Ke=Re(Ht),Je=Re(_t),Qe=function(t){return"number"==typeof t?Me:Boolean(Te(t))?Ae:ct.test(t)?Ke:lt.test(t)?Je:Me},tr=ke(function(b){return void 0===b&&(b={}),Se(function(t){var o=t.complete,i=t.update,n=b.velocity,e=void 0===n?0:n,r=b.from,a=void 0===r?0:r,u=b.power,s=void 0===u?.8:u,c=b.timeConstant,f=void 0===c?350:c,l=b.restDelta,p=void 0===l?.5:l,d=b.modifyTarget,h=0,v=s*e,m=Math.round(a+v),g=void 0===d?m:d(m),y=X.update(function(t){var n=t.delta;h+=n;var e=-v*Math.exp(-h/f),r=p<e||e<-p;i(r?g+e:g),r||(Y.update(y),o())},!0);return{stop:function(){return Y.update(y)}}})},{from:L.test,modifyTarget:function(t){return"function"==typeof t},velocity:L.test}),nr=ke(function(S){return void 0===S&&(S={}),Se(function(t){var s=t.update,c=t.complete,n=S.velocity,f=void 0===n?0:n,e=S.from,r=void 0===e?0:e,o=S.to,l=void 0===o?0:o,i=S.stiffness,p=void 0===i?100:i,a=S.damping,d=void 0===a?10:a,u=S.mass,h=void 0===u?1:u,v=S.restSpeed,m=void 0===v?.01:v,g=S.restDelta,y=void 0===g?.01:g,b=f?-f/1e3:0,w=0,x=l-r,E=r,C=E,P=X.update(function(t){var n=t.delta;w+=n;var e=d/(2*Math.sqrt(p*h)),r=Math.sqrt(p/h)/1e3;if(C=E,e<1){var o=Math.exp(-e*r*w),i=r*Math.sqrt(1-e*e);E=l-o*((b+e*r*x)/i*Math.sin(i*w)+x*Math.cos(i*w))}else{o=Math.exp(-r*w);E=l-o*(x+(b+r*x)*w)}f=Kt(E-C,n);var a=Math.abs(f)<=m,u=Math.abs(l-E)<=y;a&&u?(s(E=l),Y.update(P),c()):s(E)},!0);return{stop:function(){return Y.update(P)}}})},{from:L.test,to:L.test,stiffness:L.test,damping:L.test,mass:L.test,velocity:L.test}),er=ke(function(t){var n=t.from,h=void 0===n?0:n,e=t.velocity,v=void 0===e?0:e,m=t.min,g=t.max,r=t.power,y=void 0===r?.8:r,o=t.timeConstant,b=void 0===o?700:o,i=t.bounceStiffness,w=void 0===i?500:i,a=t.bounceDamping,x=void 0===a?10:a,u=t.restDelta,E=void 0===u?1:u,C=t.modifyTarget;return Se(function(t){function r(t){return void 0!==m&&t<=m}function o(t){return void 0!==g&&g<=t}function n(t){return r(t)||o(t)}function e(t){var n,e;u(t),c=f,v=Kt((f=t)-c,O().delta),a&&!l&&(e=v,r(n=t)&&e<0||o(n)&&0<e)&&p({from:t,velocity:v})}function i(t,n){a&&a.stop(),a=t.start({update:e,complete:function(){n?n():s()}})}var a,u=t.update,s=t.complete,c=h,f=h,l=!1,p=function(t){l=!0,i(nr(P({},t,{to:r(t.from)?m:g,stiffness:w,damping:x,restDelta:E})))};if(n(h))p({from:h,velocity:v});else if(0!==v){var d=tr({from:h,velocity:v,timeConstant:b,power:y,restDelta:n(h)?20:E,modifyTarget:C});i(d,function(){n(f)?p({from:f,velocity:v}):s()})}else s();return{stop:function(){return a&&a.stop()}}})},{from:L.test,velocity:L.test,min:L.test,max:L.test,damping:L.test,stiffness:L.test,modifyTarget:function(t){return"function"==typeof t}}),rr=ke(function(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.ease,a=void 0===i?J:i,u=t.reverseEase;return void 0!==u&&u&&(a=pt(a)),Se(function(t){var n=t.update;return{seek:function(t){return n(t)}}}).pipe(a,function(t){return Ft(e,o,t)})},{ease:function(t){return"function"==typeof t},from:L.test,to:L.test}),or=Xt(0,1),ir=Xt(0,1),ar=[Le()];if("undefined"!=typeof document){De(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){for(var n=t.touches,e=n.length,r=ar.length=0;r<e;r++){var o=n[r];ar.push(Be(o))}})}var ur=Le();if("undefined"!=typeof document){De(document,"mousedown mousemove",!0).start(function(t){Be(t,ur)})}function sr(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function cr(t){return{type:"spring",stiffness:700,damping:0===t?100:35}}function fr(){return{ease:"linear",duration:.3}}function lr(t){return{type:"keyframes",duration:.8,values:t}}function pr(t){var r=t.to,o=t.duration;return Se(function(t){var n=t.update,e=t.complete;n(r),o?gr(o).start({complete:e}):e()})}function dr(t){return Array.isArray(t)?(w(4===t.length,"Cubic bezier arrays must contain four numerical values."),Pt(t[0],t[1],t[2],t[3])):"string"==typeof t?(w(void 0!==Lt[t],"Invalid easing type '"+t+"'"),Lt[t]):t}function hr(t){return Array.isArray(t)&&"number"!=typeof t[0]}function vr(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!lt.test(n)||n.startsWith("url(")))}function mr(t,n,e){var r,o,i,a=e?e.delay:0;if(void 0===e||!function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection;var n=b(t,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(n).length}(e))return P({delay:a},(r=t,i=xe(o=n)?lr:yr[r]||yr.default,P({to:o},i(o))));var u=e[t]||e.default||e;return!1===u.type?{delay:u.hasOwnProperty("delay")?u.delay:a,to:xe(n)?n[n.length-1]:n,type:"just"}:xe(n)?P(P({values:n,duration:.8,delay:a,ease:"linear"},u),{type:"keyframes"}):P({type:"tween",to:n,delay:a},u)}var gr=function(r){return Se(function(t){var n=t.complete,e=setTimeout(n,r);return{stop:function(){return clearTimeout(e)}}})},yr={x:sr,y:sr,z:sr,rotate:sr,rotateX:sr,rotateY:sr,rotateZ:sr,scaleX:cr,scaleY:cr,scale:cr,opacity:fr,backgroundColor:fr,color:fr,default:cr},br=function(t){return 1e3*t},wr={tween:Ve,spring:nr,keyframes:function(t){var n,e,r,o,i=t.easings,a=t.ease,u=void 0===a?J:a,s=t.times,c=t.values,f=b(t,["easings","ease","times","values"]);i=Array.isArray(i)?i:(e=i,(n=c).map(function(){return e||vt}).splice(0,n.length-1)),s=s||(o=(r=c).length,r.map(function(t,n){return 0!==n?n/(o-1):0}));var l=i.map(function(t,n){return rr({from:c[n],to:c[n+1],ease:t})});return Ve(P({},f,{ease:u})).applyMiddleware(function(t){return n=l,e=t,o=(r=s).length,a=(i=o-1)-1,u=n.map(function(t){return t.start(e)}),function(t){t<=r[0]&&u[0].seek(0),t>=r[i]&&u[a].seek(1);for(var n=1;n<o&&!(r[n]>t||n===i);n++);var e=Yt(r[n-1],r[n],t);u[n-1].seek(ir(e))};var r,n,e,o,i,a,u})},inertia:er,just:pr},xr={tween:function(t){if(t.ease){var n=hr(t.ease)?t.ease[0]:t.ease;t.ease=dr(n)}return t},keyframes:function(t){var n=t.from,e=(t.to,t.velocity,b(t,["from","to","velocity"]));if(e.values&&null===e.values[0]){var r=S(e.values);r[0]=n,e.values=r}return e.ease&&(e.easings=hr(e.ease)?e.ease.map(dr):dr(e.ease)),e.ease=J,e}},Er=function(t,n,e,r){var o,i,a,u=n.get(),s=vr(t,u),c=vr(t,e),f=mr(t,e,r),l=f.type,p=void 0===l?"tween":l,d=b(f,["type"]),h=s&&c?wr[p]:pr,v=(o=p,i=P({from:u,velocity:n.getVelocity()},d),xr[o]?xr[o](i):i);return((a=v).hasOwnProperty("duration")||a.hasOwnProperty("repeatDelay"))&&(v.duration&&(v.duration=br(v.duration)),v.repeatDelay&&(v.repeatDelay=br(v.repeatDelay))),[h,v]};function Cr(s,c,f,t){var n=t.delay,l=void 0===n?0:n,p=b(t,["delay"]);return c.start(function(n){var e,t=Er(s,c,f,p),r=t[0],o=t[1],i=o.delay,a=b(o,["delay"]);void 0!==i&&(l=i);function u(){var t=r(a);e=t.start({update:function(t){return c.set(t)},complete:n})}return l?e=gr(br(l)).start({complete:u}):u(),function(){e&&e.stop()}})}var Pr=(Sr.prototype.setProps=function(t){this.props=t},Sr.prototype.setVariants=function(t){t&&(this.variants=t)},Sr.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},Sr.prototype.setValues=function(t,n){var r=this,e=void 0===n?{}:n,o=e.isActive,i=void 0===o?new Set:o,a=e.priority,u=this.resolveVariant(t),s=u.target,c=u.transitionEnd;return s=this.transformValues(P(P({},s),c)),Object.keys(s).forEach(function(t){if(!i.has(t)&&(i.add(t),s)){var n=Ee(s[t]);if(r.values.has(t)){var e=r.values.get(t);e&&e.set(n)}else r.values.set(t,nn(n));a||(r.baseTarget[t]=n)}})},Sr.prototype.transformValues=function(t){var n=this.props.transformValues;return n?n(t):t},Sr.prototype.checkForNewValues=function(t){var n,e=Object.keys(t).filter(this.hasValue),r=e.length;if(r)for(var o=0;o<r;o++){var i=e[o],a=t[i],u=null;Array.isArray(a)&&(u=a[0]),null===u&&(u=this.readValueFromSource(i),w(null!==u,'No initial value for "'+i+'" can be inferred. Ensure an initial value for "'+i+'" is defined on the component.')),"string"==typeof u&&/^\d*\.?\d+$/.test(u)?u=parseFloat(u):(n=u,!_e.find(Ce(n))&<.test(a)&&(u=lt.getAnimatableNone(a))),this.values.set(i,nn(u)),this.baseTarget[i]=u}},Sr.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var n,e,r,o;"function"==typeof t&&(t=t(this.props.custom,(r=this.values,o={},r.forEach(function(t,n){return o[n]=t.get()}),o),(n=this.values,e={},n.forEach(function(t,n){return e[n]=t.getVelocity()}),e)));var i=t.transition;return{transition:void 0===i?this.defaultTransition:i,transitionEnd:t.transitionEnd,target:b(t,["transition","transitionEnd"])}},Sr.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},Sr.prototype.setOverride=function(n,e){this.overrides[e]=n,this.children&&this.children.forEach(function(t){return t.setOverride(n,e)})},Sr.prototype.startOverride=function(t){var n=this.overrides[t];if(n)return this.start(n,{priority:t})},Sr.prototype.clearOverride=function(n){var t=this;if(this.children&&this.children.forEach(function(t){return t.clearOverride(n)}),this.overrides[n]){this.activeOverrides.delete(n);var e=this.getHighestPriority();this.resetIsAnimating(),!e||this.overrides[e]&&this.startOverride(e);var r=this.resolvedOverrides[n];if(r){var o={};for(var i in this.baseTarget)void 0!==r[i]&&(o[i]=this.baseTarget[i]);this.onStart(),this.animate(o).then(function(){return t.onComplete()})}}},Sr.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"==typeof t?this.applyVariantLabels([t]):void this.setValues(t)},Sr.prototype.applyVariantLabels=function(o){var i=this,a=new Set;S(o).reverse().forEach(function(t){var n=i.resolveVariant(i.variants[t]),e=n.target,r=n.transitionEnd;r&&i.setValues(r,{isActive:a}),e&&i.setValues(e,{isActive:a}),i.children&&i.children.size&&i.children.forEach(function(t){return t.applyVariantLabels(o)})})},Sr.prototype.start=function(t,n){var e,r,o=this;return void 0===n&&(n={}),n.priority&&this.activeOverrides.add(n.priority),this.resetIsAnimating(n.priority),r=t,e=Array.isArray(r)?this.animateVariantLabels(t,n):"string"==typeof t?this.animateVariant(t,n):this.animate(t,n),this.onStart(),e.then(function(){return o.onComplete()})},Sr.prototype.animate=function(t,n){var e=this,r=void 0===n?{}:n,o=r.delay,i=void 0===o?0:o,a=r.priority,u=void 0===a?0:a,s=r.transitionOverride,c=this.resolveVariant(t),f=c.target,l=c.transition,p=c.transitionEnd;if(s&&(l=s),!f)return Promise.resolve();if(f=this.transformValues(f),p=p&&this.transformValues(p),this.checkForNewValues(f),this.makeTargetAnimatable){var d=this.makeTargetAnimatable(f,p);f=d.target,p=d.transitionEnd}u&&(this.resolvedOverrides[u]=f),this.checkForNewValues(f);var h=[];for(var v in f){var m=this.values.get(v);if(m&&f&&void 0!==f[v]){var g=f[v];u||(this.baseTarget[v]=Ee(g)),this.isAnimating.has(v)||(this.isAnimating.add(v),h.push(Cr(v,m,g,P({delay:i},l))))}}var y=Promise.all(h);return p?y.then(function(){e.setValues(p,{priority:u})}):y},Sr.prototype.animateVariantLabels=function(t,n){var e=this,r=S(t).reverse().map(function(t){return e.animateVariant(t,n)});return Promise.all(r)},Sr.prototype.animateVariant=function(t,n){var e=this,r=!1,o=0,i=0,a=1,u=n&&n.priority||0,s=this.variants[t],c=s?function(){return e.animate(s,n)}:function(){return Promise.resolve()},f=this.children?function(){return e.animateChildren(t,o,i,a,u)}:function(){return Promise.resolve()};if(s&&this.children){var l=this.resolveVariant(s).transition;l&&(r=l.when||r,o=l.delayChildren||o,i=l.staggerChildren||i,a=l.staggerDirection||a)}if(r){var p="beforeChildren"===r?[c,f]:[f,c],d=p[1];return(0,p[0])().then(d)}return Promise.all([c(),f()])},Sr.prototype.animateChildren=function(r,o,n,t,i){if(void 0===o&&(o=0),void 0===n&&(n=0),void 0===t&&(t=1),void 0===i&&(i=0),!this.children)return Promise.resolve();var a=[],e=(this.children.size-1)*n,u=1===t?function(t){return t*n}:function(t){return e-t*n};return Array.from(this.children).forEach(function(t,n){var e=t.animateVariant(r,{priority:i,delay:o+u(n)});a.push(e)}),Promise.all(a)},Sr.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},Sr.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&t()},Sr.prototype.checkOverrideIsAnimating=function(t){for(var n=this.overrides.length,e=t+1;e<n;e++){var r=this.resolvedOverrides[e];if(r)for(var o in r)this.isAnimating.add(o)}},Sr.prototype.resetIsAnimating=function(n){void 0===n&&(n=0),this.isAnimating.clear(),n<this.getHighestPriority()&&this.checkOverrideIsAnimating(n),this.children&&this.children.forEach(function(t){return t.resetIsAnimating(n)})},Sr.prototype.stop=function(){this.values.forEach(function(t){return t.stop()})},Sr.prototype.addChild=function(e){this.children||(this.children=new Set),this.children.add(e),this.overrides.forEach(function(t,n){t&&e.setOverride(t,n)})},Sr.prototype.removeChild=function(t){this.children&&this.children.delete(t)},Sr.prototype.resetChildren=function(){this.children&&this.children.clear()},Sr);function Sr(t){var e=this,n=t.values,r=t.readValueFromSource,o=t.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!e.values.has(t)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=o,this.values.forEach(function(t,n){return e.baseTarget[n]=t.get()})}var Or=(Tr.prototype.setVariants=function(n){this.variants=n,this.componentControls.forEach(function(t){return t.setVariants(n)})},Tr.prototype.setDefaultTransition=function(n){this.defaultTransition=n,this.componentControls.forEach(function(t){return t.setDefaultTransition(n)})},Tr.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return n.componentControls.delete(t)}},Tr.prototype.start=function(e,r){var n=this;if(this.hasMounted){var o=[];return this.componentControls.forEach(function(t){var n=t.start(e,{transitionOverride:r});o.push(n)}),Promise.all(o)}return new Promise(function(t){n.pendingAnimations.push({animation:[e,r],resolve:t})})},Tr.prototype.set=function(n){return w(this.hasMounted,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),this.componentControls.forEach(function(t){return t.apply(n)})},Tr.prototype.stop=function(){this.componentControls.forEach(function(t){return t.stop()})},Tr.prototype.mount=function(){var r=this;this.hasMounted=!0,this.pendingAnimations.forEach(function(t){var n=t.animation,e=t.resolve;return r.start.apply(r,n).then(e)})},Tr.prototype.unmount=function(){this.hasMounted=!1,this.stop()},Tr);function Tr(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}function Mr(t){return"string"==typeof t||Array.isArray(t)}function Ar(t){return t instanceof Or}function Rr(n,e,t,r,o){void 0===r&&(r=!1);var i,a=o.initial,u=o.animate,s=o.variants,c=o.whileTap,f=o.whileHover,l=C.useContext(kr);void 0!==(null===l||void 0===l?void 0:l.initial)&&(a=l.initial),!1!==a||Ar(u)?"boolean"!=typeof a&&(i=a):i=u;var p=C.useRef(!1),d=s||Mr(u)||Mr(c)||Mr(f)||Ar(u),h=Mr(i)?i:n.initial,v=Mr(u)?u:n.animate,m=r?h:null,g=d&&Mr(v)?v:null,y=C.useMemo(function(){return{controls:d?e:n.controls,initial:h,animate:v,values:t,hasMounted:p,isReducedMotion:n.isReducedMotion}},[m,g,n.isReducedMotion]);return function(t,n){void 0===n&&(n=!1);var e=C.useRef(!0);(!n||n&&e.current)&&t(),e.current=!1}(function(){var t=i||n.initial;t&&e.apply(t)},!(y.static=r)),C.useEffect(function(){p.current=!0},[]),y}var kr=C.createContext(null),Vr=C.createContext({static:!1});function Dr(t,n,e){var r=n.variants,o=n.transition,i=C.useContext(Vr).controls,a=C.useContext(kr),u=ve(function(){return new Pr(t)});return a&&!a.isPresent||(u.resetChildren(),u.setProps(n),u.setVariants(r),u.setDefaultTransition(o)),C.useEffect(function(){e&&i&&i.addChild(u)}),C.useEffect(function(){return function(){n.onAnimationComplete;var t=b(n,["onAnimationComplete"]);u.setProps(t),i&&i.removeChild(u)}},[]),u}function Lr(t){var n=t.animate,e=t.variants,r=t.inherit;return(void 0===r||r)&&!!e&&(!n||n instanceof Or)}function Br(t){var n=t&&"function"!=typeof t?t:C.useRef(null);return t&&"function"==typeof t&&C.useEffect(function(){return t(n.current),function(){return t(null)}},[]),n}function Xr(t){var p=t.getValueControlsConfig,d=t.loadFunctionalityComponents,h=t.renderComponent;return C.forwardRef(function(t,n){var e=Br(n),r=C.useContext(Vr),o=r.static||t.static||!1,i=we(t),a=function(t,n,e,r){void 0===n&&(n={});var o,i={},a=C.useRef({}).current;for(var u in n){var s=n[u];if(me(s))t.set(u,s);else if(e||!In(u)&&(o=u,!We.has(o)))i[u]=s;else{if(t.has(u)){if(s!==a[u])t.get(u).set(s)}else t.set(u,nn(s));a[u]=s}}return r?r(i):i}(i,t.style,o,t.transformValues),u=Lr(t),s=Dr(ve(function(){return p(e,i)}),t,u),c=Rr(r,s,i,o,t),f=o?null:d(e,i,t,r,s,u),l=h(e,a,i,t,o);return C.createElement(C.Fragment,null,C.createElement(Vr.Provider,{value:c},l),C.createElement(C.Fragment,null,C.createElement(Ne,{innerRef:e,values:i,isStatic:o}),f))})}var Yr=["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Fr=C.createContext({transformPagePoint:function(t){return t}});function Ir(t){return C.useEffect(function(){return function(){return t()}},[])}function jr(t,n,e,r){if(e)return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function Hr(n,e,r,o){C.useEffect(function(){var t=n.current;if(r&&t)return jr(t,e,r,o)},[n,e,r,o])}function zr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Nr(t){return!!t.touches}var Ur={pageX:0,pageY:0};function Wr(t){return{point:Nr(t)?{x:(a=(i=t).touches[0]||i.changedTouches[0]||Ur).pageX,y:a.pageY}:(e=(n=t).pageX,r=void 0===e?0:e,o=n.pageY,{x:r,y:void 0===o?0:o})};var n,e,r,o,i,a}var Gr,_r=function(n,t){if(void 0===t&&(t=!1),n){var e=function(t){return n(t,Wr(t))};return t?function(e){if(e)return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}(e):e}},qr="undefined"!=typeof window,Zr=function(){return qr&&null===window.onpointerdown},$r=function(){return qr&&null===window.ontouchstart},Kr=function(){return qr&&null===window.onmousedown},Jr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Qr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function to(t){return Zr()?t:$r()?Qr[t]:Kr()?Jr[t]:t}function no(t,n,e,r){return jr(t,to(n),_r(e,"pointerdown"===n),r)}function eo(t,n,e,r){return Hr(t,to(n),_r(e,"pointerdown"===n),r)}(Gr=r.Point||(r.Point={})).subtract=function(t,n){return{x:t.x-n.x,y:t.y-n.y}};var ro=!(Gr.relativeTo=function(i){var a;return function(t){var n=t.x,e=t.y,r=void 0!==a?a:a="string"==typeof i?document.getElementById(i):i;if(r){var o=r.getBoundingClientRect();return{x:n-o.left-window.scrollX,y:e-o.top-window.scrollY}}}});"undefined"!=typeof window&&document.addEventListener("touchmove",function(t){ro&&t.preventDefault()},{passive:!1});function oo(){return ro=!1}var io=(ao.prototype.handlePointerMove=function(t,n){this.lastMoveEvent=t,this.lastMoveEventInfo=uo(n,this.transformPagePoint),zr(t)&&0===t.buttons?this.handlePointerUp(t,n):X.update(this.updatePoint,!0)},ao.prototype.handlePointerUp=function(t,n){this.end();var e=this.handlers.onEnd;if(e){var r=so(uo(n,this.transformPagePoint),this.history);e&&e(t,r)}},ao.prototype.updateHandlers=function(t){this.handlers=t},ao.prototype.end=function(){this.removeListeners&&this.removeListeners(),Y.update(this.updatePoint),oo()},ao);function ao(t,n,e){var s=this,r=(void 0===e?{}:e).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(s.lastMoveEvent&&s.lastMoveEventInfo){var t=so(s.lastMoveEventInfo,s.history),n=null!==s.startEvent,e=3<=function(t,n){if(void 0===n&&(n=Bt),St(t)&&St(n))return At(t,n);if(Tt(t)&&Tt(n)){var e=At(t.x,n.x),r=At(t.y,n.y),o=Mt(t)&&Mt(n)?At(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}return 0}(t.offset,{x:0,y:0});if(n||e){var r=t.point,o=O().timestamp;s.history.push(P(P({},r),{timestamp:o}));var i=s.handlers,a=i.onStart,u=i.onMove;n||(a&&a(s.lastMoveEvent,t),s.startEvent=s.lastMoveEvent),u&&u(s.lastMoveEvent,t)}}},!(Nr(t)&&1<t.touches.length)){this.handlers=n,this.transformPagePoint=r;var o=uo(Wr(t),this.transformPagePoint),i=o.point,a=O().timestamp;this.history=[P(P({},i),{timestamp:a})];var u=n.onSessionStart;u&&u(t,so(o,this.history));var c=no(window,"pointermove",function(t,n){return s.handlePointerMove(t,n)}),f=no(window,"pointerup",function(t,n){return s.handlePointerUp(t,n)});this.removeListeners=function(){c&&c(),f&&f()}}}function uo(t,n){return n?{point:n(t.point)}:t}function so(t,n){var e=t.point;return{point:e,delta:r.Point.subtract(e,co(n)),offset:r.Point.subtract(e,n[0]),velocity:function(t,n){if(t.length<2)return{x:0,y:0};var e=t.length-1,r=null,o=co(t);for(;0<=e&&(r=t[e],!(o.timestamp-r.timestamp>br(n)));)e--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0==i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};a.x===1/0&&(a.x=0);a.y===1/0&&(a.y=0);return a}(n,.1)}}function co(t){return t[t.length-1]}function fo(t,n){var e=t.onPan,r=t.onPanStart,o=t.onPanEnd,i=t.onPanSessionStart,a=e||r||o||i,u=C.useRef(null),s=C.useContext(Fr).transformPagePoint,c={onSessionStart:i,onStart:r,onMove:e,onEnd:function(t,n){u.current=null,o&&o(t,n)}};null!==u.current&&u.current.updateHandlers(c),eo(n,"pointerdown",a&&function(t){u.current=new io(t,c,{transformPagePoint:s})}),Ir(function(){return u.current&&u.current.end()})}function lo(t){return ho.indexOf(t)+1}var po=function(t,n){return!!n&&(t===n||po(t,n.parentElement))},ho=["whileHover","whileTap","whileDrag"];function vo(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var mo=vo("dragHorizontal"),go=vo("dragVertical");function yo(t){var n=!1;if("y"===t)n=go();else if("x"===t)n=mo();else{var e=mo(),r=go();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}var bo=lo("whileTap");function wo(t,o){var i=t.onTap,e=t.onTapStart,a=t.onTapCancel,u=t.whileTap,s=t.controls,n=i||e||a||u,c=C.useRef(!1),r=C.useRef(null);function f(){r.current&&r.current(),r.current=null}u&&s&&s.setOverride(u,bo);var l=C.useRef(null);l.current=function(t,n){var e=o.current;if(f(),c.current&&e){c.current=!1,s&&u&&s.clearOverride(bo);var r=yo(!0);r&&(r(),po(e,t.target)?i&&i(t,n):a&&a(t,n))}},eo(o,"pointerdown",n?function(t,n){f(),r.current=no(window,"pointerup",function(t,n){return l.current(t,n)}),o.current&&!c.current&&(c.current=!0,e&&e(t,n),s&&u&&s.startOverride(bo))}:void 0),Ir(f)}var xo=lo("whileHover"),Eo=function(e){return function(t,n){zr(t)&&e(t,n)}};function Co(t,n){var e,r,o,i,a,u;fo(t,n),wo(t,n),r=n,o=(e=t).whileHover,i=e.onHoverStart,a=e.onHoverEnd,u=e.controls,o&&u&&u.setOverride(o,xo),eo(r,"pointerenter",Eo(function(t,n){i&&i(t,n),o&&u&&u.startOverride(xo)})),eo(r,"pointerleave",Eo(function(t,n){a&&a(t,n),o&&u&&u.clearOverride(xo)}))}function Po(n){return function(t){return n(t),null}}function So(t){return"object"==typeof t&&t.hasOwnProperty("current")}function Oo(t){return t}var To=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Mo={key:"gestures",shouldRender:function(n){return To.some(function(t){return n.hasOwnProperty(t)})},Component:Po(function(t){var n=t.innerRef;Co(b(t,["innerRef"]),n)})},Ao=(Ro.prototype.start=function(t,n){var c=this,e=(void 0===n?{}:n).snapToCursor;void 0!==e&&e&&this.snapToCursor(t);var r=this.props.transformPagePoint;this.panSession=new io(t,{onSessionStart:function(){ro=!0,ko(function(t){var n=c.point[t];n&&n.stop()})},onStart:function(t,n){if(c.constraintsNeedResolution){var e=c.props,r=e.dragConstraints,o=e.transformPagePoint;c.constraints=Bo(r,c.ref,c.point,o),c.applyConstraintsToPoint()}ko(function(t){var n=c.point[t];n&&c.origin[t].set(n.get())});var i=c.props,a=i.drag,u=i.dragPropagation;if(!a||u||(c.openGlobalLock&&c.openGlobalLock(),c.openGlobalLock=yo(a),c.openGlobalLock)){c.isDragging=!0,c.currentDirection=null;var s=c.props.onDragStart;s&&s(t,Vo(n,c.point))}},onMove:function(t,n){var e=c.props,r=e.dragPropagation,o=e.dragDirectionLock;if(r||c.openGlobalLock){var i=n.offset;if(o&&null===c.currentDirection){if(c.currentDirection=function(t,n){void 0===n&&(n=10);var e=null;return Math.abs(t.y)>n?e="y":Math.abs(t.x)>n&&(e="x"),e}(i),null!==c.currentDirection){var a=c.props.onDirectionLock;a&&a(c.currentDirection)}}else{c.updatePoint("x",i),c.updatePoint("y",i);var u=c.props.onDrag;u&&u(t,Vo(n,c.point))}}},onEnd:function(t,n){c.stop(t,n)}},{transformPagePoint:r})},Ro.prototype.cancelDrag=function(){oo(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},Ro.prototype.stop=function(t,n){var e;null===(e=this.panSession)||void 0===e||e.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,u=o.onDragEnd;if(i||a){var s=n.velocity;this.animateDragEnd(s)}else this.recordBoxInfo(this.constraints);u&&u(t,Vo(n,this.point))}},Ro.prototype.recordBoxInfo=function(t){if(t){var n=t.right,e=t.left,r=t.bottom,o=t.top;this.prevConstraintsBox.width=(n||0)-(e||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},Ro.prototype.snapToCursor=function(t){var e=this,n=this.props.transformPagePoint,r=Wr(t).point,o=Xo(this.ref,n),i=o.width/2+o.left+window.scrollX,a=o.height/2+o.top+window.scrollY,u={x:r.x-i,y:r.y-a};ko(function(t){var n=e.point[t];n&&e.origin[t].set(n.get())}),this.updatePoint("x",u),this.updatePoint("y",u)},Ro.prototype.setPoint=function(t,n){this.point[t]=n},Ro.prototype.updatePoint=function(t,n){var e=this.props,r=e.drag,o=e.dragElastic,i=this.point[t];if(Lo(t,r,this.currentDirection)&&i){var a=Fo(t,this.origin[t].get()+n[t],this.constraints,o);i.set(a)}},Ro.prototype.updateProps=function(t){var e=this,n=t.drag,r=void 0!==n&&n,o=t.dragDirectionLock,i=void 0!==o&&o,a=t.dragPropagation,u=void 0!==a&&a,s=t.dragConstraints,c=void 0!==s&&s,f=t.dragElastic,l=void 0===f||f,p=t.dragMomentum,d=void 0===p||p,h=b(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=P({drag:r,dragDirectionLock:i,dragPropagation:u,dragConstraints:c,dragElastic:l,dragMomentum:d},h);var v=h._dragValueX,m=h._dragValueY,g=h.dragOriginX,y=h.dragOriginY;g&&(this.origin.x=g),y&&(this.origin.y=y),ko(function(t){if(Lo(t,r,e.currentDirection)){var n="x"===t?v:m;e.setPoint(t,n||e.values.get(t,0))}}),this.constraintsNeedResolution=So(c),this.constraints=this.constraintsNeedResolution?this.constraints||!1:c},Ro.prototype.applyConstraintsToPoint=function(e){var r=this;return void 0===e&&(e=this.constraints),ko(function(t){var n=r.point[t];n&&!n.isAnimating()&&Fo(t,n,e,0)})},Ro.prototype.animateDragEnd=function(s){var c=this,t=this.props,f=t.drag,l=t.dragMomentum,p=t.dragElastic,d=t.dragTransition,h=t._dragValueX,v=t._dragValueY,m=t._dragTransitionControls,n=ko(function(t){var n;if(Lo(t,f,c.currentDirection)){var e=c.constraints?Do(t,c.constraints):{},r=p?200:1e6,o=p?40:1e7,i=m||c.controls,a=P(P({type:"inertia",velocity:l?s[t]:0,bounceStiffness:r,bounceDamping:o,timeConstant:750,restDelta:1},d),e),u="x"===t?h:v;return u?Cr(t,u,0,a):i.start(((n={})[t]=0,n.transition=a,n))}});return Promise.all(n).then(function(){c.recordBoxInfo(c.constraints),c.scalePoint();var t=c.props.onDragTransitionEnd;t&&t()})},Ro.prototype.scalePoint=function(){var o=this,t=this.props,n=t.dragConstraints,e=t.transformPagePoint;if(So(n)){var i=Xo(n,e),a=Xo(this.ref,e),r=function(t,n){var e=o.point[t];if(e){if(e.isAnimating())return e.stop(),void o.recordBoxInfo();var r=o.prevConstraintsBox[n]?(i[n]-a[n])/o.prevConstraintsBox[n]:1;e.set(o.prevConstraintsBox[t]*r)}};r("x","width"),r("y","height")}},Ro.prototype.mount=function(t){var o=this,n=no(t,"pointerdown",function(t){var n=o.props,e=n.drag,r=n.dragListener;e&&(void 0===r||r)&&o.start(t)}),e=jr(window,"resize",function(){return o.scalePoint()});if(this.constraintsNeedResolution){var r=this.props,i=r.dragConstraints,a=r.transformPagePoint,u=Bo(i,this.ref,this.point,a);this.applyConstraintsToPoint(u),this.recordBoxInfo(u)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),e&&e(),o.cancelDrag()}},Ro);function Ro(t){var n=t.ref,e=t.values,r=t.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Oo},this.point={},this.origin={x:nn(0),y:nn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=n,this.values=e,this.controls=r}function ko(t){return[t("x"),t("y")]}function Vo(t,n){return P(P({},t),{point:{x:n.x?n.x.get():0,y:n.y?n.y.get():0}})}function Do(t,n){var e=n.top,r=n.right,o=n.bottom,i=n.left;return"x"===t?{min:i,max:r}:{min:e,max:o}}function Lo(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}function Bo(t,n,e,r){w(null!==t.current&&null!==n.current,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=Xo(t,r),i=Xo(n,r),a=o.left-i.left+Yo(e.x),u=o.top-i.top+Yo(e.y);return{top:u,left:a,right:o.width-i.width+a,bottom:o.height-i.height+u}}function Xo(t,n){var e=t.current.getBoundingClientRect(),r=n({x:e.left,y:e.top}),o=r.x,i=r.y,a=n({x:e.width,y:e.height});return{left:o,top:i,width:a.x,height:a.y}}function Yo(t){return t?t.get():0}function Fo(t,n,e,r){var o=n instanceof Qt?n.get():n;if(!e)return o;var i=Do(t,e),a=i.min,u=i.max;return void 0!==a&&o<a?o=r?Io(a,o,r):Math.max(a,o):void 0!==u&&u<o&&(o=r?Io(u,o,r):Math.min(u,o)),n instanceof Qt&&n.set(o),o}function Io(t,n,e){return Ft(t,n,"number"==typeof e?e:.35)}var jo={key:"drag",shouldRender:function(t){return!!t.drag},Component:Po(function(t){var n,e,r,o,i,a,u,s=t.innerRef,c=t.values,f=t.controls,l=b(t,["innerRef","values","controls"]);return e=s,r=c,o=f,i=(n=l).dragControls,a=C.useContext(Fr).transformPagePoint,(u=ve(function(){return new Ao({ref:e,values:r,controls:o})})).updateProps(P(P({},n),{transformPagePoint:a})),C.useEffect(function(){return i&&i.subscribe(u)},[u]),void C.useEffect(function(){return u.mount(e.current)},[])})};function Ho(t){return"string"==typeof t&&t.startsWith("var(--")}var zo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;var No=4;function Uo(t,n,e){void 0===e&&(e=1),w(e<=No,'Max CSS variable fallback depth detected in property "'+t+'". This may indicate a circular fallback dependency.');var r,o,i=(r=t,(o=zo.exec(r))?[o[1],o[2]]:[,]),a=i[0],u=i[1];if(a){var s=window.getComputedStyle(n).getPropertyValue(a);return s||(Ho(u)?Uo(u,n,e+1):u)}}function Wo(t){return $o.has(t)}function Go(t,n){t.set(n,!1),t.set(n)}function _o(t){return t===L||t===j}var qo,Zo,$o=new Set(["width","height","top","left","right","bottom","x","y"]);(Zo=qo=qo||{}).width="width",Zo.height="height",Zo.left="left",Zo.right="right",Zo.top="top",Zo.bottom="bottom";function Ko(t,n){return parseFloat(t.split(", ")[n])}function Jo(i,a){return function(t,n){var e=n.transform;if("none"===e||!e)return 0;var r=e.match(/^matrix3d\((.+)\)$/);if(r)return Ko(r[1],a);var o=e.match(/^matrix\((.+)\)$/);return o?Ko(o[1],i):0}}var Qo=new Set(["x","y","z"]),ti=Yn.filter(function(t){return!Qo.has(t)});function ni(d,t,h,v){void 0===v&&(v={}),h=P({},h),v=P({},v);var n=t.current,m=he(n),e=Object.keys(h).filter(Wo),g=[],y=!1,r=e.reduce(function(t,n){var e=d.get(n);if(!e)return t;var r,o,i,a,u=e.get(),s=h[n],c=Pe(u);if(xe(s))for(var f=s.length,l=null===s[0]?1:0;l<f;l++)r?w(Pe(s[l])===r,"All keyframes must be of the same type"):(r=Pe(s[l]),w(r===c||_o(c)&&_o(r),"Keyframes must be of the same dimension as the current value"));else r=Pe(s);if(c!==r)if(_o(c)&&_o(r)){var p=e.get();"string"==typeof p&&e.set(parseFloat(p)),"string"==typeof s?h[n]=parseFloat(s):Array.isArray(s)&&r===j&&(h[n]=s.map(parseFloat))}else y||(o=d,i=m,a=[],ti.forEach(function(t){var n=o.get(t);void 0!==n&&(a.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),a.length&&i.render(),g=a,y=!0),t.push(n),v[n]=void 0!==v[n]?v[n]:h[n],Go(e,s);return t},[]);if(r.length){var o=function(e,r,t,n,o){var i=t.getBoundingClientRect(),a=getComputedStyle(t),u=a.display,s={top:a.top,left:a.left,bottom:a.bottom,right:a.right,transform:a.transform};"none"===u&&n.set("display",e.display||"block"),n.render();var c=t.getBoundingClientRect();return o.forEach(function(t){var n=r.get(t);Go(n,ei[t](i,s)),e[t]=ei[t](c,a)}),e}(h,d,n,m,r);return g.length&&g.forEach(function(t){var n=t[0],e=t[1];d.get(n).set(e)}),m.render(),{target:o,transitionEnd:v}}return{target:h,transitionEnd:v}}var ei={width:function(t){return t.width},height:function(t){return t.height},top:function(t,n){var e=n.top;return parseFloat(e)},left:function(t,n){var e=n.left;return parseFloat(e)},bottom:function(t,n){var e=t.height,r=n.top;return parseFloat(r)+e},right:function(t,n){var e=t.width,r=n.left;return parseFloat(r)+e},x:Jo(4,13),y:Jo(5,14)};function ri(t,n,e,r){return o=e,Object.keys(o).some(Wo)?ni(t,n,e,r):{target:e,transitionEnd:r};var o}function oi(r,o){return function(t,n){var e=function(t,n,e,r){var o=b(e,[]),i=n.current;if(!(i instanceof HTMLElement))return{target:o,transitionEnd:r};for(var a in r=r&&P({},r),t.forEach(function(t){var n=t.get();if(Ho(n)){var e=Uo(n,i);e&&t.set(e)}}),o){var u=o[a];if(Ho(u)){var s=Uo(u,i);s&&(o[a]=s,r&&void 0===r[a]&&(r[a]=u))}}return{target:o,transitionEnd:r}}(r,o,t,n);return t=e.target,n=e.transitionEnd,ri(r,o,t,n)}}function ii(){var t=C.useState(0),n=t[0],e=t[1];return C.useCallback(function(){return e(n+1)},[n])}var ai,ui,si,ci=C.createContext(null);(si=ui=ui||{}).Prepare="prepare",si.Read="read",si.Render="render";var fi=[ui.Prepare,ui.Read,ui.Render].reduce(function(t,n){return t[n]=[],t},{}),li=!1;function pi(t){for(var n=t.length,e=0;e<n;e++)t[e]();t.length=0}function di(n){return function(t){t&&(li=!0,fi[n].push(t))}}var hi=((ai={})[ui.Prepare]=di(ui.Prepare),ai[ui.Read]=di(ui.Read),ai[ui.Render]=di(ui.Render),ai.flush=function(){li&&(pi(fi.prepare),pi(fi.read),pi(fi.render),li=!1)},ai);var vi={duration:.8,ease:[.45,.05,.19,1]},mi=sr();var gi={id:"x",size:"width",min:"left",max:"right",origin:"originX"},yi={id:"y",size:"height",min:"top",max:"bottom",origin:"originY"};function bi(t,n){return(t+n)/2}function wi(t,n,e){var r,o=t[e.size]-n[e.size],i=.5;return o&&(t[e.min]===n[e.min]?i=0:t[e.max]===n[e.max]&&(i=1)),(r={})[e.size]=o,r[e.origin]=i,r[e.id]=.5===i?bi(t[e.min],t[e.max])-bi(n[e.min],n[e.max]):0,r}var xi,Ei,Ci,Pi={getLayout:function(t){return t.offset},measure:function(t){var n=t.offsetLeft,e=t.offsetTop,r=t.offsetWidth,o=t.offsetHeight;return{left:n,top:e,right:n+r,bottom:e+o,width:r,height:o}}},Si={getLayout:function(t){return t.boundingBox},measure:function(t){var n=t.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height,right:n.right,bottom:n.bottom}}};function Oi(t){return window.getComputedStyle(t).position}function Ti(t){return"width"===t||"height"===t}function Mi(){this.constructor=Ei}function Ai(){return null!==xi&&xi.apply(this,arguments)||this}var Ri,ki,Vi={key:"layout",shouldRender:function(t){var n=t.positionTransition,e=t.layoutTransition;return w(!(n&&e),"Don't set both positionTransition and layoutTransition on the same component"),"undefined"!=typeof window&&!(!n&&!e)},Component:(xi=C.Component,e(Ei=Ai,Ci=xi),Ei.prototype=null===Ci?Object.create(Ci):(Mi.prototype=Ci.prototype,new Mi),Ai.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.innerRef,e=t.positionTransition,d=t.values,i=t.controls,a=n.current;if(a instanceof HTMLElement){var r,o,u,s,h,v,m=(r=this.props,o=r.layoutTransition,u=r.positionTransition,o||u),g=!!e,c=Oi(a),y={offset:Pi.measure(a),boundingBox:Si.measure(a)};return hi.prepare(function(){s=a.style.transform,a.style.transform=""}),hi.read(function(){h={offset:Pi.measure(a),boundingBox:Si.measure(a)};var t,n,e=Oi(a);t=c,n=e,v=g&&t===n?Pi:Si}),hi.render(function(){var t,n,e=v.getLayout(y),r=v.getLayout(h),c=P(P({},wi(t=e,n=r,gi)),wi(t,n,yi));if(c.x||c.y||c.width||c.height){he(a).set({originX:c.originX,originY:c.originY}),je();var f={},l={},p="function"==typeof m?m({delta:c}):m;o("left","x",0,c.x),o("top","y",0,c.y),g||(o("width","scaleX",1,y.boundingBox.width/h.boundingBox.width),o("height","scaleY",1,y.boundingBox.height/h.boundingBox.height)),f.transition=l,p&&i.start(f),He()}else s&&(a.style.transform=s);function o(t,n,e,r){var o=Ti(t)?t:n;if(c[o]){var i="boolean"==typeof p?P({},g?mi:vi):p,a=d.get(n,e),u=a.getVelocity();l[n]=i[n]?P({},i[n]):P({},i),void 0===l[n].velocity&&(l[n].velocity=u||0),f[n]=e;var s=Ti(t)||v!==Pi?0:a.get();a.set(r+s)}}}),null}},Ai.prototype.componentDidUpdate=function(){hi.flush()},Ai.prototype.render=function(){return null},Ai.contextType=ci,Ai)},Di=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","positionTransition","layoutTransition","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","_dragValueX","_dragValueY","_dragTransitionControls","dragOriginX","dragOriginY","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function Li(t){return Di.has(t)}(ki=Ri=Ri||{}).Target="Target",ki.VariantLabel="VariantLabel",ki.AnimationSubscription="AnimationSubscription";function Bi(t,n){return void 0!==n&&(Array.isArray(t)&&Array.isArray(n)?!function(t,n){if(null===n)return!1;var e=n.length;if(e!==t.length)return!1;for(var r=0;r<e;r++)if(n[r]!==t[r])return!1;return!0}(n,t):t!==n)}function Xi(t,n){void 0===n&&(n=!1);t.transition;var e=t.transitionEnd,r=b(t,["transition","transitionEnd"]);return n?P(P({},r),e):r}function Yi(t){var n,e=t instanceof Qt?t.get():t;return Array.from(new Set((n=e)?Array.isArray(n)?n:[n]:[]))}var Fi,Ii;function ji(r,t,o,i){var a=Yi(t),u=C.useContext(Vr),s=u.hasMounted&&u.hasMounted.current,c=C.useRef(!1);C.useEffect(function(){var t,n,e=!1;o?(e=!!s,a=Yi(u.animate)):e=c.current||(t=Yi(r),n=a,t.join(",")!==n.join(",")),e&&i.start(a),c.current=!0},[a.join(",")])}function Hi(t){return t.animate instanceof Or}var zi=((Fi={})[Ri.Target]=Po(function(t){var u,s,c,f,l,p,n=t.animate,e=t.controls,r=t.values,o=t.transition;return u=n,s=e,c=r,f=o,l=C.useRef(!0),(p=C.useRef(null)).current||(p.current=Xi(u,!0)),void C.useEffect(function(){var t={},n=Xi(u),e=Xi(u,!0);for(var r in n){var o=l.current&&(!c.has(r)||c.get(r).get()!==e[r]),i=null!==e[r],a=Bi(p.current[r],e[r]);i&&(a||o)&&(t[r]=n[r])}l.current=!1,p.current=P(P({},p.current),e),Object.keys(t).length&&s.start(P(P({},t),{transition:u.transition||f,transitionEnd:u.transitionEnd}))},[u])}),Fi[Ri.VariantLabel]=Po(function(t){var n=t.animate,e=t.inherit,r=void 0===e||e,o=t.controls;return ji(t.initial,n,r,o)}),Fi[Ri.AnimationSubscription]=Po(function(t){var n,e,r,o=t.animate,i=t.controls;return n=o,e=i,r=C.useMemo(function(){return n.subscribe(e)},[n]),void C.useEffect(function(){return function(){r&&r()}},[r])}),Fi),Ni=["initial","animate","whileTap","whileHover"],Ui=((Ii={})[Ri.Target]=function(t){return!(void 0===t.animate||(n=t.animate,Array.isArray(n)||"string"==typeof n)||Hi(t));var n},Ii[Ri.VariantLabel]=function(n){return void 0!==n.variants||Ni.some(function(t){return"string"==typeof n[t]})},Ii[Ri.AnimationSubscription]=Hi,Ii);function Wi(){var t=C.useContext(kr);if(null===t)return[!0];var n=t.isPresent,e=t.onExitComplete,r=t.register;return C.useEffect(r,[]),!n&&e?[!1,e]:[!0]}var Gi={key:"exit",shouldRender:function(t){return!!t.exit&&!Lr(t)},Component:Po(function(t){var n=t.animate,e=t.controls,r=t.exit,o=Wi(),i=o[0],a=o[1],u=C.useContext(kr),s=C.useRef(!1),c=void 0!==(null===u||void 0===u?void 0:u.custom)?u.custom:t.custom;C.useEffect(function(){i?!s.current||!n||n instanceof Or||e.start(n):(!s.current&&r&&(e.setProps(P(P({},t),{custom:c})),e.start(r).then(a)),s.current=!0),i&&(s.current=!1)},[i])})},_i=function(t){return!Li(t)};try{var qi=require("@emotion/is-prop-valid").default;_i=function(t){return t.startsWith("on")?!Li(t):qi(t)}}catch(E){}function Zi(t,n,e,r){var o,i,a,u,s,c={style:(i=n,a=e,u=Ue(o=t),(s=o.getTransformTemplate())&&(u.transform=i.transform?s({},i.transform):s),Jn(P(P({},i),u),!a))};return r&&(c.style.userSelect="none",c.draggable=!1),c}var $i=[Vi,jo,Mo,Gi],Ki=$i.length;function Ji(c){var f="string"==typeof c,l=f&&-1!==Yr.indexOf(c);return{renderComponent:function(t,n,e,r,o){var i,a,u=f?function(t){var n={};for(var e in t)_i(e)&&(n[e]=t[e]);return n}(r):r,s=l?(i=n,(a=ue(Ue(e),void 0,void 0,void 0,void 0,!1)).style=P(P({},i),a.style),a):Zi(e,n,o,!!r.drag);return C.createElement(c,P(P(P({},u),{ref:t}),s))},loadFunctionalityComponents:function(t,n,e,r,o,i){var a=[],u=function(t){var n=void 0;for(var e in Ri)Ui[e](t)&&(n=e);return n?zi[n]:void 0}(e);u&&a.push(C.createElement(u,{key:"animation",initial:e.initial,animate:e.animate,variants:e.variants,transition:e.transition,controls:o,inherit:i,values:n}));for(var s=0;s<Ki;s++){var c=$i[s],f=c.shouldRender,l=c.key,p=c.Component;f(e,r)&&a.push(C.createElement(p,P({key:l},e,{parentContext:r,values:n,controls:o,innerRef:t})))}return a},getValueControlsConfig:function(n,t){return{values:t,readValueFromSource:function(t){return he(n.current).get(t)},makeTargetAnimatable:oi(t,n)}}}}var Qi=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","webview"].reduce(function(t,n){var e=Ji(n);return t[n]=Xr(e),t},{}),ta=Yr.reduce(function(t,n){return t[n]=Xr(Ji(n)),t},{}),na=P(P({custom:function(t){return Xr(Ji(t))}},Qi),ta);function ea(t){return ve(function(){return nn(t)})}var ra=function(t){return"object"==typeof(n=t)&&n.mix?t.mix:void 0;var n};function oa(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!Array.isArray(t[0]),r=e?0:-1,o=t[0+r],i=t[1+r],a=t[2+r],u=t[3+r],s=$t(i,a,P({mixer:ra(a[0])},u));return e?s(o):s}var ia=function(t){return"function"==typeof t},aa=function(t){return t};function ua(t,n,e,r){var o=C.useRef(null),i=[t],a=aa;if(ia(n))a=n;else if(Array.isArray(e)){var u=n;a=oa(u,e,r),i=[t,u.join(","),e.join(",")]}return C.useMemo(function(){return o.current&&o.current.destroy(),o.current=t.addChild({transformer:a}),o.current},i)}function sa(t){return.001<t?1/t:1e5}function ca(){return{scrollX:nn(0),scrollY:nn(0),scrollXProgress:nn(0),scrollYProgress:nn(0)}}function fa(t,n,e){e.set(t&&n?t/n:0)}function la(i,a){function t(){var t=a(),n=t.xOffset,e=t.yOffset,r=t.xMaxOffset,o=t.yMaxOffset;i.scrollX.set(n),i.scrollY.set(e),fa(n,r,i.scrollXProgress),fa(e,o,i.scrollYProgress)}return t(),t}var pa=ca();function da(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var ha=!1;var va=(ma.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),function(){return n.componentControls.delete(t)}},ma.prototype.start=function(n,e){this.componentControls.forEach(function(t){t.start(n.nativeEvent||n,e)})},ma);function ma(){this.componentControls=new Set}function ga(){return new va}function ya(t){var n=t.children,e=t.initial,r=t.isPresent,o=t.onExitComplete,i=t.custom,a=C.useRef(0),u=C.useRef(0),s={initial:e,isPresent:r,custom:i,onExitComplete:function(){u.current++;var t=u.current>=a.current;o&&t&&o()}},c=C.useMemo(function(){return u.current=0,function(){return a.current++,function(){return a.current--}}},[r]);return C.createElement(kr.Provider,{value:P(P({},s),{register:c})},n)}function ba(t){return t.key||""}var wa=nn(null);if("undefined"!=typeof window)if(window.matchMedia){var xa=window.matchMedia("(prefers-reduced-motion)"),Ea=function(){return wa.set(xa.matches)};xa.addListener(Ea),Ea()}else wa.set(!1);function Ca(t,n){return"boolean"==typeof n?n:Boolean(t)}r.AnimatePresence=function(t){var n,e,r,o=t.children,i=t.custom,a=t.initial,u=void 0===a||a,s=t.onExitComplete,c=t.exitBeforeEnter,f=ii(),l=C.useContext(ci)||f,p=C.useRef(!0),d=(n=o,e=[],C.Children.forEach(n,function(t){C.isValidElement(t)&&e.push(t)}),e),h=C.useRef(d),v=C.useRef(new Map).current,m=C.useRef(new Set).current;if(r=v,d.forEach(function(t){var n=ba(t);r.set(n,t)}),p.current)return p.current=!1,C.createElement(C.Fragment,null,d.map(function(t){return C.createElement(ya,{key:ba(t),isPresent:!0,initial:!!u&&void 0},t)}));for(var g=S(d),y=h.current.map(ba),b=d.map(ba),w=y.length,x=0;x<w;x++){var E=y[x];-1===b.indexOf(E)?m.add(E):m.delete(E)}return c&&m.size&&(g=[]),m.forEach(function(n){if(-1===b.indexOf(n)){var t=v.get(n);if(t){var e=y.indexOf(n);g.splice(e,0,C.createElement(ya,{key:ba(t),isPresent:!1,onExitComplete:function(){m.delete(n);var t=h.current.findIndex(function(t){return t.key===n});h.current.splice(t,1),m.size||(h.current=d,l(),s&&s())},custom:i},t))}}}),g=g.map(function(t){var n=t.key;return m.has(n)?t:C.createElement(ya,{key:ba(t),isPresent:!0},t)}),h.current=g,C.createElement(C.Fragment,null,m.size?g:g.map(function(t){return C.cloneElement(t)}))},r.AnimationControls=Or,r.DragControls=va,r.MotionContext=Vr,r.MotionPluginContext=Fr,r.MotionPlugins=function(t){var n=t.children,e=b(t,["children"]),r=C.useContext(Fr),o=C.useRef(P({},r)).current;for(var i in e)o[i]=e[i];return C.createElement(Fr.Provider,{value:o},n)},r.MotionValue=Qt,r.ReducedMotion=function(t){var n=t.children,e=t.enabled,r=C.useContext(Vr);return r=C.useMemo(function(){return P(P({},r),{isReducedMotion:e})},[e]),C.createElement(Vr.Provider,{value:r},n)},r.UnstableSyncLayout=function(t){var n=t.children,e=ii();return C.createElement(ci.Provider,{value:e},n)},r.animationControls=function(){return new Or},r.createMotionComponent=Xr,r.isValidMotionProp=Li,r.motion=na,r.motionValue=nn,r.transform=oa,r.unwrapMotionValue=function(t){var n,e=t instanceof Qt?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},r.useAnimatedState=function(t){var n=C.useState(t),e=n[0],r=n[1],o=ve(function(){return{onUpdate:r}}),i=we(o),a=Dr({values:i,readValueFromSource:function(t){return e[t]}},{},!1),u=ve(function(){return function(t){return a.start(t)}});return C.useEffect(function(){return i.mount(),function(){return i.unmount()}},[]),[e,u]},r.useAnimation=function(){var t=ve(function(){return new Or});return C.useEffect(function(){return t.mount(),function(){return t.unmount()}},[]),t},r.useCycle=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];n.length;var e=C.useRef(0),r=C.useState(n[e.current]),o=r[0],i=r[1];return[o,function(t){e.current="number"!=typeof t?Jt(0,n.length,e.current+1):t,i(n[e.current])}]},r.useDomEvent=Hr,r.useDragControls=function(){return ve(ga)},r.useElementScroll=function(i){var a=ve(ca);return C.useLayoutEffect(function(){var t=i.current;if(w(!!t,"ref provided to useScroll must be passed into a HTML element."),t){var n,e=la(a,(n=t,function(){return{xOffset:n.scrollLeft,yOffset:n.scrollTop,xMaxOffset:n.scrollWidth-n.offsetWidth,yMaxOffset:n.scrollHeight-n.offsetHeight}})),r=jr(t,"scroll",e,{passive:!0}),o=jr(t,"resize",e);return function(){r&&r(),o&&o()}}},[]),a},r.useExternalRef=Br,r.useGestures=Co,r.useInvertedScale=function(t){var n=ea(1),e=ea(1),r=C.useContext(Vr).values;return w(!(!t&&!r),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t?(n=t.scaleX||n,e=t.scaleY||e):r&&(n=r.get("scaleX",1),e=r.get("scaleY",1)),{scaleX:ua(n,sa),scaleY:ua(e,sa)}},r.useMotionValue=ea,r.usePanGesture=fo,r.usePresence=Wi,r.useReducedMotion=function(){var n=C.useContext(Vr).isReducedMotion,t=C.useState(Ca(wa.get(),n)),e=t[0],r=t[1];return C.useEffect(function(){return wa.onChange(function(t){r(Ca(t,n))})},[r,n]),e},r.useSpring=function(t,e){void 0===e&&(e={});var n,r,o=C.useRef(null),i=ea(me(t)?t.get():t);return C.useMemo(function(){return i.attach(function(t,n){return o.current&&o.current.stop(),o.current=nr(P({from:i.get(),to:t,velocity:i.getVelocity()},e)).start(n),i.get()})},Object.values(e)),n=t,r=function(t){return i.set(parseFloat(t))},C.useEffect(function(){return me(n)?n.onChange(r):void 0},[n]),i},r.useTapGesture=wo,r.useTransform=ua,r.useViewportScroll=function(){return C.useLayoutEffect(function(){ha||function(){if(ha=!0,"undefined"!=typeof window){var t=la(pa,da);jr(window,"scroll",t,{passive:!0}),jr(window,"resize",t)}}()},[]),pa},Object.defineProperty(r,"__esModule",{value:!0})});
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t=t||self).Motion={},t.React)}(this,function(r,C){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};var P=function(){return(P=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function b(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function S(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var t,n,w=function(){},o=0,i="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var n=Date.now(),e=Math.max(0,16.7-(n-o));o=n+e,setTimeout(function(){return t(o)},e)};(n=t=t||{}).Read="read",n.Update="update",n.Render="render",n.PostRender="postRender",n.FixedUpdate="fixedUpdate";function d(t){return m=t}function a(t){return T[t].process(y)}function O(){return y}function u(n,e){return function(t){return Math.max(Math.min(t,e),n)}}function l(t){return t%1?Number(t.toFixed(5)):t}function s(n){return{test:function(t){return"string"==typeof t&&t.endsWith(n)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+n}}}function c(t){return void 0!==t.red}function f(t){return void 0!==t.hue}function p(i){return function(t){if("string"!=typeof t)return t;for(var n,e={},r=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")).split(/,\s*/),o=0;o<4;o++)e[i[o]]=void 0!==r[o]?parseFloat(r[o]):1;return e}}var h=1/60*1e3,v=!0,m=!1,g=!1,y={delta:0,timestamp:0},x=[t.Read,t.Update,t.Render,t.PostRender],E=x.reduce(function(t,n){var r,i,a,u,s,o,c,f,l,p=(r=d,i=[],s=!(a=[]),o=u=0,c=new WeakSet,f=new WeakSet,l={cancel:function(t){var n=a.indexOf(t);c.add(t),-1!==n&&a.splice(n,1)},process:function(t){var n,e;if(s=!0,i=(n=[a,i])[0],(a=n[1]).length=0,u=i.length)for(o=0;o<u;o++)(e=i[o])(t),!0!==f.has(e)||c.has(e)||(l.schedule(e),r(!0));s=!1},schedule:function(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1),w("function"==typeof t,"Argument must be a function");var r=e&&s,o=r?i:a;c.delete(t),n&&f.add(t),-1===o.indexOf(t)&&(o.push(t),r&&(u=i.length))}});return t.sync[n]=function(t,n,e){return void 0===n&&(n=!1),void 0===e&&(e=!1),m||A(),p.schedule(t,n,e),t},t.cancelSync[n]=function(t){return p.cancel(t)},t.steps[n]=p,t},{steps:{},sync:{},cancelSync:{}}),T=E.steps,X=E.sync,Y=E.cancelSync,M=function(t){m=!1,y.delta=v?h:Math.max(Math.min(t-y.timestamp,40),1),v||(h=y.delta),y.timestamp=t,g=!0,x.forEach(a),g=!1,m&&(v=!1,i(M))},A=function(){v=m=!0,g||i(M)},R=function(){return(R=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},k=/(-)?(\d[\d\.]*)/g,V=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,D=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,L={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},B=R({},L,{transform:u(0,1)}),F=(R({},L,{default:1}),s("deg")),I=s("%"),j=s("px"),H=s("vh"),z=s("vw"),N=(R({},I,{parse:function(t){return I.parse(t)/100},transform:function(t){return I.transform(100*t)}}),u(0,255)),U=R({},L,{transform:function(t){return Math.round(N(t))}});function W(t,n){return t.startsWith(n)&&D.test(t)}function G(t){return"number"==typeof t?0:t}function _(n){return function(t){return 1-n(1-t)}}function q(n){return function(t){return t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2}}function Z(n){return function(t){return Math.pow(t,n)}}function $(n){return function(t){return t*t*((n+1)*t-n)}}function K(t){var n=$(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}}function J(t){return t}function Q(t){return 1-Math.sin(Math.acos(t))}function tt(t){var n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72}function nt(t,n){return 1-3*n+3*t}function et(t,n){return 3*n-6*t}function rt(t){return 3*t}function ot(t,n,e){return 3*nt(n,e)*t*t+2*et(n,e)*t+rt(n)}function it(t,n,e){return((nt(n,e)*t+et(n,e))*t+rt(n))*t}var at={test:function(t){return"string"==typeof t?W(t,"rgb"):c(t)},parse:p(["red","green","blue","alpha"]),transform:function(t){var n,e,r,o,i,a=t.red,u=t.green,s=t.blue,c=t.alpha,f=void 0===c?1:c;return n={red:U.transform(a),green:U.transform(u),blue:U.transform(s),alpha:l(B.transform(f))},e=n.red,r=n.green,o=n.blue,i=n.alpha,"rgba("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},ut={test:function(t){return"string"==typeof t?W(t,"hsl"):f(t)},parse:p(["hue","saturation","lightness","alpha"]),transform:function(t){var n,e,r,o,i,a=t.hue,u=t.saturation,s=t.lightness,c=t.alpha,f=void 0===c?1:c;return n={hue:Math.round(a),saturation:I.transform(l(u)),lightness:I.transform(l(s)),alpha:l(B.transform(f))},e=n.hue,r=n.saturation,o=n.lightness,i=n.alpha,"hsla("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},st=R({},at,{test:function(t){return"string"==typeof t&&W(t,"#")},parse:function(t){var n="",e="",r="";return 4<t.length?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),ct={test:function(t){return"string"==typeof t&&D.test(t)||c(t)||f(t)},parse:function(t){return at.test(t)?at.parse(t):ut.test(t)?ut.parse(t):st.test(t)?st.parse(t):t},transform:function(t){return c(t)?at.transform(t):f(t)?ut.transform(t):t}},ft="${c}",lt={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(k),r=t.match(V);return e&&(n+=e.length),r&&(n+=r.length),0<n},parse:function(t){var n=t,e=[],r=n.match(V);r&&(n=n.replace(V,ft),e.push.apply(e,r.map(ct.parse)));var o=n.match(k);return o&&e.push.apply(e,o.map(L.parse)),e},createTransformer:function(t){var r=t,o=0,n=t.match(V),i=n?n.length:0;if(n)for(var e=0;e<i;e++)r=r.replace(n[e],ft),o++;var a=r.match(k),u=a?a.length:0;if(a)for(e=0;e<u;e++)r=r.replace(a[e],"${n}"),o++;return function(t){for(var n=r,e=0;e<o;e++)n=n.replace(e<i?ft:"${n}",e<i?ct.transform(t[e]):l(t[e]));return n}},getAnimatableNone:function(t){var n=lt.parse(t);return lt.createTransformer(t)(n.map(G))}},pt=_,dt=q,ht=Z(2),vt=_(ht),mt=q(ht),gt=_(Q),yt=q(gt),bt=$(1.525),wt=_(bt),xt=q(bt),Et=K(1.525),Ct="undefined"!=typeof Float32Array;function Pt(a,n,u,e){function r(t){for(var n,e,r,o=0,i=1;10!==i&&s[i]<=t;++i)o+=.1;return n=(t-s[--i])/(s[i+1]-s[i]),.001<=(r=ot(e=o+.1*n,a,u))?function(t,n){for(var e=0,r=0;e<8;++e){if(0===(r=ot(n,a,u)))return n;n-=(it(n,a,u)-t)/r}return n}(t,e):0===r?e:function(t,n,e){for(var r,o,i=0;0<(r=it(o=n+(e-n)/2,a,u)-t)?e=o:n=o,1e-7<Math.abs(r)&&++i<10;);return o}(t,o,o+.1)}var s=Ct?new Float32Array(11):new Array(11);!function(){for(var t=0;t<11;++t)s[t]=it(.1*t,a,u)}();return function(t){return a===n&&u===e?t:0===t?0:1===t?1:it(r(t),n,e)}}function St(t){return"number"==typeof t}function Ot(r){return function(n,e,t){return void 0!==t?r(n,e,t):function(t){return r(n,e,t)}}}function Tt(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")}function Mt(t){return Tt(t)&&t.hasOwnProperty("z")}function At(t,n){return Math.abs(t-n)}function Rt(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))}function kt(n){return jt.find(function(t){return t.test(n)})}function Vt(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."}function Dt(n,e){return function(t){return e(n(t))}}var Lt=Object.freeze({reversed:_,mirrored:q,createReversedEasing:pt,createMirroredEasing:dt,createExpoIn:Z,createBackIn:$,createAnticipateEasing:K,linear:J,easeIn:ht,easeOut:vt,easeInOut:mt,circIn:Q,circOut:gt,circInOut:yt,backIn:bt,backOut:wt,backInOut:xt,anticipate:Et,bounceOut:tt,bounceIn:function(t){return 1-tt(1-t)},bounceInOut:function(t){return t<.5?.5*(1-tt(1-2*t)):.5*tt(2*t-1)+.5},cubicBezier:Pt}),Bt={x:0,y:0,z:0},Xt=Ot(function(t,n,e){return Math.min(Math.max(e,t),n)}),Yt=function(t,n,e){var r=n-t;return 0==r?1:(e-t)/r},Ft=function(t,n,e){return-e*t+e*n+t},It=function(){return(It=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},jt=[st,at,ut],Ht=function(t,n){var e=kt(t),r=kt(n);w(!!e,Vt(t)),w(!!r,Vt(n)),w(e.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var o=e.parse(t),i=r.parse(n),a=It({},o),u=e===ut?Ft:Rt;return function(t){for(var n in a)"alpha"!==n&&(a[n]=u(o[n],i[n],t));return a.alpha=Ft(o.alpha,i.alpha,t),e.transform(a)}},zt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(Dt)};function Nt(n,e){return St(n)?function(t){return Ft(n,e,t)}:ct.test(n)?Ht(n,e):_t(n,e)}var Ut=function(t,e){var r=t.slice(),o=r.length,i=t.map(function(t,n){return Nt(t,e[n])});return function(t){for(var n=0;n<o;n++)r[n]=i[n](t);return r}},Wt=function(t,n){var e=It({},t,n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=Nt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function Gt(t){for(var n=lt.parse(t),e=n.length,r=0,o=0,i=0,a=0;a<e;a++)r||"number"==typeof n[a]?r++:void 0!==n[a].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}var _t=function(t,n){var e=lt.createTransformer(n),r=Gt(t),o=Gt(n);return w(r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers,"Complex values '"+t+"' and '"+n+"' too different to mix. Ensure all colors are of the same type."),zt(Ut(r.parsed,o.parsed),e)},qt=function(n,e){return function(t){return Ft(n,e,t)}};function Zt(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?qt:"string"==typeof r?ct.test(r)?Ht:_t:Array.isArray(r)?Ut:"object"==typeof r?Wt:void 0),a=t.length-1,u=0;u<a;u++){var s=i(t[u],t[u+1]);if(n){var c=Array.isArray(n)?n[u]:n;s=zt(c,s)}o.push(s)}return o}function $t(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,u=r.mixer,s=t.length;w(s===n.length,"Both input and output ranges must be the same length"),w(!a||!Array.isArray(a)||a.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c,f,l,p,d,h,v,m,g,y=Zt(n,a,u),b=2===s?(h=y,v=(d=t)[0],m=d[1],g=h[0],function(t){return g(Yt(v,m,t))}):(f=y,l=(c=t).length,p=l-1,function(t){var n=0,e=!1;if(t<=c[0]?e=!0:t>=c[p]&&(n=p-1,e=!0),!e){for(var r=1;r<l&&!(c[r]>t||r===p);r++);n=r-1}var o=Yt(c[n],c[n+1],t);return f[n](o)});return i?zt(Xt(t[0],t[s-1]),b):b}function Kt(t,n){return n?t*(1e3/n):0}var Jt=Ot(function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t}),Qt=(Xt(0,1),tn.prototype.addChild=function(t){void 0===t&&(t={});var n=new tn(this.current,P({parent:this},t));return this.children||(this.children=new Set),this.children.add(n),n},tn.prototype.removeChild=function(t){this.children&&this.children.delete(t)},tn.prototype.subscribeTo=function(t,n){function e(){return n(r.current)}var r=this;return t.add(e),function(){return t.delete(e)}},tn.prototype.onChange=function(t){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,t)},tn.prototype.onRenderRequest=function(t){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(t),this.subscribeTo(this.renderSubscribers,t)},tn.prototype.attach=function(t){this.passiveEffect=t},tn.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},tn.prototype.get=function(){return this.current},tn.prototype.getVelocity=function(){return this.canTrackVelocity?Kt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},tn.prototype.start=function(n){var e=this;return this.stop(),new Promise(function(t){e.stopAnimation=n(t)}).then(function(){return e.clearAnimation()})},tn.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},tn.prototype.isAnimating=function(){return!!this.stopAnimation},tn.prototype.clearAnimation=function(){this.stopAnimation=null},tn.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},tn);function tn(t,n){var e,i=this,r=void 0===n?{}:n,o=r.transformer,a=r.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),i.prev=i.current,i.current=i.transformer?i.transformer(t):t,i.updateSubscribers&&i.prev!==i.current&&i.updateSubscribers.forEach(i.notifySubscriber),i.children&&i.children.forEach(i.setChild),n&&i.renderSubscribers&&i.renderSubscribers.forEach(i.notifySubscriber);var e=O(),r=e.delta,o=e.timestamp;i.lastUpdated!==o&&(i.timeDelta=r,i.lastUpdated=o,X.postRender(i.scheduleVelocityCheck))},this.notifySubscriber=function(t){t(i.current)},this.scheduleVelocityCheck=function(){return X.postRender(i.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==i.lastUpdated&&(i.prev=i.current)},this.setChild=function(t){return t.set(i.current)},this.parent=a,this.transformer=o,this.set(t,!1),this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}function nn(t,n){return new Qt(t,n)}function en(n,e){return function(t){return Math.max(Math.min(t,e),n)}}function rn(t){return t%1?Number(t.toFixed(5)):t}function on(n){return{test:function(t){return"string"==typeof t&&t.endsWith(n)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+n}}}function an(t){return void 0!==t.red}function un(t){return void 0!==t.hue}function sn(i){return function(t){if("string"!=typeof t)return t;for(var n,e={},r=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")).split(/,\s*/),o=0;o<4;o++)e[i[o]]=void 0!==r[o]?parseFloat(r[o]):1;return e}}var cn=function(){return(cn=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},fn=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,ln={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},pn=cn(cn({},ln),{transform:en(0,1)}),dn=cn(cn({},ln),{default:1}),hn=on("deg"),vn=on("%"),mn=on("px"),gn=cn(cn({},vn),{parse:function(t){return vn.parse(t)/100},transform:function(t){return vn.transform(100*t)}}),yn=en(0,255),bn=cn(cn({},ln),{transform:function(t){return Math.round(yn(t))}});function wn(t,n){return t.startsWith(n)&&fn.test(t)}function xn(t){var e=t.onRead,n=t.onRender,r=t.uncachedValues,c=void 0===r?new Set:r,o=t.useCache,f=void 0===o||o;return function(t){void 0===t&&(t={});var r=b(t,[]),o={},i=[],a=!1;function u(t,n){t.startsWith("--")&&(r.hasCSSVariable=!0);var e=o[t];o[t]=n,o[t]!==e&&(-1===i.indexOf(t)&&i.push(t),a||(a=!0,X.render(s.render)))}var s={get:function(t,n){return void 0===n&&(n=!1),!n&&f&&!c.has(t)&&void 0!==o[t]?o[t]:e(t,r)},set:function(t,n){if("string"==typeof t)u(t,n);else for(var e in t)u(e,t[e]);return this},render:function(t){return void 0===t&&(t=!1),!a&&!0!==t||(n(o,r,i),a=!1,i.length=0),this}};return s}}function En(t,n){return kn.set(t,An(n))}var Cn,Pn={test:function(t){return"string"==typeof t?wn(t,"rgb"):an(t)},parse:sn(["red","green","blue","alpha"]),transform:function(t){var n,e,r,o,i,a=t.red,u=t.green,s=t.blue,c=t.alpha,f=void 0===c?1:c;return n={red:bn.transform(a),green:bn.transform(u),blue:bn.transform(s),alpha:rn(pn.transform(f))},e=n.red,r=n.green,o=n.blue,i=n.alpha,"rgba("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},Sn={test:function(t){return"string"==typeof t?wn(t,"hsl"):un(t)},parse:sn(["hue","saturation","lightness","alpha"]),transform:function(t){var n,e,r,o,i,a=t.hue,u=t.saturation,s=t.lightness,c=t.alpha,f=void 0===c?1:c;return n={hue:Math.round(a),saturation:vn.transform(rn(u)),lightness:vn.transform(rn(s)),alpha:rn(pn.transform(f))},e=n.hue,r=n.saturation,o=n.lightness,i=n.alpha,"hsla("+e+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},On=cn(cn({},Pn),{test:function(t){return"string"==typeof t&&wn(t,"#")},parse:function(t){var n="",e="",r="";return 4<t.length?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),Tn={test:function(t){return"string"==typeof t&&fn.test(t)||an(t)||un(t)},parse:function(t){return Pn.test(t)?Pn.parse(t):Sn.test(t)?Sn.parse(t):On.test(t)?On.parse(t):t},transform:function(t){return an(t)?Pn.transform(t):un(t)?Sn.transform(t):t}},Mn=/([a-z])([A-Z])/g,An=function(t){return t.replace(Mn,"$1-$2").toLowerCase()},Rn=new Map,kn=new Map,Vn=["Webkit","Moz","O","ms",""],Dn=Vn.length,Ln="undefined"!=typeof document,Bn=function(t,n){void 0===n&&(n=!1);var e,r=n?kn:Rn;return r.has(t)||(Ln?function(t){Cn=Cn||document.createElement("div");for(var n=0;n<Dn;n++){var e=Vn[n],r=""===e,o=r?t:e+t.charAt(0).toUpperCase()+t.slice(1);if(o in Cn.style||r){if(r&&"clipPath"===t&&kn.has(t))return;Rn.set(t,o),En(t,(r?"":"-")+An(o))}}}(t):En(e=t,e)),r.get(t)||t},Xn=["","X","Y","Z"],Yn=["translate","scale","rotate","skew","transformPerspective"].reduce(function(t,e){return Xn.reduce(function(t,n){return t.push(e+n),t},t)},["x","y","z"]),Fn=Yn.reduce(function(t,n){return t[n]=!0,t},{});function In(t){return!0===Fn[t]}function jn(t,n){return Yn.indexOf(t)-Yn.indexOf(n)}var Hn=new Set(["originX","originY","originZ"]);var zn=P(P({},ln),{transform:Math.round}),Nn={color:Tn,backgroundColor:Tn,outlineColor:Tn,fill:Tn,stroke:Tn,borderColor:Tn,borderTopColor:Tn,borderRightColor:Tn,borderBottomColor:Tn,borderLeftColor:Tn,borderWidth:mn,borderTopWidth:mn,borderRightWidth:mn,borderBottomWidth:mn,borderLeftWidth:mn,borderRadius:mn,radius:mn,borderTopLeftRadius:mn,borderTopRightRadius:mn,borderBottomRightRadius:mn,borderBottomLeftRadius:mn,width:mn,maxWidth:mn,height:mn,maxHeight:mn,size:mn,top:mn,right:mn,bottom:mn,left:mn,padding:mn,paddingTop:mn,paddingRight:mn,paddingBottom:mn,paddingLeft:mn,margin:mn,marginTop:mn,marginRight:mn,marginBottom:mn,marginLeft:mn,rotate:hn,rotateX:hn,rotateY:hn,rotateZ:hn,scale:dn,scaleX:dn,scaleY:dn,scaleZ:dn,skew:hn,skewX:hn,skewY:hn,distance:mn,translateX:mn,translateY:mn,translateZ:mn,x:mn,y:mn,z:mn,perspective:mn,opacity:pn,originX:gn,originY:gn,originZ:mn,zIndex:zn,fillOpacity:pn,strokeOpacity:pn,numOctaves:zn},Un=function(t){return Nn[t]},Wn=function(t,n){return n&&"number"==typeof t?n.transform(t):t},Gn="scrollLeft",_n="scrollTop",qn=new Set([Gn,_n]),Zn=new Set([Gn,_n,"transform"]),$n={x:"translateX",y:"translateY",z:"translateZ"};function Kn(t){return"function"==typeof t}function Jn(t,n,e,r,o,i,a){void 0===n&&(n=!0),void 0===e&&(e={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=[]),void 0===a&&(a=!1);var u,s=!0,c=!1,f=!1;for(var l in t){var p=t[l],d=Un(l),h=Wn(p,d);In(l)?(c=!0,r[l]=h,i.push(l),s&&(d.default&&p!==d.default||!d.default&&0!==p)&&(s=!1)):(u=l,Hn.has(u)?(o[l]=h,f=!0):Zn.has(l)&&Kn(h)||(e[Bn(l,a)]=h))}return!c&&"function"!=typeof t.transform||(e.transform=function(t,n,e,r,o){var i="",a=!1;e.sort(jn);for(var u=e.length,s=0;s<u;s++){var c=e[s];i+=($n[c]||c)+"("+n[c]+") ",a="z"===c||a}return!a&&o?i+="translateZ(0)":i=i.trim(),Kn(t.transform)?i=t.transform(n,r?"":i):r&&(i="none"),i}(t,r,i,s,n)),f&&(e.transformOrigin=(o.originX||"50%")+" "+(o.originY||"50%")+" "+(o.originZ||0)),e}function Qn(n,e){void 0===n&&(n=!0),void 0===e&&(e=!0);var r={},o={},i={},a=[];return function(t){return a.length=0,Jn(t,n,r,o,i,a,e),r}}var te=xn({onRead:function(t,n){var e=n.element,r=n.preparseOutput,o=Un(t);if(In(t))return o&&o.default||0;if(qn.has(t))return e[t];var i=window.getComputedStyle(e,null).getPropertyValue(Bn(t,!0))||0;return r&&o&&o.test(i)&&o.parse?o.parse(i):i},onRender:function(t,n,e){var r=n.element,o=n.buildStyles,i=n.hasCSSVariable;if(Object.assign(r.style,o(t)),i)for(var a=e.length,u=0;u<a;u++){var s=e[u];s.startsWith("--")&&r.style.setProperty(s,t[s])}-1!==e.indexOf(Gn)&&(r[Gn]=t[Gn]),-1!==e.indexOf(_n)&&(r[_n]=t[_n])},uncachedValues:qn});var ne=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),ee=.5,re=function(){return{style:{}}},oe=function(t,n){return mn.transform(t*n)},ie={x:0,y:0,width:0,height:0};function ae(t,n,e){return"string"==typeof t?t:mn.transform(n+e*t)}function ue(t,n,e,r,o,i){void 0===n&&(n=ie),void 0===r&&(r=Qn(!1,!1)),void 0===o&&(o=re()),void 0===i&&(i=!0);var a,u,s=t.attrX,c=t.attrY,f=t.originX,l=t.originY,p=t.pathLength,d=t.pathSpacing,h=void 0===d?1:d,v=t.pathOffset,m=void 0===v?0:v,g=r(b(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var y in g){if("transform"===y)o.style.transform=g[y];else o[i&&!ne.has(y)?An(y):y]=g[y]}return void 0===f&&void 0===l&&!g.transform||(o.style.transformOrigin=(u=void 0!==l?l:ee,ae(void 0!==f?f:ee,(a=n).x,a.width)+" "+ae(u,a.y,a.height))),void 0!==s&&(o.x=s),void 0!==c&&(o.y=c),void 0!==e&&void 0!==p&&(o[i?"stroke-dashoffset":"strokeDashoffset"]=oe(-m,e),o[i?"stroke-dasharray":"strokeDasharray"]=oe(p,e)+" "+oe(h,e)),o}function se(t){var n=function(t){try{return"function"==typeof(n=t).getBBox?n.getBBox():n.getBoundingClientRect()}catch(t){return{x:0,y:0,width:0,height:0}}var n}(t),e="path"===t.tagName&&t.getTotalLength?t.getTotalLength():void 0;return fe({element:t,buildAttrs:function(n,e,r){void 0===r&&(r=!0);var o=re(),i=Qn(!1,!1);return function(t){return ue(t,n,e,i,o,r)}}(n,e)})}function ce(t,n){var e,r,o;return t===window?e=le(t):(o=t)instanceof HTMLElement||"function"==typeof o.click?e=function(t,n){void 0===n&&(n={});var e=n.enableHardwareAcceleration,r=b(n,["enableHardwareAcceleration"]);return te(P({element:t,buildStyles:Qn(e),preparseOutput:!0},r))}(t,n):((r=t)instanceof SVGElement||"ownerSVGElement"in r)&&(e=se(t)),w(void 0!==e,"No valid node provided. Node must be HTMLElement, SVGElement or window."),pe.set(t,e),e}var fe=xn({onRead:function(t,n){var e=n.element;if(In(t=ne.has(t)?t:An(t))){var r=Un(t);return r&&r.default||0}return e.getAttribute(t)},onRender:function(t,n){var e=n.element,r=(0,n.buildAttrs)(t);for(var o in r)"style"===o?Object.assign(e.style,r.style):e.setAttribute(o,r[o])}}),le=xn({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var n=t.scrollTop,e=void 0===n?0:n,r=t.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,e)}}),pe=new WeakMap,de=function(t,n){return pe.has(t)?pe.get(t):ce(t,n)};function he(t,n){var e="string"==typeof t?document.querySelector(t):t;return de(e,n)}function ve(t){var n=C.useRef(null);return null===n.current&&(n.current=t()),n.current}var me=function(t){return t instanceof Qt},ge=xn({onRead:function(){return null},onRender:function(t,n){return(0,n.onUpdate)(t)}}),ye=(be.prototype.has=function(t){return this.values.has(t)},be.prototype.set=function(t,n){this.values.set(t,n),this.hasMounted&&this.bindValueToOutput(t,n)},be.prototype.get=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new Qt(n),this.set(t,e)),e},be.prototype.forEach=function(t){return this.values.forEach(t)},be.prototype.bindValueToOutput=function(n,t){var e=this,r=t.onRenderRequest(function(t){return e.output&&e.output(n,t)}),o=t.onChange(function(t){e.onUpdate&&e.onUpdate.set(n,t)});this.unsubscribers.has(n)&&this.unsubscribers.get(n)(),this.unsubscribers.set(n,function(){r(),o()})},be.prototype.setOnUpdate=function(t){this.onUpdate=void 0,t&&(this.onUpdate=ge({onUpdate:t}))},be.prototype.setTransformTemplate=function(t){this.transformTemplate!==t&&(this.transformTemplate=t,this.updateTransformTemplate())},be.prototype.getTransformTemplate=function(){return this.transformTemplate},be.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},be.prototype.mount=function(t){var e=this;this.hasMounted=!0,t&&(this.output=t),this.values.forEach(function(t,n){return e.bindValueToOutput(n,t)}),this.updateTransformTemplate()},be.prototype.unmount=function(){var r=this;this.values.forEach(function(t,n){var e=r.unsubscribers.get(n);e&&e()})},be);function be(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}function we(e){var t=ve(function(){var t=new ye;for(var n in e)me(e[n])&&!Ye.has(n)&&t.set(n,e[n]);return t});return t.setOnUpdate(e.onUpdate),t.setTransformTemplate(e.transformTemplate),t}function xe(t){return Array.isArray(t)}function Ee(t){return xe(t)?t[t.length-1]||0:t}function Ce(n){return function(t){return t.test(n)}}function Pe(t){return Ge.find(Ce(t))}function Se(t){return new Ze({init:t})}function Oe(e){function r(t,n){return void 0!==t&&!e[n](t)}var t=Object.keys(e);return{getVectorKeys:function(e){return t.reduce(function(t,n){return r(e[n],n)&&t.push(n),t},[])},testVectorProps:function(n){return n&&t.some(function(t){return r(n[t],t)})}}}function Te(n){return $e.find(function(t){return t.test(n)})}function Me(t,n){return t(n)}function Ae(t,n){var e=n.from,r=n.to,o=b(n,["from","to"]),i=Te(e)||Te(r),a=i.transform,u=i.parse;return t(P({},o,{from:"string"==typeof e?u(e):e,to:"string"==typeof r?u(r):r})).pipe(a)}function Re(i){return function(t,n){var e=n.from,r=n.to,o=b(n,["from","to"]);return t(P({},o,{from:0,to:1})).pipe(i(e,r))}}function ke(r,t){var n=Oe(t),o=n.testVectorProps,i=n.getVectorKeys;return function(t){if(!o(t))return r(t);var n=i(t),e=t[n[0]];return Qe(e)(r,t,n)}}function Ve(B){return void 0===B&&(B={}),Se(function(t){function r(t){var n;void 0===t&&(t=!1),V=rr({from:x=(n=[C,x])[0],to:C=n[1],ease:l,reverseEase:t}).start(a)}function o(){D=or(Yt(0,c,S)),V.seek(D)}function n(){L=!0,i=X.update(function(t){var n,e=t.delta;S+=e,o(),!(n=L&&c+b<S)||(!n||v||d||g)&&(S=S-c-b,v&&k<v?(k++,!0):d&&T<d?(T++,r(),!0):g&&A<g&&(r(++A%2!=0),!0))||(Y.update(i),u&&X.update(u,!1,!0))},!0)}function e(){L=!1,i&&Y.update(i)}var i,a=t.update,u=t.complete,s=B.duration,c=void 0===s?300:s,f=B.ease,l=void 0===f?vt:f,p=B.flip,d=void 0===p?0:p,h=B.loop,v=void 0===h?0:h,m=B.yoyo,g=void 0===m?0:m,y=B.repeatDelay,b=void 0===y?0:y,w=B.from,x=void 0===w?0:w,E=B.to,C=void 0===E?1:E,P=B.elapsed,S=void 0===P?0:P,O=B.flipCount,T=void 0===O?0:O,M=B.yoyoCount,A=void 0===M?0:M,R=B.loopCount,k=void 0===R?0:R,V=rr({from:x,to:C,ease:l}).start(a),D=0,L=!1;return n(),{isActive:function(){return L},getElapsed:function(){return Xt(0,c,S)},getProgress:function(){return D},stop:function(){e()},pause:function(){return e(),this},resume:function(){return L||n(),this},seek:function(t){return S=Ft(0,c,t),X.update(o,!1,!0),this},reverse:function(){return r(),this}}})}function De(r,o,i){return Se(function(t){var n=t.update,e=o.split(" ").map(function(t){return r.addEventListener(t,n,i),t});return{stop:function(){return e.forEach(function(t){return r.removeEventListener(t,n,i)})}}})}function Le(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}}function Be(t,n){return void 0===n&&(n=Le()),n.clientX=n.x=t.clientX,n.clientY=n.y=t.clientY,n.pageX=t.pageX,n.pageY=t.pageY,n}var Xe,Ye=new Set(["dragOriginX","dragOriginY"]),Fe=null,Ie=function(){return null!==Fe},je=function(){w(!Fe,"Sync render session already open"),Fe=[]},He=function(){w(null!==Fe,"No sync render session found"),Fe&&Fe.forEach(function(t){return t.render()}),Fe=null},ze=function(t){w(null!==Fe,"No sync render session found"),Fe&&Fe.push(t)},Ne=C.memo(function(t){var n=t.innerRef,r=t.values,o=t.isStatic;return C.useEffect(function(){w(n.current instanceof Element,"No `ref` found. Ensure components created with `motion.custom` forward refs using `React.forwardRef`");var e=he(n.current,{preparseOutput:!1,enableHardwareAcceleration:!o});return r.mount(function(t,n){e.set(t,n),Ie()&&ze(e)}),function(){return r.unmount()}},[]),null}),Ue=(Xe=function(t){return t.get()},function(t){var e={};return t.forEach(function(t,n){return e[n]=Xe(t)}),e}),We=new Set(["originX","originY","originZ"]),Ge=[L,j,I,F,z,H,{test:function(t){return"auto"===t},parse:function(t){return t}}],_e=S(Ge,[ct,lt]),qe=function(){return function(t,n){var e=this,r=t.middleware,o=t.onComplete;this.isActive=!0,this.update=function(t){e.observer.update&&e.updateObserver(t)},this.complete=function(){e.observer.complete&&e.isActive&&e.observer.complete(),e.onComplete&&e.onComplete(),e.isActive=!1},this.error=function(t){e.observer.error&&e.isActive&&e.observer.error(t),e.isActive=!1},this.observer=n,this.updateObserver=function(t){return n.update(t)},this.onComplete=o,n.update&&r&&r.length&&r.forEach(function(t){return e.updateObserver=t(e.updateObserver,e.complete)})}}(),Ze=function(){function n(t){void 0===t&&(t={}),this.props=t}return n.prototype.create=function(t){return new n(t)},n.prototype.start=function(t){void 0===t&&(t={});var n,e,r,o=!1,i={stop:function(){}},a=this.props,u=a.init,s=b(a,["init"]),c=u((n=t,e=function(){o=!0,i.stop()},r=s.middleware,new qe({middleware:r,onComplete:e},"function"==typeof n?{update:n}:n)));return i=c?P({},i,c):i,o&&i.stop(),i},n.prototype.applyMiddleware=function(t){return this.create(P({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},n.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=1===t.length?t[0]:zt.apply(void 0,t);return this.applyMiddleware(function(n){return function(t){return n(e(t))}})},n}(),$e=[j,I,F,H,z],Ke=Re(Ht),Je=Re(_t),Qe=function(t){return"number"==typeof t?Me:Boolean(Te(t))?Ae:ct.test(t)?Ke:lt.test(t)?Je:Me},tr=ke(function(b){return void 0===b&&(b={}),Se(function(t){var o=t.complete,i=t.update,n=b.velocity,e=void 0===n?0:n,r=b.from,a=void 0===r?0:r,u=b.power,s=void 0===u?.8:u,c=b.timeConstant,f=void 0===c?350:c,l=b.restDelta,p=void 0===l?.5:l,d=b.modifyTarget,h=0,v=s*e,m=Math.round(a+v),g=void 0===d?m:d(m),y=X.update(function(t){var n=t.delta;h+=n;var e=-v*Math.exp(-h/f),r=p<e||e<-p;i(r?g+e:g),r||(Y.update(y),o())},!0);return{stop:function(){return Y.update(y)}}})},{from:L.test,modifyTarget:function(t){return"function"==typeof t},velocity:L.test}),nr=ke(function(S){return void 0===S&&(S={}),Se(function(t){var s=t.update,c=t.complete,n=S.velocity,f=void 0===n?0:n,e=S.from,r=void 0===e?0:e,o=S.to,l=void 0===o?0:o,i=S.stiffness,p=void 0===i?100:i,a=S.damping,d=void 0===a?10:a,u=S.mass,h=void 0===u?1:u,v=S.restSpeed,m=void 0===v?.01:v,g=S.restDelta,y=void 0===g?.01:g,b=f?-f/1e3:0,w=0,x=l-r,E=r,C=E,P=X.update(function(t){var n=t.delta;w+=n;var e=d/(2*Math.sqrt(p*h)),r=Math.sqrt(p/h)/1e3;if(C=E,e<1){var o=Math.exp(-e*r*w),i=r*Math.sqrt(1-e*e);E=l-o*((b+e*r*x)/i*Math.sin(i*w)+x*Math.cos(i*w))}else{o=Math.exp(-r*w);E=l-o*(x+(b+r*x)*w)}f=Kt(E-C,n);var a=Math.abs(f)<=m,u=Math.abs(l-E)<=y;a&&u?(s(E=l),Y.update(P),c()):s(E)},!0);return{stop:function(){return Y.update(P)}}})},{from:L.test,to:L.test,stiffness:L.test,damping:L.test,mass:L.test,velocity:L.test}),er=ke(function(t){var n=t.from,h=void 0===n?0:n,e=t.velocity,v=void 0===e?0:e,m=t.min,g=t.max,r=t.power,y=void 0===r?.8:r,o=t.timeConstant,b=void 0===o?700:o,i=t.bounceStiffness,w=void 0===i?500:i,a=t.bounceDamping,x=void 0===a?10:a,u=t.restDelta,E=void 0===u?1:u,C=t.modifyTarget;return Se(function(t){function r(t){return void 0!==m&&t<=m}function o(t){return void 0!==g&&g<=t}function n(t){return r(t)||o(t)}function e(t){var n,e;u(t),c=f,v=Kt((f=t)-c,O().delta),a&&!l&&(e=v,r(n=t)&&e<0||o(n)&&0<e)&&p({from:t,velocity:v})}function i(t,n){a&&a.stop(),a=t.start({update:e,complete:function(){n?n():s()}})}var a,u=t.update,s=t.complete,c=h,f=h,l=!1,p=function(t){l=!0,i(nr(P({},t,{to:r(t.from)?m:g,stiffness:w,damping:x,restDelta:E})))};if(n(h))p({from:h,velocity:v});else if(0!==v){var d=tr({from:h,velocity:v,timeConstant:b,power:y,restDelta:n(h)?20:E,modifyTarget:C});i(d,function(){n(f)?p({from:f,velocity:v}):s()})}else s();return{stop:function(){return a&&a.stop()}}})},{from:L.test,velocity:L.test,min:L.test,max:L.test,damping:L.test,stiffness:L.test,modifyTarget:function(t){return"function"==typeof t}}),rr=ke(function(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.ease,a=void 0===i?J:i,u=t.reverseEase;return void 0!==u&&u&&(a=pt(a)),Se(function(t){var n=t.update;return{seek:function(t){return n(t)}}}).pipe(a,function(t){return Ft(e,o,t)})},{ease:function(t){return"function"==typeof t},from:L.test,to:L.test}),or=Xt(0,1),ir=Xt(0,1),ar=[Le()];if("undefined"!=typeof document){De(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){for(var n=t.touches,e=n.length,r=ar.length=0;r<e;r++){var o=n[r];ar.push(Be(o))}})}var ur=Le();if("undefined"!=typeof document){De(document,"mousedown mousemove",!0).start(function(t){Be(t,ur)})}function sr(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function cr(t){return{type:"spring",stiffness:700,damping:0===t?100:35}}function fr(){return{ease:"linear",duration:.3}}function lr(t){return{type:"keyframes",duration:.8,values:t}}function pr(t){var r=t.to,o=t.duration;return Se(function(t){var n=t.update,e=t.complete;n(r),o?gr(o).start({complete:e}):e()})}function dr(t){return Array.isArray(t)?(w(4===t.length,"Cubic bezier arrays must contain four numerical values."),Pt(t[0],t[1],t[2],t[3])):"string"==typeof t?(w(void 0!==Lt[t],"Invalid easing type '"+t+"'"),Lt[t]):t}function hr(t){return Array.isArray(t)&&"number"!=typeof t[0]}function vr(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!lt.test(n)||n.startsWith("url(")))}function mr(t,n,e){var r,o,i,a=e?e.delay:0;if(void 0===e||!function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection;var n=b(t,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(n).length}(e))return P({delay:a},(r=t,i=xe(o=n)?lr:yr[r]||yr.default,P({to:o},i(o))));var u=e[t]||e.default||e;return!1===u.type?{delay:u.hasOwnProperty("delay")?u.delay:a,to:xe(n)?n[n.length-1]:n,type:"just"}:xe(n)?P(P({values:n,duration:.8,delay:a,ease:"linear"},u),{type:"keyframes"}):P({type:"tween",to:n,delay:a},u)}var gr=function(r){return Se(function(t){var n=t.complete,e=setTimeout(n,r);return{stop:function(){return clearTimeout(e)}}})},yr={x:sr,y:sr,z:sr,rotate:sr,rotateX:sr,rotateY:sr,rotateZ:sr,scaleX:cr,scaleY:cr,scale:cr,opacity:fr,backgroundColor:fr,color:fr,default:cr},br=function(t){return 1e3*t},wr={tween:Ve,spring:nr,keyframes:function(t){var n,e,r,o,i=t.easings,a=t.ease,u=void 0===a?J:a,s=t.times,c=t.values,f=b(t,["easings","ease","times","values"]);i=Array.isArray(i)?i:(e=i,(n=c).map(function(){return e||vt}).splice(0,n.length-1)),s=s||(o=(r=c).length,r.map(function(t,n){return 0!==n?n/(o-1):0}));var l=i.map(function(t,n){return rr({from:c[n],to:c[n+1],ease:t})});return Ve(P({},f,{ease:u})).applyMiddleware(function(t){return n=l,e=t,o=(r=s).length,a=(i=o-1)-1,u=n.map(function(t){return t.start(e)}),function(t){t<=r[0]&&u[0].seek(0),t>=r[i]&&u[a].seek(1);for(var n=1;n<o&&!(r[n]>t||n===i);n++);var e=Yt(r[n-1],r[n],t);u[n-1].seek(ir(e))};var r,n,e,o,i,a,u})},inertia:er,just:pr},xr={tween:function(t){if(t.ease){var n=hr(t.ease)?t.ease[0]:t.ease;t.ease=dr(n)}return t},keyframes:function(t){var n=t.from,e=(t.to,t.velocity,b(t,["from","to","velocity"]));if(e.values&&null===e.values[0]){var r=S(e.values);r[0]=n,e.values=r}return e.ease&&(e.easings=hr(e.ease)?e.ease.map(dr):dr(e.ease)),e.ease=J,e}},Er=function(t,n,e,r){var o,i,a,u=n.get(),s=vr(t,u),c=vr(t,e),f=mr(t,e,r),l=f.type,p=void 0===l?"tween":l,d=b(f,["type"]),h=s&&c?wr[p]:pr,v=(o=p,i=P({from:u,velocity:n.getVelocity()},d),xr[o]?xr[o](i):i);return((a=v).hasOwnProperty("duration")||a.hasOwnProperty("repeatDelay"))&&(v.duration&&(v.duration=br(v.duration)),v.repeatDelay&&(v.repeatDelay=br(v.repeatDelay))),[h,v]};function Cr(s,c,f,t){var n=t.delay,l=void 0===n?0:n,p=b(t,["delay"]);return c.start(function(n){var e,t=Er(s,c,f,p),r=t[0],o=t[1],i=o.delay,a=b(o,["delay"]);void 0!==i&&(l=i);function u(){var t=r(a);e=t.start({update:function(t){return c.set(t)},complete:n})}return l?e=gr(br(l)).start({complete:u}):u(),function(){e&&e.stop()}})}var Pr=(Sr.prototype.setProps=function(t){this.props=t},Sr.prototype.setVariants=function(t){t&&(this.variants=t)},Sr.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},Sr.prototype.setValues=function(t,n){var r=this,e=void 0===n?{}:n,o=e.isActive,i=void 0===o?new Set:o,a=e.priority,u=this.resolveVariant(t),s=u.target,c=u.transitionEnd;return s=this.transformValues(P(P({},s),c)),Object.keys(s).forEach(function(t){if(!i.has(t)&&(i.add(t),s)){var n=Ee(s[t]);if(r.values.has(t)){var e=r.values.get(t);e&&e.set(n)}else r.values.set(t,nn(n));a||(r.baseTarget[t]=n)}})},Sr.prototype.transformValues=function(t){var n=this.props.transformValues;return n?n(t):t},Sr.prototype.checkForNewValues=function(t){var n,e=Object.keys(t).filter(this.hasValue),r=e.length;if(r)for(var o=0;o<r;o++){var i=e[o],a=t[i],u=null;Array.isArray(a)&&(u=a[0]),null===u&&(u=this.readValueFromSource(i),w(null!==u,'No initial value for "'+i+'" can be inferred. Ensure an initial value for "'+i+'" is defined on the component.')),"string"==typeof u&&/^\d*\.?\d+$/.test(u)?u=parseFloat(u):(n=u,!_e.find(Ce(n))&<.test(a)&&(u=lt.getAnimatableNone(a))),this.values.set(i,nn(u)),this.baseTarget[i]=u}},Sr.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var n,e,r,o;"function"==typeof t&&(t=t(this.props.custom,(r=this.values,o={},r.forEach(function(t,n){return o[n]=t.get()}),o),(n=this.values,e={},n.forEach(function(t,n){return e[n]=t.getVelocity()}),e)));var i=t.transition;return{transition:void 0===i?this.defaultTransition:i,transitionEnd:t.transitionEnd,target:b(t,["transition","transitionEnd"])}},Sr.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},Sr.prototype.setOverride=function(n,e){this.overrides[e]=n,this.children&&this.children.forEach(function(t){return t.setOverride(n,e)})},Sr.prototype.startOverride=function(t){var n=this.overrides[t];if(n)return this.start(n,{priority:t})},Sr.prototype.clearOverride=function(n){var t=this;if(this.children&&this.children.forEach(function(t){return t.clearOverride(n)}),this.overrides[n]){this.activeOverrides.delete(n);var e=this.getHighestPriority();this.resetIsAnimating(),!e||this.overrides[e]&&this.startOverride(e);var r=this.resolvedOverrides[n];if(r){var o={};for(var i in this.baseTarget)void 0!==r[i]&&(o[i]=this.baseTarget[i]);this.onStart(),this.animate(o).then(function(){return t.onComplete()})}}},Sr.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"==typeof t?this.applyVariantLabels([t]):void this.setValues(t)},Sr.prototype.applyVariantLabels=function(o){var i=this,a=new Set;S(o).reverse().forEach(function(t){var n=i.resolveVariant(i.variants[t]),e=n.target,r=n.transitionEnd;r&&i.setValues(r,{isActive:a}),e&&i.setValues(e,{isActive:a}),i.children&&i.children.size&&i.children.forEach(function(t){return t.applyVariantLabels(o)})})},Sr.prototype.start=function(t,n){var e,r,o=this;return void 0===n&&(n={}),n.priority&&this.activeOverrides.add(n.priority),this.resetIsAnimating(n.priority),r=t,e=Array.isArray(r)?this.animateVariantLabels(t,n):"string"==typeof t?this.animateVariant(t,n):this.animate(t,n),this.onStart(),e.then(function(){return o.onComplete()})},Sr.prototype.animate=function(t,n){var e=this,r=void 0===n?{}:n,o=r.delay,i=void 0===o?0:o,a=r.priority,u=void 0===a?0:a,s=r.transitionOverride,c=this.resolveVariant(t),f=c.target,l=c.transition,p=c.transitionEnd;if(s&&(l=s),!f)return Promise.resolve();if(f=this.transformValues(f),p=p&&this.transformValues(p),this.checkForNewValues(f),this.makeTargetAnimatable){var d=this.makeTargetAnimatable(f,p);f=d.target,p=d.transitionEnd}u&&(this.resolvedOverrides[u]=f),this.checkForNewValues(f);var h=[];for(var v in f){var m=this.values.get(v);if(m&&f&&void 0!==f[v]){var g=f[v];u||(this.baseTarget[v]=Ee(g)),this.isAnimating.has(v)||(this.isAnimating.add(v),h.push(Cr(v,m,g,P({delay:i},l))))}}var y=Promise.all(h);return p?y.then(function(){e.setValues(p,{priority:u})}):y},Sr.prototype.animateVariantLabels=function(t,n){var e=this,r=S(t).reverse().map(function(t){return e.animateVariant(t,n)});return Promise.all(r)},Sr.prototype.animateVariant=function(t,n){var e=this,r=!1,o=0,i=0,a=1,u=n&&n.priority||0,s=this.variants[t],c=s?function(){return e.animate(s,n)}:function(){return Promise.resolve()},f=this.children?function(){return e.animateChildren(t,o,i,a,u)}:function(){return Promise.resolve()};if(s&&this.children){var l=this.resolveVariant(s).transition;l&&(r=l.when||r,o=l.delayChildren||o,i=l.staggerChildren||i,a=l.staggerDirection||a)}if(r){var p="beforeChildren"===r?[c,f]:[f,c],d=p[1];return(0,p[0])().then(d)}return Promise.all([c(),f()])},Sr.prototype.animateChildren=function(r,o,n,t,i){if(void 0===o&&(o=0),void 0===n&&(n=0),void 0===t&&(t=1),void 0===i&&(i=0),!this.children)return Promise.resolve();var a=[],e=(this.children.size-1)*n,u=1===t?function(t){return t*n}:function(t){return e-t*n};return Array.from(this.children).forEach(function(t,n){var e=t.animateVariant(r,{priority:i,delay:o+u(n)});a.push(e)}),Promise.all(a)},Sr.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},Sr.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&t()},Sr.prototype.checkOverrideIsAnimating=function(t){for(var n=this.overrides.length,e=t+1;e<n;e++){var r=this.resolvedOverrides[e];if(r)for(var o in r)this.isAnimating.add(o)}},Sr.prototype.resetIsAnimating=function(n){void 0===n&&(n=0),this.isAnimating.clear(),n<this.getHighestPriority()&&this.checkOverrideIsAnimating(n),this.children&&this.children.forEach(function(t){return t.resetIsAnimating(n)})},Sr.prototype.stop=function(){this.values.forEach(function(t){return t.stop()})},Sr.prototype.addChild=function(e){this.children||(this.children=new Set),this.children.add(e),this.overrides.forEach(function(t,n){t&&e.setOverride(t,n)})},Sr.prototype.removeChild=function(t){this.children&&this.children.delete(t)},Sr.prototype.resetChildren=function(){this.children&&this.children.clear()},Sr);function Sr(t){var e=this,n=t.values,r=t.readValueFromSource,o=t.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!e.values.has(t)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=o,this.values.forEach(function(t,n){return e.baseTarget[n]=t.get()})}var Or=(Tr.prototype.setVariants=function(n){this.variants=n,this.componentControls.forEach(function(t){return t.setVariants(n)})},Tr.prototype.setDefaultTransition=function(n){this.defaultTransition=n,this.componentControls.forEach(function(t){return t.setDefaultTransition(n)})},Tr.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return n.componentControls.delete(t)}},Tr.prototype.start=function(e,r){var n=this;if(this.hasMounted){var o=[];return this.componentControls.forEach(function(t){var n=t.start(e,{transitionOverride:r});o.push(n)}),Promise.all(o)}return new Promise(function(t){n.pendingAnimations.push({animation:[e,r],resolve:t})})},Tr.prototype.set=function(n){return w(this.hasMounted,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),this.componentControls.forEach(function(t){return t.apply(n)})},Tr.prototype.stop=function(){this.componentControls.forEach(function(t){return t.stop()})},Tr.prototype.mount=function(){var r=this;this.hasMounted=!0,this.pendingAnimations.forEach(function(t){var n=t.animation,e=t.resolve;return r.start.apply(r,n).then(e)})},Tr.prototype.unmount=function(){this.hasMounted=!1,this.stop()},Tr);function Tr(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}function Mr(t){return"string"==typeof t||Array.isArray(t)}function Ar(t){return t instanceof Or}function Rr(n,e,t,r,o){void 0===r&&(r=!1);var i,a=o.initial,u=o.animate,s=o.variants,c=o.whileTap,f=o.whileHover,l=C.useContext(kr);void 0!==(null===l||void 0===l?void 0:l.initial)&&(a=l.initial),!1!==a||Ar(u)?"boolean"!=typeof a&&(i=a):i=u;var p=C.useRef(!1),d=s||Mr(u)||Mr(c)||Mr(f)||Ar(u),h=Mr(i)?i:n.initial,v=Mr(u)?u:n.animate,m=r?h:null,g=d&&Mr(v)?v:null,y=C.useMemo(function(){return{controls:d?e:n.controls,initial:h,animate:v,values:t,hasMounted:p,isReducedMotion:n.isReducedMotion}},[m,g,n.isReducedMotion]);return function(t,n){void 0===n&&(n=!1);var e=C.useRef(!0);(!n||n&&e.current)&&t(),e.current=!1}(function(){var t=i||n.initial;t&&e.apply(t)},!(y.static=r)),C.useEffect(function(){p.current=!0},[]),y}var kr=C.createContext(null),Vr=C.createContext({static:!1});function Dr(t,n,e){var r=n.variants,o=n.transition,i=C.useContext(Vr).controls,a=C.useContext(kr),u=ve(function(){return new Pr(t)});return a&&!a.isPresent||(u.resetChildren(),u.setProps(n),u.setVariants(r),u.setDefaultTransition(o)),C.useEffect(function(){e&&i&&i.addChild(u)}),C.useEffect(function(){return function(){n.onAnimationComplete;var t=b(n,["onAnimationComplete"]);u.setProps(t),i&&i.removeChild(u)}},[]),u}function Lr(t){var n=t.animate,e=t.variants,r=t.inherit;return(void 0===r||r)&&!!e&&(!n||n instanceof Or)}function Br(t){var n=t&&"function"!=typeof t?t:C.useRef(null);return t&&"function"==typeof t&&C.useEffect(function(){return t(n.current),function(){return t(null)}},[]),n}function Xr(t){var p=t.getValueControlsConfig,d=t.loadFunctionalityComponents,h=t.renderComponent;return C.forwardRef(function(t,n){var e=Br(n),r=C.useContext(Vr),o=r.static||t.static||!1,i=we(t),a=function(t,n,e,r){void 0===n&&(n={});var o,i={},a=C.useRef({}).current;for(var u in n){var s=n[u];if(me(s))t.set(u,s);else if(e||!In(u)&&(o=u,!We.has(o)))i[u]=s;else{if(t.has(u)){if(s!==a[u])t.get(u).set(s)}else t.set(u,nn(s));a[u]=s}}return r?r(i):i}(i,t.style,o,t.transformValues),u=Lr(t),s=Dr(ve(function(){return p(e,i)}),t,u),c=Rr(r,s,i,o,t),f=o?null:d(e,i,t,r,s,u),l=h(e,a,i,t,o);return C.createElement(C.Fragment,null,C.createElement(Vr.Provider,{value:c},l),C.createElement(C.Fragment,null,C.createElement(Ne,{innerRef:e,values:i,isStatic:o}),f))})}var Yr=["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Fr=C.createContext({transformPagePoint:function(t){return t}});function Ir(t){return C.useEffect(function(){return function(){return t()}},[])}function jr(t,n,e,r){if(e)return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function Hr(n,e,r,o){C.useEffect(function(){var t=n.current;if(r&&t)return jr(t,e,r,o)},[n,e,r,o])}function zr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Nr(t){return!!t.touches}var Ur={pageX:0,pageY:0};function Wr(t){return{point:Nr(t)?{x:(a=(i=t).touches[0]||i.changedTouches[0]||Ur).pageX,y:a.pageY}:(e=(n=t).pageX,r=void 0===e?0:e,o=n.pageY,{x:r,y:void 0===o?0:o})};var n,e,r,o,i,a}var Gr,_r=function(n,t){if(void 0===t&&(t=!1),n){var e=function(t){return n(t,Wr(t))};return t?function(e){if(e)return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}(e):e}},qr="undefined"!=typeof window,Zr=function(){return qr&&null===window.onpointerdown},$r=function(){return qr&&null===window.ontouchstart},Kr=function(){return qr&&null===window.onmousedown},Jr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Qr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function to(t){return Zr()?t:$r()?Qr[t]:Kr()?Jr[t]:t}function no(t,n,e,r){return jr(t,to(n),_r(e,"pointerdown"===n),r)}function eo(t,n,e,r){return Hr(t,to(n),_r(e,"pointerdown"===n),r)}(Gr=r.Point||(r.Point={})).subtract=function(t,n){return{x:t.x-n.x,y:t.y-n.y}};var ro=!(Gr.relativeTo=function(i){var a;return function(t){var n=t.x,e=t.y,r=void 0!==a?a:a="string"==typeof i?document.getElementById(i):i;if(r){var o=r.getBoundingClientRect();return{x:n-o.left-window.scrollX,y:e-o.top-window.scrollY}}}});"undefined"!=typeof window&&document.addEventListener("touchmove",function(t){ro&&t.preventDefault()},{passive:!1});function oo(){return ro=!1}var io=(ao.prototype.handlePointerMove=function(t,n){this.lastMoveEvent=t,this.lastMoveEventInfo=uo(n,this.transformPagePoint),zr(t)&&0===t.buttons?this.handlePointerUp(t,n):X.update(this.updatePoint,!0)},ao.prototype.handlePointerUp=function(t,n){this.end();var e=this.handlers.onEnd;if(e){var r=so(uo(n,this.transformPagePoint),this.history);e&&e(t,r)}},ao.prototype.updateHandlers=function(t){this.handlers=t},ao.prototype.end=function(){this.removeListeners&&this.removeListeners(),Y.update(this.updatePoint),oo()},ao);function ao(t,n,e){var s=this,r=(void 0===e?{}:e).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(s.lastMoveEvent&&s.lastMoveEventInfo){var t=so(s.lastMoveEventInfo,s.history),n=null!==s.startEvent,e=3<=function(t,n){if(void 0===n&&(n=Bt),St(t)&&St(n))return At(t,n);if(Tt(t)&&Tt(n)){var e=At(t.x,n.x),r=At(t.y,n.y),o=Mt(t)&&Mt(n)?At(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}return 0}(t.offset,{x:0,y:0});if(n||e){var r=t.point,o=O().timestamp;s.history.push(P(P({},r),{timestamp:o}));var i=s.handlers,a=i.onStart,u=i.onMove;n||(a&&a(s.lastMoveEvent,t),s.startEvent=s.lastMoveEvent),u&&u(s.lastMoveEvent,t)}}},!(Nr(t)&&1<t.touches.length)){this.handlers=n,this.transformPagePoint=r;var o=uo(Wr(t),this.transformPagePoint),i=o.point,a=O().timestamp;this.history=[P(P({},i),{timestamp:a})];var u=n.onSessionStart;u&&u(t,so(o,this.history));var c=no(window,"pointermove",function(t,n){return s.handlePointerMove(t,n)}),f=no(window,"pointerup",function(t,n){return s.handlePointerUp(t,n)});this.removeListeners=function(){c&&c(),f&&f()}}}function uo(t,n){return n?{point:n(t.point)}:t}function so(t,n){var e=t.point;return{point:e,delta:r.Point.subtract(e,co(n)),offset:r.Point.subtract(e,n[0]),velocity:function(t,n){if(t.length<2)return{x:0,y:0};var e=t.length-1,r=null,o=co(t);for(;0<=e&&(r=t[e],!(o.timestamp-r.timestamp>br(n)));)e--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0==i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};a.x===1/0&&(a.x=0);a.y===1/0&&(a.y=0);return a}(n,.1)}}function co(t){return t[t.length-1]}function fo(t,n){var e=t.onPan,r=t.onPanStart,o=t.onPanEnd,i=t.onPanSessionStart,a=e||r||o||i,u=C.useRef(null),s=C.useContext(Fr).transformPagePoint,c={onSessionStart:i,onStart:r,onMove:e,onEnd:function(t,n){u.current=null,o&&o(t,n)}};C.useEffect(function(){null!==u.current&&u.current.updateHandlers(c)}),eo(n,"pointerdown",a&&function(t){u.current=new io(t,c,{transformPagePoint:s})}),Ir(function(){return u.current&&u.current.end()})}function lo(t){return ho.indexOf(t)+1}var po=function(t,n){return!!n&&(t===n||po(t,n.parentElement))},ho=["whileHover","whileTap","whileDrag"];function vo(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var mo=vo("dragHorizontal"),go=vo("dragVertical");function yo(t){var n=!1;if("y"===t)n=go();else if("x"===t)n=mo();else{var e=mo(),r=go();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}var bo=lo("whileTap");function wo(t,o){var i=t.onTap,e=t.onTapStart,a=t.onTapCancel,u=t.whileTap,s=t.controls,n=i||e||a||u,c=C.useRef(!1),r=C.useRef(null);function f(){r.current&&r.current(),r.current=null}u&&s&&s.setOverride(u,bo);var l=C.useRef(null);l.current=function(t,n){var e=o.current;if(f(),c.current&&e){c.current=!1,s&&u&&s.clearOverride(bo);var r=yo(!0);r&&(r(),po(e,t.target)?i&&i(t,n):a&&a(t,n))}},eo(o,"pointerdown",n?function(t,n){f(),r.current=no(window,"pointerup",function(t,n){return l.current(t,n)}),o.current&&!c.current&&(c.current=!0,e&&e(t,n),s&&u&&s.startOverride(bo))}:void 0),Ir(f)}var xo=lo("whileHover"),Eo=function(e){return function(t,n){zr(t)&&e(t,n)}};function Co(t,n){var e,r,o,i,a,u;fo(t,n),wo(t,n),r=n,o=(e=t).whileHover,i=e.onHoverStart,a=e.onHoverEnd,u=e.controls,o&&u&&u.setOverride(o,xo),eo(r,"pointerenter",Eo(function(t,n){i&&i(t,n),o&&u&&u.startOverride(xo)})),eo(r,"pointerleave",Eo(function(t,n){a&&a(t,n),o&&u&&u.clearOverride(xo)}))}function Po(n){return function(t){return n(t),null}}function So(t){return"object"==typeof t&&t.hasOwnProperty("current")}function Oo(t){return t}var To=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Mo={key:"gestures",shouldRender:function(n){return To.some(function(t){return n.hasOwnProperty(t)})},Component:Po(function(t){var n=t.innerRef;Co(b(t,["innerRef"]),n)})},Ao=(Ro.prototype.start=function(t,n){var c=this,e=(void 0===n?{}:n).snapToCursor;void 0!==e&&e&&this.snapToCursor(t);var r=this.props.transformPagePoint;this.panSession=new io(t,{onSessionStart:function(){ro=!0,ko(function(t){var n=c.point[t];n&&n.stop()})},onStart:function(t,n){if(c.constraintsNeedResolution){var e=c.props,r=e.dragConstraints,o=e.transformPagePoint;c.constraints=Bo(r,c.ref,c.point,o),c.applyConstraintsToPoint()}ko(function(t){var n=c.point[t];n&&c.origin[t].set(n.get())});var i=c.props,a=i.drag,u=i.dragPropagation;if(!a||u||(c.openGlobalLock&&c.openGlobalLock(),c.openGlobalLock=yo(a),c.openGlobalLock)){c.isDragging=!0,c.currentDirection=null;var s=c.props.onDragStart;s&&s(t,Vo(n,c.point))}},onMove:function(t,n){var e=c.props,r=e.dragPropagation,o=e.dragDirectionLock;if(r||c.openGlobalLock){var i=n.offset;if(o&&null===c.currentDirection){if(c.currentDirection=function(t,n){void 0===n&&(n=10);var e=null;return Math.abs(t.y)>n?e="y":Math.abs(t.x)>n&&(e="x"),e}(i),null!==c.currentDirection){var a=c.props.onDirectionLock;a&&a(c.currentDirection)}}else{c.updatePoint("x",i),c.updatePoint("y",i);var u=c.props.onDrag;u&&u(t,Vo(n,c.point))}}},onEnd:function(t,n){c.stop(t,n)}},{transformPagePoint:r})},Ro.prototype.cancelDrag=function(){oo(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},Ro.prototype.stop=function(t,n){var e;null===(e=this.panSession)||void 0===e||e.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,u=o.onDragEnd;if(i||a){var s=n.velocity;this.animateDragEnd(s)}else this.recordBoxInfo(this.constraints);u&&u(t,Vo(n,this.point))}},Ro.prototype.recordBoxInfo=function(t){if(t){var n=t.right,e=t.left,r=t.bottom,o=t.top;this.prevConstraintsBox.width=(n||0)-(e||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},Ro.prototype.snapToCursor=function(t){var e=this,n=this.props.transformPagePoint,r=Wr(t).point,o=Xo(this.ref,n),i=o.width/2+o.left+window.scrollX,a=o.height/2+o.top+window.scrollY,u={x:r.x-i,y:r.y-a};ko(function(t){var n=e.point[t];n&&e.origin[t].set(n.get())}),this.updatePoint("x",u),this.updatePoint("y",u)},Ro.prototype.setPoint=function(t,n){this.point[t]=n},Ro.prototype.updatePoint=function(t,n){var e=this.props,r=e.drag,o=e.dragElastic,i=this.point[t];if(Lo(t,r,this.currentDirection)&&i){var a=Fo(t,this.origin[t].get()+n[t],this.constraints,o);i.set(a)}},Ro.prototype.updateProps=function(t){var e=this,n=t.drag,r=void 0!==n&&n,o=t.dragDirectionLock,i=void 0!==o&&o,a=t.dragPropagation,u=void 0!==a&&a,s=t.dragConstraints,c=void 0!==s&&s,f=t.dragElastic,l=void 0===f||f,p=t.dragMomentum,d=void 0===p||p,h=b(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=P({drag:r,dragDirectionLock:i,dragPropagation:u,dragConstraints:c,dragElastic:l,dragMomentum:d},h);var v=h._dragValueX,m=h._dragValueY,g=h.dragOriginX,y=h.dragOriginY;g&&(this.origin.x=g),y&&(this.origin.y=y),ko(function(t){if(Lo(t,r,e.currentDirection)){var n="x"===t?v:m;e.setPoint(t,n||e.values.get(t,0))}}),this.constraintsNeedResolution=So(c),this.constraints=this.constraintsNeedResolution?this.constraints||!1:c},Ro.prototype.applyConstraintsToPoint=function(e){var r=this;return void 0===e&&(e=this.constraints),ko(function(t){var n=r.point[t];n&&!n.isAnimating()&&Fo(t,n,e,0)})},Ro.prototype.animateDragEnd=function(s){var c=this,t=this.props,f=t.drag,l=t.dragMomentum,p=t.dragElastic,d=t.dragTransition,h=t._dragValueX,v=t._dragValueY,m=t._dragTransitionControls,n=ko(function(t){var n;if(Lo(t,f,c.currentDirection)){var e=c.constraints?Do(t,c.constraints):{},r=p?200:1e6,o=p?40:1e7,i=m||c.controls,a=P(P({type:"inertia",velocity:l?s[t]:0,bounceStiffness:r,bounceDamping:o,timeConstant:750,restDelta:1},d),e),u="x"===t?h:v;return u?Cr(t,u,0,a):i.start(((n={})[t]=0,n.transition=a,n))}});return Promise.all(n).then(function(){c.recordBoxInfo(c.constraints),c.scalePoint();var t=c.props.onDragTransitionEnd;t&&t()})},Ro.prototype.scalePoint=function(){var o=this,t=this.props,n=t.dragConstraints,e=t.transformPagePoint;if(So(n)){var i=Xo(n,e),a=Xo(this.ref,e),r=function(t,n){var e=o.point[t];if(e){if(e.isAnimating())return e.stop(),void o.recordBoxInfo();var r=o.prevConstraintsBox[n]?(i[n]-a[n])/o.prevConstraintsBox[n]:1;e.set(o.prevConstraintsBox[t]*r)}};r("x","width"),r("y","height")}},Ro.prototype.mount=function(t){var o=this,n=no(t,"pointerdown",function(t){var n=o.props,e=n.drag,r=n.dragListener;e&&(void 0===r||r)&&o.start(t)}),e=jr(window,"resize",function(){return o.scalePoint()});if(this.constraintsNeedResolution){var r=this.props,i=r.dragConstraints,a=r.transformPagePoint,u=Bo(i,this.ref,this.point,a);this.applyConstraintsToPoint(u),this.recordBoxInfo(u)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),e&&e(),o.cancelDrag()}},Ro);function Ro(t){var n=t.ref,e=t.values,r=t.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Oo},this.point={},this.origin={x:nn(0),y:nn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=n,this.values=e,this.controls=r}function ko(t){return[t("x"),t("y")]}function Vo(t,n){return P(P({},t),{point:{x:n.x?n.x.get():0,y:n.y?n.y.get():0}})}function Do(t,n){var e=n.top,r=n.right,o=n.bottom,i=n.left;return"x"===t?{min:i,max:r}:{min:e,max:o}}function Lo(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}function Bo(t,n,e,r){w(null!==t.current&&null!==n.current,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=Xo(t,r),i=Xo(n,r),a=o.left-i.left+Yo(e.x),u=o.top-i.top+Yo(e.y);return{top:u,left:a,right:o.width-i.width+a,bottom:o.height-i.height+u}}function Xo(t,n){var e=t.current.getBoundingClientRect(),r=n({x:e.left,y:e.top}),o=r.x,i=r.y,a=n({x:e.width,y:e.height});return{left:o,top:i,width:a.x,height:a.y}}function Yo(t){return t?t.get():0}function Fo(t,n,e,r){var o=n instanceof Qt?n.get():n;if(!e)return o;var i=Do(t,e),a=i.min,u=i.max;return void 0!==a&&o<a?o=r?Io(a,o,r):Math.max(a,o):void 0!==u&&u<o&&(o=r?Io(u,o,r):Math.min(u,o)),n instanceof Qt&&n.set(o),o}function Io(t,n,e){return Ft(t,n,"number"==typeof e?e:.35)}var jo={key:"drag",shouldRender:function(t){return!!t.drag},Component:Po(function(t){var n,e,r,o,i,a,u,s=t.innerRef,c=t.values,f=t.controls,l=b(t,["innerRef","values","controls"]);return e=s,r=c,o=f,i=(n=l).dragControls,a=C.useContext(Fr).transformPagePoint,(u=ve(function(){return new Ao({ref:e,values:r,controls:o})})).updateProps(P(P({},n),{transformPagePoint:a})),C.useEffect(function(){return i&&i.subscribe(u)},[u]),void C.useEffect(function(){return u.mount(e.current)},[])})};function Ho(t){return"string"==typeof t&&t.startsWith("var(--")}var zo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;var No=4;function Uo(t,n,e){void 0===e&&(e=1),w(e<=No,'Max CSS variable fallback depth detected in property "'+t+'". This may indicate a circular fallback dependency.');var r,o,i=(r=t,(o=zo.exec(r))?[o[1],o[2]]:[,]),a=i[0],u=i[1];if(a){var s=window.getComputedStyle(n).getPropertyValue(a);return s||(Ho(u)?Uo(u,n,e+1):u)}}function Wo(t){return $o.has(t)}function Go(t,n){t.set(n,!1),t.set(n)}function _o(t){return t===L||t===j}var qo,Zo,$o=new Set(["width","height","top","left","right","bottom","x","y"]);(Zo=qo=qo||{}).width="width",Zo.height="height",Zo.left="left",Zo.right="right",Zo.top="top",Zo.bottom="bottom";function Ko(t,n){return parseFloat(t.split(", ")[n])}function Jo(i,a){return function(t,n){var e=n.transform;if("none"===e||!e)return 0;var r=e.match(/^matrix3d\((.+)\)$/);if(r)return Ko(r[1],a);var o=e.match(/^matrix\((.+)\)$/);return o?Ko(o[1],i):0}}var Qo=new Set(["x","y","z"]),ti=Yn.filter(function(t){return!Qo.has(t)});function ni(d,t,h,v){void 0===v&&(v={}),h=P({},h),v=P({},v);var n=t.current,m=he(n),e=Object.keys(h).filter(Wo),g=[],y=!1,r=e.reduce(function(t,n){var e=d.get(n);if(!e)return t;var r,o,i,a,u=e.get(),s=h[n],c=Pe(u);if(xe(s))for(var f=s.length,l=null===s[0]?1:0;l<f;l++)r?w(Pe(s[l])===r,"All keyframes must be of the same type"):(r=Pe(s[l]),w(r===c||_o(c)&&_o(r),"Keyframes must be of the same dimension as the current value"));else r=Pe(s);if(c!==r)if(_o(c)&&_o(r)){var p=e.get();"string"==typeof p&&e.set(parseFloat(p)),"string"==typeof s?h[n]=parseFloat(s):Array.isArray(s)&&r===j&&(h[n]=s.map(parseFloat))}else y||(o=d,i=m,a=[],ti.forEach(function(t){var n=o.get(t);void 0!==n&&(a.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),a.length&&i.render(),g=a,y=!0),t.push(n),v[n]=void 0!==v[n]?v[n]:h[n],Go(e,s);return t},[]);if(r.length){var o=function(e,r,t,n,o){var i=t.getBoundingClientRect(),a=getComputedStyle(t),u=a.display,s={top:a.top,left:a.left,bottom:a.bottom,right:a.right,transform:a.transform};"none"===u&&n.set("display",e.display||"block"),n.render();var c=t.getBoundingClientRect();return o.forEach(function(t){var n=r.get(t);Go(n,ei[t](i,s)),e[t]=ei[t](c,a)}),e}(h,d,n,m,r);return g.length&&g.forEach(function(t){var n=t[0],e=t[1];d.get(n).set(e)}),m.render(),{target:o,transitionEnd:v}}return{target:h,transitionEnd:v}}var ei={width:function(t){return t.width},height:function(t){return t.height},top:function(t,n){var e=n.top;return parseFloat(e)},left:function(t,n){var e=n.left;return parseFloat(e)},bottom:function(t,n){var e=t.height,r=n.top;return parseFloat(r)+e},right:function(t,n){var e=t.width,r=n.left;return parseFloat(r)+e},x:Jo(4,13),y:Jo(5,14)};function ri(t,n,e,r){return o=e,Object.keys(o).some(Wo)?ni(t,n,e,r):{target:e,transitionEnd:r};var o}function oi(r,o){return function(t,n){var e=function(t,n,e,r){var o=b(e,[]),i=n.current;if(!(i instanceof HTMLElement))return{target:o,transitionEnd:r};for(var a in r=r&&P({},r),t.forEach(function(t){var n=t.get();if(Ho(n)){var e=Uo(n,i);e&&t.set(e)}}),o){var u=o[a];if(Ho(u)){var s=Uo(u,i);s&&(o[a]=s,r&&void 0===r[a]&&(r[a]=u))}}return{target:o,transitionEnd:r}}(r,o,t,n);return t=e.target,n=e.transitionEnd,ri(r,o,t,n)}}function ii(){var t=C.useState(0),n=t[0],e=t[1];return C.useCallback(function(){return e(n+1)},[n])}var ai,ui,si,ci=C.createContext(null);(si=ui=ui||{}).Prepare="prepare",si.Read="read",si.Render="render";var fi=[ui.Prepare,ui.Read,ui.Render].reduce(function(t,n){return t[n]=[],t},{}),li=!1;function pi(t){for(var n=t.length,e=0;e<n;e++)t[e]();t.length=0}function di(n){return function(t){t&&(li=!0,fi[n].push(t))}}var hi=((ai={})[ui.Prepare]=di(ui.Prepare),ai[ui.Read]=di(ui.Read),ai[ui.Render]=di(ui.Render),ai.flush=function(){li&&(pi(fi.prepare),pi(fi.read),pi(fi.render),li=!1)},ai);var vi={duration:.8,ease:[.45,.05,.19,1]},mi=sr();var gi={id:"x",size:"width",min:"left",max:"right",origin:"originX"},yi={id:"y",size:"height",min:"top",max:"bottom",origin:"originY"};function bi(t,n){return(t+n)/2}function wi(t,n,e){var r,o=t[e.size]-n[e.size],i=.5;return o&&(t[e.min]===n[e.min]?i=0:t[e.max]===n[e.max]&&(i=1)),(r={})[e.size]=o,r[e.origin]=i,r[e.id]=.5===i?bi(t[e.min],t[e.max])-bi(n[e.min],n[e.max]):0,r}var xi,Ei,Ci,Pi={getLayout:function(t){return t.offset},measure:function(t){var n=t.offsetLeft,e=t.offsetTop,r=t.offsetWidth,o=t.offsetHeight;return{left:n,top:e,right:n+r,bottom:e+o,width:r,height:o}}},Si={getLayout:function(t){return t.boundingBox},measure:function(t){var n=t.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height,right:n.right,bottom:n.bottom}}};function Oi(t){return window.getComputedStyle(t).position}function Ti(t){return"width"===t||"height"===t}function Mi(){this.constructor=Ei}function Ai(){return null!==xi&&xi.apply(this,arguments)||this}var Ri,ki,Vi={key:"layout",shouldRender:function(t){var n=t.positionTransition,e=t.layoutTransition;return w(!(n&&e),"Don't set both positionTransition and layoutTransition on the same component"),"undefined"!=typeof window&&!(!n&&!e)},Component:(xi=C.Component,e(Ei=Ai,Ci=xi),Ei.prototype=null===Ci?Object.create(Ci):(Mi.prototype=Ci.prototype,new Mi),Ai.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.innerRef,e=t.positionTransition,d=t.values,i=t.controls,a=n.current;if(a instanceof HTMLElement){var r,o,u,s,h,v,m=(r=this.props,o=r.layoutTransition,u=r.positionTransition,o||u),g=!!e,c=Oi(a),y={offset:Pi.measure(a),boundingBox:Si.measure(a)};return hi.prepare(function(){s=a.style.transform,a.style.transform=""}),hi.read(function(){h={offset:Pi.measure(a),boundingBox:Si.measure(a)};var t,n,e=Oi(a);t=c,n=e,v=g&&t===n?Pi:Si}),hi.render(function(){var t,n,e=v.getLayout(y),r=v.getLayout(h),c=P(P({},wi(t=e,n=r,gi)),wi(t,n,yi));if(c.x||c.y||c.width||c.height){he(a).set({originX:c.originX,originY:c.originY}),je();var f={},l={},p="function"==typeof m?m({delta:c}):m;o("left","x",0,c.x),o("top","y",0,c.y),g||(o("width","scaleX",1,y.boundingBox.width/h.boundingBox.width),o("height","scaleY",1,y.boundingBox.height/h.boundingBox.height)),f.transition=l,p&&i.start(f),He()}else s&&(a.style.transform=s);function o(t,n,e,r){var o=Ti(t)?t:n;if(c[o]){var i="boolean"==typeof p?P({},g?mi:vi):p,a=d.get(n,e),u=a.getVelocity();l[n]=i[n]?P({},i[n]):P({},i),void 0===l[n].velocity&&(l[n].velocity=u||0),f[n]=e;var s=Ti(t)||v!==Pi?0:a.get();a.set(r+s)}}}),null}},Ai.prototype.componentDidUpdate=function(){hi.flush()},Ai.prototype.render=function(){return null},Ai.contextType=ci,Ai)},Di=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","positionTransition","layoutTransition","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","_dragValueX","_dragValueY","_dragTransitionControls","dragOriginX","dragOriginY","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function Li(t){return Di.has(t)}(ki=Ri=Ri||{}).Target="Target",ki.VariantLabel="VariantLabel",ki.AnimationSubscription="AnimationSubscription";function Bi(t,n){return void 0!==n&&(Array.isArray(t)&&Array.isArray(n)?!function(t,n){if(null===n)return!1;var e=n.length;if(e!==t.length)return!1;for(var r=0;r<e;r++)if(n[r]!==t[r])return!1;return!0}(n,t):t!==n)}function Xi(t,n){void 0===n&&(n=!1);t.transition;var e=t.transitionEnd,r=b(t,["transition","transitionEnd"]);return n?P(P({},r),e):r}function Yi(t){var n,e=t instanceof Qt?t.get():t;return Array.from(new Set((n=e)?Array.isArray(n)?n:[n]:[]))}var Fi,Ii;function ji(r,t,o,i){var a=Yi(t),u=C.useContext(Vr),s=u.hasMounted&&u.hasMounted.current,c=C.useRef(!1);C.useEffect(function(){var t,n,e=!1;o?(e=!!s,a=Yi(u.animate)):e=c.current||(t=Yi(r),n=a,t.join(",")!==n.join(",")),e&&i.start(a),c.current=!0},[a.join(",")])}function Hi(t){return t.animate instanceof Or}var zi=((Fi={})[Ri.Target]=Po(function(t){var u,s,c,f,l,p,n=t.animate,e=t.controls,r=t.values,o=t.transition;return u=n,s=e,c=r,f=o,l=C.useRef(!0),(p=C.useRef(null)).current||(p.current=Xi(u,!0)),void C.useEffect(function(){var t={},n=Xi(u),e=Xi(u,!0);for(var r in n){var o=l.current&&(!c.has(r)||c.get(r).get()!==e[r]),i=null!==e[r],a=Bi(p.current[r],e[r]);i&&(a||o)&&(t[r]=n[r])}l.current=!1,p.current=P(P({},p.current),e),Object.keys(t).length&&s.start(P(P({},t),{transition:u.transition||f,transitionEnd:u.transitionEnd}))},[u])}),Fi[Ri.VariantLabel]=Po(function(t){var n=t.animate,e=t.inherit,r=void 0===e||e,o=t.controls;return ji(t.initial,n,r,o)}),Fi[Ri.AnimationSubscription]=Po(function(t){var n,e,r,o=t.animate,i=t.controls;return n=o,e=i,r=C.useMemo(function(){return n.subscribe(e)},[n]),void C.useEffect(function(){return function(){r&&r()}},[r])}),Fi),Ni=["initial","animate","whileTap","whileHover"],Ui=((Ii={})[Ri.Target]=function(t){return!(void 0===t.animate||(n=t.animate,Array.isArray(n)||"string"==typeof n)||Hi(t));var n},Ii[Ri.VariantLabel]=function(n){return void 0!==n.variants||Ni.some(function(t){return"string"==typeof n[t]})},Ii[Ri.AnimationSubscription]=Hi,Ii);function Wi(){var t=C.useContext(kr);if(null===t)return[!0];var n=t.isPresent,e=t.onExitComplete,r=t.register;return C.useEffect(r,[]),!n&&e?[!1,e]:[!0]}var Gi={key:"exit",shouldRender:function(t){return!!t.exit&&!Lr(t)},Component:Po(function(t){var n=t.animate,e=t.controls,r=t.exit,o=Wi(),i=o[0],a=o[1],u=C.useContext(kr),s=C.useRef(!1),c=void 0!==(null===u||void 0===u?void 0:u.custom)?u.custom:t.custom;C.useEffect(function(){i?!s.current||!n||n instanceof Or||e.start(n):(!s.current&&r&&(e.setProps(P(P({},t),{custom:c})),e.start(r).then(a)),s.current=!0),i&&(s.current=!1)},[i])})},_i=function(t){return!Li(t)};try{var qi=require("@emotion/is-prop-valid").default;_i=function(t){return t.startsWith("on")?!Li(t):qi(t)}}catch(E){}function Zi(t,n,e,r){var o,i,a,u,s,c={style:(i=n,a=e,u=Ue(o=t),(s=o.getTransformTemplate())&&(u.transform=i.transform?s({},i.transform):s),Jn(P(P({},i),u),!a))};return r&&(c.style.userSelect="none",c.draggable=!1),c}var $i=[Vi,jo,Mo,Gi],Ki=$i.length;function Ji(c){var f="string"==typeof c,l=f&&-1!==Yr.indexOf(c);return{renderComponent:function(t,n,e,r,o){var i,a,u=f?function(t){var n={};for(var e in t)_i(e)&&(n[e]=t[e]);return n}(r):r,s=l?(i=n,(a=ue(Ue(e),void 0,void 0,void 0,void 0,!1)).style=P(P({},i),a.style),a):Zi(e,n,o,!!r.drag);return C.createElement(c,P(P(P({},u),{ref:t}),s))},loadFunctionalityComponents:function(t,n,e,r,o,i){var a=[],u=function(t){var n=void 0;for(var e in Ri)Ui[e](t)&&(n=e);return n?zi[n]:void 0}(e);u&&a.push(C.createElement(u,{key:"animation",initial:e.initial,animate:e.animate,variants:e.variants,transition:e.transition,controls:o,inherit:i,values:n}));for(var s=0;s<Ki;s++){var c=$i[s],f=c.shouldRender,l=c.key,p=c.Component;f(e,r)&&a.push(C.createElement(p,P({key:l},e,{parentContext:r,values:n,controls:o,innerRef:t})))}return a},getValueControlsConfig:function(n,t){return{values:t,readValueFromSource:function(t){return he(n.current).get(t)},makeTargetAnimatable:oi(t,n)}}}}var Qi=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","webview"].reduce(function(t,n){var e=Ji(n);return t[n]=Xr(e),t},{}),ta=Yr.reduce(function(t,n){return t[n]=Xr(Ji(n)),t},{}),na=P(P({custom:function(t){return Xr(Ji(t))}},Qi),ta);function ea(t){return ve(function(){return nn(t)})}var ra=function(t){return"object"==typeof(n=t)&&n.mix?t.mix:void 0;var n};function oa(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!Array.isArray(t[0]),r=e?0:-1,o=t[0+r],i=t[1+r],a=t[2+r],u=t[3+r],s=$t(i,a,P({mixer:ra(a[0])},u));return e?s(o):s}var ia=function(t){return"function"==typeof t},aa=function(t){return t};function ua(t,n,e,r){var o=C.useRef(null),i=[t],a=aa;if(ia(n))a=n;else if(Array.isArray(e)){var u=n;a=oa(u,e,r),i=[t,u.join(","),e.join(",")]}return C.useMemo(function(){return o.current&&o.current.destroy(),o.current=t.addChild({transformer:a}),o.current},i)}function sa(t){return.001<t?1/t:1e5}function ca(){return{scrollX:nn(0),scrollY:nn(0),scrollXProgress:nn(0),scrollYProgress:nn(0)}}function fa(t,n,e){e.set(t&&n?t/n:0)}function la(i,a){function t(){var t=a(),n=t.xOffset,e=t.yOffset,r=t.xMaxOffset,o=t.yMaxOffset;i.scrollX.set(n),i.scrollY.set(e),fa(n,r,i.scrollXProgress),fa(e,o,i.scrollYProgress)}return t(),t}var pa="undefined"!=typeof window?C.useLayoutEffect:C.useEffect;var da=ca();function ha(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var va=!1;var ma=(ga.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),function(){return n.componentControls.delete(t)}},ga.prototype.start=function(n,e){this.componentControls.forEach(function(t){t.start(n.nativeEvent||n,e)})},ga);function ga(){this.componentControls=new Set}function ya(){return new ma}function ba(t){var n=t.children,e=t.initial,r=t.isPresent,o=t.onExitComplete,i=t.custom,a=C.useRef(0),u=C.useRef(0),s={initial:e,isPresent:r,custom:i,onExitComplete:function(){u.current++;var t=u.current>=a.current;o&&t&&o()}},c=C.useMemo(function(){return u.current=0,function(){return a.current++,function(){return a.current--}}},[r]);return C.createElement(kr.Provider,{value:P(P({},s),{register:c})},n)}function wa(t){return t.key||""}var xa=nn(null);if("undefined"!=typeof window)if(window.matchMedia){var Ea=window.matchMedia("(prefers-reduced-motion)"),Ca=function(){return xa.set(Ea.matches)};Ea.addListener(Ca),Ca()}else xa.set(!1);function Pa(t,n){return"boolean"==typeof n?n:Boolean(t)}r.AnimatePresence=function(t){var n,e,r,o=t.children,i=t.custom,a=t.initial,u=void 0===a||a,s=t.onExitComplete,c=t.exitBeforeEnter,f=ii(),l=C.useContext(ci)||f,p=C.useRef(!0),d=(n=o,e=[],C.Children.forEach(n,function(t){C.isValidElement(t)&&e.push(t)}),e),h=C.useRef(d),v=C.useRef(new Map).current,m=C.useRef(new Set).current;if(r=v,d.forEach(function(t){var n=wa(t);r.set(n,t)}),p.current)return p.current=!1,C.createElement(C.Fragment,null,d.map(function(t){return C.createElement(ba,{key:wa(t),isPresent:!0,initial:!!u&&void 0},t)}));for(var g=S(d),y=h.current.map(wa),b=d.map(wa),w=y.length,x=0;x<w;x++){var E=y[x];-1===b.indexOf(E)?m.add(E):m.delete(E)}return c&&m.size&&(g=[]),m.forEach(function(n){if(-1===b.indexOf(n)){var t=v.get(n);if(t){var e=y.indexOf(n);g.splice(e,0,C.createElement(ba,{key:wa(t),isPresent:!1,onExitComplete:function(){m.delete(n);var t=h.current.findIndex(function(t){return t.key===n});h.current.splice(t,1),m.size||(h.current=d,l(),s&&s())},custom:i},t))}}}),g=g.map(function(t){var n=t.key;return m.has(n)?t:C.createElement(ba,{key:wa(t),isPresent:!0},t)}),h.current=g,C.createElement(C.Fragment,null,m.size?g:g.map(function(t){return C.cloneElement(t)}))},r.AnimationControls=Or,r.DragControls=ma,r.MotionContext=Vr,r.MotionPluginContext=Fr,r.MotionPlugins=function(t){var n=t.children,e=b(t,["children"]),r=C.useContext(Fr),o=C.useRef(P({},r)).current;for(var i in e)o[i]=e[i];return C.createElement(Fr.Provider,{value:o},n)},r.MotionValue=Qt,r.ReducedMotion=function(t){var n=t.children,e=t.enabled,r=C.useContext(Vr);return r=C.useMemo(function(){return P(P({},r),{isReducedMotion:e})},[e]),C.createElement(Vr.Provider,{value:r},n)},r.UnstableSyncLayout=function(t){var n=t.children,e=ii();return C.createElement(ci.Provider,{value:e},n)},r.animationControls=function(){return new Or},r.createMotionComponent=Xr,r.isValidMotionProp=Li,r.motion=na,r.motionValue=nn,r.transform=oa,r.unwrapMotionValue=function(t){var n,e=t instanceof Qt?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},r.useAnimatedState=function(t){var n=C.useState(t),e=n[0],r=n[1],o=ve(function(){return{onUpdate:r}}),i=we(o),a=Dr({values:i,readValueFromSource:function(t){return e[t]}},{},!1),u=ve(function(){return function(t){return a.start(t)}});return C.useEffect(function(){return i.mount(),function(){return i.unmount()}},[]),[e,u]},r.useAnimation=function(){var t=ve(function(){return new Or});return C.useEffect(function(){return t.mount(),function(){return t.unmount()}},[]),t},r.useCycle=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];n.length;var e=C.useRef(0),r=C.useState(n[e.current]),o=r[0],i=r[1];return[o,function(t){e.current="number"!=typeof t?Jt(0,n.length,e.current+1):t,i(n[e.current])}]},r.useDomEvent=Hr,r.useDragControls=function(){return ve(ya)},r.useElementScroll=function(i){var a=ve(ca);return pa(function(){var t=i.current;if(w(!!t,"ref provided to useScroll must be passed into a HTML element."),t){var n,e=la(a,(n=t,function(){return{xOffset:n.scrollLeft,yOffset:n.scrollTop,xMaxOffset:n.scrollWidth-n.offsetWidth,yMaxOffset:n.scrollHeight-n.offsetHeight}})),r=jr(t,"scroll",e,{passive:!0}),o=jr(t,"resize",e);return function(){r&&r(),o&&o()}}},[]),a},r.useExternalRef=Br,r.useGestures=Co,r.useInvertedScale=function(t){var n=ea(1),e=ea(1),r=C.useContext(Vr).values;return w(!(!t&&!r),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t?(n=t.scaleX||n,e=t.scaleY||e):r&&(n=r.get("scaleX",1),e=r.get("scaleY",1)),{scaleX:ua(n,sa),scaleY:ua(e,sa)}},r.useMotionValue=ea,r.usePanGesture=fo,r.usePresence=Wi,r.useReducedMotion=function(){var n=C.useContext(Vr).isReducedMotion,t=C.useState(Pa(xa.get(),n)),e=t[0],r=t[1];return C.useEffect(function(){return xa.onChange(function(t){r(Pa(t,n))})},[r,n]),e},r.useSpring=function(t,e){void 0===e&&(e={});var n,r,o=C.useRef(null),i=ea(me(t)?t.get():t);return C.useMemo(function(){return i.attach(function(t,n){return o.current&&o.current.stop(),o.current=nr(P({from:i.get(),to:t,velocity:i.getVelocity()},e)).start(n),i.get()})},Object.values(e)),n=t,r=function(t){return i.set(parseFloat(t))},C.useEffect(function(){return me(n)?n.onChange(r):void 0},[n]),i},r.useTapGesture=wo,r.useTransform=ua,r.useViewportScroll=function(){return pa(function(){va||function(){if(va=!0,"undefined"!=typeof window){var t=la(da,ha);jr(window,"scroll",t,{passive:!0}),jr(window,"resize",t)}}()},[]),da},Object.defineProperty(r,"__esModule",{value:!0})});
|