Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

framer-motion

Package Overview
Dependencies
Maintainers
20
Versions
1157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

framer-motion - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

dist/value/use-viewport-scroll-values.d.ts

2

dist/behaviours/use-draggable.d.ts
import { RefObject } from "react";
import { MotionValuesMap } from "../motion";
import { MotionValuesMap } from "../motion/utils/use-motion-values";
declare type DragDirection = "x" | "y";

@@ -4,0 +4,0 @@ export interface DraggableProps {

@@ -265,2 +265,5 @@ 'use strict';

MotionValue.prototype.removeChild = function (child) {
if (!this.children) {
return;
}
this.children.delete(child);

@@ -508,14 +511,10 @@ };

};
var getPoseTransitions = function (valueKey, to, transitionProp) {
if (transitionProp !== undefined) {
var transition = {};
if (transitionProp === false || transitionProp[valueKey] === false) {
transition = { type: "just" };
}
else {
transition = transitionProp[valueKey] || transitionProp.default || transitionProp;
}
return __assign({}, transition, { to: to });
var getTransitionForValue = function (key, to, transitionDefinition) {
if (transitionDefinition === undefined) {
return getDefaultTransition(key, to);
}
return getDefaultTransition(valueKey, to);
var valueTransitionDefinition = transitionDefinition[key] || transitionDefinition.default || transitionDefinition;
return valueTransitionDefinition.type === false
? { type: "just", to: to }
: __assign({}, valueTransitionDefinition, { to: to });
};

@@ -526,3 +525,3 @@ var preprocessOptions = function (type, opts) {

var getTransition = function (valueKey, to, transition) {
var _a = getPoseTransitions(valueKey, to, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
var _a = getTransitionForValue(valueKey, to, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
var actionFactory = transitions[type];

@@ -670,2 +669,5 @@ var opts = preprocessOptions(type, transitionDefinition);

if (staggerDirection === void 0) { staggerDirection = 1; }
if (!this.children) {
return Promise.resolve();
}
var animations = [];

@@ -698,2 +700,5 @@ var maxStaggerDuration = (this.children.size - 1) * staggerChildren;

AnimationControls.prototype.removeChild = function (controls) {
if (!this.children) {
return;
}
this.children.delete(controls);

@@ -1316,2 +1321,42 @@ };

var scrollX = motionValue(0);
var scrollY = motionValue(0);
var scrollXProgress = motionValue(0);
var scrollYProgress = motionValue(0);
var documentWidth = 0;
var documentHeight = 0;
var windowWidth = 0;
var windowHeight = 0;
var hasEventListener = false;
var addScrollListener = function () {
hasEventListener = true;
if (typeof window === "undefined")
return;
var updateScrollValues = function () {
var xOffset = window.pageXOffset;
var yOffset = window.pageYOffset;
scrollX.set(xOffset);
scrollY.set(yOffset);
scrollXProgress.set(documentWidth - xOffset - windowWidth);
scrollYProgress.set(documentHeight - yOffset - windowHeight);
};
var updateViewportMeasurements = function () {
documentWidth = document.body.clientWidth;
documentHeight = document.body.clientHeight;
windowWidth = window.innerWidth;
windowHeight = window.innerHeight;
};
updateViewportMeasurements();
updateScrollValues();
window.addEventListener("resize", updateViewportMeasurements);
window.addEventListener("scroll", updateScrollValues, { passive: true });
};
var viewportMotionValues = { scrollX: scrollX, scrollY: scrollY, scrollXProgress: scrollXProgress, scrollYProgress: scrollYProgress };
var useViewportScrollValues = function () {
if (!hasEventListener) {
addScrollListener();
}
return viewportMotionValues;
};
var useAnimation = function (poses) {

@@ -1330,2 +1375,3 @@ var animation = React.useMemo(function () { return new AnimationManager(); }, []);

exports.useTransformedValue = useTransformedValue;
exports.useViewportScrollValues = useViewportScrollValues;
exports.useAnimation = useAnimation;

@@ -1332,0 +1378,0 @@ exports.useTapGesture = useTapGesture;

@@ -257,2 +257,5 @@ import sync, { getFrameData, cancelSync } from 'framesync';

MotionValue.prototype.removeChild = function (child) {
if (!this.children) {
return;
}
this.children.delete(child);

@@ -500,14 +503,10 @@ };

};
var getPoseTransitions = function (valueKey, to, transitionProp) {
if (transitionProp !== undefined) {
var transition = {};
if (transitionProp === false || transitionProp[valueKey] === false) {
transition = { type: "just" };
}
else {
transition = transitionProp[valueKey] || transitionProp.default || transitionProp;
}
return __assign({}, transition, { to: to });
var getTransitionForValue = function (key, to, transitionDefinition) {
if (transitionDefinition === undefined) {
return getDefaultTransition(key, to);
}
return getDefaultTransition(valueKey, to);
var valueTransitionDefinition = transitionDefinition[key] || transitionDefinition.default || transitionDefinition;
return valueTransitionDefinition.type === false
? { type: "just", to: to }
: __assign({}, valueTransitionDefinition, { to: to });
};

@@ -518,3 +517,3 @@ var preprocessOptions = function (type, opts) {

var getTransition = function (valueKey, to, transition) {
var _a = getPoseTransitions(valueKey, to, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
var _a = getTransitionForValue(valueKey, to, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
var actionFactory = transitions[type];

@@ -662,2 +661,5 @@ var opts = preprocessOptions(type, transitionDefinition);

if (staggerDirection === void 0) { staggerDirection = 1; }
if (!this.children) {
return Promise.resolve();
}
var animations = [];

@@ -690,2 +692,5 @@ var maxStaggerDuration = (this.children.size - 1) * staggerChildren;

AnimationControls.prototype.removeChild = function (controls) {
if (!this.children) {
return;
}
this.children.delete(controls);

@@ -1308,2 +1313,42 @@ };

var scrollX = motionValue(0);
var scrollY = motionValue(0);
var scrollXProgress = motionValue(0);
var scrollYProgress = motionValue(0);
var documentWidth = 0;
var documentHeight = 0;
var windowWidth = 0;
var windowHeight = 0;
var hasEventListener = false;
var addScrollListener = function () {
hasEventListener = true;
if (typeof window === "undefined")
return;
var updateScrollValues = function () {
var xOffset = window.pageXOffset;
var yOffset = window.pageYOffset;
scrollX.set(xOffset);
scrollY.set(yOffset);
scrollXProgress.set(documentWidth - xOffset - windowWidth);
scrollYProgress.set(documentHeight - yOffset - windowHeight);
};
var updateViewportMeasurements = function () {
documentWidth = document.body.clientWidth;
documentHeight = document.body.clientHeight;
windowWidth = window.innerWidth;
windowHeight = window.innerHeight;
};
updateViewportMeasurements();
updateScrollValues();
window.addEventListener("resize", updateViewportMeasurements);
window.addEventListener("scroll", updateScrollValues, { passive: true });
};
var viewportMotionValues = { scrollX: scrollX, scrollY: scrollY, scrollXProgress: scrollXProgress, scrollYProgress: scrollYProgress };
var useViewportScrollValues = function () {
if (!hasEventListener) {
addScrollListener();
}
return viewportMotionValues;
};
var useAnimation = function (poses) {

@@ -1319,2 +1364,2 @@ var animation = useMemo(function () { return new AnimationManager(); }, []);

export { motion, useMotionValue, useTransformedValue, useAnimation, useTapGesture, usePanGesture, useGestures };
export { motion, useMotionValue, useTransformedValue, useViewportScrollValues, useAnimation, useTapGesture, usePanGesture, useGestures };

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.FramerMotion={},t.React)}(this,function(t,D){"use strict";var e=["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"],n=["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"],r=e.concat(n),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var F=function(){return(F=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function V(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n}var u,a,s=0,c="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-s));s=e+n,setTimeout(function(){return t(s)},n)};(a=u||(u={})).Read="read",a.Update="update",a.Render="render",a.PostRender="postRender",a.FixedUpdate="fixedUpdate";var f=1/60*1e3,p=!0,d=!1,l=!1,h={delta:0,timestamp:0},v=[u.Read,u.Update,u.Render,u.PostRender],m=function(t){return d=t},g=v.reduce(function(t,e){var r,i,u,a,s,o,c,f,p,l=(r=m,i=[],s=!(u=[]),o=a=0,c=new WeakSet,f=new WeakSet,p={cancel:function(t){var e=u.indexOf(t);c.add(t),-1!==e&&u.splice(e,1)},process:function(t){var e,n;if(s=!0,i=(e=[u,i])[0],(u=e[1]).length=0,a=i.length)for(o=0;o<a;o++)(n=i[o])(t),!0!==f.has(n)||c.has(n)||(p.schedule(n),r(!0));s=!1},schedule:function(t,e,n){var r=n&&s,o=r?i:u;e&&f.add(t),-1===o.indexOf(t)&&(o.push(t),r&&(a=i.length))}});return t.sync[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),d||P(),l.schedule(t,e,n),t},t.cancelSync[e]=function(t){return l.cancel(t)},t.steps[e]=l,t},{steps:{},sync:{},cancelSync:{}}),y=g.steps,U=g.sync,I=g.cancelSync,b=function(t){return y[t].process(h)},w=function(t){d=!1,h.delta=p?f:Math.max(Math.min(t-h.timestamp,40),1),p||(f=h.delta),h.timestamp=t,l=!0,v.forEach(b),l=!1,d&&(p=!1,c(w))},P=function(){p=d=!0,l||c(w)},M=function(){return h},O=function(){return(O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},x=function(e,n){return function(t){return Math.max(Math.min(t,n),e)}},S=function(e){return function(t){return"string"==typeof t&&0===t.indexOf(e)}},k=function(t){return t%1?Number(t.toFixed(5)):t},C={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},E=O({},C,{transform:x(0,1)}),A=O({},C,{default:1}),T=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},L=T("deg"),R=T("%"),Y=T("px"),j=T("vh"),X=T("vw"),B=x(0,255),q=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,W=function(t){return void 0!==t.red},Z=function(t){return void 0!==t.hue},_=function(u){var a=u.length;return function(t){if("string"!=typeof t)return t;for(var e,n,r={},o="string"==typeof(e=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")))?e.split(/,\s*/):[e],i=0;i<a;i++)r[u[i]]=void 0!==o[i]?parseFloat(o[i]):1;return r}},N=O({},C,{transform:function(t){return Math.round(B(t))}}),z=S("rgb"),G={test:function(t){return"string"==typeof t?z(t):W(t)},parse:_(["red","green","blue","alpha"]),transform:function(t){var e,n,r,o,i,u=t.red,a=t.green,s=t.blue,c=t.alpha;return e={red:N.transform(u),green:N.transform(a),blue:N.transform(s),alpha:k(c)},n=e.red,r=e.green,o=e.blue,i=e.alpha,"rgba("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},$=S("hsl"),H={test:function(t){return"string"==typeof t?$(t):Z(t)},parse:_(["hue","saturation","lightness","alpha"]),transform:function(t){var e,n,r,o,i,u=t.hue,a=t.saturation,s=t.lightness,c=t.alpha;return e={hue:Math.round(u),saturation:R.transform(k(a)),lightness:R.transform(k(s)),alpha:k(c)},n=e.hue,r=e.saturation,o=e.lightness,i=e.alpha,"hsla("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},K=O({},G,{test:S("#"),parse:function(t){var e="",n="",r="";return 4<t.length?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(t){return"string"==typeof t&&q.test(t)||G.test(t)||H.test(t)||K.test(t)},parse:function(t){return G.test(t)?G.parse(t):H.test(t)?H.parse(t):K.test(t)?K.parse(t):t},transform:function(t){return W(t)?G.transform(t):Z(t)?H.transform(t):t}},Q=/(-)?(\d[\d\.]*)/g,tt=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,et="${c}",nt=function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(Q),r=t.match(tt);return n&&(e+=n.length),r&&(e+=r.length),0<e},rt=function(t){var e=t,n=[],r=e.match(tt);r&&(e=e.replace(tt,et),n.push.apply(n,r.map(J.parse)));var o=e.match(Q);return o&&n.push.apply(n,o.map(C.parse)),n},ot=function(t){var r=t,o=0,e=t.match(tt),i=e?e.length:0;if(e)for(var n=0;n<i;n++)r=r.replace(e[n],et),o++;var u=r.match(Q),a=u?u.length:0;if(u)for(n=0;n<a;n++)r=r.replace(u[n],"${n}"),o++;return function(t){for(var e=r,n=0;n<o;n++)e=e.replace(n<i?et:"${n}",n<i?J.transform(t[n]):k(t[n]));return e}},it=function(e){return function(t){return 1-e(1-t)}},ut=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},at=function(e){return function(t){return t*t*((e+1)*t-e)}},st=function(t){var e=at(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},ct=function(t){return t},ft=function(e){return function(t){return Math.pow(t,e)}}(2),pt=it(ft),lt=ut(ft),dt=function(t){return 1-Math.sin(Math.acos(t))},ht=it(dt),vt=ut(ht),mt=at(1.525),gt=it(mt),yt=ut(mt),bt=st(1.525),wt="undefined"!=typeof Float32Array,Pt=function(t,e){return 1-3*e+3*t},Mt=function(t,e){return 3*e-6*t},Ot=function(t){return 3*t},xt=function(t,e,n){return 3*Pt(e,n)*t*t+2*Mt(e,n)*t+Ot(e)},St=function(t,e,n){return((Pt(e,n)*t+Mt(e,n))*t+Ot(e))*t};function kt(u,e,a,n){var s=wt?new Float32Array(11):new Array(11),r=function(t){for(var e,n,r,o=0,i=1;10!==i&&s[i]<=t;++i)o+=.1;return e=(t-s[--i])/(s[i+1]-s[i]),.001<=(r=xt(n=o+.1*e,u,a))?function(t,e){for(var n=0,r=0;n<8;++n){if(0===(r=xt(e,u,a)))return e;e-=(St(e,u,a)-t)/r}return e}(t,n):0===r?n:function(t,e,n){for(var r,o,i=0;0<(r=St(o=e+(n-e)/2,u,a)-t)?n=o:e=o,1e-7<Math.abs(r)&&++i<10;);return o}(t,o,o+.1)};!function(){for(var t=0;t<11;++t)s[t]=St(.1*t,u,a)}();return function(t){return u===e&&a===n?t:0===t?0:1===t?1:St(r(t),e,n)}}var Ct=function(t){return"number"==typeof t},Et=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},At=Et(function(t,e,n){return Math.min(Math.max(n,t),e)}),Tt=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Lt=function(t,e,n){return-n*t+n*e+t},Rt=function(){return(Rt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yt=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},jt=[K,G,H],Xt=function(e){return jt.find(function(t){return t.test(e)})},Dt=function(t,e){var n=Xt(t),r=Xt(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=Rt({},o),a=n===H?Lt:Yt;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=Lt(o.alpha,i.alpha,t),n.transform(u)}},Ft=function(e,n){return function(t){return n(e(t))}},Vt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Ft)},Ut=function(t,r){var n=t.slice(),o=n.length,i=t.map(function(e,t){var n=r[t];return Ct(e)?function(t){return Lt(e,n,t)}:J.test(e)?Dt(e,n):It(e,n)});return function(t){for(var e=0;e<o;e++)n[e]=i[e](t);return n}},It=function(t,e){var n=ot(t);return n(t),ot(e)(t),Vt(Ut(rt(t),rt(e)),n)},Bt=(Et(Lt),function(t){return t}),qt=function(i){return void 0===i&&(i=Bt),Et(function(t,e,n){var r=e-n,o=-(0-t+1)*(0-i(Math.abs(r)));return r<=0?e+o:e-o})},Wt=(qt(),qt(Math.sqrt),function(t,e){return Ct(t)?t/(1e3/e):0}),Zt=function(t,e){return e?t*(1e3/e):0};Et(function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t}),At(0,1);var _t=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.applyMiddleware=function(t){return this.create(F({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=1===t.length?t[0]:Vt.apply(void 0,t);return this.applyMiddleware(function(e){return function(t){return e(n(t))}})},t.prototype.while=function(r){return this.applyMiddleware(function(e,n){return function(t){return r(t)?e(t):n()}})},t.prototype.filter=function(n){return this.applyMiddleware(function(e){return function(t){return n(t)&&e(t)}})},t}(),Nt=function(){return function(t,e){var n=t.middleware,r=t.onComplete,o=this;this.isActive=!0,this.update=function(t){o.observer.update&&o.updateObserver(t)},this.complete=function(){o.observer.complete&&o.isActive&&o.observer.complete(),o.onComplete&&o.onComplete(),o.isActive=!1},this.error=function(t){o.observer.error&&o.isActive&&o.observer.error(t),o.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=r,e.update&&n&&n.length&&n.forEach(function(t){return o.updateObserver=t(o.updateObserver,o.complete)})}}(),zt=function(t,e,n){var r=e.middleware;return new Nt({middleware:r,onComplete:n},"function"==typeof t?{update:t}:t)},Gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.start=function(t){void 0===t&&(t={});var e=!1,n={stop:function(){}},r=this.props,o=r.init,i=V(r,["init"]),u=o(zt(t,i,function(){e=!0,n.stop()}));return n=u?F({},n,u):n,t.registerParent&&t.registerParent(n),e&&n.stop(),n},e}(_t),$t=function(t){return new Gt({init:t})},Ht=function(t){var f=t.getCount,p=t.getFirst,l=t.getOutput,d=t.mapApi,h=t.setProp,v=t.startActions;return function(c){return $t(function(t){var e=t.update,r=t.complete,o=t.error,i=f(c),u=l(),a=function(){return e(u)},s=0,n=v(c,function(t,e){var n=!1;return t.start({complete:function(){n||(n=!0,++s===i&&U.update(r))},error:o,update:function(t){h(u,e,t),U.update(a,!1,!0)}})});return Object.keys(p(n)).reduce(function(t,e){return t[e]=d(n,e),t},{})})}},Kt=Ht({getOutput:function(){return{}},getCount:function(t){return Object.keys(t).length},getFirst:function(t){return t[Object.keys(t)[0]]},mapApi:function(o,i){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return Object.keys(o).reduce(function(t,e){var n;return o[e][i]&&(r[0]&&void 0!==r[0][e]?t[e]=o[e][i](r[0][e]):t[e]=(n=o[e])[i].apply(n,r)),t},{})}},setProp:function(t,e,n){return t[e]=n},startActions:function(n,r){return Object.keys(n).reduce(function(t,e){return t[e]=r(n[e],e),t},{})}}),Jt=Ht({getOutput:function(){return[]},getCount:function(t){return t.length},getFirst:function(t){return t[0]},mapApi:function(e,r){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.map(function(t,e){if(t[r])return Array.isArray(n[0])?t[r](n[0][e]):t[r].apply(t,n)})}},setProp:function(t,e,n){return t[e]=n},startActions:function(t,n){return t.map(function(t,e){return n(t,e)})}}),Qt=[Y,R,L,j,X],te=function(e){return Qt.find(function(t){return t.test(e)})},ee=function(t,e){return t(e)},ne=function(o,i,u){var t=u[0],e=i[t].map(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return se(t)(o,r)});return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Jt(t)}.apply(void 0,e)},re=function(o,i,u){var a=u[0],t=Object.keys(i[a]).reduce(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return t[e]=se(i[a][e])(o,r),t},{});return Kt(t)},oe=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=te(n)||te(r),u=i.transform,a=i.parse;return t(F({},o,{from:"string"==typeof n?a(n):n,to:"string"==typeof r?a(r):r})).pipe(u)},ie=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]);return t(F({},o,{from:0,to:1})).pipe(Dt(n,r),J.transform)},ue=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=ot(n);return i(n),ot(r)(n),t(F({},o,{from:0,to:1})).pipe(Ut(rt(n),rt(r)),i)},ae=function(r,t){var n,o,i,e=(n=t,o=Object.keys(n),i=function(t,e){return void 0!==t&&!n[e](t)},{getVectorKeys:function(n){return o.reduce(function(t,e){return i(n[e],e)&&t.push(e),t},[])},testVectorProps:function(e){return e&&o.some(function(t){return i(e[t],t)})}}),u=e.testVectorProps,a=e.getVectorKeys;return function(t){if(!u(t))return r(t);var e=a(t),n=t[e[0]];return se(n)(r,t,e)}},se=function(t){var e=ee;return"number"==typeof t?e=ee:Array.isArray(t)?e=ne:Boolean(te(t))?e=oe:J.test(t)?e=ie:nt(t)?e=ue:"object"==typeof t&&(e=re),e},ce=ae(function(b){return void 0===b&&(b={}),$t(function(t){var o=t.complete,i=t.update,e=b.velocity,n=void 0===e?0:e,r=b.from,u=void 0===r?0:r,a=b.power,s=void 0===a?.8:a,c=b.timeConstant,f=void 0===c?350:c,p=b.restDelta,l=void 0===p?.5:p,d=b.modifyTarget,h=0,v=s*n,m=Math.round(u+v),g=void 0===d?m:d(m),y=U.update(function(t){var e=t.delta;h+=e;var n=-v*Math.exp(-h/f),r=l<n||n<-l;i(r?g+n:g),r||(I.update(y),o())},!0);return{stop:function(){return I.update(y)}}})},{from:C.test,modifyTarget:function(t){return"function"==typeof t},velocity:C.test}),fe=ae(function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,u=void 0===i?ct:i;return $t(function(t){var e=t.update;return{seek:function(t){return e(t)}}}).pipe(u,function(t){return Lt(n,o,t)})},{ease:function(t){return"function"==typeof t},from:C.test,to:C.test}),pe=At(0,1),le=function(X){return void 0===X&&(X={}),$t(function(t){var n,r=t.update,o=t.complete,e=X.duration,i=void 0===e?300:e,u=X.ease,a=void 0===u?pt:u,s=X.flip,c=void 0===s?0:s,f=X.loop,p=void 0===f?0:f,l=X.yoyo,d=void 0===l?0:l,h=X.from,v=void 0===h?0:h,m=X.to,g=void 0===m?1:m,y=X.elapsed,b=void 0===y?0:y,w=X.playDirection,P=void 0===w?1:w,M=X.flipCount,O=void 0===M?0:M,x=X.yoyoCount,S=void 0===x?0:x,k=X.loopCount,C=void 0===k?0:k,E=fe({from:v,to:g,ease:a}).start(r),A=0,T=!1,L=function(){return P*=-1},R=function(){A=pe(Tt(0,i,b)),E.seek(A)},Y=function(){T=!0,n=U.update(function(t){var e=t.delta;b+=e*P,R(),function(){var t,e=1===P?T&&i<=b:T&&b<=0;if(!e)return!1;if(e&&!p&&!c&&!d)return!0;var n=!1;return p&&C<p?(C++,n=!(b=0)):c&&O<c?(b=i-b,E=fe({from:v=(t=[g,v])[0],to:g=t[1],ease:a}).start(r),O++,n=!0):d&&S<d&&(L(),S++,n=!0),!n}()&&o&&(I.update(n),U.update(o,!1,!0))},!0)},j=function(){T=!1,n&&I.update(n)};return Y(),{isActive:function(){return T},getElapsed:function(){return At(0,i,b)},getProgress:function(){return A},stop:function(){j()},pause:function(){return j(),this},resume:function(){return T||Y(),this},seek:function(t){return b=Lt(0,i,t),U.update(R,!1,!0),this},reverse:function(){return L(),this}}})},de=At(0,1),he=ae(function(m){return void 0===m&&(m={}),$t(function(t){var r=t.complete,o=t.update,e=m.acceleration,i=void 0===e?0:e,n=m.friction,u=void 0===n?0:n,a=m.velocity,s=void 0===a?0:a,c=m.springStrength,f=m.to,p=m.restSpeed,l=void 0===p?.001:p,d=m.from,h=void 0===d?0:d,v=U.update(function(t){var e=t.delta,n=Math.max(e,16);(i&&(s+=Wt(i,n)),u&&(s*=Math.pow(1-u,n/100)),void 0!==c&&void 0!==f)&&(s+=(f-h)*Wt(c,n));h+=Wt(s,n),o(h),!1!==l&&(!s||Math.abs(s)<=l)&&(I.update(v),r())},!0);return{set:function(t){return h=t,this},setAcceleration:function(t){return i=t,this},setFriction:function(t){return u=t,this},setSpringStrength:function(t){return c=t,this},setSpringTarget:function(t){return f=t,this},setVelocity:function(t){return s=t,this},stop:function(){return I.update(v)}}})},{acceleration:C.test,friction:C.test,velocity:C.test,from:C.test,to:C.test,springStrength:C.test}),ve=ae(function(S){return void 0===S&&(S={}),$t(function(t){var s=t.update,c=t.complete,e=S.velocity,f=void 0===e?0:e,n=S.from,r=void 0===n?0:n,o=S.to,p=void 0===o?0:o,i=S.stiffness,l=void 0===i?100:i,u=S.damping,d=void 0===u?10:u,a=S.mass,h=void 0===a?1:a,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,P=p-r,M=r,O=M,x=U.update(function(t){var e=t.delta;w+=e;var n=d/(2*Math.sqrt(l*h)),r=Math.sqrt(l/h)/1e3;if(O=M,n<1){var o=Math.exp(-n*r*w),i=r*Math.sqrt(1-n*n);M=p-o*((b+n*r*P)/i*Math.sin(i*w)+P*Math.cos(i*w))}else{o=Math.exp(-r*w);M=p-o*(P+(b+r*P)*w)}f=Zt(M-O,e);var u=Math.abs(f)<=m,a=Math.abs(p-M)<=y;u&&a?(s(M=p),I.update(x),c()):s(M)},!0);return{stop:function(){return I.update(x)}}})},{from:C.test,to:C.test,stiffness:C.test,damping:C.test,mass:C.test,velocity:C.test}),me=function(r,o,i){return $t(function(t){var e=t.update,n=o.split(" ").map(function(t){return r.addEventListener(t,e,i),t});return{stop:function(){return n.forEach(function(t){return r.removeEventListener(t,e,i)})}}})},ge=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},ye=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},be=[ge()];if("undefined"!=typeof document){me(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){for(var e=t.touches,n=e.length,r=be.length=0;r<n;r++){var o=e[r];be.push(ye(o))}})}var we=ge();if("undefined"!=typeof document){me(document,"mousedown mousemove",!0).start(function(t){ye(t,we)})}var Pe,Me=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},Oe=Me(function(t,e,n){return Math.min(Math.max(n,t),e)}),xe=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Se=function(t,e,n){return-n*t+n*e+t},ke=function(){return(ke=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ce=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},Ee=[K,G,H],Ae=function(e){return Ee.find(function(t){return t.test(e)})},Te=function(t,e){var n=Ae(t),r=Ae(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=ke({},o),a=n===H?Se:Ce;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=Se(o.alpha,i.alpha,t),n.transform(u)}},Le=function(e,n){return function(t){return n(e(t))}},Re=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Le)},Ye=function(t,e){var n,r,o,i,u,a=ot(t);return a(t),ot(e)(t),Re((n=rt(t),r=rt(e),o=n.slice(),i=o.length,u=n.map(function(e,t){var n=r[t];return"number"==typeof e?function(t){return Se(e,n,t)}:J.test(e)?Te(e,n):Ye(e,n)}),function(t){for(var e=0;e<i;e++)o[e]=u[e](t);return o}),a)},je=Me(Se),Xe=function(o,i){return Array(o.length-1).fill((t=o[0],"number"==typeof t?je:J.test(t)?Te:Ye)).map(function(t,e){var n=t(o[e],o[e+1]);if(i){var r=Array.isArray(i)?i[e]:i;return Re(r,n)}return n});var t},De=function(t,e,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,u=r.ease,a=t.length;e.length,!u||!Array.isArray(u)||(u.length,t.length),t[0]>t[a-1]&&(t=t.slice(),e=e.slice(),t.reverse(),e.reverse());var s,c,f,p,l,d,h,v,m,g=Xe(e,u),y=2===a?(d=g,h=(l=t)[0],v=l[1],m=d[0],function(t){return m(xe(h,v,t))}):(c=g,f=(s=t).length,p=f-1,function(t){var e=0,n=!1;if(t<=s[0]?n=!0:t>=s[p]&&(e=p-1,n=!0),!n){for(var r=1;r<f&&!(s[r]>t||r===p);r++);e=r-1}var o=xe(s[e],s[e+1],t);return c[e](o)});return i?Re(Oe(t[0],t[a-1]),y):y},Fe=(Oe(0,1),function(){function n(t,e){var n,r=void 0===e?{}:e,o=r.transformer,i=r.parent,u=this;this.timeDelta=0,this.lastUpdated=0,this.cancelSubscriber=new Set,this.canTrackVelocity=!1,this.notifySubscriber=function(t){t(u.current)},this.scheduleVelocityCheck=function(){return U.postRender(u.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==u.lastUpdated&&(u.prev=u.current)},this.setChild=function(t){return t.set(u.current)},this.parent=i,this.transformer=o,this.set(t),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return n.prototype.addChild=function(t){var e=new n(this.current,F({parent:this},t));return this.children||(this.children=new Set),this.children.add(e),e},n.prototype.removeChild=function(t){this.children.delete(t)},n.prototype.addUpdateSubscription=function(t){var e=this;this.updateSubscribers||(this.updateSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.update(n,!1,!0)};return this.updateSubscribers.add(r),this.cancelSubscriber.add(function(){return I.update(n)}),function(){return e.updateSubscribers.delete(r)}},n.prototype.addRenderSubscription=function(t){var e=this;this.renderSubscribers||(this.renderSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.render(n)};return this.renderSubscribers.add(r),r(),this.cancelSubscriber.add(function(){return I.render(n)}),function(){return e.renderSubscribers.delete(r)}},n.prototype.set=function(t,e){void 0===e&&(e=!0),this.prev=this.current,this.current=this.transformer?this.transformer(t):t,this.updateSubscribers&&this.updateSubscribers.forEach(this.notifySubscriber),this.children&&this.children.forEach(this.setChild),e&&this.renderSubscribers&&this.renderSubscribers.forEach(this.notifySubscriber);var n=M(),r=n.delta,o=n.timestamp;this.timeDelta=r,this.lastUpdated=o,U.postRender(this.scheduleVelocityCheck)},n.prototype.get=function(){return this.current},n.prototype.getVelocity=function(){return this.canTrackVelocity?(t=parseFloat(this.prev)-parseFloat(this.current),(e=this.timeDelta)?t*(1e3/e):0):0;var t,e},n.prototype.control=function(t,e,n){var r=this,o=e.delay,i=V(e,["delay"]);this.stop();var u,a=t(F({from:this.get(),velocity:this.getVelocity()},i));return n&&(a=a.pipe(n)),o&&(a=function(){for(var u=[],t=0;t<arguments.length;t++)u[t]=arguments[t];return $t(function(t){var e,n=t.update,r=t.complete,o=0,i=function(){e=u[o].start({complete:function(){++o>=u.length?r():i()},update:n})};return i(),{stop:function(){return e&&e.stop()}}})}((u=o,$t(function(t){var e=t.complete,n=setTimeout(e,u);return{stop:function(){return clearTimeout(n)}}})),a)),new Promise(function(t){r.controller=a.start({update:function(t){return r.set(t)},complete:t})})},n.prototype.stop=function(){this.controller&&this.controller.stop()},n.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.cancelSubscriber.forEach(function(t){return t()}),this.cancelSubscriber.clear(),this.parent&&this.parent.removeChild(this),this.stop()},n}()),Ve=function(t,e){return new Fe(t,e)},Ue=function(t){var e,n=t instanceof Fe?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))},Ie=function(t){return[t.join(",")]},Be=D.createContext({dragging:!1}),qe=function(){return(qe=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},We=function(t){var s=t.onRead,e=t.onRender,n=t.aliasMap,c=void 0===n?{}:n,r=t.uncachedValues,f=void 0===r?new Set:r,o=t.useCache,p=void 0===o||o;return function(n){var o={},i=[],u=!1,r=function(t,e){var n=c[t]||t,r=o[n];o[n]=e,o[n]!==r&&(-1===i.indexOf(n)&&i.push(n),u||(u=!0,U.render(a)))};function a(t){return void 0===t&&(t=!1),(!0===t||u)&&(e(o,n,i),u=!1,i.length=0),this}return{get:function(t){var e=c[t]||t;return e?p&&!f.has(e)&&void 0!==o[e]?o[e]:s(e,n):o},set:function(e,t){if("string"==typeof e){if(void 0===t)return function(t){return r(e,t)};r(e,t)}else for(var n in e)e.hasOwnProperty(n)&&r(n,e[n]);return this},render:a}}},Ze=/([a-z])([A-Z])/g,_e=function(t){return t.replace(Ze,"$1-$2").toLowerCase()},Ne=new Map,ze=new Map,Ge=["Webkit","Moz","O","ms",""],$e=Ge.length,He="undefined"!=typeof document,Ke=function(t,e){return ze.set(t,_e(e))},Je=function(t,e){void 0===e&&(e=!1);var n,r=e?ze:Ne;return r.has(t)||(He?function(t){Pe=Pe||document.createElement("div");for(var e=0;e<$e;e++){var n=Ge[e],r=""===n,o=r?t:n+t.charAt(0).toUpperCase()+t.slice(1);(o in Pe.style||r)&&(Ne.set(t,o),Ke(t,(r?"":"-")+_e(o)))}}(t):Ke(n=t,n)),r.get(t)||t},Qe=["","X","Y","Z"],tn=["translate","scale","rotate","skew","transformPerspective"].reduce(function(t,n){return Qe.reduce(function(t,e){return t.push(n+e),t},t)},["x","y","z"]),en=tn.reduce(function(t,e){return t[e]=!0,t},{}),nn=function(t){return!0===en[t]},rn=function(t,e){return tn.indexOf(t)-tn.indexOf(e)},on={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,rotate:L,rotateX:L,rotateY:L,rotateZ:L,scale:A,scaleX:A,scaleY:A,scaleZ:A,skew:L,skewX:L,skewY:L,distance:Y,translateX:Y,translateY:Y,translateZ:Y,perspective:Y,opacity:E,transformOriginX:R,transformOriginY:R,transformOriginZ:Y},un=function(t){return on[t]},an="scrollLeft",sn="scrollTop",cn=new Set([an,sn]),fn={x:"translateX",y:"translateY",z:"translateZ",originX:"transformOriginX",originY:"transformOriginY",originZ:"transformOriginZ",scrollX:an,scrollY:sn},pn=function(t,e,n,r,o,i){void 0===e&&(e=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=[]);var u,a=!0,s=!1;for(var c in t){var f=fn[c]?fn[c]:c,p=t[c],l=un(f),d="number"==typeof p&&l?l.transform(p):p;nn(f)?(r[f]=d,i.push(f),a&&(l.default&&p!==l.default||!l.default&&0!==p)&&(a=!1)):"transformOriginX"===(u=f)||"transformOriginY"===u?(o[f]=d,s=!0):cn.has(f)||(n[f]=d)}if(a)n.transform="none";else{var h="",v=!1;i.sort(rn);for(var m=i.length,g=0;g<m;g++){h+=(f=i[g])+"("+r[f]+") ",v="z"===f||v}!v&&e&&(h+="translateZ(0)"),n.transform=h}return s&&(n.transformOrigin=(o.transformOriginX||0)+" "+(o.transformOriginY||0)+" "+(o.transformOriginZ||0)),n},ln=We({onRead:function(t,e){var n=e.element,r=e.preparseOutput,o=un(t);if(nn(t))return o&&o.default||0;if(cn.has(t))return n[t];var i=window.getComputedStyle(n,null).getPropertyValue(Je(t,!0))||0;return r&&o&&o.parse?o.parse(i):i},onRender:function(t,e,n){var r=e.element,o=e.buildStyles;r.style.cssText+=o(t),-1!==n.indexOf(an)&&(r.scrollLeft=t.scrollLeft),-1!==n.indexOf(sn)&&(r.scrollTop=t.scrollTop)},aliasMap:fn,uncachedValues:cn}),dn=function(t,e){return ln(qe({element:t,buildStyles:function(u){void 0===u&&(u=!0);var a={},s={},c={},f={},p=[];return function(t){var e,n,r="";for(var o in p.length=0,a=pn(t,u,a,c,f,p)){var i=a[o];i!==s[o]&&(r+=(n=i,";"+Je(o,!0)+":"+n))}return a=(e=[s,a])[0],s=e[1],r}}(),preparseOutput:!0},e))},hn=function(t,e){return t/100*e+"px"},vn={fill:J,stroke:J,scale:A,scaleX:A,scaleY:A,opacity:E,fillOpacity:E,strokeOpacity:E},mn=We({onRead:function(t,e){var n=e.element;if(nn(t)){var r=vn[t];return r?r.default:0}return n.getAttribute(t)},onRender:function(t,e,n){var r=e.dimensions;!function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])}(e.element,function(t,e,n,r){var o=!1,i=!1,u={},a=n?{pathLength:"0",pathSpacing:""+r}:void 0,s=void 0!==t.scale?t.scale||1e-7:t.scaleX||1,c=void 0!==t.scaleY?t.scaleY||1e-7:s||1,f=e.width*((t.originX||50)/100)+e.x,p=e.height*((t.originY||50)/100)+e.y,l=1*s*-f,d=1*c*-p,h=f/s,v=p/c,m={translate:"translate("+t.translateX+", "+t.translateY+") ",scale:"translate("+l+", "+d+") scale("+s+", "+c+") translate("+h+", "+v+") ",rotate:"rotate("+t.rotate+", "+f+", "+p+") ",skewX:"skewX("+t.skewX+") ",skewY:"skewY("+t.skewY+") "};for(var g in t)if(t.hasOwnProperty(g)){var y=t[g];nn(g)?o=!0:!n||"pathLength"!==g&&"pathSpacing"!==g||"number"!=typeof y?n&&"pathOffset"===g?u["stroke-dashoffset"]=hn(-y,r):u[_e(g)]=y:(i=!0,a[g]=hn(y,r))}if(i&&(u["stroke-dasharray"]=a.pathLength+" "+a.pathSpacing),o)for(var g in u.transform="",m)if(m.hasOwnProperty(g)){var b="scale"===g?"1":"0";u.transform+=m[g].replace(/undefined/g,b)}return u}(t,r,e.isPath,e.pathLength))},aliasMap:{x:"translateX",y:"translateY",background:"fill"}}),gn=We({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var e=t.scrollTop,n=void 0===e?0:e,r=t.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),yn=new WeakMap,bn=function(t,e){var n,r,o,i;return t instanceof HTMLElement?n=dn(t,e):t instanceof SVGElement?(o=(r=t).getBBox(),i={element:r,dimensions:{x:o.x,y:o.y,width:o.width,height:o.height},isPath:!1},"path"===r.tagName&&(i.isPath=!0,i.pathLength=r.getTotalLength()),n=mn(i)):t===window&&(n=gn(t)),yn.set(t,n),n};function wn(t,e){var n,r,o="string"==typeof t?document.querySelector(t):t;return n=o,r=e,yn.has(n)?yn.get(n):bn(n,r)}var Pn,Mn=function(){function t(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return t.prototype.has=function(t){return this.values.has(t)},t.prototype.set=function(t,e){this.values.set(t,e),this.hasMounted&&this.bindValueToStyler(t,e)},t.prototype.get=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new Fe(e),this.set(t,n)),n},t.prototype.forEach=function(t){return this.values.forEach(t)},t.prototype.bindValueToStyler=function(e,t){var n=this,r=t.addRenderSubscription(function(t){return n.styler.set(e,t)});this.unsubscribers.set(e,r)},t.prototype.mount=function(t){var n=this;this.hasMounted=!0,this.styler=wn(t),this.values.forEach(function(t,e){return n.bindValueToStyler(e,t)})},t.prototype.unmount=function(){var r=this;this.values.forEach(function(t,e){var n=r.unsubscribers.get(e);n&&n()})},t}(),On=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},xn=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},Sn=function(){return{ease:"linear",duration:250}},kn={x:On,y:On,z:On,rotate:On,rotateX:On,rotateY:On,rotateZ:On,scaleX:xn,scaleY:xn,scale:xn,opacity:Sn,backgroundColor:Sn,color:Sn,default:xn},Cn={tween:le,spring:ve,keyframes:function(t){var e,n,r,o,i=t.easings,u=t.ease,a=void 0===u?ct:u,s=t.times,c=t.values,f=V(t,["easings","ease","times","values"]);i=Array.isArray(i)?i:(n=i,(e=c).map(function(){return n||pt}).splice(0,e.length-1)),s=s||(o=(r=c).length,r.map(function(t,e){return 0!==e?e/(o-1):0}));var p=i.map(function(t,e){return fe({from:c[e],to:c[e+1],ease:t})});return le(F({},f,{ease:a})).applyMiddleware(function(t){return e=p,n=t,o=(r=s).length,u=(i=o-1)-1,a=e.map(function(t){return t.start(n)}),function(t){t<=r[0]&&a[0].seek(0),t>=r[i]&&a[u].seek(1);for(var e=1;e<o&&!(r[e]>t||e===i);e++);var n=Tt(r[e-1],r[e],t);a[e-1].seek(de(n))};var r,e,n,o,i,u,a})},decay:ce,physics:he,just:function(t){var r=t.to;return $t(function(t){var e=t.update,n=t.complete;e(r),n()})}},En={linear:ct,easeIn:ft,easeOut:pt,easeInOut:lt,circIn:dt,circOut:ht,circInOut:vt,backIn:mt,backOut:gt,backInOut:yt,anticipate:bt},An={tween:function(t){var e=t.ease;if(Array.isArray(e)){e.length;var n=e[0],r=e[1],o=e[2],i=e[3];t.ease=kt(n,r,o,i)}else"string"==typeof e&&(t.ease=En[e]);return t},keyframes:function(t){t.from,t.to;return V(t,["from","to"])}},Tn=function(t,e,n){if(void 0===n)return F({},(kn[t]||kn.default)(r=e),{to:r});var r,o={};return o=!1===n||!1===n[t]?{type:"just"}:n[t]||n.default||n,F({},o,{to:e})},Ln=function(t,e,n){var r,o,i=Tn(t,e,n),u=i.type,a=void 0===u?"tween":u,s=V(i,["type"]);return[Cn[a],(o=s,An[r=a]?An[r](o):o)]},Rn=function(n,r,o){return void 0===o&&(o=new Set),Object.keys(n).forEach(function(t){if(!o.has(t))if(o.add(t),r.has(t)){var e=r.get(t);e&&e.set(n[t])}else r.set(t,Ve(n[t]))})},Yn=function(t,e){return void 0===e&&(e={}),t?("function"==typeof t&&(t=t(e)),Array.isArray(t)?t:[t]):[]},jn=function(){function t(t){this.poses={},this.isAnimating=new Set,this.values=t}return t.prototype.setProps=function(t){this.props=t},t.prototype.setPoses=function(t){this.poses=t},t.prototype.start=function(t,e){return this.resetIsAnimating(),n=t,Array.isArray(n)?this.animateMultiplePoses(t):"string"==typeof t?this.animatePose(t):this.animate([t,e]);var n},t.prototype.set=function(t){var i=this,u=new Set;t.slice().reverse().forEach(function(t){var e=Yn(i.poses[t],i.props),n=e[0],r=e[1];if(r){var o=r.applyOnEnd;o&&Rn(o,i.values,u)}n&&Rn(n,i.values,u)})},t.prototype.animate=function(t,s){var c=this;void 0===s&&(s=0);var e=Yn(t),f=e[0],n=e[1],p=void 0===n?{}:n;if(!f)return Promise.resolve();var r=Object.keys(f).reduce(function(t,e){if(c.isAnimating.has(e))return t;c.values.has(e)||c.values.set(e,Ve(0));var n=c.values.get(e);if(!n)return t;var r,o=f[e];if("number"==typeof(r=o)||nt(r)){var i=Ln(e,o,F({delay:s},p)),u=i[0],a=i[1];t.push(n.control(u,a))}else n.set(o);return c.isAnimating.add(e),t},[]);return Promise.all(r).then(function(){if(p&&p.applyOnEnd){var t=p.applyOnEnd;Rn(t,c.values)}})},t.prototype.animateMultiplePoses=function(t){var e=this,n=t.slice().reverse().map(function(t){return e.animatePose(t)});return Promise.all(n)},t.prototype.animatePose=function(t,e){var n=this;void 0===e&&(e=0);var r=!1,o=!1,i=0,u=this.poses[t],a=u?function(){return n.animate(u,e)}:function(){return Promise.resolve()},s=this.children?function(){return n.animateChildren(t,i,0,1)}:function(){return Promise.resolve()};if(u&&this.children){var c=Yn(u)[1];c&&(r=c.beforeChildren||r,o=c.afterChildren||o,i=c.delayChildren||i)}if(r||o){var f=r?[a,s]:[s,a],p=f[1];return(0,f[0])().then(p)}return Promise.all([a(),s()])},t.prototype.animateChildren=function(r,o,e,t){void 0===o&&(o=0),void 0===e&&(e=0),void 0===t&&(t=1);var i=[],n=(this.children.size-1)*e,u=1===t?function(t){return t*e}:function(t){return n-t*e};return Array.from(this.children).forEach(function(t,e){var n=t.animatePose(r,o+u(e));i.push(n)}),Promise.all(i)},t.prototype.resetIsAnimating=function(){this.isAnimating.clear(),this.children&&this.children.forEach(function(t){return t.resetIsAnimating()})},t.prototype.stop=function(){this.values.forEach(function(t){return t.stop()})},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t)},t.prototype.removeChild=function(t){this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}(),Xn=(Pn=function(t){return t.get()},function(t){var n={};return t.forEach(function(t,e){return n[e]=Pn(t)}),n}),Dn=function(n,r){void 0===r&&(r={});var o={};return Object.keys(r).forEach(function(t){var e=r[t];e instanceof Fe?n.get(t)!==e&&n.set(t,e):o[t]=e}),D.useMemo(function(){return F({},o,pn(Xn(n)))},[o,n])},Fn=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.subscribers=new Set,this.poses={}}return t.prototype.setPoses=function(e){this.poses=e,this.subscribers.forEach(function(t){return t.setPoses(e)})},t.prototype.subscribe=function(t){var e=this;return this.subscribers.add(t),this.poses&&t.setPoses(this.poses),function(){return e.subscribers.delete(t)}},t.prototype.start=function(n,r){if(this.hasMounted){var o=[];return this.subscribers.forEach(function(t){var e=t.start(n,r);o.push(e)}),Promise.all(o)}return this.pendingAnimations.push([n,r]),Promise.resolve()},t.prototype.stop=function(){this.subscribers.forEach(function(t){return t.stop()})},t.prototype.mount=function(){var r=this;this.hasMounted=!0,this.pendingAnimations.forEach(function(t){var e=t[0],n=t[1];return r.start(e,n)})},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),Vn=function(t,e){var n=D.useMemo(function(){return t instanceof Fn&&t.subscribe(e)},[t]);D.useEffect(function(){return function(){return n&&n()}},[n])},Un=function(t,e,n,r,o,i){var u,a=D.useContext(Be).pose,s=Ue(e?a:o),c=D.useRef(!1),f=!((u=t)instanceof Fn)&&void 0!==u;f&&n.setPoses(t),D.useMemo(function(){if(f){var t=i?Ue(i):s;n.set(t)}},[f]),D.useEffect(function(){!e&&f&&((c.current||i)&&n.start(s).then(function(){r&&r()}),c.current=!0)},Ie(s))};function In(t){return"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}var Bn,qn=function(t,e,n,r){return[function(){t&&t.addEventListener(e,n,r)},function(){t&&t.removeEventListener(e,n,r)}]},Wn=function(o,i,u,a){var t=void 0;return i&&!In(i)||!u||(t=qn(i,o,u,a)),D.useEffect(function(){var t=i;if(u&&i&&!In(i)&&t.current){var e=qn(t.current,o,u,a),n=e[0],r=e[1];return n(),r}},[o,i,u,a]),t},Zn=function(t,e){if(!e)return{x:t.pageX,y:t.pageY};if(window.webkitConvertPointFromPageToNode){var n=new WebKitPoint(t.pageX,t.pageY);return{x:(n=window.webkitConvertPointFromPageToNode(e,n)).x,y:n.y}}var r=e.getBoundingClientRect(),o=1;e.style.width&&""!==e.style.width&&(o=parseFloat(e.style.width)/r.width);var i=1;e.style.height&&""!==e.style.height&&(i=parseFloat(e.style.height)/r.height);var u=i;return{x:o*(t.pageX-r.left-e.clientLeft+e.scrollLeft),y:u*(t.pageY-r.top-e.clientTop+e.scrollTop)}},_n=function(o){if(o){return function(t,e){var n,r;e||(r=(n=t).target instanceof HTMLElement?n.target:null,e={point:Zn(n,r),devicePoint:Zn(n,document.body)}),o(t,e)}}},Nn=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(!r.every(function(t){return void 0===t})){return[function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[0]()}},function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[1]()}}]}},zn=function(t,e,n){var r=t.onPointerDown,o=t.onPointerMove,i=t.onPointerUp,u=t.onPointerCancel,a=t.onPointerOver,s=t.onPointerOut,c=t.onPointerEnter,f=t.onPointerLeave,p={},l={},d={};null===window.onpointerdown&&null===window.onpointermove&&null===window.onpointerup?d=t:null===window.ontouchstart&&null===window.ontouchmove&&null===window.ontouchend?l={onTouchStart:r,onTouchMove:o,onTouchEnd:i,onTouchCancel:u}:null===window.onmousedown&&null===window.onmousemove&&null===window.onmouseup&&(p={onMouseDown:r,onMouseMove:o,onMouseUp:i,onMouseOver:a,onMouseOut:s,onMouseEnter:c,onMouseLeave:f});var h,v,m,g,y,b,w,P,M,O,x,S,k,C,E,A,T,L,R,Y,j,X,D,F,V,U,I,B,q,W,Z,_,N,z,G,$,H,K,J,Q,tt,et,nt,rt,ot,it,ut,at=(v=e,m=n,g=(h=d).onPointerDown,y=h.onPointerMove,b=h.onPointerUp,w=h.onPointerCancel,P=h.onPointerOver,M=h.onPointerOut,O=h.onPointerEnter,x=h.onPointerLeave,S=Wn("pointerdown",v,_n(g),m),k=Wn("pointermove",v,_n(y),m),C=Wn("pointerup",v,_n(b),m),E=Wn("pointercancel",v,_n(w),m),A=Wn("pointerover",v,_n(P),m),T=Wn("pointerout",v,_n(M),m),L=Wn("pointerenter",v,_n(O),m),R=Wn("pointerleave",v,_n(x),m),Nn(S,k,C,E,A,T,L,R)),st=(j=e,X=n,D=(Y=l).onTouchStart,F=Y.onTouchMove,V=Y.onTouchEnd,U=Y.onTouchCancel,I=Wn("touchstart",j,_n(D),X),B=Wn("touchmove",j,_n(F),X),q=Wn("touchend",j,_n(V),X),W=Wn("touchcancel",j,_n(U),X),Nn(I,B,q,W)),ct=(_=e,N=n,z=(Z=p).onMouseDown,G=Z.onMouseMove,$=Z.onMouseUp,H=Z.onMouseOver,K=Z.onMouseOut,J=Z.onMouseEnter,Q=Z.onMouseLeave,tt=Wn("mousedown",_,_n(z),N),et=Wn("mousemove",_,_n(G),N),nt=Wn("mouseup",_,_n($),N),rt=Wn("mouseover",_,_n(H),N),ot=Wn("mouseout",_,_n(K),N),it=Wn("mouseenter",_,_n(J),N),ut=Wn("mouseleave",_,_n(Q),N),Nn(tt,et,nt,rt,ot,it,ut));return Nn(at,st,ct)},Gn=function(t,e,n){var r,o,i=D.useRef(null);return o=e?(r=e,t):(r=i,{}),zn(o,r,n),e?void 0:t};function $n(t,e){var u=t.onPan,a=t.onPanStart,s=t.onPanEnd,c=null,n=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c){var o=Bn.subtract(r,c.lastDevicePoint),i=Bn.subtract(r,c.startDevicePoint);(0<Math.abs(o.x)||0<Math.abs(o.y))&&(c.startEvent?u&&u({point:n,devicePoint:r,delta:o,offset:i},t):(a&&a({point:n,devicePoint:r,delta:o,offset:i},t),c.startEvent=t)),c.lastDevicePoint=r}else console.error("Pointer move without started session")}},[u,a]),r=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c){var o=Bn.subtract(r,c.lastDevicePoint),i=Bn.subtract(r,c.startDevicePoint);d(),f(),s&&s({point:n,devicePoint:r,delta:o,offset:i},t),c=null}else console.error("Pointer end without started session")}},[s,n]),o=zn({onPointerUp:r},window),i=o[0],f=o[1],p=zn({onPointerMove:n},window,{capture:!0}),l=p[0],d=p[1],h=D.useMemo(function(){return function(t,e){var n=e.devicePoint;c={target:t.target,lastDevicePoint:n,startDevicePoint:n},l(),i()}},[r,n]);return D.useEffect(function(){return function(){d(),f()}}),Gn({onPointerDown:h},e)}function Hn(t,o){var i=t.onTap,u=null,e=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;u&&o&&t.target===o.current&&(i&&i({point:n,devicePoint:r},t),u=null)}},[i]),n=zn({onPointerUp:e},window),r=n[0],a=n[1];return D.useEffect(function(){return function(){a()}},[o&&o.current,e]),Gn({onPointerDown:function(t){r(),o&&t.target===o.current&&(u={target:t.target})}},o)}(Bn||(Bn={})).subtract=function(t,e){return{x:t.x-e.x,y:t.y-e.y}};var Kn=function(t,e){$n(t,e),Hn(t,e)};function Jn(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Qn={dragEnabled:!1,dragLocksDirection:!1,dragPropagation:!1};function tr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function er(t,e,n){var r,o,i=(r=t,o=Qn,Object.assign(o,r),o),u=i.dragEnabled,a=i.dragPropagation,s=i.dragLocksDirection,c={},f=null;tr("x",u,f)&&(c.x=n.get("x",0)),tr("y",u,f)&&(c.y=n.get("y",0));var p=D.useContext(Be),l=!1,d=D.useMemo(function(){return function(){(a||(l=function(t){var e=!1;if("y"===t)e=rr();else if("x"===t)e=nr();else{var n=nr(),r=rr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(u)))&&(f=null,p.dragging=!0)}},[u,a,p]),h=D.useMemo(function(){return function(t){var e=t.delta,n=t.offset;if(a||l)if(s&&null===f)f=function(t){var e=null;10<Math.abs(t.y)?e="y":10<Math.abs(t.x)&&(e="x");return e}(n);else{var r=c.x,o=c.y;tr("x",u,f)&&r&&r.set(r.get()+e.x),tr("y",u,f)&&o&&o.set(o.get()+e.y)}}},[l,u,c]),v=D.useMemo(function(){return function(){!a&&l&&l(),p.dragging=!1}},[l,p,u]),m={};u&&(m={onPanStart:d,onPan:h,onPanEnd:v}),$n(m,e)}var nr=Jn("dragHorizontal"),rr=Jn("dragVertical");var or=function(X){return D.memo(D.forwardRef(function(t,e){var n,r,o,i,u,a,s,c,f,p,l,d,h,v,m,g,y=t,b=y.animate,w=y.pose,P=void 0===w?"default":w,M=y.style,O=y.onPoseComplete,x=y.inherit,S=void 0!==x&&x,k=y.initialPose,C=y.dragEnabled,E=y.dragLocksDirection,A=y.dragPropagation,T=V(y,["animate","pose","style","onPoseComplete","inherit","initialPose","dragEnabled","dragLocksDirection","dragPropagation"]),L=(r=(n=e)&&"function"!=typeof n?n:D.useRef(null),D.useEffect(function(){if(n&&"function"==typeof n)return n(r.current),function(){return n(null)}}),r),R=(o=L,i=D.useMemo(function(){return new Mn},[]),D.useEffect(function(){return o.current,Element,i.mount(o.current),function(){return i.unmount()}}),i),Y=(u=R,a=S,s=T,c=D.useContext(Be).controls,(f=D.useMemo(function(){return new jn(u)},[])).resetChildren(),a&&c&&c.addChild(f),D.useEffect(function(){return function(){return c&&c.removeChild(f)}},[]),f.setProps(s),f),j=(p=Y,l=S,d=k||P,h=D.useContext(Be),v=h.pose,m=h.dragging,(g=D.useMemo(function(){return{controls:p,dragging:m}},Ie(Ue(d)))).pose=l?v:d,g);return Vn(b,Y),Un(b,S,Y,O,P,k),Kn(T,L),er({dragEnabled:C,dragLocksDirection:E,dragPropagation:A},L,R),D.createElement(Be.Provider,{value:j},D.createElement(X,F({},T,{ref:L,style:Dn(R,M)})))}))},ir=r.reduce(function(t,e){return t[e]=or(e),t},{custom:or});t.motion=ir,t.useMotionValue=function(t){return D.useMemo(function(){return Ve(t)},[])},t.useTransformedValue=function(e,n,r){var o=D.useRef(null);return D.useMemo(function(){o.current&&o.current.destroy();var t=De(n,r);return o.current=e.addChild({transformer:t}),o.current},[e].concat(n,r))},t.useAnimation=function(t){var e=D.useMemo(function(){return new Fn},[]);return t&&e.setPoses(t),D.useEffect(function(){return e.mount(),function(){return e.unmount()}},[]),e},t.useTapGesture=Hn,t.usePanGesture=$n,t.useGestures=Kn,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.FramerMotion={},t.React)}(this,function(t,D){"use strict";var e=["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"],n=["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"],r=e.concat(n),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var F=function(){return(F=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function V(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n}var u,a,s=0,c="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-s));s=e+n,setTimeout(function(){return t(s)},n)};(a=u||(u={})).Read="read",a.Update="update",a.Render="render",a.PostRender="postRender",a.FixedUpdate="fixedUpdate";var f=1/60*1e3,p=!0,d=!1,l=!1,h={delta:0,timestamp:0},v=[u.Read,u.Update,u.Render,u.PostRender],m=function(t){return d=t},g=v.reduce(function(t,e){var r,i,u,a,s,o,c,f,p,l=(r=m,i=[],s=!(u=[]),o=a=0,c=new WeakSet,f=new WeakSet,p={cancel:function(t){var e=u.indexOf(t);c.add(t),-1!==e&&u.splice(e,1)},process:function(t){var e,n;if(s=!0,i=(e=[u,i])[0],(u=e[1]).length=0,a=i.length)for(o=0;o<a;o++)(n=i[o])(t),!0!==f.has(n)||c.has(n)||(p.schedule(n),r(!0));s=!1},schedule:function(t,e,n){var r=n&&s,o=r?i:u;e&&f.add(t),-1===o.indexOf(t)&&(o.push(t),r&&(a=i.length))}});return t.sync[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),d||P(),l.schedule(t,e,n),t},t.cancelSync[e]=function(t){return l.cancel(t)},t.steps[e]=l,t},{steps:{},sync:{},cancelSync:{}}),y=g.steps,U=g.sync,I=g.cancelSync,b=function(t){return y[t].process(h)},w=function(t){d=!1,h.delta=p?f:Math.max(Math.min(t-h.timestamp,40),1),p||(f=h.delta),h.timestamp=t,l=!0,v.forEach(b),l=!1,d&&(p=!1,c(w))},P=function(){p=d=!0,l||c(w)},M=function(){return h},O=function(){return(O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},S=function(e,n){return function(t){return Math.max(Math.min(t,n),e)}},x=function(e){return function(t){return"string"==typeof t&&0===t.indexOf(e)}},k=function(t){return t%1?Number(t.toFixed(5)):t},E={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},C=O({},E,{transform:S(0,1)}),A=O({},E,{default:1}),T=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},L=T("deg"),R=T("%"),Y=T("px"),X=T("vh"),j=T("vw"),W=S(0,255),B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,q=function(t){return void 0!==t.red},Z=function(t){return void 0!==t.hue},_=function(u){var a=u.length;return function(t){if("string"!=typeof t)return t;for(var e,n,r={},o="string"==typeof(e=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")))?e.split(/,\s*/):[e],i=0;i<a;i++)r[u[i]]=void 0!==o[i]?parseFloat(o[i]):1;return r}},z=O({},E,{transform:function(t){return Math.round(W(t))}}),N=x("rgb"),G={test:function(t){return"string"==typeof t?N(t):q(t)},parse:_(["red","green","blue","alpha"]),transform:function(t){var e,n,r,o,i,u=t.red,a=t.green,s=t.blue,c=t.alpha;return e={red:z.transform(u),green:z.transform(a),blue:z.transform(s),alpha:k(c)},n=e.red,r=e.green,o=e.blue,i=e.alpha,"rgba("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},H=x("hsl"),$={test:function(t){return"string"==typeof t?H(t):Z(t)},parse:_(["hue","saturation","lightness","alpha"]),transform:function(t){var e,n,r,o,i,u=t.hue,a=t.saturation,s=t.lightness,c=t.alpha;return e={hue:Math.round(u),saturation:R.transform(k(a)),lightness:R.transform(k(s)),alpha:k(c)},n=e.hue,r=e.saturation,o=e.lightness,i=e.alpha,"hsla("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},K=O({},G,{test:x("#"),parse:function(t){var e="",n="",r="";return 4<t.length?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(t){return"string"==typeof t&&B.test(t)||G.test(t)||$.test(t)||K.test(t)},parse:function(t){return G.test(t)?G.parse(t):$.test(t)?$.parse(t):K.test(t)?K.parse(t):t},transform:function(t){return q(t)?G.transform(t):Z(t)?$.transform(t):t}},Q=/(-)?(\d[\d\.]*)/g,tt=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,et="${c}",nt=function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(Q),r=t.match(tt);return n&&(e+=n.length),r&&(e+=r.length),0<e},rt=function(t){var e=t,n=[],r=e.match(tt);r&&(e=e.replace(tt,et),n.push.apply(n,r.map(J.parse)));var o=e.match(Q);return o&&n.push.apply(n,o.map(E.parse)),n},ot=function(t){var r=t,o=0,e=t.match(tt),i=e?e.length:0;if(e)for(var n=0;n<i;n++)r=r.replace(e[n],et),o++;var u=r.match(Q),a=u?u.length:0;if(u)for(n=0;n<a;n++)r=r.replace(u[n],"${n}"),o++;return function(t){for(var e=r,n=0;n<o;n++)e=e.replace(n<i?et:"${n}",n<i?J.transform(t[n]):k(t[n]));return e}},it=function(e){return function(t){return 1-e(1-t)}},ut=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},at=function(e){return function(t){return t*t*((e+1)*t-e)}},st=function(t){var e=at(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},ct=function(t){return t},ft=function(e){return function(t){return Math.pow(t,e)}}(2),pt=it(ft),lt=ut(ft),dt=function(t){return 1-Math.sin(Math.acos(t))},ht=it(dt),vt=ut(ht),mt=at(1.525),gt=it(mt),yt=ut(mt),bt=st(1.525),wt="undefined"!=typeof Float32Array,Pt=function(t,e){return 1-3*e+3*t},Mt=function(t,e){return 3*e-6*t},Ot=function(t){return 3*t},St=function(t,e,n){return 3*Pt(e,n)*t*t+2*Mt(e,n)*t+Ot(e)},xt=function(t,e,n){return((Pt(e,n)*t+Mt(e,n))*t+Ot(e))*t};function kt(u,e,a,n){var s=wt?new Float32Array(11):new Array(11),r=function(t){for(var e,n,r,o=0,i=1;10!==i&&s[i]<=t;++i)o+=.1;return e=(t-s[--i])/(s[i+1]-s[i]),.001<=(r=St(n=o+.1*e,u,a))?function(t,e){for(var n=0,r=0;n<8;++n){if(0===(r=St(e,u,a)))return e;e-=(xt(e,u,a)-t)/r}return e}(t,n):0===r?n:function(t,e,n){for(var r,o,i=0;0<(r=xt(o=e+(n-e)/2,u,a)-t)?n=o:e=o,1e-7<Math.abs(r)&&++i<10;);return o}(t,o,o+.1)};!function(){for(var t=0;t<11;++t)s[t]=xt(.1*t,u,a)}();return function(t){return u===e&&a===n?t:0===t?0:1===t?1:xt(r(t),e,n)}}var Et=function(t){return"number"==typeof t},Ct=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},At=Ct(function(t,e,n){return Math.min(Math.max(n,t),e)}),Tt=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Lt=function(t,e,n){return-n*t+n*e+t},Rt=function(){return(Rt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yt=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},Xt=[K,G,$],jt=function(e){return Xt.find(function(t){return t.test(e)})},Dt=function(t,e){var n=jt(t),r=jt(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=Rt({},o),a=n===$?Lt:Yt;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=Lt(o.alpha,i.alpha,t),n.transform(u)}},Ft=function(e,n){return function(t){return n(e(t))}},Vt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Ft)},Ut=function(t,r){var n=t.slice(),o=n.length,i=t.map(function(e,t){var n=r[t];return Et(e)?function(t){return Lt(e,n,t)}:J.test(e)?Dt(e,n):It(e,n)});return function(t){for(var e=0;e<o;e++)n[e]=i[e](t);return n}},It=function(t,e){var n=ot(t);return n(t),ot(e)(t),Vt(Ut(rt(t),rt(e)),n)},Wt=(Ct(Lt),function(t){return t}),Bt=function(i){return void 0===i&&(i=Wt),Ct(function(t,e,n){var r=e-n,o=-(0-t+1)*(0-i(Math.abs(r)));return r<=0?e+o:e-o})},qt=(Bt(),Bt(Math.sqrt),function(t,e){return Et(t)?t/(1e3/e):0}),Zt=function(t,e){return e?t*(1e3/e):0};Ct(function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t}),At(0,1);var _t=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.applyMiddleware=function(t){return this.create(F({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=1===t.length?t[0]:Vt.apply(void 0,t);return this.applyMiddleware(function(e){return function(t){return e(n(t))}})},t.prototype.while=function(r){return this.applyMiddleware(function(e,n){return function(t){return r(t)?e(t):n()}})},t.prototype.filter=function(n){return this.applyMiddleware(function(e){return function(t){return n(t)&&e(t)}})},t}(),zt=function(){return function(t,e){var n=t.middleware,r=t.onComplete,o=this;this.isActive=!0,this.update=function(t){o.observer.update&&o.updateObserver(t)},this.complete=function(){o.observer.complete&&o.isActive&&o.observer.complete(),o.onComplete&&o.onComplete(),o.isActive=!1},this.error=function(t){o.observer.error&&o.isActive&&o.observer.error(t),o.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=r,e.update&&n&&n.length&&n.forEach(function(t){return o.updateObserver=t(o.updateObserver,o.complete)})}}(),Nt=function(t,e,n){var r=e.middleware;return new zt({middleware:r,onComplete:n},"function"==typeof t?{update:t}:t)},Gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.start=function(t){void 0===t&&(t={});var e=!1,n={stop:function(){}},r=this.props,o=r.init,i=V(r,["init"]),u=o(Nt(t,i,function(){e=!0,n.stop()}));return n=u?F({},n,u):n,t.registerParent&&t.registerParent(n),e&&n.stop(),n},e}(_t),Ht=function(t){return new Gt({init:t})},$t=function(t){var f=t.getCount,p=t.getFirst,l=t.getOutput,d=t.mapApi,h=t.setProp,v=t.startActions;return function(c){return Ht(function(t){var e=t.update,r=t.complete,o=t.error,i=f(c),u=l(),a=function(){return e(u)},s=0,n=v(c,function(t,e){var n=!1;return t.start({complete:function(){n||(n=!0,++s===i&&U.update(r))},error:o,update:function(t){h(u,e,t),U.update(a,!1,!0)}})});return Object.keys(p(n)).reduce(function(t,e){return t[e]=d(n,e),t},{})})}},Kt=$t({getOutput:function(){return{}},getCount:function(t){return Object.keys(t).length},getFirst:function(t){return t[Object.keys(t)[0]]},mapApi:function(o,i){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return Object.keys(o).reduce(function(t,e){var n;return o[e][i]&&(r[0]&&void 0!==r[0][e]?t[e]=o[e][i](r[0][e]):t[e]=(n=o[e])[i].apply(n,r)),t},{})}},setProp:function(t,e,n){return t[e]=n},startActions:function(n,r){return Object.keys(n).reduce(function(t,e){return t[e]=r(n[e],e),t},{})}}),Jt=$t({getOutput:function(){return[]},getCount:function(t){return t.length},getFirst:function(t){return t[0]},mapApi:function(e,r){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.map(function(t,e){if(t[r])return Array.isArray(n[0])?t[r](n[0][e]):t[r].apply(t,n)})}},setProp:function(t,e,n){return t[e]=n},startActions:function(t,n){return t.map(function(t,e){return n(t,e)})}}),Qt=[Y,R,L,X,j],te=function(e){return Qt.find(function(t){return t.test(e)})},ee=function(t,e){return t(e)},ne=function(o,i,u){var t=u[0],e=i[t].map(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return se(t)(o,r)});return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Jt(t)}.apply(void 0,e)},re=function(o,i,u){var a=u[0],t=Object.keys(i[a]).reduce(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return t[e]=se(i[a][e])(o,r),t},{});return Kt(t)},oe=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=te(n)||te(r),u=i.transform,a=i.parse;return t(F({},o,{from:"string"==typeof n?a(n):n,to:"string"==typeof r?a(r):r})).pipe(u)},ie=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]);return t(F({},o,{from:0,to:1})).pipe(Dt(n,r),J.transform)},ue=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=ot(n);return i(n),ot(r)(n),t(F({},o,{from:0,to:1})).pipe(Ut(rt(n),rt(r)),i)},ae=function(r,t){var n,o,i,e=(n=t,o=Object.keys(n),i=function(t,e){return void 0!==t&&!n[e](t)},{getVectorKeys:function(n){return o.reduce(function(t,e){return i(n[e],e)&&t.push(e),t},[])},testVectorProps:function(e){return e&&o.some(function(t){return i(e[t],t)})}}),u=e.testVectorProps,a=e.getVectorKeys;return function(t){if(!u(t))return r(t);var e=a(t),n=t[e[0]];return se(n)(r,t,e)}},se=function(t){var e=ee;return"number"==typeof t?e=ee:Array.isArray(t)?e=ne:Boolean(te(t))?e=oe:J.test(t)?e=ie:nt(t)?e=ue:"object"==typeof t&&(e=re),e},ce=ae(function(b){return void 0===b&&(b={}),Ht(function(t){var o=t.complete,i=t.update,e=b.velocity,n=void 0===e?0:e,r=b.from,u=void 0===r?0:r,a=b.power,s=void 0===a?.8:a,c=b.timeConstant,f=void 0===c?350:c,p=b.restDelta,l=void 0===p?.5:p,d=b.modifyTarget,h=0,v=s*n,m=Math.round(u+v),g=void 0===d?m:d(m),y=U.update(function(t){var e=t.delta;h+=e;var n=-v*Math.exp(-h/f),r=l<n||n<-l;i(r?g+n:g),r||(I.update(y),o())},!0);return{stop:function(){return I.update(y)}}})},{from:E.test,modifyTarget:function(t){return"function"==typeof t},velocity:E.test}),fe=ae(function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,u=void 0===i?ct:i;return Ht(function(t){var e=t.update;return{seek:function(t){return e(t)}}}).pipe(u,function(t){return Lt(n,o,t)})},{ease:function(t){return"function"==typeof t},from:E.test,to:E.test}),pe=At(0,1),le=function(j){return void 0===j&&(j={}),Ht(function(t){var n,r=t.update,o=t.complete,e=j.duration,i=void 0===e?300:e,u=j.ease,a=void 0===u?pt:u,s=j.flip,c=void 0===s?0:s,f=j.loop,p=void 0===f?0:f,l=j.yoyo,d=void 0===l?0:l,h=j.from,v=void 0===h?0:h,m=j.to,g=void 0===m?1:m,y=j.elapsed,b=void 0===y?0:y,w=j.playDirection,P=void 0===w?1:w,M=j.flipCount,O=void 0===M?0:M,S=j.yoyoCount,x=void 0===S?0:S,k=j.loopCount,E=void 0===k?0:k,C=fe({from:v,to:g,ease:a}).start(r),A=0,T=!1,L=function(){return P*=-1},R=function(){A=pe(Tt(0,i,b)),C.seek(A)},Y=function(){T=!0,n=U.update(function(t){var e=t.delta;b+=e*P,R(),function(){var t,e=1===P?T&&i<=b:T&&b<=0;if(!e)return!1;if(e&&!p&&!c&&!d)return!0;var n=!1;return p&&E<p?(E++,n=!(b=0)):c&&O<c?(b=i-b,C=fe({from:v=(t=[g,v])[0],to:g=t[1],ease:a}).start(r),O++,n=!0):d&&x<d&&(L(),x++,n=!0),!n}()&&o&&(I.update(n),U.update(o,!1,!0))},!0)},X=function(){T=!1,n&&I.update(n)};return Y(),{isActive:function(){return T},getElapsed:function(){return At(0,i,b)},getProgress:function(){return A},stop:function(){X()},pause:function(){return X(),this},resume:function(){return T||Y(),this},seek:function(t){return b=Lt(0,i,t),U.update(R,!1,!0),this},reverse:function(){return L(),this}}})},de=At(0,1),he=ae(function(m){return void 0===m&&(m={}),Ht(function(t){var r=t.complete,o=t.update,e=m.acceleration,i=void 0===e?0:e,n=m.friction,u=void 0===n?0:n,a=m.velocity,s=void 0===a?0:a,c=m.springStrength,f=m.to,p=m.restSpeed,l=void 0===p?.001:p,d=m.from,h=void 0===d?0:d,v=U.update(function(t){var e=t.delta,n=Math.max(e,16);(i&&(s+=qt(i,n)),u&&(s*=Math.pow(1-u,n/100)),void 0!==c&&void 0!==f)&&(s+=(f-h)*qt(c,n));h+=qt(s,n),o(h),!1!==l&&(!s||Math.abs(s)<=l)&&(I.update(v),r())},!0);return{set:function(t){return h=t,this},setAcceleration:function(t){return i=t,this},setFriction:function(t){return u=t,this},setSpringStrength:function(t){return c=t,this},setSpringTarget:function(t){return f=t,this},setVelocity:function(t){return s=t,this},stop:function(){return I.update(v)}}})},{acceleration:E.test,friction:E.test,velocity:E.test,from:E.test,to:E.test,springStrength:E.test}),ve=ae(function(x){return void 0===x&&(x={}),Ht(function(t){var s=t.update,c=t.complete,e=x.velocity,f=void 0===e?0:e,n=x.from,r=void 0===n?0:n,o=x.to,p=void 0===o?0:o,i=x.stiffness,l=void 0===i?100:i,u=x.damping,d=void 0===u?10:u,a=x.mass,h=void 0===a?1:a,v=x.restSpeed,m=void 0===v?.01:v,g=x.restDelta,y=void 0===g?.01:g,b=f?-f/1e3:0,w=0,P=p-r,M=r,O=M,S=U.update(function(t){var e=t.delta;w+=e;var n=d/(2*Math.sqrt(l*h)),r=Math.sqrt(l/h)/1e3;if(O=M,n<1){var o=Math.exp(-n*r*w),i=r*Math.sqrt(1-n*n);M=p-o*((b+n*r*P)/i*Math.sin(i*w)+P*Math.cos(i*w))}else{o=Math.exp(-r*w);M=p-o*(P+(b+r*P)*w)}f=Zt(M-O,e);var u=Math.abs(f)<=m,a=Math.abs(p-M)<=y;u&&a?(s(M=p),I.update(S),c()):s(M)},!0);return{stop:function(){return I.update(S)}}})},{from:E.test,to:E.test,stiffness:E.test,damping:E.test,mass:E.test,velocity:E.test}),me=function(r,o,i){return Ht(function(t){var e=t.update,n=o.split(" ").map(function(t){return r.addEventListener(t,e,i),t});return{stop:function(){return n.forEach(function(t){return r.removeEventListener(t,e,i)})}}})},ge=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},ye=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},be=[ge()];if("undefined"!=typeof document){me(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){for(var e=t.touches,n=e.length,r=be.length=0;r<n;r++){var o=e[r];be.push(ye(o))}})}var we=ge();if("undefined"!=typeof document){me(document,"mousedown mousemove",!0).start(function(t){ye(t,we)})}var Pe,Me=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},Oe=Me(function(t,e,n){return Math.min(Math.max(n,t),e)}),Se=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},xe=function(t,e,n){return-n*t+n*e+t},ke=function(){return(ke=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ee=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},Ce=[K,G,$],Ae=function(e){return Ce.find(function(t){return t.test(e)})},Te=function(t,e){var n=Ae(t),r=Ae(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=ke({},o),a=n===$?xe:Ee;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=xe(o.alpha,i.alpha,t),n.transform(u)}},Le=function(e,n){return function(t){return n(e(t))}},Re=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Le)},Ye=function(t,e){var n,r,o,i,u,a=ot(t);return a(t),ot(e)(t),Re((n=rt(t),r=rt(e),o=n.slice(),i=o.length,u=n.map(function(e,t){var n=r[t];return"number"==typeof e?function(t){return xe(e,n,t)}:J.test(e)?Te(e,n):Ye(e,n)}),function(t){for(var e=0;e<i;e++)o[e]=u[e](t);return o}),a)},Xe=Me(xe),je=function(o,i){return Array(o.length-1).fill((t=o[0],"number"==typeof t?Xe:J.test(t)?Te:Ye)).map(function(t,e){var n=t(o[e],o[e+1]);if(i){var r=Array.isArray(i)?i[e]:i;return Re(r,n)}return n});var t},De=function(t,e,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,u=r.ease,a=t.length;e.length,!u||!Array.isArray(u)||(u.length,t.length),t[0]>t[a-1]&&(t=t.slice(),e=e.slice(),t.reverse(),e.reverse());var s,c,f,p,l,d,h,v,m,g=je(e,u),y=2===a?(d=g,h=(l=t)[0],v=l[1],m=d[0],function(t){return m(Se(h,v,t))}):(c=g,f=(s=t).length,p=f-1,function(t){var e=0,n=!1;if(t<=s[0]?n=!0:t>=s[p]&&(e=p-1,n=!0),!n){for(var r=1;r<f&&!(s[r]>t||r===p);r++);e=r-1}var o=Se(s[e],s[e+1],t);return c[e](o)});return i?Re(Oe(t[0],t[a-1]),y):y},Fe=(Oe(0,1),function(){function n(t,e){var n,r=void 0===e?{}:e,o=r.transformer,i=r.parent,u=this;this.timeDelta=0,this.lastUpdated=0,this.cancelSubscriber=new Set,this.canTrackVelocity=!1,this.notifySubscriber=function(t){t(u.current)},this.scheduleVelocityCheck=function(){return U.postRender(u.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==u.lastUpdated&&(u.prev=u.current)},this.setChild=function(t){return t.set(u.current)},this.parent=i,this.transformer=o,this.set(t),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return n.prototype.addChild=function(t){var e=new n(this.current,F({parent:this},t));return this.children||(this.children=new Set),this.children.add(e),e},n.prototype.removeChild=function(t){this.children&&this.children.delete(t)},n.prototype.addUpdateSubscription=function(t){var e=this;this.updateSubscribers||(this.updateSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.update(n,!1,!0)};return this.updateSubscribers.add(r),this.cancelSubscriber.add(function(){return I.update(n)}),function(){return e.updateSubscribers.delete(r)}},n.prototype.addRenderSubscription=function(t){var e=this;this.renderSubscribers||(this.renderSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.render(n)};return this.renderSubscribers.add(r),r(),this.cancelSubscriber.add(function(){return I.render(n)}),function(){return e.renderSubscribers.delete(r)}},n.prototype.set=function(t,e){void 0===e&&(e=!0),this.prev=this.current,this.current=this.transformer?this.transformer(t):t,this.updateSubscribers&&this.updateSubscribers.forEach(this.notifySubscriber),this.children&&this.children.forEach(this.setChild),e&&this.renderSubscribers&&this.renderSubscribers.forEach(this.notifySubscriber);var n=M(),r=n.delta,o=n.timestamp;this.timeDelta=r,this.lastUpdated=o,U.postRender(this.scheduleVelocityCheck)},n.prototype.get=function(){return this.current},n.prototype.getVelocity=function(){return this.canTrackVelocity?(t=parseFloat(this.prev)-parseFloat(this.current),(e=this.timeDelta)?t*(1e3/e):0):0;var t,e},n.prototype.control=function(t,e,n){var r=this,o=e.delay,i=V(e,["delay"]);this.stop();var u,a=t(F({from:this.get(),velocity:this.getVelocity()},i));return n&&(a=a.pipe(n)),o&&(a=function(){for(var u=[],t=0;t<arguments.length;t++)u[t]=arguments[t];return Ht(function(t){var e,n=t.update,r=t.complete,o=0,i=function(){e=u[o].start({complete:function(){++o>=u.length?r():i()},update:n})};return i(),{stop:function(){return e&&e.stop()}}})}((u=o,Ht(function(t){var e=t.complete,n=setTimeout(e,u);return{stop:function(){return clearTimeout(n)}}})),a)),new Promise(function(t){r.controller=a.start({update:function(t){return r.set(t)},complete:t})})},n.prototype.stop=function(){this.controller&&this.controller.stop()},n.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.cancelSubscriber.forEach(function(t){return t()}),this.cancelSubscriber.clear(),this.parent&&this.parent.removeChild(this),this.stop()},n}()),Ve=function(t,e){return new Fe(t,e)},Ue=function(t){var e,n=t instanceof Fe?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))},Ie=function(t){return[t.join(",")]},We=D.createContext({dragging:!1}),Be=function(){return(Be=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qe=function(t){var s=t.onRead,e=t.onRender,n=t.aliasMap,c=void 0===n?{}:n,r=t.uncachedValues,f=void 0===r?new Set:r,o=t.useCache,p=void 0===o||o;return function(n){var o={},i=[],u=!1,r=function(t,e){var n=c[t]||t,r=o[n];o[n]=e,o[n]!==r&&(-1===i.indexOf(n)&&i.push(n),u||(u=!0,U.render(a)))};function a(t){return void 0===t&&(t=!1),(!0===t||u)&&(e(o,n,i),u=!1,i.length=0),this}return{get:function(t){var e=c[t]||t;return e?p&&!f.has(e)&&void 0!==o[e]?o[e]:s(e,n):o},set:function(e,t){if("string"==typeof e){if(void 0===t)return function(t){return r(e,t)};r(e,t)}else for(var n in e)e.hasOwnProperty(n)&&r(n,e[n]);return this},render:a}}},Ze=/([a-z])([A-Z])/g,_e=function(t){return t.replace(Ze,"$1-$2").toLowerCase()},ze=new Map,Ne=new Map,Ge=["Webkit","Moz","O","ms",""],He=Ge.length,$e="undefined"!=typeof document,Ke=function(t,e){return Ne.set(t,_e(e))},Je=function(t,e){void 0===e&&(e=!1);var n,r=e?Ne:ze;return r.has(t)||($e?function(t){Pe=Pe||document.createElement("div");for(var e=0;e<He;e++){var n=Ge[e],r=""===n,o=r?t:n+t.charAt(0).toUpperCase()+t.slice(1);(o in Pe.style||r)&&(ze.set(t,o),Ke(t,(r?"":"-")+_e(o)))}}(t):Ke(n=t,n)),r.get(t)||t},Qe=["","X","Y","Z"],tn=["translate","scale","rotate","skew","transformPerspective"].reduce(function(t,n){return Qe.reduce(function(t,e){return t.push(n+e),t},t)},["x","y","z"]),en=tn.reduce(function(t,e){return t[e]=!0,t},{}),nn=function(t){return!0===en[t]},rn=function(t,e){return tn.indexOf(t)-tn.indexOf(e)},on={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,rotate:L,rotateX:L,rotateY:L,rotateZ:L,scale:A,scaleX:A,scaleY:A,scaleZ:A,skew:L,skewX:L,skewY:L,distance:Y,translateX:Y,translateY:Y,translateZ:Y,perspective:Y,opacity:C,transformOriginX:R,transformOriginY:R,transformOriginZ:Y},un=function(t){return on[t]},an="scrollLeft",sn="scrollTop",cn=new Set([an,sn]),fn={x:"translateX",y:"translateY",z:"translateZ",originX:"transformOriginX",originY:"transformOriginY",originZ:"transformOriginZ",scrollX:an,scrollY:sn},pn=function(t,e,n,r,o,i){void 0===e&&(e=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=[]);var u,a=!0,s=!1;for(var c in t){var f=fn[c]?fn[c]:c,p=t[c],l=un(f),d="number"==typeof p&&l?l.transform(p):p;nn(f)?(r[f]=d,i.push(f),a&&(l.default&&p!==l.default||!l.default&&0!==p)&&(a=!1)):"transformOriginX"===(u=f)||"transformOriginY"===u?(o[f]=d,s=!0):cn.has(f)||(n[f]=d)}if(a)n.transform="none";else{var h="",v=!1;i.sort(rn);for(var m=i.length,g=0;g<m;g++){h+=(f=i[g])+"("+r[f]+") ",v="z"===f||v}!v&&e&&(h+="translateZ(0)"),n.transform=h}return s&&(n.transformOrigin=(o.transformOriginX||0)+" "+(o.transformOriginY||0)+" "+(o.transformOriginZ||0)),n},ln=qe({onRead:function(t,e){var n=e.element,r=e.preparseOutput,o=un(t);if(nn(t))return o&&o.default||0;if(cn.has(t))return n[t];var i=window.getComputedStyle(n,null).getPropertyValue(Je(t,!0))||0;return r&&o&&o.parse?o.parse(i):i},onRender:function(t,e,n){var r=e.element,o=e.buildStyles;r.style.cssText+=o(t),-1!==n.indexOf(an)&&(r.scrollLeft=t.scrollLeft),-1!==n.indexOf(sn)&&(r.scrollTop=t.scrollTop)},aliasMap:fn,uncachedValues:cn}),dn=function(t,e){return ln(Be({element:t,buildStyles:function(u){void 0===u&&(u=!0);var a={},s={},c={},f={},p=[];return function(t){var e,n,r="";for(var o in p.length=0,a=pn(t,u,a,c,f,p)){var i=a[o];i!==s[o]&&(r+=(n=i,";"+Je(o,!0)+":"+n))}return a=(e=[s,a])[0],s=e[1],r}}(),preparseOutput:!0},e))},hn=function(t,e){return t/100*e+"px"},vn={fill:J,stroke:J,scale:A,scaleX:A,scaleY:A,opacity:C,fillOpacity:C,strokeOpacity:C},mn=qe({onRead:function(t,e){var n=e.element;if(nn(t)){var r=vn[t];return r?r.default:0}return n.getAttribute(t)},onRender:function(t,e,n){var r=e.dimensions;!function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])}(e.element,function(t,e,n,r){var o=!1,i=!1,u={},a=n?{pathLength:"0",pathSpacing:""+r}:void 0,s=void 0!==t.scale?t.scale||1e-7:t.scaleX||1,c=void 0!==t.scaleY?t.scaleY||1e-7:s||1,f=e.width*((t.originX||50)/100)+e.x,p=e.height*((t.originY||50)/100)+e.y,l=1*s*-f,d=1*c*-p,h=f/s,v=p/c,m={translate:"translate("+t.translateX+", "+t.translateY+") ",scale:"translate("+l+", "+d+") scale("+s+", "+c+") translate("+h+", "+v+") ",rotate:"rotate("+t.rotate+", "+f+", "+p+") ",skewX:"skewX("+t.skewX+") ",skewY:"skewY("+t.skewY+") "};for(var g in t)if(t.hasOwnProperty(g)){var y=t[g];nn(g)?o=!0:!n||"pathLength"!==g&&"pathSpacing"!==g||"number"!=typeof y?n&&"pathOffset"===g?u["stroke-dashoffset"]=hn(-y,r):u[_e(g)]=y:(i=!0,a[g]=hn(y,r))}if(i&&(u["stroke-dasharray"]=a.pathLength+" "+a.pathSpacing),o)for(var g in u.transform="",m)if(m.hasOwnProperty(g)){var b="scale"===g?"1":"0";u.transform+=m[g].replace(/undefined/g,b)}return u}(t,r,e.isPath,e.pathLength))},aliasMap:{x:"translateX",y:"translateY",background:"fill"}}),gn=qe({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var e=t.scrollTop,n=void 0===e?0:e,r=t.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),yn=new WeakMap,bn=function(t,e){var n,r,o,i;return t instanceof HTMLElement?n=dn(t,e):t instanceof SVGElement?(o=(r=t).getBBox(),i={element:r,dimensions:{x:o.x,y:o.y,width:o.width,height:o.height},isPath:!1},"path"===r.tagName&&(i.isPath=!0,i.pathLength=r.getTotalLength()),n=mn(i)):t===window&&(n=gn(t)),yn.set(t,n),n};function wn(t,e){var n,r,o="string"==typeof t?document.querySelector(t):t;return n=o,r=e,yn.has(n)?yn.get(n):bn(n,r)}var Pn,Mn=function(){function t(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return t.prototype.has=function(t){return this.values.has(t)},t.prototype.set=function(t,e){this.values.set(t,e),this.hasMounted&&this.bindValueToStyler(t,e)},t.prototype.get=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new Fe(e),this.set(t,n)),n},t.prototype.forEach=function(t){return this.values.forEach(t)},t.prototype.bindValueToStyler=function(e,t){var n=this,r=t.addRenderSubscription(function(t){return n.styler.set(e,t)});this.unsubscribers.set(e,r)},t.prototype.mount=function(t){var n=this;this.hasMounted=!0,this.styler=wn(t),this.values.forEach(function(t,e){return n.bindValueToStyler(e,t)})},t.prototype.unmount=function(){var r=this;this.values.forEach(function(t,e){var n=r.unsubscribers.get(e);n&&n()})},t}(),On=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Sn=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},xn=function(){return{ease:"linear",duration:250}},kn={x:On,y:On,z:On,rotate:On,rotateX:On,rotateY:On,rotateZ:On,scaleX:Sn,scaleY:Sn,scale:Sn,opacity:xn,backgroundColor:xn,color:xn,default:Sn},En={tween:le,spring:ve,keyframes:function(t){var e,n,r,o,i=t.easings,u=t.ease,a=void 0===u?ct:u,s=t.times,c=t.values,f=V(t,["easings","ease","times","values"]);i=Array.isArray(i)?i:(n=i,(e=c).map(function(){return n||pt}).splice(0,e.length-1)),s=s||(o=(r=c).length,r.map(function(t,e){return 0!==e?e/(o-1):0}));var p=i.map(function(t,e){return fe({from:c[e],to:c[e+1],ease:t})});return le(F({},f,{ease:a})).applyMiddleware(function(t){return e=p,n=t,o=(r=s).length,u=(i=o-1)-1,a=e.map(function(t){return t.start(n)}),function(t){t<=r[0]&&a[0].seek(0),t>=r[i]&&a[u].seek(1);for(var e=1;e<o&&!(r[e]>t||e===i);e++);var n=Tt(r[e-1],r[e],t);a[e-1].seek(de(n))};var r,e,n,o,i,u,a})},decay:ce,physics:he,just:function(t){var r=t.to;return Ht(function(t){var e=t.update,n=t.complete;e(r),n()})}},Cn={linear:ct,easeIn:ft,easeOut:pt,easeInOut:lt,circIn:dt,circOut:ht,circInOut:vt,backIn:mt,backOut:gt,backInOut:yt,anticipate:bt},An={tween:function(t){var e=t.ease;if(Array.isArray(e)){e.length;var n=e[0],r=e[1],o=e[2],i=e[3];t.ease=kt(n,r,o,i)}else"string"==typeof e&&(t.ease=Cn[e]);return t},keyframes:function(t){t.from,t.to;return V(t,["from","to"])}},Tn=function(t,e,n){if(void 0===n)return F({},(kn[t]||kn.default)(r=e),{to:r});var r,o=n[t]||n.default||n;return!1===o.type?{type:"just",to:e}:F({},o,{to:e})},Ln=function(t,e,n){var r,o,i=Tn(t,e,n),u=i.type,a=void 0===u?"tween":u,s=V(i,["type"]);return[En[a],(o=s,An[r=a]?An[r](o):o)]},Rn=function(n,r,o){return void 0===o&&(o=new Set),Object.keys(n).forEach(function(t){if(!o.has(t))if(o.add(t),r.has(t)){var e=r.get(t);e&&e.set(n[t])}else r.set(t,Ve(n[t]))})},Yn=function(t,e){return void 0===e&&(e={}),t?("function"==typeof t&&(t=t(e)),Array.isArray(t)?t:[t]):[]},Xn=function(){function t(t){this.poses={},this.isAnimating=new Set,this.values=t}return t.prototype.setProps=function(t){this.props=t},t.prototype.setPoses=function(t){this.poses=t},t.prototype.start=function(t,e){return this.resetIsAnimating(),n=t,Array.isArray(n)?this.animateMultiplePoses(t):"string"==typeof t?this.animatePose(t):this.animate([t,e]);var n},t.prototype.set=function(t){var i=this,u=new Set;t.slice().reverse().forEach(function(t){var e=Yn(i.poses[t],i.props),n=e[0],r=e[1];if(r){var o=r.applyOnEnd;o&&Rn(o,i.values,u)}n&&Rn(n,i.values,u)})},t.prototype.animate=function(t,s){var c=this;void 0===s&&(s=0);var e=Yn(t),f=e[0],n=e[1],p=void 0===n?{}:n;if(!f)return Promise.resolve();var r=Object.keys(f).reduce(function(t,e){if(c.isAnimating.has(e))return t;c.values.has(e)||c.values.set(e,Ve(0));var n=c.values.get(e);if(!n)return t;var r,o=f[e];if("number"==typeof(r=o)||nt(r)){var i=Ln(e,o,F({delay:s},p)),u=i[0],a=i[1];t.push(n.control(u,a))}else n.set(o);return c.isAnimating.add(e),t},[]);return Promise.all(r).then(function(){if(p&&p.applyOnEnd){var t=p.applyOnEnd;Rn(t,c.values)}})},t.prototype.animateMultiplePoses=function(t){var e=this,n=t.slice().reverse().map(function(t){return e.animatePose(t)});return Promise.all(n)},t.prototype.animatePose=function(t,e){var n=this;void 0===e&&(e=0);var r=!1,o=!1,i=0,u=this.poses[t],a=u?function(){return n.animate(u,e)}:function(){return Promise.resolve()},s=this.children?function(){return n.animateChildren(t,i,0,1)}:function(){return Promise.resolve()};if(u&&this.children){var c=Yn(u)[1];c&&(r=c.beforeChildren||r,o=c.afterChildren||o,i=c.delayChildren||i)}if(r||o){var f=r?[a,s]:[s,a],p=f[1];return(0,f[0])().then(p)}return Promise.all([a(),s()])},t.prototype.animateChildren=function(r,o,e,t){if(void 0===o&&(o=0),void 0===e&&(e=0),void 0===t&&(t=1),!this.children)return Promise.resolve();var i=[],n=(this.children.size-1)*e,u=1===t?function(t){return t*e}:function(t){return n-t*e};return Array.from(this.children).forEach(function(t,e){var n=t.animatePose(r,o+u(e));i.push(n)}),Promise.all(i)},t.prototype.resetIsAnimating=function(){this.isAnimating.clear(),this.children&&this.children.forEach(function(t){return t.resetIsAnimating()})},t.prototype.stop=function(){this.values.forEach(function(t){return t.stop()})},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t)},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}(),jn=(Pn=function(t){return t.get()},function(t){var n={};return t.forEach(function(t,e){return n[e]=Pn(t)}),n}),Dn=function(n,r){void 0===r&&(r={});var o={};return Object.keys(r).forEach(function(t){var e=r[t];e instanceof Fe?n.get(t)!==e&&n.set(t,e):o[t]=e}),D.useMemo(function(){return F({},o,pn(jn(n)))},[o,n])},Fn=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.subscribers=new Set,this.poses={}}return t.prototype.setPoses=function(e){this.poses=e,this.subscribers.forEach(function(t){return t.setPoses(e)})},t.prototype.subscribe=function(t){var e=this;return this.subscribers.add(t),this.poses&&t.setPoses(this.poses),function(){return e.subscribers.delete(t)}},t.prototype.start=function(n,r){if(this.hasMounted){var o=[];return this.subscribers.forEach(function(t){var e=t.start(n,r);o.push(e)}),Promise.all(o)}return this.pendingAnimations.push([n,r]),Promise.resolve()},t.prototype.stop=function(){this.subscribers.forEach(function(t){return t.stop()})},t.prototype.mount=function(){var r=this;this.hasMounted=!0,this.pendingAnimations.forEach(function(t){var e=t[0],n=t[1];return r.start(e,n)})},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),Vn=function(t,e){var n=D.useMemo(function(){return t instanceof Fn&&t.subscribe(e)},[t]);D.useEffect(function(){return function(){return n&&n()}},[n])},Un=function(t,e,n,r,o,i){var u,a=D.useContext(We).pose,s=Ue(e?a:o),c=D.useRef(!1),f=!((u=t)instanceof Fn)&&void 0!==u;f&&n.setPoses(t),D.useMemo(function(){if(f){var t=i?Ue(i):s;n.set(t)}},[f]),D.useEffect(function(){!e&&f&&((c.current||i)&&n.start(s).then(function(){r&&r()}),c.current=!0)},Ie(s))};function In(t){return"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}var Wn,Bn=function(t,e,n,r){return[function(){t&&t.addEventListener(e,n,r)},function(){t&&t.removeEventListener(e,n,r)}]},qn=function(o,i,u,a){var t=void 0;return i&&!In(i)||!u||(t=Bn(i,o,u,a)),D.useEffect(function(){var t=i;if(u&&i&&!In(i)&&t.current){var e=Bn(t.current,o,u,a),n=e[0],r=e[1];return n(),r}},[o,i,u,a]),t},Zn=function(t,e){if(!e)return{x:t.pageX,y:t.pageY};if(window.webkitConvertPointFromPageToNode){var n=new WebKitPoint(t.pageX,t.pageY);return{x:(n=window.webkitConvertPointFromPageToNode(e,n)).x,y:n.y}}var r=e.getBoundingClientRect(),o=1;e.style.width&&""!==e.style.width&&(o=parseFloat(e.style.width)/r.width);var i=1;e.style.height&&""!==e.style.height&&(i=parseFloat(e.style.height)/r.height);var u=i;return{x:o*(t.pageX-r.left-e.clientLeft+e.scrollLeft),y:u*(t.pageY-r.top-e.clientTop+e.scrollTop)}},_n=function(o){if(o){return function(t,e){var n,r;e||(r=(n=t).target instanceof HTMLElement?n.target:null,e={point:Zn(n,r),devicePoint:Zn(n,document.body)}),o(t,e)}}},zn=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(!r.every(function(t){return void 0===t})){return[function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[0]()}},function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[1]()}}]}},Nn=function(t,e,n){var r=t.onPointerDown,o=t.onPointerMove,i=t.onPointerUp,u=t.onPointerCancel,a=t.onPointerOver,s=t.onPointerOut,c=t.onPointerEnter,f=t.onPointerLeave,p={},l={},d={};null===window.onpointerdown&&null===window.onpointermove&&null===window.onpointerup?d=t:null===window.ontouchstart&&null===window.ontouchmove&&null===window.ontouchend?l={onTouchStart:r,onTouchMove:o,onTouchEnd:i,onTouchCancel:u}:null===window.onmousedown&&null===window.onmousemove&&null===window.onmouseup&&(p={onMouseDown:r,onMouseMove:o,onMouseUp:i,onMouseOver:a,onMouseOut:s,onMouseEnter:c,onMouseLeave:f});var h,v,m,g,y,b,w,P,M,O,S,x,k,E,C,A,T,L,R,Y,X,j,D,F,V,U,I,W,B,q,Z,_,z,N,G,H,$,K,J,Q,tt,et,nt,rt,ot,it,ut,at=(v=e,m=n,g=(h=d).onPointerDown,y=h.onPointerMove,b=h.onPointerUp,w=h.onPointerCancel,P=h.onPointerOver,M=h.onPointerOut,O=h.onPointerEnter,S=h.onPointerLeave,x=qn("pointerdown",v,_n(g),m),k=qn("pointermove",v,_n(y),m),E=qn("pointerup",v,_n(b),m),C=qn("pointercancel",v,_n(w),m),A=qn("pointerover",v,_n(P),m),T=qn("pointerout",v,_n(M),m),L=qn("pointerenter",v,_n(O),m),R=qn("pointerleave",v,_n(S),m),zn(x,k,E,C,A,T,L,R)),st=(X=e,j=n,D=(Y=l).onTouchStart,F=Y.onTouchMove,V=Y.onTouchEnd,U=Y.onTouchCancel,I=qn("touchstart",X,_n(D),j),W=qn("touchmove",X,_n(F),j),B=qn("touchend",X,_n(V),j),q=qn("touchcancel",X,_n(U),j),zn(I,W,B,q)),ct=(_=e,z=n,N=(Z=p).onMouseDown,G=Z.onMouseMove,H=Z.onMouseUp,$=Z.onMouseOver,K=Z.onMouseOut,J=Z.onMouseEnter,Q=Z.onMouseLeave,tt=qn("mousedown",_,_n(N),z),et=qn("mousemove",_,_n(G),z),nt=qn("mouseup",_,_n(H),z),rt=qn("mouseover",_,_n($),z),ot=qn("mouseout",_,_n(K),z),it=qn("mouseenter",_,_n(J),z),ut=qn("mouseleave",_,_n(Q),z),zn(tt,et,nt,rt,ot,it,ut));return zn(at,st,ct)},Gn=function(t,e,n){var r,o,i=D.useRef(null);return o=e?(r=e,t):(r=i,{}),Nn(o,r,n),e?void 0:t};function Hn(t,e){var u=t.onPan,a=t.onPanStart,s=t.onPanEnd,c=null,n=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c){var o=Wn.subtract(r,c.lastDevicePoint),i=Wn.subtract(r,c.startDevicePoint);(0<Math.abs(o.x)||0<Math.abs(o.y))&&(c.startEvent?u&&u({point:n,devicePoint:r,delta:o,offset:i},t):(a&&a({point:n,devicePoint:r,delta:o,offset:i},t),c.startEvent=t)),c.lastDevicePoint=r}else console.error("Pointer move without started session")}},[u,a]),r=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c){var o=Wn.subtract(r,c.lastDevicePoint),i=Wn.subtract(r,c.startDevicePoint);d(),f(),s&&s({point:n,devicePoint:r,delta:o,offset:i},t),c=null}else console.error("Pointer end without started session")}},[s,n]),o=Nn({onPointerUp:r},window),i=o[0],f=o[1],p=Nn({onPointerMove:n},window,{capture:!0}),l=p[0],d=p[1],h=D.useMemo(function(){return function(t,e){var n=e.devicePoint;c={target:t.target,lastDevicePoint:n,startDevicePoint:n},l(),i()}},[r,n]);return D.useEffect(function(){return function(){d(),f()}}),Gn({onPointerDown:h},e)}function $n(t,o){var i=t.onTap,u=null,e=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;u&&o&&t.target===o.current&&(i&&i({point:n,devicePoint:r},t),u=null)}},[i]),n=Nn({onPointerUp:e},window),r=n[0],a=n[1];return D.useEffect(function(){return function(){a()}},[o&&o.current,e]),Gn({onPointerDown:function(t){r(),o&&t.target===o.current&&(u={target:t.target})}},o)}(Wn||(Wn={})).subtract=function(t,e){return{x:t.x-e.x,y:t.y-e.y}};var Kn=function(t,e){Hn(t,e),$n(t,e)};function Jn(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Qn={dragEnabled:!1,dragLocksDirection:!1,dragPropagation:!1};function tr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function er(t,e,n){var r,o,i=(r=t,o=Qn,Object.assign(o,r),o),u=i.dragEnabled,a=i.dragPropagation,s=i.dragLocksDirection,c={},f=null;tr("x",u,f)&&(c.x=n.get("x",0)),tr("y",u,f)&&(c.y=n.get("y",0));var p=D.useContext(We),l=!1,d=D.useMemo(function(){return function(){(a||(l=function(t){var e=!1;if("y"===t)e=rr();else if("x"===t)e=nr();else{var n=nr(),r=rr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(u)))&&(f=null,p.dragging=!0)}},[u,a,p]),h=D.useMemo(function(){return function(t){var e=t.delta,n=t.offset;if(a||l)if(s&&null===f)f=function(t){var e=null;10<Math.abs(t.y)?e="y":10<Math.abs(t.x)&&(e="x");return e}(n);else{var r=c.x,o=c.y;tr("x",u,f)&&r&&r.set(r.get()+e.x),tr("y",u,f)&&o&&o.set(o.get()+e.y)}}},[l,u,c]),v=D.useMemo(function(){return function(){!a&&l&&l(),p.dragging=!1}},[l,p,u]),m={};u&&(m={onPanStart:d,onPan:h,onPanEnd:v}),Hn(m,e)}var nr=Jn("dragHorizontal"),rr=Jn("dragVertical");var or=function(j){return D.memo(D.forwardRef(function(t,e){var n,r,o,i,u,a,s,c,f,p,l,d,h,v,m,g,y=t,b=y.animate,w=y.pose,P=void 0===w?"default":w,M=y.style,O=y.onPoseComplete,S=y.inherit,x=void 0!==S&&S,k=y.initialPose,E=y.dragEnabled,C=y.dragLocksDirection,A=y.dragPropagation,T=V(y,["animate","pose","style","onPoseComplete","inherit","initialPose","dragEnabled","dragLocksDirection","dragPropagation"]),L=(r=(n=e)&&"function"!=typeof n?n:D.useRef(null),D.useEffect(function(){if(n&&"function"==typeof n)return n(r.current),function(){return n(null)}}),r),R=(o=L,i=D.useMemo(function(){return new Mn},[]),D.useEffect(function(){return o.current,Element,i.mount(o.current),function(){return i.unmount()}}),i),Y=(u=R,a=x,s=T,c=D.useContext(We).controls,(f=D.useMemo(function(){return new Xn(u)},[])).resetChildren(),a&&c&&c.addChild(f),D.useEffect(function(){return function(){return c&&c.removeChild(f)}},[]),f.setProps(s),f),X=(p=Y,l=x,d=k||P,h=D.useContext(We),v=h.pose,m=h.dragging,(g=D.useMemo(function(){return{controls:p,dragging:m}},Ie(Ue(d)))).pose=l?v:d,g);return Vn(b,Y),Un(b,x,Y,O,P,k),Kn(T,L),er({dragEnabled:E,dragLocksDirection:C,dragPropagation:A},L,R),D.createElement(We.Provider,{value:X},D.createElement(j,F({},T,{ref:L,style:Dn(R,M)})))}))},ir=r.reduce(function(t,e){return t[e]=or(e),t},{custom:or}),ur=Ve(0),ar=Ve(0),sr=Ve(0),cr=Ve(0),fr=0,pr=0,lr=0,dr=0,hr=!1,vr={scrollX:ur,scrollY:ar,scrollXProgress:sr,scrollYProgress:cr};t.motion=ir,t.useMotionValue=function(t){return D.useMemo(function(){return Ve(t)},[])},t.useTransformedValue=function(e,n,r){var o=D.useRef(null);return D.useMemo(function(){o.current&&o.current.destroy();var t=De(n,r);return o.current=e.addChild({transformer:t}),o.current},[e].concat(n,r))},t.useViewportScrollValues=function(){return hr||function(){if(hr=!0,"undefined"!=typeof window){var t=function(){var t=window.pageXOffset,e=window.pageYOffset;ur.set(t),ar.set(e),sr.set(fr-t-lr),cr.set(pr-e-dr)},e=function(){fr=document.body.clientWidth,pr=document.body.clientHeight,lr=window.innerWidth,dr=window.innerHeight};e(),t(),window.addEventListener("resize",e),window.addEventListener("scroll",t,{passive:!0})}}(),vr},t.useAnimation=function(t){var e=D.useMemo(function(){return new Fn},[]);return t&&e.setPoses(t),D.useEffect(function(){return e.mount(),function(){return e.unmount()}},[]),e},t.useTapGesture=$n,t.usePanGesture=Hn,t.useGestures=Kn,Object.defineProperty(t,"__esModule",{value:!0})});
export { motion } from "./motion";
export { useMotionValue } from "./value/use-motion-value";
export { useTransformedValue } from "./value/use-transformed-value";
export { useViewportScrollValues } from "./value/use-viewport-scroll-values";
export { useAnimation } from "./animation/use-animation";
export { useTapGesture, usePanGesture, useGestures } from "./gestures";
export { Poses } from "./types";

@@ -6,4 +6,4 @@ import { ComponentType, ReactHTML, SVGAttributes, DetailedHTMLFactory } from "react";

export { AnimationControls } from "./utils/use-animation-controls";
import { MotionProps } from "./types";
import { createMotionComponent } from "./component";
import { MotionProps } from "./types";
declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

@@ -10,0 +10,0 @@ declare type UnwrapFactory<F> = F extends DetailedHTMLFactory<infer P, any> ? P : never;

@@ -1,2 +0,2 @@

import { Transition } from "../../types";
export declare const getDefaultTransition: (valueKey: string, to: string | number) => Transition;
import { PopmotionTransitionDefinition } from "../../types";
export declare const getDefaultTransition: (valueKey: string, to: string | number) => PopmotionTransitionDefinition;

@@ -1,3 +0,39 @@

import { Transition, Tween, Keyframes } from "../../types";
import { EasingFunction, TransitionMap, PopmotionTransitionDefinition } from "../../types";
import { ActionFactory } from "../../value";
export declare const getTransition: (valueKey: string, to: string | number, transition?: false | import("../../types").BaseTransition | Tween | Keyframes | import("../../types").Spring | import("../../types").Decay | import("../../types").Physics | undefined) => [ActionFactory, Transition];
export declare const getTransition: (valueKey: string, to: string | number, transition?: (import("../../types").BaseTransition & import("../../types").TransitionOrchestration) | (import("../../types").BaseTransition & {
type?: "tween" | undefined;
duration?: number | undefined;
ease?: EasingFunction | [number, number, number, number] | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | undefined;
elapsed?: number | undefined;
loop?: number | undefined;
flip?: number | undefined;
yoyo?: number | undefined;
} & import("../../types").TransitionOrchestration) | (import("../../types").BaseTransition & {
type: "spring";
stiffness?: number | undefined;
damping?: number | undefined;
mass?: number | undefined;
restSpeed?: number | undefined;
restDelta?: number | undefined;
} & import("../../types").TransitionOrchestration) | (import("../../types").BaseTransition & {
type: "decay";
modifyTarget?: ((v: number) => number) | undefined;
power?: number | undefined;
timeConstant?: number | undefined;
restDelta?: number | undefined;
} & import("../../types").TransitionOrchestration) | (import("../../types").BaseTransition & {
type: "keyframes";
values: number[] | string[];
easings?: import("../../types").Easing[] | undefined;
easeAll?: EasingFunction | [number, number, number, number] | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | undefined;
elapsed?: number | undefined;
duration?: number | undefined;
loop?: number | undefined;
flip?: number | undefined;
yoyo?: number | undefined;
} & import("../../types").TransitionOrchestration) | (import("../../types").BaseTransition & {
type: "physics";
acceleration?: number | undefined;
friction?: number | undefined;
restSpeed?: number | false | undefined;
} & import("../../types").TransitionOrchestration) | TransitionMap | undefined) => [ActionFactory, PopmotionTransitionDefinition];

@@ -7,3 +7,3 @@ import { MotionValuesMap } from "./use-motion-values";

private poses;
private children;
private children?;
private isAnimating;

@@ -10,0 +10,0 @@ constructor(values: MotionValuesMap);

@@ -7,7 +7,3 @@ export declare type Props = {

export declare type Easing = CubicBezier | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | EasingFunction;
export declare type BaseTransition = {
delay?: number;
from?: number | string;
to?: number | string;
velocity?: number;
export declare type TransitionOrchestration = {
beforeChildren?: boolean;

@@ -20,2 +16,9 @@ afterChildren?: boolean;

};
export declare type BaseTransition = {
type?: false;
delay?: number;
from?: number | string;
to?: number | string;
velocity?: number;
};
export declare type Tween = BaseTransition & {

@@ -65,7 +68,8 @@ type?: "tween";

};
export declare type Transition = Tween | Spring | Decay | Keyframes | Physics | Just;
export declare type PoseTransition = Tween | Spring | Decay | Keyframes | Physics | BaseTransition | false;
export declare type TransitionMap = {
[key: string]: PoseTransition;
export declare type PopmotionTransitionDefinition = Tween | Spring | Decay | Keyframes | Physics | Just;
export declare type TransitionDefinition = Tween | Spring | Decay | Keyframes | Physics | BaseTransition;
export declare type TransitionMap = TransitionOrchestration & {
[key: string]: TransitionDefinition;
};
export declare type PoseTransition = (TransitionDefinition & TransitionOrchestration) | (TransitionMap & TransitionOrchestration);
export declare type PoseDefinition = {

@@ -72,0 +76,0 @@ x?: number | string;

import { FrameData } from "framesync";
import { Action } from "popmotion";
import { PopmotionTransitionDefinition } from "../types";
export declare type Transformer<T> = (v: T) => T;

@@ -9,6 +10,3 @@ export declare type Subscriber<T> = (v: T) => void;

};
export declare type ActionConfig = {
[key: string]: any;
};
export declare type ActionFactory = (actionConfig: ActionConfig) => Action;
export declare type ActionFactory = (actionConfig: PopmotionTransitionDefinition) => Action;
export declare class MotionValue<V = any> {

@@ -19,3 +17,3 @@ private current;

private lastUpdated;
private children;
private children?;
private parent?;

@@ -40,3 +38,3 @@ private updateSubscribers;

getVelocity(): number;
control(controller: ActionFactory, { delay, ...config }: ActionConfig, transformer?: Transformer<V>): Promise<{}>;
control(controller: ActionFactory, { delay, ...config }: PopmotionTransitionDefinition, transformer?: Transformer<V>): Promise<{}>;
stop(): void;

@@ -43,0 +41,0 @@ destroy(): void;

{
"name": "framer-motion",
"version": "0.0.2",
"version": "0.0.3",
"main": "dist/framer-motion.cjs.js",

@@ -5,0 +5,0 @@ "module": "dist/framer-motion.es.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc