Socket
Socket
Sign inDemoInstall

@motionone/dom

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@motionone/dom - npm Package Compare versions

Comparing version 10.17.1 to 10.18.0

1

dist/animate/style.cjs.js

@@ -13,2 +13,3 @@ 'use strict';

: getComputedStyle(element)[name];
// TODO Decide if value can be 0
if (!value && value !== 0) {

@@ -15,0 +16,0 @@ const definition = transforms.transformDefinitions.get(name);

@@ -11,2 +11,3 @@ import { isCssVar } from './utils/css-var.es.js';

: getComputedStyle(element)[name];
// TODO Decide if value can be 0
if (!value && value !== 0) {

@@ -13,0 +14,0 @@ const definition = transformDefinitions.get(name);

3

dist/animate/utils/controls.cjs.js

@@ -49,3 +49,4 @@ 'use strict';

default:
return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === "undefined"
return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) ===
"undefined"
? undefined

@@ -52,0 +53,0 @@ : () => target.animations.forEach((animation) => animation[key]());

@@ -47,3 +47,4 @@ import { defaults, noop, time } from '@motionone/utils';

default:
return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === "undefined"
return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) ===
"undefined"
? undefined

@@ -50,0 +51,0 @@ : () => target.animations.forEach((animation) => animation[key]());

@@ -33,3 +33,4 @@ 'use strict';

if (results[key] === undefined)
results[key] = featureTests[key]();
results[key] =
featureTests[key]();
return results[key];

@@ -36,0 +37,0 @@ };

@@ -31,3 +31,4 @@ const testAnimation = (keyframes, options) => document.createElement("div").animate(keyframes, options);

if (results[key] === undefined)
results[key] = featureTests[key]();
results[key] =
featureTests[key]();
return results[key];

@@ -34,0 +35,0 @@ };

@@ -39,4 +39,4 @@ 'use strict';

const prevTime = info.time;
axis.current = element["scroll" + position];
axis.scrollLength = element["scroll" + length] - element["client" + length];
axis.current = element[`scroll${position}`];
axis.scrollLength = element[`scroll${length}`] - element[`client${length}`];
axis.offset.length = 0;

@@ -43,0 +43,0 @@ axis.offset[0] = 0;

@@ -37,4 +37,4 @@ import { progress, velocityPerSecond } from '@motionone/utils';

const prevTime = info.time;
axis.current = element["scroll" + position];
axis.scrollLength = element["scroll" + length] - element["client" + length];
axis.current = element[`scroll${position}`];
axis.scrollLength = element[`scroll${length}`] - element[`client${length}`];
axis.offset.length = 0;

@@ -41,0 +41,0 @@ axis.offset[0] = 0;

@@ -30,3 +30,6 @@ 'use strict';

*/
offsetDefinition = [offset, edge.namedEdges[offset] ? offset : `0`];
offsetDefinition = [
offset,
edge.namedEdges[offset] ? offset : `0`,
];
}

@@ -33,0 +36,0 @@ }

@@ -28,3 +28,6 @@ import { isNumber, isString } from '@motionone/utils';

*/
offsetDefinition = [offset, namedEdges[offset] ? offset : `0`];
offsetDefinition = [
offset,
namedEdges[offset] ? offset : `0`,
];
}

@@ -31,0 +34,0 @@ }

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

const t=(t,e,n)=>Math.min(Math.max(n,t),e),e={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},n=t=>"number"==typeof t,i=t=>Array.isArray(t)&&!n(t[0]),a=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};const s=(t,e,n)=>-n*t+n*e+t,r=()=>{},o=t=>t,l=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function c(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const a=l(0,e,i);t.push(s(n,1,a))}}function u(e,n=function(t){const e=[0];return c(e,t-1),e}(e.length),r=o){const u=e.length,h=u-n.length;return h>0&&c(n,h),o=>{let c=0;for(;c<u-2&&!(o<n[c+1]);c++);let h=t(0,1,l(n[c],n[c+1],o));const d=function(t,e){return i(t)?t[a(0,t.length,e)]:t}(r,c);return h=d(h),s(e[c],e[c+1],h)}}const h=t=>Array.isArray(t)&&n(t[0]),d=t=>"object"==typeof t&&Boolean(t.createAnimation),f=t=>"function"==typeof t,m=t=>"string"==typeof t,p={ms:t=>1e3*t,s:t=>t/1e3},y=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,g=1e-7,v=12;function w(t,e,n,i){if(t===e&&n===i)return o;const a=e=>function(t,e,n,i,a){let s,r,o=0;do{r=e+(n-e)/2,s=y(r,i,a)-t,s>0?n=r:e=r}while(Math.abs(s)>g&&++o<v);return r}(e,0,1,t,n);return t=>0===t||1===t?t:y(a(t),e,i)}const T={ease:w(.25,.1,.25,1),"ease-in":w(.42,0,1,1),"ease-in-out":w(.42,0,.58,1),"ease-out":w(0,0,.58,1)},S=/\((.*?)\)/;function D(e){if(f(e))return e;if(h(e))return w(...e);if(T[e])return T[e];if(e.startsWith("steps")){const n=S.exec(e);if(n){const e=n[1].split(",");return((e,n="end")=>i=>{const a=(i="end"===n?Math.min(i,.999):Math.max(i,.001))*e,s="end"===n?Math.floor(a):Math.ceil(a);return t(0,1,s/e)})(parseFloat(e[0]),e[1].trim())}}return o}var b=function(){};"production"!==process.env.NODE_ENV&&(b=function(t,e){if(!t)throw new Error(e)});class A{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const x=new WeakMap;function O(t){return x.has(t)||x.set(t,{transforms:[],values:new Map}),x.get(t)}const k=["","X","Y","Z"],E={x:"translateX",y:"translateY",z:"translateZ"},M={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},R={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:M,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:o},skew:M},P=new Map,j=t=>`--motion-${t}`,V=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{k.forEach((e=>{V.push(t+e),P.set(j(t+e),R[t])}))}));const $=(t,e)=>V.indexOf(t)-V.indexOf(e),q=new Set(V),F=t=>q.has(t),N=(t,e)=>{E[e]&&(e=E[e]);const{transforms:n}=O(t);var i,a;a=e,-1===(i=n).indexOf(a)&&i.push(a),t.style.transform=U(n)},U=t=>t.sort($).reduce(_,"").trim(),_=(t,e)=>`${t} ${e}(var(${j(e)}))`,B=t=>t.startsWith("--"),C=new Set;const I=(t,e)=>document.createElement("div").animate(t,e),z={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{I({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(I({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{I({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},W={},K={};for(const t in z)K[t]=()=>(void 0===W[t]&&(W[t]=z[t]()),W[t]);const X=(t,n)=>f(t)?K.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(l(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,n)})`:e.easing:h(t)?Y(t):t,Y=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;const Z=t=>Array.isArray(t)?t:[t];function L(t){return E[t]&&(t=E[t]),F(t)?j(t):t}const G={get:(t,e)=>{e=L(e);let n=B(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=P.get(e);t&&(n=t.initialValue)}return n},set:(t,e,n)=>{e=L(e),B(e)?t.style.setProperty(e,n):t.style[e]=n}};function H(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function J(t,a,s,l={},c){const u=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==l.record&&u;let y,{duration:g=e.duration,delay:v=e.delay,endDelay:w=e.endDelay,repeat:T=e.repeat,easing:S=e.easing,persist:D=!1,direction:b,offset:x,allowWebkitAcceleration:k=!1,autoplay:E=!0}=l;const M=O(t),R=F(a);let j=K.waapi();R&&N(t,a);const V=L(a),$=function(t,e){return t.has(e)||t.set(e,new A),t.get(e)}(M.values,V),q=P.get(V);return H($.animation,!(d(S)&&$.generator)&&!1!==l.record),()=>{const e=()=>{var e,n;return null!==(n=null!==(e=G.get(t,V))&&void 0!==e?e:null==q?void 0:q.initialValue)&&void 0!==n?n:0};let A=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}(Z(s),e);const O=function(t,e){var n;let i=(null==e?void 0:e.toDefaultUnit)||o;const a=t[t.length-1];if(m(a)){const t=(null===(n=a.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(i=e=>e+t)}return i}(A,q);if(d(S)){const t=S.createAnimation(A,"opacity"!==a,e,V,$);S=t.easing,A=t.keyframes||A,g=t.duration||g}if(B(V)&&(K.cssRegisterProperty()?function(t){if(!C.has(t)){C.add(t);try{const{syntax:e,initialValue:n}=P.has(t)?P.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(V):j=!1),R&&!K.linearEasing()&&(f(S)||i(S)&&S.some(f))&&(j=!1),j){q&&(A=A.map((t=>n(t)?q.toDefaultUnit(t):t))),1!==A.length||K.partialKeyframes()&&!h||A.unshift(e());const a={delay:p.ms(v),duration:p.ms(g),endDelay:p.ms(w),easing:i(S)?void 0:X(S,g),direction:b,iterations:T+1,fill:"both"};y=t.animate({[V]:A,offset:x,easing:i(S)?S.map((t=>X(t,g))):void 0},a),y.finished||(y.finished=new Promise(((t,e)=>{y.onfinish=t,y.oncancel=e})));const s=A[A.length-1];y.finished.then((()=>{D||(G.set(t,V,s),y.cancel())})).catch(r),k||(y.playbackRate=1.000001)}else if(c&&R)A=A.map((t=>"string"==typeof t?parseFloat(t):t)),1===A.length&&A.unshift(parseFloat(e())),y=new c((e=>{G.set(t,V,O?O(e):e)}),A,Object.assign(Object.assign({},l),{duration:g,easing:S}));else{const e=A[A.length-1];G.set(t,V,q&&n(e)?q.toDefaultUnit(e):e)}return h&&u(t,a,A,{duration:g,delay:v,easing:S,repeat:T,offset:x},"motion-one"),$.setAnimation(y),y&&!E&&y.pause(),y}}const Q=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);const tt=t=>t(),et={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return p.s((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(nt)).catch(r)),t.finished;case"stop":return()=>{t.animations.forEach((t=>H(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=p.ms(n);case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},nt=t=>t.finished;function it(t,e,n){return f(t)?t(e,n):t}const at=(st=class{constructor(t,n=[0,1],{easing:a,duration:s=e.duration,delay:r=e.delay,endDelay:l=e.endDelay,repeat:c=e.repeat,offset:h,direction:f="normal",autoplay:m=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=o,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),a=a||e.easing,d(a)){const t=a.createAnimation(n);a=t.easing,n=t.keyframes||n,s=t.duration||s}this.repeat=c,this.easing=i(a)?o:D(a),this.updateDuration(s);const p=u(n,h,i(a)?a.map(D):o);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-r,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const a=i/this.duration;let s=Math.floor(a),o=a%1;!o&&a>=1&&(o=1),1===o&&s--;const c=s%2;("reverse"===f||"alternate"===f&&c||"alternate-reverse"===f&&!c)&&(o=1-o);const u=i>=this.totalDuration?1:Math.min(o,1),h=p(this.easing(u));t(h),void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+l)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,h)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},m&&this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}},function(t,n,i={}){const a=(t=function(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length;b(Boolean(a),"No valid element provided."),b(Boolean(n),"No keyframes defined.");const s=[];for(let e=0;e<a;e++){const r=t[e];for(const t in n){const o=Q(i,t);o.delay=it(o.delay,e,a);const l=J(r,t,n[t],o,st);s.push(l)}}return((t,n,i=e.duration)=>new Proxy({animations:t.map(tt).filter(Boolean),duration:i,options:n},et))(s,i,i.duration)});var st;export{at as animate};
const t=(t,e,n)=>Math.min(Math.max(n,t),e),e={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},n=t=>"number"==typeof t,i=t=>Array.isArray(t)&&!n(t[0]),a=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};const s=(t,e,n)=>-n*t+n*e+t,r=()=>{},o=t=>t,l=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function c(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const a=l(0,e,i);t.push(s(n,1,a))}}function u(e,n=function(t){const e=[0];return c(e,t-1),e}(e.length),r=o){const u=e.length,h=u-n.length;return h>0&&c(n,h),o=>{let c=0;for(;c<u-2&&!(o<n[c+1]);c++);let h=t(0,1,l(n[c],n[c+1],o));const d=function(t,e){return i(t)?t[a(0,t.length,e)]:t}(r,c);return h=d(h),s(e[c],e[c+1],h)}}const h=t=>Array.isArray(t)&&n(t[0]),d=t=>"object"==typeof t&&Boolean(t.createAnimation),f=t=>"function"==typeof t,m=t=>"string"==typeof t,p={ms:t=>1e3*t,s:t=>t/1e3},y=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,g=1e-7,v=12;function w(t,e,n,i){if(t===e&&n===i)return o;const a=e=>function(t,e,n,i,a){let s,r,o=0;do{r=e+(n-e)/2,s=y(r,i,a)-t,s>0?n=r:e=r}while(Math.abs(s)>g&&++o<v);return r}(e,0,1,t,n);return t=>0===t||1===t?t:y(a(t),e,i)}const T={ease:w(.25,.1,.25,1),"ease-in":w(.42,0,1,1),"ease-in-out":w(.42,0,.58,1),"ease-out":w(0,0,.58,1)},S=/\((.*?)\)/;function D(e){if(f(e))return e;if(h(e))return w(...e);const n=T[e];if(n)return n;if(e.startsWith("steps")){const n=S.exec(e);if(n){const e=n[1].split(",");return((e,n="end")=>i=>{const a=(i="end"===n?Math.min(i,.999):Math.max(i,.001))*e,s="end"===n?Math.floor(a):Math.ceil(a);return t(0,1,s/e)})(parseFloat(e[0]),e[1].trim())}}return o}var b=function(){};"production"!==process.env.NODE_ENV&&(b=function(t,e){if(!t)throw new Error(e)});class A{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const x=new WeakMap;function O(t){return x.has(t)||x.set(t,{transforms:[],values:new Map}),x.get(t)}const k=["","X","Y","Z"],E={x:"translateX",y:"translateY",z:"translateZ"},M={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},R={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:M,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:o},skew:M},P=new Map,j=t=>`--motion-${t}`,V=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{k.forEach((e=>{V.push(t+e),P.set(j(t+e),R[t])}))}));const $=(t,e)=>V.indexOf(t)-V.indexOf(e),q=new Set(V),F=t=>q.has(t),N=(t,e)=>{E[e]&&(e=E[e]);const{transforms:n}=O(t);var i,a;a=e,-1===(i=n).indexOf(a)&&i.push(a),t.style.transform=U(n)},U=t=>t.sort($).reduce(_,"").trim(),_=(t,e)=>`${t} ${e}(var(${j(e)}))`,B=t=>t.startsWith("--"),C=new Set;const I=(t,e)=>document.createElement("div").animate(t,e),z={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{I({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(I({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{I({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},W={},K={};for(const t in z)K[t]=()=>(void 0===W[t]&&(W[t]=z[t]()),W[t]);const X=(t,n)=>f(t)?K.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(l(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,n)})`:e.easing:h(t)?Y(t):t,Y=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;const Z=t=>Array.isArray(t)?t:[t];function L(t){return E[t]&&(t=E[t]),F(t)?j(t):t}const G={get:(t,e)=>{e=L(e);let n=B(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=P.get(e);t&&(n=t.initialValue)}return n},set:(t,e,n)=>{e=L(e),B(e)?t.style.setProperty(e,n):t.style[e]=n}};function H(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function J(t,a,s,l={},c){const u=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==l.record&&u;let y,{duration:g=e.duration,delay:v=e.delay,endDelay:w=e.endDelay,repeat:T=e.repeat,easing:S=e.easing,persist:D=!1,direction:b,offset:x,allowWebkitAcceleration:k=!1,autoplay:E=!0}=l;const M=O(t),R=F(a);let j=K.waapi();R&&N(t,a);const V=L(a),$=function(t,e){return t.has(e)||t.set(e,new A),t.get(e)}(M.values,V),q=P.get(V);return H($.animation,!(d(S)&&$.generator)&&!1!==l.record),()=>{const e=()=>{var e,n;return null!==(n=null!==(e=G.get(t,V))&&void 0!==e?e:null==q?void 0:q.initialValue)&&void 0!==n?n:0};let A=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}(Z(s),e);const O=function(t,e){var n;let i=(null==e?void 0:e.toDefaultUnit)||o;const a=t[t.length-1];if(m(a)){const t=(null===(n=a.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(i=e=>e+t)}return i}(A,q);if(d(S)){const t=S.createAnimation(A,"opacity"!==a,e,V,$);S=t.easing,A=t.keyframes||A,g=t.duration||g}if(B(V)&&(K.cssRegisterProperty()?function(t){if(!C.has(t)){C.add(t);try{const{syntax:e,initialValue:n}=P.has(t)?P.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(V):j=!1),R&&!K.linearEasing()&&(f(S)||i(S)&&S.some(f))&&(j=!1),j){q&&(A=A.map((t=>n(t)?q.toDefaultUnit(t):t))),1!==A.length||K.partialKeyframes()&&!h||A.unshift(e());const a={delay:p.ms(v),duration:p.ms(g),endDelay:p.ms(w),easing:i(S)?void 0:X(S,g),direction:b,iterations:T+1,fill:"both"};y=t.animate({[V]:A,offset:x,easing:i(S)?S.map((t=>X(t,g))):void 0},a),y.finished||(y.finished=new Promise(((t,e)=>{y.onfinish=t,y.oncancel=e})));const s=A[A.length-1];y.finished.then((()=>{D||(G.set(t,V,s),y.cancel())})).catch(r),k||(y.playbackRate=1.000001)}else if(c&&R)A=A.map((t=>"string"==typeof t?parseFloat(t):t)),1===A.length&&A.unshift(parseFloat(e())),y=new c((e=>{G.set(t,V,O?O(e):e)}),A,Object.assign(Object.assign({},l),{duration:g,easing:S}));else{const e=A[A.length-1];G.set(t,V,q&&n(e)?q.toDefaultUnit(e):e)}return h&&u(t,a,A,{duration:g,delay:v,easing:S,repeat:T,offset:x},"motion-one"),$.setAnimation(y),y&&!E&&y.pause(),y}}const Q=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);const tt=t=>t(),et={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return p.s((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(nt)).catch(r)),t.finished;case"stop":return()=>{t.animations.forEach((t=>H(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=p.ms(n);case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},nt=t=>t.finished;function it(t,e,n){return f(t)?t(e,n):t}const at=(st=class{constructor(t,n=[0,1],{easing:a,duration:s=e.duration,delay:r=e.delay,endDelay:l=e.endDelay,repeat:c=e.repeat,offset:h,direction:f="normal",autoplay:m=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=o,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),a=a||e.easing,d(a)){const t=a.createAnimation(n);a=t.easing,n=t.keyframes||n,s=t.duration||s}this.repeat=c,this.easing=i(a)?o:D(a),this.updateDuration(s);const p=u(n,h,i(a)?a.map(D):o);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-r,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const a=i/this.duration;let s=Math.floor(a),o=a%1;!o&&a>=1&&(o=1),1===o&&s--;const c=s%2;("reverse"===f||"alternate"===f&&c||"alternate-reverse"===f&&!c)&&(o=1-o);const u=i>=this.totalDuration?1:Math.min(o,1),h=p(this.easing(u));t(h),void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+l)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,h)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},m&&this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}},function(t,n,i={}){const a=(t=function(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length;b(Boolean(a),"No valid element provided."),b(Boolean(n),"No keyframes defined.");const s=[];for(let e=0;e<a;e++){const r=t[e];for(const t in n){const o=Q(i,t);o.delay=it(o.delay,e,a);const l=J(r,t,n[t],o,st);s.push(l)}}return((t,n,i=e.duration)=>new Proxy({animations:t.map(tt).filter(Boolean),duration:i,options:n},et))(s,i,i.duration)});var st;export{at as animate};

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

"function"==typeof SuppressedError&&SuppressedError;const t=new WeakMap;let e;function n({target:e,contentRect:n,borderBoxSize:o}){var r;null===(r=t.get(e))||void 0===r||r.forEach((t=>{t({target:e,contentSize:n,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(e,o)}})}))}function o(t){t.forEach(n)}function r(n,r){e||"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(o));const i=function(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(n);return i.forEach((n=>{let o=t.get(n);o||(o=new Set,t.set(n,o)),o.add(r),null==e||e.observe(n)})),()=>{i.forEach((n=>{const o=t.get(n);null==o||o.delete(r),(null==o?void 0:o.size)||null==e||e.unobserve(n)}))}}const i=new Set;let s;function c(t){return i.add(t),s||(s=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};i.forEach((t=>t(e)))},window.addEventListener("resize",s)),()=>{i.delete(t),!i.size&&s&&(s=void 0)}}const f=(t,e,n)=>Math.min(Math.max(n,t),e),l=t=>"number"==typeof t,a=t=>Array.isArray(t)&&!l(t[0]),u=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};const g=(t,e,n)=>-n*t+n*e+t,h=t=>t,d=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function p(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=d(0,e,o);t.push(g(n,1,r))}}function m(t){const e=[0];return p(e,t-1),e}function y(t,e=m(t.length),n=h){const o=t.length,r=o-e.length;return r>0&&p(e,r),r=>{let i=0;for(;i<o-2&&!(r<e[i+1]);i++);let s=f(0,1,d(e[i],e[i+1],r));const c=function(t,e){return a(t)?t[u(0,t.length,e)]:t}(n,i);return s=c(s),g(t[i],t[i+1],s)}}const v=t=>"function"==typeof t,w=t=>"string"==typeof t;const E=50,x={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function L(t,e,n,o){const r=n[e],{length:i,position:s}=x[e],c=r.current,f=n.time;r.current=t["scroll"+s],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=d(0,r.scrollLength,r.current);const l=o-f;var a,u;r.velocity=l>E?0:(a=r.current-c,(u=l)?a*(1e3/u):0)}const O={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},W={start:0,center:.5,end:1};function S(t,e,n=0){let o=0;if(void 0!==W[t]&&(t=W[t]),w(t)){const e=parseFloat(t);t.endsWith("px")?o=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?o=e/100*document.documentElement.clientWidth:t.endsWith("vh")?o=e/100*document.documentElement.clientHeight:t=e}return l(t)&&(o=e*t),n+o}const z=[0,0];function b(t,e,n,o){let r=Array.isArray(t)?t:z,i=0,s=0;return l(t)?r=[t,t]:w(t)&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,W[t]?t:"0"]),i=S(r[0],n,o),s=S(r[1],e),i-s}const A={x:0,y:0};function H(t,e,n){let{offset:o=O.All}=n;const{target:r=t,axis:i="y"}=n,s="y"===i?"height":"width",c=r!==t?function(t,e){let n={x:0,y:0},o=t;for(;o&&o!==e;)if(o instanceof HTMLElement)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;else if(o instanceof SVGGraphicsElement&&"getBBox"in o){const{top:t,left:e}=o.getBBox();for(n.x+=e,n.y+=t;o&&"svg"!==o.tagName;)o=o.parentNode}return n}(r,t):A,f=r===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:r.clientWidth,height:r.clientHeight},l={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let a=!e[i].interpolate;const u=o.length;for(let t=0;t<u;t++){const n=b(o[t],l[s],f[s],c[i]);a||n===e[i].interpolatorOffsets[t]||(a=!0),e[i].offset[t]=n}a&&(e[i].interpolate=y(m(u),e[i].offset),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function B(t,e,n,o={}){const r=o.axis||"y";return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let o=e;for(;o&&o!=t;)n.x.targetOffset+=o.offsetLeft,n.y.targetOffset+=o.offsetTop,o=o.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,o.target,n),update:e=>{!function(t,e,n){L(t,"x",e,n),L(t,"y",e,n),e.time=n}(t,n,e),(o.offset||o.target)&&H(t,n,o)},notify:v(e)?()=>e(n):M(e,n[r])}}function M(t,e){return t.pause(),t.forEachNative(((t,{easing:e})=>{var n,o;if(t.updateDuration)e||(t.easing=h),t.updateDuration(1);else{const r={duration:1e3};e||(r.easing="linear"),null===(o=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===o||o.call(n,r)}})),()=>{t.currentTime=e.progress}}const T=new WeakMap,k=new WeakMap,P=new WeakMap,j=t=>t===document.documentElement?window:t;function q(t,e={}){var{container:n=document.documentElement}=e,o=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}(e,["container"]);let i=P.get(n);i||(i=new Set,P.set(n,i));const s=B(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(i.add(s),!T.has(n)){const t=()=>{const t=performance.now();for(const t of i)t.measure();for(const e of i)e.update(t);for(const t of i)t.notify()};T.set(n,t);const e=j(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&k.set(n,(l=t,v(f=n)?c(f):r(f,l))),e.addEventListener("scroll",t,{passive:!0})}var f,l;const a=T.get(n),u=requestAnimationFrame(a);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(u);const o=P.get(n);if(!o)return;if(o.delete(s),o.size)return;const r=T.get(n);T.delete(n),r&&(j(n).removeEventListener("scroll",r),null===(e=k.get(n))||void 0===e||e(),window.removeEventListener("resize",r))}}export{q as scroll};
"function"==typeof SuppressedError&&SuppressedError;const t=new WeakMap;let e;function n({target:e,contentRect:n,borderBoxSize:o}){var r;null===(r=t.get(e))||void 0===r||r.forEach((t=>{t({target:e,contentSize:n,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(e,o)}})}))}function o(t){t.forEach(n)}function r(n,r){e||"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(o));const i=function(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(n);return i.forEach((n=>{let o=t.get(n);o||(o=new Set,t.set(n,o)),o.add(r),null==e||e.observe(n)})),()=>{i.forEach((n=>{const o=t.get(n);null==o||o.delete(r),(null==o?void 0:o.size)||null==e||e.unobserve(n)}))}}const i=new Set;let s;function c(t){return i.add(t),s||(s=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};i.forEach((t=>t(e)))},window.addEventListener("resize",s)),()=>{i.delete(t),!i.size&&s&&(s=void 0)}}const f=(t,e,n)=>Math.min(Math.max(n,t),e),l=t=>"number"==typeof t,a=t=>Array.isArray(t)&&!l(t[0]),u=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};const g=(t,e,n)=>-n*t+n*e+t,h=t=>t,d=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function p(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=d(0,e,o);t.push(g(n,1,r))}}function m(t){const e=[0];return p(e,t-1),e}function y(t,e=m(t.length),n=h){const o=t.length,r=o-e.length;return r>0&&p(e,r),r=>{let i=0;for(;i<o-2&&!(r<e[i+1]);i++);let s=f(0,1,d(e[i],e[i+1],r));const c=function(t,e){return a(t)?t[u(0,t.length,e)]:t}(n,i);return s=c(s),g(t[i],t[i+1],s)}}const v=t=>"function"==typeof t,w=t=>"string"==typeof t;const E=50,x={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function L(t,e,n,o){const r=n[e],{length:i,position:s}=x[e],c=r.current,f=n.time;r.current=t[`scroll${s}`],r.scrollLength=t[`scroll${i}`]-t[`client${i}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=d(0,r.scrollLength,r.current);const l=o-f;var a,u;r.velocity=l>E?0:(a=r.current-c,(u=l)?a*(1e3/u):0)}const O={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},W={start:0,center:.5,end:1};function S(t,e,n=0){let o=0;if(void 0!==W[t]&&(t=W[t]),w(t)){const e=parseFloat(t);t.endsWith("px")?o=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?o=e/100*document.documentElement.clientWidth:t.endsWith("vh")?o=e/100*document.documentElement.clientHeight:t=e}return l(t)&&(o=e*t),n+o}const z=[0,0];function b(t,e,n,o){let r=Array.isArray(t)?t:z,i=0,s=0;return l(t)?r=[t,t]:w(t)&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,W[t]?t:"0"]),i=S(r[0],n,o),s=S(r[1],e),i-s}const A={x:0,y:0};function H(t,e,n){let{offset:o=O.All}=n;const{target:r=t,axis:i="y"}=n,s="y"===i?"height":"width",c=r!==t?function(t,e){let n={x:0,y:0},o=t;for(;o&&o!==e;)if(o instanceof HTMLElement)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;else if(o instanceof SVGGraphicsElement&&"getBBox"in o){const{top:t,left:e}=o.getBBox();for(n.x+=e,n.y+=t;o&&"svg"!==o.tagName;)o=o.parentNode}return n}(r,t):A,f=r===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:r.clientWidth,height:r.clientHeight},l={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let a=!e[i].interpolate;const u=o.length;for(let t=0;t<u;t++){const n=b(o[t],l[s],f[s],c[i]);a||n===e[i].interpolatorOffsets[t]||(a=!0),e[i].offset[t]=n}a&&(e[i].interpolate=y(m(u),e[i].offset),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function B(t,e,n,o={}){const r=o.axis||"y";return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let o=e;for(;o&&o!=t;)n.x.targetOffset+=o.offsetLeft,n.y.targetOffset+=o.offsetTop,o=o.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,o.target,n),update:e=>{!function(t,e,n){L(t,"x",e,n),L(t,"y",e,n),e.time=n}(t,n,e),(o.offset||o.target)&&H(t,n,o)},notify:v(e)?()=>e(n):M(e,n[r])}}function M(t,e){return t.pause(),t.forEachNative(((t,{easing:e})=>{var n,o;if(t.updateDuration)e||(t.easing=h),t.updateDuration(1);else{const r={duration:1e3};e||(r.easing="linear"),null===(o=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===o||o.call(n,r)}})),()=>{t.currentTime=e.progress}}const T=new WeakMap,k=new WeakMap,P=new WeakMap,j=t=>t===document.documentElement?window:t;function q(t,e={}){var{container:n=document.documentElement}=e,o=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}(e,["container"]);let i=P.get(n);i||(i=new Set,P.set(n,i));const s=B(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(i.add(s),!T.has(n)){const t=()=>{const t=performance.now();for(const t of i)t.measure();for(const e of i)e.update(t);for(const t of i)t.notify()};T.set(n,t);const e=j(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&k.set(n,(l=t,v(f=n)?c(f):r(f,l))),e.addEventListener("scroll",t,{passive:!0})}var f,l;const a=T.get(n),u=requestAnimationFrame(a);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(u);const o=P.get(n);if(!o)return;if(o.delete(s),o.size)return;const r=T.get(n);T.delete(n),r&&(j(n).removeEventListener("scroll",r),null===(e=k.get(n))||void 0===e||e(),window.removeEventListener("resize",r))}}export{q as scroll};

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

"function"==typeof SuppressedError&&SuppressedError;var t=function(){};function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}"production"!==process.env.NODE_ENV&&(t=function(t,e){if(!t)throw new Error(e)});const n=(t,e,n)=>Math.min(Math.max(n,t),e),i={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},a=t=>"number"==typeof t,s=t=>Array.isArray(t)&&!a(t[0]),r=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function o(t,e){return s(t)?t[r(0,t.length,e)]:t}const l=(t,e,n)=>-n*t+n*e+t,c=()=>{},u=t=>t,h=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function f(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const a=h(0,e,i);t.push(l(n,1,a))}}function p(t){const e=[0];return f(e,t-1),e}const d=t=>Array.isArray(t)&&a(t[0]),m=t=>"object"==typeof t&&Boolean(t.createAnimation),y=t=>"function"==typeof t,g=t=>"string"==typeof t,v={ms:t=>1e3*t,s:t=>t/1e3},O=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,b=1e-7,w=12;function S(t,e,n,i){if(t===e&&n===i)return u;const a=e=>function(t,e,n,i,a){let s,r,o=0;do{r=e+(n-e)/2,s=O(r,i,a)-t,s>0?n=r:e=r}while(Math.abs(s)>b&&++o<w);return r}(e,0,1,t,n);return t=>0===t||1===t?t:O(a(t),e,i)}const T={ease:S(.25,.1,.25,1),"ease-in":S(.42,0,1,1),"ease-in-out":S(.42,0,.58,1),"ease-out":S(0,0,.58,1)},x=/\((.*?)\)/;function A(t){if(y(t))return t;if(d(t))return S(...t);if(T[t])return T[t];if(t.startsWith("steps")){const e=x.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(a):Math.ceil(a);return n(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return u}class D{constructor(t,e=[0,1],{easing:a,duration:r=i.duration,delay:c=i.delay,endDelay:d=i.endDelay,repeat:y=i.repeat,offset:g,direction:v="normal",autoplay:O=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=u,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),a=a||i.easing,m(a)){const t=a.createAnimation(e);a=t.easing,e=t.keyframes||e,r=t.duration||r}this.repeat=y,this.easing=s(a)?u:A(a),this.updateDuration(r);const b=function(t,e=p(t.length),i=u){const a=t.length,s=a-e.length;return s>0&&f(e,s),s=>{let r=0;for(;r<a-2&&!(s<e[r+1]);r++);let c=n(0,1,h(e[r],e[r+1],s));return c=o(i,r)(c),l(t[r],t[r+1],c)}}(e,g,s(a)?a.map(A):u);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-c,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const a=i/this.duration;let s=Math.floor(a),r=a%1;!r&&a>=1&&(r=1),1===r&&s--;const o=s%2;("reverse"===v||"alternate"===v&&o||"alternate-reverse"===v&&!o)&&(r=1-r);const l=i>=this.totalDuration?1:Math.min(r,1),u=b(this.easing(l));t(u);void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+d)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,u)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},O&&this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}function E(t,e,n){return y(t)?t(e,n):t}class M{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const k=new WeakMap;function j(t){return k.has(t)||k.set(t,{transforms:[],values:new Map}),k.get(t)}const P=["","X","Y","Z"],R={x:"translateX",y:"translateY",z:"translateZ"},V={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},$={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:V,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:u},skew:V},q=new Map,F=t=>`--motion-${t}`,I=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{P.forEach((e=>{I.push(t+e),q.set(F(t+e),$[t])}))}));const U=(t,e)=>I.indexOf(t)-I.indexOf(e),W=new Set(I),_=t=>W.has(t),C=(t,e)=>{R[e]&&(e=R[e]);const{transforms:n}=j(t);var i,a;a=e,-1===(i=n).indexOf(a)&&i.push(a),t.style.transform=z(n)},z=t=>t.sort(U).reduce(B,"").trim(),B=(t,e)=>`${t} ${e}(var(${F(e)}))`,N=t=>t.startsWith("--"),K=new Set;const X=(t,e)=>document.createElement("div").animate(t,e),Y={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{X({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(X({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{X({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},Z={},L={};for(const t in Y)L[t]=()=>(void 0===Z[t]&&(Z[t]=Y[t]()),Z[t]);const G=(t,e)=>y(t)?L.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(h(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,e)})`:i.easing:d(t)?H(t):t,H=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;const J=t=>Array.isArray(t)?t:[t];function Q(t){return R[t]&&(t=R[t]),_(t)?F(t):t}const tt={get:(t,e)=>{e=Q(e);let n=N(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=q.get(e);t&&(n=t.initialValue)}return n},set:(t,e,n)=>{e=Q(e),N(e)?t.style.setProperty(e,n):t.style[e]=n}};function et(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function nt(t,e,n,r={},o){const l=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==r.record&&l;let f,{duration:p=i.duration,delay:d=i.delay,endDelay:O=i.endDelay,repeat:b=i.repeat,easing:w=i.easing,persist:S=!1,direction:T,offset:x,allowWebkitAcceleration:A=!1,autoplay:D=!0}=r;const E=j(t),k=_(e);let P=L.waapi();k&&C(t,e);const R=Q(e),V=function(t,e){return t.has(e)||t.set(e,new M),t.get(e)}(E.values,R),$=q.get(R);return et(V.animation,!(m(w)&&V.generator)&&!1!==r.record),()=>{const i=()=>{var e,n;return null!==(n=null!==(e=tt.get(t,R))&&void 0!==e?e:null==$?void 0:$.initialValue)&&void 0!==n?n:0};let E=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}(J(n),i);const M=function(t,e){var n;let i=(null==e?void 0:e.toDefaultUnit)||u;const a=t[t.length-1];if(g(a)){const t=(null===(n=a.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(i=e=>e+t)}return i}(E,$);if(m(w)){const t=w.createAnimation(E,"opacity"!==e,i,R,V);w=t.easing,E=t.keyframes||E,p=t.duration||p}if(N(R)&&(L.cssRegisterProperty()?function(t){if(!K.has(t)){K.add(t);try{const{syntax:e,initialValue:n}=q.has(t)?q.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(R):P=!1),k&&!L.linearEasing()&&(y(w)||s(w)&&w.some(y))&&(P=!1),P){$&&(E=E.map((t=>a(t)?$.toDefaultUnit(t):t))),1!==E.length||L.partialKeyframes()&&!h||E.unshift(i());const e={delay:v.ms(d),duration:v.ms(p),endDelay:v.ms(O),easing:s(w)?void 0:G(w,p),direction:T,iterations:b+1,fill:"both"};f=t.animate({[R]:E,offset:x,easing:s(w)?w.map((t=>G(t,p))):void 0},e),f.finished||(f.finished=new Promise(((t,e)=>{f.onfinish=t,f.oncancel=e})));const n=E[E.length-1];f.finished.then((()=>{S||(tt.set(t,R,n),f.cancel())})).catch(c),A||(f.playbackRate=1.000001)}else if(o&&k)E=E.map((t=>"string"==typeof t?parseFloat(t):t)),1===E.length&&E.unshift(parseFloat(i())),f=new o((e=>{tt.set(t,R,M?M(e):e)}),E,Object.assign(Object.assign({},r),{duration:p,easing:w}));else{const e=E[E.length-1];tt.set(t,R,$&&a(e)?$.toDefaultUnit(e):e)}return h&&l(t,e,E,{duration:p,delay:d,easing:w,repeat:b,offset:x},"motion-one"),V.setAnimation(f),f&&!D&&f.pause(),f}}const it=t=>t(),at={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return v.s((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(st)).catch(c)),t.finished;case"stop":return()=>{t.animations.forEach((t=>et(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=v.ms(n);case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},st=t=>t.finished,rt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function ot(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}function lt(t,e,n,i){var s;return a(e)?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}function ct(t,n,i,a,s,r){!function(t,n,i){for(let a=0;a<t.length;a++){const s=t[a];s.at>n&&s.at<i&&(e(t,s),a--)}}(t,s,r);for(let e=0;e<n.length;e++)t.push({value:n[e],at:l(s,r,a[e]),easing:o(i,e)})}function ut(t,e){return t.at===e.at?null===t.value?1:-1:t.at-e.at}function ht(t,e={}){var n;const a=ft(t,e),s=a.map((t=>nt(...t,D))).filter(Boolean);return((t,e,n=i.duration)=>new Proxy({animations:t.map(it).filter(Boolean),duration:n,options:e},at))(s,e,null===(n=a[0])||void 0===n?void 0:n[3].duration)}function ft(e,n={}){var{defaultOptions:a={}}=n,s=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n}(n,["defaultOptions"]);const r=[],o=new Map,l={},c=new Map;let u=0,d=0,y=0;for(let n=0;n<e.length;n++){const s=e[n];if(g(s)){c.set(s,d);continue}if(!Array.isArray(s)){c.set(s.name,lt(d,s.at,u,c));continue}const[r,h,v={}]=s;void 0!==v.at&&(d=lt(d,v.at,u,c));let O=0;const b=ot(r,l),w=b.length;for(let e=0;e<w;e++){const n=pt(b[e],o);for(const s in h){const r=dt(s,n);let o=J(h[s]);const l=rt(v,s);let{duration:c=a.duration||i.duration,easing:u=a.easing||i.easing}=l;if(m(u)){t("opacity"===s||o.length>1,"spring must be provided 2 keyframes within timeline()");const e=u.createAnimation(o,"opacity"!==s,(()=>0),s);u=e.easing,o=e.keyframes||o,c=e.duration||c}const g=E(v.delay,e,w)||0,b=d+g,S=b+c;let{offset:T=p(o.length)}=l;1===T.length&&0===T[0]&&(T[1]=1);const x=T.length-o.length;x>0&&f(T,x),1===o.length&&o.unshift(null),ct(r,o,u,T,b,S),O=Math.max(g+c,O),y=Math.max(S,y)}}u=d,d+=O}return o.forEach(((t,e)=>{for(const n in t){const o=t[n];o.sort(ut);const l=[],c=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:a}=o[t];l.push(n),c.push(h(0,y,e)),u.push(a||i.easing)}0!==c[0]&&(c.unshift(0),l.unshift(l[0]),u.unshift("linear")),1!==c[c.length-1]&&(c.push(1),l.push(null)),r.push([e,n,l,Object.assign(Object.assign(Object.assign({},a),{duration:y,easing:u,offset:c}),s)])}})),r}function pt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function dt(t,e){return e[t]||(e[t]=[]),e[t]}export{ft as createAnimationsFromTimeline,ht as timeline};
"function"==typeof SuppressedError&&SuppressedError;var t=function(){};function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}"production"!==process.env.NODE_ENV&&(t=function(t,e){if(!t)throw new Error(e)});const n=(t,e,n)=>Math.min(Math.max(n,t),e),i={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},a=t=>"number"==typeof t,s=t=>Array.isArray(t)&&!a(t[0]),r=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function o(t,e){return s(t)?t[r(0,t.length,e)]:t}const l=(t,e,n)=>-n*t+n*e+t,c=()=>{},u=t=>t,h=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function f(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const a=h(0,e,i);t.push(l(n,1,a))}}function p(t){const e=[0];return f(e,t-1),e}const d=t=>Array.isArray(t)&&a(t[0]),m=t=>"object"==typeof t&&Boolean(t.createAnimation),y=t=>"function"==typeof t,g=t=>"string"==typeof t,v={ms:t=>1e3*t,s:t=>t/1e3},O=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,b=1e-7,w=12;function S(t,e,n,i){if(t===e&&n===i)return u;const a=e=>function(t,e,n,i,a){let s,r,o=0;do{r=e+(n-e)/2,s=O(r,i,a)-t,s>0?n=r:e=r}while(Math.abs(s)>b&&++o<w);return r}(e,0,1,t,n);return t=>0===t||1===t?t:O(a(t),e,i)}const T={ease:S(.25,.1,.25,1),"ease-in":S(.42,0,1,1),"ease-in-out":S(.42,0,.58,1),"ease-out":S(0,0,.58,1)},x=/\((.*?)\)/;function A(t){if(y(t))return t;if(d(t))return S(...t);const e=T[t];if(e)return e;if(t.startsWith("steps")){const e=x.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const a=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,s="end"===e?Math.floor(a):Math.ceil(a);return n(0,1,s/t)})(parseFloat(t[0]),t[1].trim())}}return u}class D{constructor(t,e=[0,1],{easing:a,duration:r=i.duration,delay:c=i.delay,endDelay:d=i.endDelay,repeat:y=i.repeat,offset:g,direction:v="normal",autoplay:O=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=u,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),a=a||i.easing,m(a)){const t=a.createAnimation(e);a=t.easing,e=t.keyframes||e,r=t.duration||r}this.repeat=y,this.easing=s(a)?u:A(a),this.updateDuration(r);const b=function(t,e=p(t.length),i=u){const a=t.length,s=a-e.length;return s>0&&f(e,s),s=>{let r=0;for(;r<a-2&&!(s<e[r+1]);r++);let c=n(0,1,h(e[r],e[r+1],s));return c=o(i,r)(c),l(t[r],t[r+1],c)}}(e,g,s(a)?a.map(A):u);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-c,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const a=i/this.duration;let s=Math.floor(a),r=a%1;!r&&a>=1&&(r=1),1===r&&s--;const o=s%2;("reverse"===v||"alternate"===v&&o||"alternate-reverse"===v&&!o)&&(r=1-r);const l=i>=this.totalDuration?1:Math.min(r,1),u=b(this.easing(l));t(u);void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+d)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,u)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},O&&this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}function E(t,e,n){return y(t)?t(e,n):t}class M{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const k=new WeakMap;function j(t){return k.has(t)||k.set(t,{transforms:[],values:new Map}),k.get(t)}const P=["","X","Y","Z"],R={x:"translateX",y:"translateY",z:"translateZ"},V={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},$={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:V,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:u},skew:V},q=new Map,F=t=>`--motion-${t}`,I=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{P.forEach((e=>{I.push(t+e),q.set(F(t+e),$[t])}))}));const U=(t,e)=>I.indexOf(t)-I.indexOf(e),W=new Set(I),_=t=>W.has(t),C=(t,e)=>{R[e]&&(e=R[e]);const{transforms:n}=j(t);var i,a;a=e,-1===(i=n).indexOf(a)&&i.push(a),t.style.transform=z(n)},z=t=>t.sort(U).reduce(B,"").trim(),B=(t,e)=>`${t} ${e}(var(${F(e)}))`,N=t=>t.startsWith("--"),K=new Set;const X=(t,e)=>document.createElement("div").animate(t,e),Y={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{X({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(X({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{X({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},Z={},L={};for(const t in Y)L[t]=()=>(void 0===Z[t]&&(Z[t]=Y[t]()),Z[t]);const G=(t,e)=>y(t)?L.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(h(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,e)})`:i.easing:d(t)?H(t):t,H=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;const J=t=>Array.isArray(t)?t:[t];function Q(t){return R[t]&&(t=R[t]),_(t)?F(t):t}const tt={get:(t,e)=>{e=Q(e);let n=N(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=q.get(e);t&&(n=t.initialValue)}return n},set:(t,e,n)=>{e=Q(e),N(e)?t.style.setProperty(e,n):t.style[e]=n}};function et(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function nt(t,e,n,r={},o){const l=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==r.record&&l;let f,{duration:p=i.duration,delay:d=i.delay,endDelay:O=i.endDelay,repeat:b=i.repeat,easing:w=i.easing,persist:S=!1,direction:T,offset:x,allowWebkitAcceleration:A=!1,autoplay:D=!0}=r;const E=j(t),k=_(e);let P=L.waapi();k&&C(t,e);const R=Q(e),V=function(t,e){return t.has(e)||t.set(e,new M),t.get(e)}(E.values,R),$=q.get(R);return et(V.animation,!(m(w)&&V.generator)&&!1!==r.record),()=>{const i=()=>{var e,n;return null!==(n=null!==(e=tt.get(t,R))&&void 0!==e?e:null==$?void 0:$.initialValue)&&void 0!==n?n:0};let E=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}(J(n),i);const M=function(t,e){var n;let i=(null==e?void 0:e.toDefaultUnit)||u;const a=t[t.length-1];if(g(a)){const t=(null===(n=a.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(i=e=>e+t)}return i}(E,$);if(m(w)){const t=w.createAnimation(E,"opacity"!==e,i,R,V);w=t.easing,E=t.keyframes||E,p=t.duration||p}if(N(R)&&(L.cssRegisterProperty()?function(t){if(!K.has(t)){K.add(t);try{const{syntax:e,initialValue:n}=q.has(t)?q.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(R):P=!1),k&&!L.linearEasing()&&(y(w)||s(w)&&w.some(y))&&(P=!1),P){$&&(E=E.map((t=>a(t)?$.toDefaultUnit(t):t))),1!==E.length||L.partialKeyframes()&&!h||E.unshift(i());const e={delay:v.ms(d),duration:v.ms(p),endDelay:v.ms(O),easing:s(w)?void 0:G(w,p),direction:T,iterations:b+1,fill:"both"};f=t.animate({[R]:E,offset:x,easing:s(w)?w.map((t=>G(t,p))):void 0},e),f.finished||(f.finished=new Promise(((t,e)=>{f.onfinish=t,f.oncancel=e})));const n=E[E.length-1];f.finished.then((()=>{S||(tt.set(t,R,n),f.cancel())})).catch(c),A||(f.playbackRate=1.000001)}else if(o&&k)E=E.map((t=>"string"==typeof t?parseFloat(t):t)),1===E.length&&E.unshift(parseFloat(i())),f=new o((e=>{tt.set(t,R,M?M(e):e)}),E,Object.assign(Object.assign({},r),{duration:p,easing:w}));else{const e=E[E.length-1];tt.set(t,R,$&&a(e)?$.toDefaultUnit(e):e)}return h&&l(t,e,E,{duration:p,delay:d,easing:w,repeat:b,offset:x},"motion-one"),V.setAnimation(f),f&&!D&&f.pause(),f}}const it=t=>t(),at={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return v.s((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(st)).catch(c)),t.finished;case"stop":return()=>{t.animations.forEach((t=>et(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=v.ms(n);case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},st=t=>t.finished,rt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function ot(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}function lt(t,e,n,i){var s;return a(e)?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}function ct(t,n,i,a,s,r){!function(t,n,i){for(let a=0;a<t.length;a++){const s=t[a];s.at>n&&s.at<i&&(e(t,s),a--)}}(t,s,r);for(let e=0;e<n.length;e++)t.push({value:n[e],at:l(s,r,a[e]),easing:o(i,e)})}function ut(t,e){return t.at===e.at?null===t.value?1:-1:t.at-e.at}function ht(t,e={}){var n;const a=ft(t,e),s=a.map((t=>nt(...t,D))).filter(Boolean);return((t,e,n=i.duration)=>new Proxy({animations:t.map(it).filter(Boolean),duration:n,options:e},at))(s,e,null===(n=a[0])||void 0===n?void 0:n[3].duration)}function ft(e,n={}){var{defaultOptions:a={}}=n,s=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n}(n,["defaultOptions"]);const r=[],o=new Map,l={},c=new Map;let u=0,d=0,y=0;for(let n=0;n<e.length;n++){const s=e[n];if(g(s)){c.set(s,d);continue}if(!Array.isArray(s)){c.set(s.name,lt(d,s.at,u,c));continue}const[r,h,v={}]=s;void 0!==v.at&&(d=lt(d,v.at,u,c));let O=0;const b=ot(r,l),w=b.length;for(let e=0;e<w;e++){const n=pt(b[e],o);for(const s in h){const r=dt(s,n);let o=J(h[s]);const l=rt(v,s);let{duration:c=a.duration||i.duration,easing:u=a.easing||i.easing}=l;if(m(u)){t("opacity"===s||o.length>1,"spring must be provided 2 keyframes within timeline()");const e=u.createAnimation(o,"opacity"!==s,(()=>0),s);u=e.easing,o=e.keyframes||o,c=e.duration||c}const g=E(v.delay,e,w)||0,b=d+g,S=b+c;let{offset:T=p(o.length)}=l;1===T.length&&0===T[0]&&(T[1]=1);const x=T.length-o.length;x>0&&f(T,x),1===o.length&&o.unshift(null),ct(r,o,u,T,b,S),O=Math.max(g+c,O),y=Math.max(S,y)}}u=d,d+=O}return o.forEach(((t,e)=>{for(const n in t){const o=t[n];o.sort(ut);const l=[],c=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:a}=o[t];l.push(n),c.push(h(0,y,e)),u.push(a||i.easing)}0!==c[0]&&(c.unshift(0),l.unshift(l[0]),u.unshift("linear")),1!==c[c.length-1]&&(c.push(1),l.push(null)),r.push([e,n,l,Object.assign(Object.assign(Object.assign({},a),{duration:y,easing:u,offset:c}),s)])}})),r}function pt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function dt(t,e){return e[t]||(e[t]=[]),e[t]}export{ft as createAnimationsFromTimeline,ht as timeline};

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

var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{j:()=>it});const i={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},n=()=>{},a=t=>t,s=t=>"object"==typeof t&&Boolean(t.createAnimation),r=t=>"number"==typeof t,o=t=>Array.isArray(t)&&!r(t[0]),l=(t,e,i)=>-i*t+i*e+t,c=(t,e,i)=>e-t==0?1:(i-t)/(e-t);function u(t,e){const i=t[t.length-1];for(let n=1;n<=e;n++){const a=c(0,e,n);t.push(l(i,1,a))}}const h=(t,e,i)=>Math.min(Math.max(i,t),e);const d=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t,f=1e-7,p=12;function m(t,e,i,n){if(t===e&&i===n)return a;return a=>0===a||1===a?a:d(function(t,e,i,n,a){let s,r,o=0;do{r=e+(i-e)/2,s=d(r,n,a)-t,s>0?i=r:e=r}while(Math.abs(s)>f&&++o<p);return r}(a,0,1,t,i),e,n)}const y=t=>"function"==typeof t,g=t=>Array.isArray(t)&&r(t[0]),v={ease:m(.25,.1,.25,1),"ease-in":m(.42,0,1,1),"ease-in-out":m(.42,0,.58,1),"ease-out":m(0,0,.58,1)},T=/\((.*?)\)/;function w(t){if(y(t))return t;if(g(t))return m(...t);if(v[t])return v[t];if(t.startsWith("steps")){const e=T.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>i=>{const n=(i="end"===e?Math.min(i,.999):Math.max(i,.001))*t,a="end"===e?Math.floor(n):Math.ceil(n);return h(0,1,a/t)})(parseFloat(t[0]),t[1].trim())}}return a}class b{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const S=new WeakMap;function D(t){return S.has(t)||S.set(t,{transforms:[],values:new Map}),S.get(t)}const O=["","X","Y","Z"],A={x:"translateX",y:"translateY",z:"translateZ"},x={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},k={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:x,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:a},skew:x},M=new Map,j=t=>`--motion-${t}`,E=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{O.forEach((e=>{E.push(t+e),M.set(j(t+e),k[t])}))}));const P=(t,e)=>E.indexOf(t)-E.indexOf(e),R=new Set(E),V=t=>R.has(t),$=t=>t.sort(P).reduce(q,"").trim(),q=(t,e)=>`${t} ${e}(var(${j(e)}))`,F=t=>t.startsWith("--"),U=new Set,B=t=>1e3*t,C=t=>t/1e3,I=(t,e)=>document.createElement("div").animate(t,e),_={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{I({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(I({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{I({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},z={},W={};for(const t in _)W[t]=()=>(void 0===z[t]&&(z[t]=_[t]()),z[t]);const K=(t,e)=>y(t)?W.linearEasing()?`linear(${((t,e)=>{let i="";const n=Math.round(e/.015);for(let e=0;e<n;e++)i+=t(c(0,n-1,e))+", ";return i.substring(0,i.length-2)})(t,e)})`:i.easing:g(t)?N(t):t,N=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`;function X(t){return A[t]&&(t=A[t]),V(t)?j(t):t}const Y=(t,e)=>{e=X(e);let i=F(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&0!==i){const t=M.get(e);t&&(i=t.initialValue)}return i},Z=(t,e,i)=>{e=X(e),F(e)?t.style.setProperty(e,i):t.style[e]=i};function L(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function G(t,e,l,c={},u){const h=window.__MOTION_DEV_TOOLS_RECORD,d=!1!==c.record&&h;let f,{duration:p=i.duration,delay:m=i.delay,endDelay:g=i.endDelay,repeat:v=i.repeat,easing:T=i.easing,persist:w=!1,direction:S,offset:O,allowWebkitAcceleration:x=!1,autoplay:k=!0}=c;const j=D(t),E=V(e);let P=W.waapi();E&&((t,e)=>{A[e]&&(e=A[e]);const{transforms:i}=D(t);var n,a;a=e,-1===(n=i).indexOf(a)&&n.push(a),t.style.transform=$(i)})(t,e);const R=X(e),q=function(t,e){return t.has(e)||t.set(e,new b),t.get(e)}(j.values,R),C=M.get(R);return L(q.animation,!(s(T)&&q.generator)&&!1!==c.record),()=>{const i=()=>{var e,i;return null!==(i=null!==(e=Y(t,R))&&void 0!==e?e:null==C?void 0:C.initialValue)&&void 0!==i?i:0};let b=function(t,e){for(let i=0;i<t.length;i++)null===t[i]&&(t[i]=i?t[i-1]:e());return t}((t=>Array.isArray(t)?t:[t])(l),i);const D=function(t,e){var i;let n=(null==e?void 0:e.toDefaultUnit)||a;const s=t[t.length-1];if("string"==typeof s){const t=(null===(i=s.match(/(-?[\d.]+)([a-z%]*)/))||void 0===i?void 0:i[2])||"";t&&(n=e=>e+t)}return n}(b,C);if(s(T)){const t=T.createAnimation(b,"opacity"!==e,i,R,q);T=t.easing,b=t.keyframes||b,p=t.duration||p}if(F(R)&&(W.cssRegisterProperty()?function(t){if(!U.has(t)){U.add(t);try{const{syntax:e,initialValue:i}=M.has(t)?M.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch(t){}}}(R):P=!1),E&&!W.linearEasing()&&(y(T)||o(T)&&T.some(y))&&(P=!1),P){C&&(b=b.map((t=>r(t)?C.toDefaultUnit(t):t))),1!==b.length||W.partialKeyframes()&&!d||b.unshift(i());const e={delay:B(m),duration:B(p),endDelay:B(g),easing:o(T)?void 0:K(T,p),direction:S,iterations:v+1,fill:"both"};f=t.animate({[R]:b,offset:O,easing:o(T)?T.map((t=>K(t,p))):void 0},e),f.finished||(f.finished=new Promise(((t,e)=>{f.onfinish=t,f.oncancel=e})));const a=b[b.length-1];f.finished.then((()=>{w||(Z(t,R,a),f.cancel())})).catch(n),x||(f.playbackRate=1.000001)}else if(u&&E)b=b.map((t=>"string"==typeof t?parseFloat(t):t)),1===b.length&&b.unshift(parseFloat(i())),f=new u((e=>{Z(t,R,D?D(e):e)}),b,Object.assign(Object.assign({},c),{duration:p,easing:T}));else{const e=b[b.length-1];Z(t,R,C&&r(e)?C.toDefaultUnit(e):e)}return d&&h(t,e,b,{duration:p,delay:m,easing:T,repeat:v,offset:O},"motion-one"),q.setAnimation(f),f&&!k&&f.pause(),f}}const H=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t),J=t=>t(),Q={get:(t,e)=>{const i=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return C((null==i?void 0:i[e])||0);case"playbackRate":case"playState":return null==i?void 0:i[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(tt)).catch(n)),t.finished;case"stop":return()=>{t.animations.forEach((t=>L(t)))};case"forEachNative":return e=>{t.animations.forEach((i=>e(i,t)))};default:return void 0===(null==i?void 0:i[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,i)=>{switch(e){case"currentTime":i=B(i);case"playbackRate":for(let n=0;n<t.animations.length;n++)t.animations[n][e]=i;return!0}return!1}},tt=t=>t.finished;function et(t,e,i){return y(t)?t(e,i):t}const it=(nt=class{constructor(t,e=[0,1],{easing:n,duration:r=i.duration,delay:d=i.delay,endDelay:f=i.endDelay,repeat:p=i.repeat,offset:m,direction:y="normal",autoplay:g=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=a,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),n=n||i.easing,s(n)){const t=n.createAnimation(e);n=t.easing,e=t.keyframes||e,r=t.duration||r}this.repeat=p,this.easing=o(n)?a:w(n),this.updateDuration(r);const v=function(t,e=function(t){const e=[0];return u(e,t-1),e}(t.length),i=a){const n=t.length,s=n-e.length;return s>0&&u(e,s),a=>{let s=0;for(;s<n-2&&!(a<e[s+1]);s++);let r=h(0,1,c(e[s],e[s+1],a));const u=function(t,e){return o(t)?t[((t,e,i)=>{const n=e-t;return((i-t)%n+n)%n+t})(0,t.length,e)]:t}(i,s);return r=u(r),l(t[s],t[s+1],r)}}(e,m,o(n)?n.map(w):a);this.tick=e=>{var i;let n=0;n=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=n,n/=1e3,n=Math.max(n-d,0),"finished"===this.playState&&void 0===this.pauseTime&&(n=this.totalDuration);const a=n/this.duration;let s=Math.floor(a),r=a%1;!r&&a>=1&&(r=1),1===r&&s--;const o=s%2;("reverse"===y||"alternate"===y&&o||"alternate-reverse"===y&&!o)&&(r=1-r);const l=n>=this.totalDuration?1:Math.min(r,1),c=v(this.easing(l));t(c),void 0===this.pauseTime&&("finished"===this.playState||n>=this.totalDuration+f)?(this.playState="finished",null===(i=this.resolve)||void 0===i||i.call(this,c)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},g&&this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}},function(t,e,n={}){const a=(t=function(t,e){return"string"==typeof t?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length;Boolean(a),Boolean(e);const s=[];for(let i=0;i<a;i++){const r=t[i];for(const t in e){const o=H(n,t);o.delay=et(o.delay,i,a);const l=G(r,t,e[t],o,nt);s.push(l)}}return((t,e,n=i.duration)=>new Proxy({animations:t.map(J).filter(Boolean),duration:n,options:e},Q))(s,n,n.duration)});var nt,at=e.j;export{at as animate};
var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{j:()=>nt});const n={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},i=()=>{},a=t=>t,s=t=>"object"==typeof t&&Boolean(t.createAnimation),r=t=>"number"==typeof t,o=t=>Array.isArray(t)&&!r(t[0]),l=(t,e,n)=>-n*t+n*e+t,c=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function u(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const a=c(0,e,i);t.push(l(n,1,a))}}const h=(t,e,n)=>Math.min(Math.max(n,t),e);const d=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,f=1e-7,p=12;function m(t,e,n,i){if(t===e&&n===i)return a;return a=>0===a||1===a?a:d(function(t,e,n,i,a){let s,r,o=0;do{r=e+(n-e)/2,s=d(r,i,a)-t,s>0?n=r:e=r}while(Math.abs(s)>f&&++o<p);return r}(a,0,1,t,n),e,i)}const y=t=>"function"==typeof t,g=t=>Array.isArray(t)&&r(t[0]),v={ease:m(.25,.1,.25,1),"ease-in":m(.42,0,1,1),"ease-in-out":m(.42,0,.58,1),"ease-out":m(0,0,.58,1)},T=/\((.*?)\)/;function w(t){if(y(t))return t;if(g(t))return m(...t);const e=v[t];if(e)return e;if(t.startsWith("steps")){const e=T.exec(t);if(e){const t=e[1].split(",");return((t,e="end")=>n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,a="end"===e?Math.floor(i):Math.ceil(i);return h(0,1,a/t)})(parseFloat(t[0]),t[1].trim())}}return a}class b{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const S=new WeakMap;function D(t){return S.has(t)||S.set(t,{transforms:[],values:new Map}),S.get(t)}const O=["","X","Y","Z"],A={x:"translateX",y:"translateY",z:"translateZ"},x={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},k={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:x,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:a},skew:x},M=new Map,j=t=>`--motion-${t}`,E=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{O.forEach((e=>{E.push(t+e),M.set(j(t+e),k[t])}))}));const P=(t,e)=>E.indexOf(t)-E.indexOf(e),R=new Set(E),V=t=>R.has(t),$=t=>t.sort(P).reduce(q,"").trim(),q=(t,e)=>`${t} ${e}(var(${j(e)}))`,F=t=>t.startsWith("--"),U=new Set,B=t=>1e3*t,C=t=>t/1e3,I=(t,e)=>document.createElement("div").animate(t,e),_={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{I({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(I({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{I({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},z={},W={};for(const t in _)W[t]=()=>(void 0===z[t]&&(z[t]=_[t]()),z[t]);const K=(t,e)=>y(t)?W.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(c(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,e)})`:n.easing:g(t)?N(t):t,N=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;function X(t){return A[t]&&(t=A[t]),V(t)?j(t):t}const Y=(t,e)=>{e=X(e);let n=F(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=M.get(e);t&&(n=t.initialValue)}return n},Z=(t,e,n)=>{e=X(e),F(e)?t.style.setProperty(e,n):t.style[e]=n};function L(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function G(t,e,l,c={},u){const h=window.__MOTION_DEV_TOOLS_RECORD,d=!1!==c.record&&h;let f,{duration:p=n.duration,delay:m=n.delay,endDelay:g=n.endDelay,repeat:v=n.repeat,easing:T=n.easing,persist:w=!1,direction:S,offset:O,allowWebkitAcceleration:x=!1,autoplay:k=!0}=c;const j=D(t),E=V(e);let P=W.waapi();E&&((t,e)=>{A[e]&&(e=A[e]);const{transforms:n}=D(t);var i,a;a=e,-1===(i=n).indexOf(a)&&i.push(a),t.style.transform=$(n)})(t,e);const R=X(e),q=function(t,e){return t.has(e)||t.set(e,new b),t.get(e)}(j.values,R),C=M.get(R);return L(q.animation,!(s(T)&&q.generator)&&!1!==c.record),()=>{const n=()=>{var e,n;return null!==(n=null!==(e=Y(t,R))&&void 0!==e?e:null==C?void 0:C.initialValue)&&void 0!==n?n:0};let b=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}((t=>Array.isArray(t)?t:[t])(l),n);const D=function(t,e){var n;let i=(null==e?void 0:e.toDefaultUnit)||a;const s=t[t.length-1];if("string"==typeof s){const t=(null===(n=s.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(i=e=>e+t)}return i}(b,C);if(s(T)){const t=T.createAnimation(b,"opacity"!==e,n,R,q);T=t.easing,b=t.keyframes||b,p=t.duration||p}if(F(R)&&(W.cssRegisterProperty()?function(t){if(!U.has(t)){U.add(t);try{const{syntax:e,initialValue:n}=M.has(t)?M.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(R):P=!1),E&&!W.linearEasing()&&(y(T)||o(T)&&T.some(y))&&(P=!1),P){C&&(b=b.map((t=>r(t)?C.toDefaultUnit(t):t))),1!==b.length||W.partialKeyframes()&&!d||b.unshift(n());const e={delay:B(m),duration:B(p),endDelay:B(g),easing:o(T)?void 0:K(T,p),direction:S,iterations:v+1,fill:"both"};f=t.animate({[R]:b,offset:O,easing:o(T)?T.map((t=>K(t,p))):void 0},e),f.finished||(f.finished=new Promise(((t,e)=>{f.onfinish=t,f.oncancel=e})));const a=b[b.length-1];f.finished.then((()=>{w||(Z(t,R,a),f.cancel())})).catch(i),x||(f.playbackRate=1.000001)}else if(u&&E)b=b.map((t=>"string"==typeof t?parseFloat(t):t)),1===b.length&&b.unshift(parseFloat(n())),f=new u((e=>{Z(t,R,D?D(e):e)}),b,Object.assign(Object.assign({},c),{duration:p,easing:T}));else{const e=b[b.length-1];Z(t,R,C&&r(e)?C.toDefaultUnit(e):e)}return d&&h(t,e,b,{duration:p,delay:m,easing:T,repeat:v,offset:O},"motion-one"),q.setAnimation(f),f&&!k&&f.pause(),f}}const H=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t),J=t=>t(),Q={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return C((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(tt)).catch(i)),t.finished;case"stop":return()=>{t.animations.forEach((t=>L(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=B(n);case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},tt=t=>t.finished;function et(t,e,n){return y(t)?t(e,n):t}const nt=(it=class{constructor(t,e=[0,1],{easing:i,duration:r=n.duration,delay:d=n.delay,endDelay:f=n.endDelay,repeat:p=n.repeat,offset:m,direction:y="normal",autoplay:g=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=a,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),i=i||n.easing,s(i)){const t=i.createAnimation(e);i=t.easing,e=t.keyframes||e,r=t.duration||r}this.repeat=p,this.easing=o(i)?a:w(i),this.updateDuration(r);const v=function(t,e=function(t){const e=[0];return u(e,t-1),e}(t.length),n=a){const i=t.length,s=i-e.length;return s>0&&u(e,s),a=>{let s=0;for(;s<i-2&&!(a<e[s+1]);s++);let r=h(0,1,c(e[s],e[s+1],a));const u=function(t,e){return o(t)?t[((t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t})(0,t.length,e)]:t}(n,s);return r=u(r),l(t[s],t[s+1],r)}}(e,m,o(i)?i.map(w):a);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-d,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const a=i/this.duration;let s=Math.floor(a),r=a%1;!r&&a>=1&&(r=1),1===r&&s--;const o=s%2;("reverse"===y||"alternate"===y&&o||"alternate-reverse"===y&&!o)&&(r=1-r);const l=i>=this.totalDuration?1:Math.min(r,1),c=v(this.easing(l));t(c),void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+f)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,c)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},g&&this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}},function(t,e,i={}){const a=(t=function(t,e){return"string"==typeof t?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length;Boolean(a),Boolean(e);const s=[];for(let n=0;n<a;n++){const r=t[n];for(const t in e){const o=H(i,t);o.delay=et(o.delay,n,a);const l=G(r,t,e[t],o,it);s.push(l)}}return((t,e,i=n.duration)=>new Proxy({animations:t.map(J).filter(Boolean),duration:i,options:e},Q))(s,i,i.duration)});var it,at=e.j;export{at as animate};

@@ -10,2 +10,3 @@ import { isCssVar } from "./utils/css-var";

: getComputedStyle(element)[name];
// TODO Decide if value can be 0
if (!value && value !== 0) {

@@ -12,0 +13,0 @@ const definition = transformDefinitions.get(name);

@@ -46,3 +46,4 @@ import { defaults, noop, time } from "@motionone/utils";

default:
return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === "undefined"
return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) ===
"undefined"
? undefined

@@ -49,0 +50,0 @@ : () => target.animations.forEach((animation) => animation[key]());

@@ -31,3 +31,4 @@ const testAnimation = (keyframes, options) => document.createElement("div").animate(keyframes, options);

if (results[key] === undefined)
results[key] = featureTests[key]();
results[key] =
featureTests[key]();
return results[key];

@@ -34,0 +35,0 @@ };

@@ -36,4 +36,4 @@ import { progress, velocityPerSecond } from "@motionone/utils";

const prevTime = info.time;
axis.current = element["scroll" + position];
axis.scrollLength = element["scroll" + length] - element["client" + length];
axis.current = element[`scroll${position}`];
axis.scrollLength = element[`scroll${length}`] - element[`client${length}`];
axis.offset.length = 0;

@@ -40,0 +40,0 @@ axis.offset[0] = 0;

@@ -27,3 +27,6 @@ import { isNumber, isString } from "@motionone/utils";

*/
offsetDefinition = [offset, namedEdges[offset] ? offset : `0`];
offsetDefinition = [
offset,
namedEdges[offset] ? offset : `0`,
];
}

@@ -30,0 +33,0 @@ }

{
"name": "@motionone/dom",
"version": "10.17.1",
"version": "10.18.0",
"description": "A tiny, performant animation library for the DOM",

@@ -18,6 +18,6 @@ "license": "MIT",

"dependencies": {
"@motionone/animation": "^10.17.1",
"@motionone/generators": "^10.17.1",
"@motionone/animation": "^10.18.0",
"@motionone/generators": "^10.18.0",
"@motionone/types": "^10.17.1",
"@motionone/utils": "^10.17.1",
"@motionone/utils": "^10.18.0",
"hey-listen": "^1.0.8",

@@ -53,3 +53,3 @@ "tslib": "^2.3.1"

"path": "./dist/size-scroll.js",
"maxSize": "2.5 kB"
"maxSize": "2.51 kB"
},

@@ -61,3 +61,3 @@ {

],
"gitHead": "e801ab1f0f04dd57a6a5fa692e0cd36d7ffbb8a1"
"gitHead": "f357769434210262a664b8b736b61e1a615e95a7"
}

@@ -5,3 +5,3 @@ import type { AnimationOptions, BasicAnimationControls, UnresolvedValueKeyframe, OptionResolver } from "@motionone/types";

export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export interface CSSStyleDeclarationWithTransform extends Omit<CSSStyleDeclaration, "direction" | "transition"> {
export interface CSSStyleDeclarationWithTransform extends Omit<CSSStyleDeclaration, "direction" | "transition" | "x" | "y"> {
x: number | string;

@@ -8,0 +8,0 @@ y: number | string;

@@ -18,5 +18,5 @@ import type { CssPropertyDefinition } from "../types";

export declare const compareTransformOrder: (a: string, b: string) => number;
export declare const isTransform: (name: string) => boolean;
export declare const isTransform: (name: string) => name is "x" | "y" | "z";
export declare const addTransformToElement: (element: HTMLElement, name: string) => void;
export declare const buildTransformTemplate: (transforms: string[]) => string;
//# sourceMappingURL=transforms.d.ts.map

@@ -7,5 +7,5 @@ import { Options } from "../types";

export interface Gesture {
isActive: (options: Options) => void;
isActive: (options: Options) => boolean;
subscribe: (element: Element, stateHandlers: StateHandlers, options: Options) => () => void;
}
//# sourceMappingURL=types.d.ts.map

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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