framer-motion 12.6.4-alpha.0 → 12.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var create = require('./create-CGndFp7x.js');
5
+ var create = require('./create-B_4YNpl3.js');
6
6
  require('motion-dom');
7
7
  require('motion-utils');
8
8
  require('react/jsx-runtime');
@@ -1985,7 +1985,7 @@ const easingDefinitionToFunction = (definition) => {
1985
1985
 
1986
1986
  function createMixers(output, ease, customMixer) {
1987
1987
  const mixers = [];
1988
- const mixerFactory = customMixer || motionUtils.MotionGlobalConfig.mix || mix;
1988
+ const mixerFactory = customMixer || mix;
1989
1989
  const numMixers = output.length - 1;
1990
1990
  for (let i = 0; i < numMixers; i++) {
1991
1991
  let mixer = mixerFactory(output[i], output[i + 1]);
@@ -5423,7 +5423,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5423
5423
  * and warn against mismatches.
5424
5424
  */
5425
5425
  if (process.env.NODE_ENV === "development") {
5426
- motionUtils.warnOnce(nextValue.version === "12.6.4-alpha.0", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4-alpha.0 may not work as expected.`);
5426
+ motionUtils.warnOnce(nextValue.version === "12.6.4", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4 may not work as expected.`);
5427
5427
  }
5428
5428
  }
5429
5429
  else if (isMotionValue(prevValue)) {
@@ -6341,6 +6341,11 @@ function addValueToWillChange(visualElement, key) {
6341
6341
  if (isWillChangeMotionValue(willChange)) {
6342
6342
  return willChange.add(key);
6343
6343
  }
6344
+ else if (!willChange && motionUtils.MotionGlobalConfig.WillChange) {
6345
+ const newWillChange = new motionUtils.MotionGlobalConfig.WillChange("auto");
6346
+ visualElement.addValue("willChange", newWillChange);
6347
+ newWillChange.add(key);
6348
+ }
6344
6349
  }
6345
6350
 
6346
6351
  /**
@@ -8980,7 +8985,6 @@ exports.findSpring = findSpring;
8980
8985
  exports.gestureAnimations = gestureAnimations;
8981
8986
  exports.getOptimisedAppearId = getOptimisedAppearId;
8982
8987
  exports.hasReducedMotionListener = hasReducedMotionListener;
8983
- exports.hslaToRgba = hslaToRgba;
8984
8988
  exports.inertia = inertia;
8985
8989
  exports.initPrefersReducedMotion = initPrefersReducedMotion;
8986
8990
  exports.instantAnimationState = instantAnimationState;
package/dist/cjs/dom.js CHANGED
@@ -800,6 +800,11 @@ function addValueToWillChange(visualElement, key) {
800
800
  if (isWillChangeMotionValue(willChange)) {
801
801
  return willChange.add(key);
802
802
  }
803
+ else if (!willChange && motionUtils.MotionGlobalConfig.WillChange) {
804
+ const newWillChange = new motionUtils.MotionGlobalConfig.WillChange("auto");
805
+ visualElement.addValue("willChange", newWillChange);
806
+ newWillChange.add(key);
807
+ }
803
808
  }
804
809
 
805
810
  /**
@@ -2285,7 +2290,7 @@ const easingDefinitionToFunction = (definition) => {
2285
2290
 
2286
2291
  function createMixers(output, ease, customMixer) {
2287
2292
  const mixers = [];
2288
- const mixerFactory = customMixer || motionUtils.MotionGlobalConfig.mix || mix;
2293
+ const mixerFactory = customMixer || mix;
2289
2294
  const numMixers = output.length - 1;
2290
2295
  for (let i = 0; i < numMixers; i++) {
2291
2296
  let mixer = mixerFactory(output[i], output[i + 1]);
@@ -3439,7 +3444,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3439
3444
  * and warn against mismatches.
3440
3445
  */
3441
3446
  if (process.env.NODE_ENV === "development") {
3442
- motionUtils.warnOnce(nextValue.version === "12.6.4-alpha.0", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4-alpha.0 may not work as expected.`);
3447
+ motionUtils.warnOnce(nextValue.version === "12.6.4", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4 may not work as expected.`);
3443
3448
  }
3444
3449
  }
3445
3450
  else if (isMotionValue(prevValue)) {
@@ -5337,7 +5342,6 @@ exports.distance2D = distance2D;
5337
5342
  exports.easeIn = easeIn;
5338
5343
  exports.easeInOut = easeInOut;
5339
5344
  exports.easeOut = easeOut;
5340
- exports.hslaToRgba = hslaToRgba;
5341
5345
  exports.inView = inView;
5342
5346
  exports.inertia = inertia;
5343
5347
  exports.interpolate = interpolate;
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
- var create = require('./create-CGndFp7x.js');
7
+ var create = require('./create-B_4YNpl3.js');
8
8
  var motionDom = require('motion-dom');
9
9
  var motionUtils = require('motion-utils');
10
10
 
@@ -2981,7 +2981,6 @@ exports.easeInOut = create.easeInOut;
2981
2981
  exports.easeOut = create.easeOut;
2982
2982
  exports.filterProps = create.filterProps;
2983
2983
  exports.findSpring = create.findSpring;
2984
- exports.hslaToRgba = create.hslaToRgba;
2985
2984
  exports.inertia = create.inertia;
2986
2985
  exports.interpolate = create.interpolate;
2987
2986
  exports.isBrowser = create.isBrowser;
@@ -3061,6 +3060,7 @@ exports.LayoutGroup = LayoutGroup;
3061
3060
  exports.LazyMotion = LazyMotion;
3062
3061
  exports.MotionConfig = MotionConfig;
3063
3062
  exports.Reorder = namespace;
3063
+ exports.WillChangeMotionValue = WillChangeMotionValue;
3064
3064
  exports.animate = animate;
3065
3065
  exports.animateMini = animateMini;
3066
3066
  exports.animationControls = animationControls;
package/dist/dom-mini.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function n(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=t=>t,a=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},r=t=>1e3*t,o=t=>t/1e3,s=n((()=>void 0!==window.ScrollTimeline));class l{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>s()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class u extends l{then(t,e){return this.finished.finally(t).then((()=>{}))}}const c=t=>t.startsWith("--"),h=(t,e,n)=>{c(e)?t.style.setProperty(e,n):t.style[e]=n},f=(t,e)=>c(e)?t.style.getPropertyValue(e):t.style[e],m=t=>null!==t;const p=n((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),d=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const y={};function g(t,e){const i=n(t);return()=>y[e]??i()}const A=g((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),b=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,T={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:b([0,.65,.55,1]),circOut:b([.55,0,1,.45]),backIn:b([.31,.01,.66,-.59]),backOut:b([.33,1.53,.69,.99])};function v(t,e){return t?"function"==typeof t&&A()?((t,e,n=10)=>{let i="";const a=Math.max(Math.round(e/n),2);for(let e=0;e<a;e++)i+=t(e/(a-1))+", ";return`linear(${i.substring(0,i.length-2)})`})(t,e):(t=>Array.isArray(t)&&"number"==typeof t[0])(t)?b(t):Array.isArray(t)?t.map((t=>v(t,e)||T.easeOut)):T[t]:void 0}function w(t){return"function"==typeof t&&"applyToOptions"in t}const x=new WeakMap;class k{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:i,pseudoElement:a,allowFlatten:r=!1}=t;let{transition:o}=t;this.allowFlatten=r;const s=function(t){const e=x.get(t)||new Map;return x.set(t,e),e}(e),l=((t,e)=>`${t}:${e}`)(n,a||""),u=s.get(l);u&&u.stop();const c=function(t,e,n,i){Array.isArray(n)||(n=[n]);for(let a=0;a<n.length;a++)null===n[a]&&(n[a]=0!==a||i?n[a-1]:f(t,e)),"number"==typeof n[a]&&d.has(e)&&(n[a]=n[a]+"px");return!i&&!p()&&n.length<2&&n.unshift(f(t,e)),n}(e,n,i,a);o.type,o=function({type:t,...e}){return w(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(o),this.animation=function(t,e,n,{delay:i=0,duration:a=300,repeat:r=0,repeatType:o="loop",ease:s="easeInOut",times:l}={},u){const c={[e]:n};l&&(c.offset=l);const h=v(s,a);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:i,duration:a,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal",pseudoElement:u})}(e,n,c,o,a),!1===o.autoplay&&this.animation.pause(),this.removeAnimation=()=>s.delete(l),this.animation.onfinish=()=>{a?this.commitStyles():h(e,n,function(t,{repeat:e,repeatType:n="loop"},i){const a=t.filter(m),r=e&&"loop"!==n&&e%2==1?0:a.length-1;return r&&void 0!==i?i:a[r]}(c,o)),this.cancel()},s.set(l,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.animation.commitStyles?.()}get duration(){console.log(this.animation.effect?.getComputedTiming());const t=this.animation.effect?.getComputedTiming().duration||0;return o(Number(t))}get time(){return o(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=r(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,i}then(t,e){return this.finished.then(t).catch(e)}}const M=2e4;function O(t,e=100,n){const i=n({...t,keyframes:[0,e]}),a=Math.min(function(t){let e=0,n=t.next(e);for(;!n.done&&e<M;)e+=50,n=t.next(e);return e>=M?1/0:e}(i),M);return{type:"keyframes",ease:t=>i.next(a*t).value/e,duration:o(a)}}function R(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const a=n?.[t]??i.querySelectorAll(t);return a?Array.from(a):[]}return Array.from(t)}function E(t,e){return n=t,Array.isArray(n)&&"number"!=typeof n[0]?t[((t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t})(0,t.length,e)]:t;var n}const W=(t,e,n)=>t+(e-t)*n;function S(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=a(0,e,i);t.push(W(n,1,r))}}function B(t){const e=[0];return S(e,t.length-1),e}function $(t,e,n,i){return"string"==typeof t&&function(t){return"object"==typeof t&&!Array.isArray(t)}(e)?R(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function I(t,e,n){return t*(e+1)}function L(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:i.get(e)??t}function F(t,n,i,a,r,o){!function(t,n,i){for(let a=0;a<t.length;a++){const r=t[a];r.at>n&&r.at<i&&(e(t,r),a--)}}(t,r,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:W(r,o,a[e]),easing:E(i,e)})}function P(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function N(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function j(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function q(t,e){return e[t]||(e[t]=[]),e[t]}function C(t){return Array.isArray(t)?t:[t]}function V(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const z=t=>"number"==typeof t,D=t=>t.every(z);function H(t,e,n,i){const a=R(t,i),o=a.length,s=[];for(let t=0;t<o;t++){const i=a[t],c={...n};"function"==typeof c.delay&&(c.delay=c.delay(t,o));for(const t in e){const n=e[t],a={...(l=c,u=t,l?.[u]??l?.default??l)};a.duration&&(a.duration=r(a.duration)),a.delay&&(a.delay=r(a.delay)),s.push(new k({element:i,name:t,keyframes:n,transition:a,allowFlatten:!c.type&&!c.ease}))}}var l,u;return s}const X=(t=>function(e,n,i){return new u(H(e,n,i,t))})();t.animate=X,t.animateSequence=function(t,e){const n=[];return function(t,{defaultTransition:e={},...n}={},i,o){const s=e.duration||.3,l=new Map,u=new Map,c={},h=new Map;let f=0,m=0,p=0;for(let n=0;n<t.length;n++){const a=t[n];if("string"==typeof a){h.set(a,m);continue}if(!Array.isArray(a)){h.set(a.name,L(m,a.at,f,h));continue}let[l,y,g={}]=a;void 0!==g.at&&(m=L(m,g.at,f,h));let A=0;const b=(t,n,i,a=0,l=0)=>{const u=C(t),{delay:c=0,times:h=B(u),type:f="keyframes",repeat:d,repeatType:y,repeatDelay:g=0,...b}=n;let{ease:T=e.ease||"easeOut",duration:v}=n;const x="function"==typeof c?c(a,l):c,k=u.length,M=w(f)?f:o?.[f];if(k<=2&&M){let t=100;if(2===k&&D(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...b};void 0!==v&&(e.duration=r(v));const n=O(e,t,M);T=n.ease,v=n.duration}v??(v=s);const R=m+x;1===h.length&&0===h[0]&&(h[1]=1);const W=h.length-u.length;if(W>0&&S(h,W),1===u.length&&u.unshift(null),d){v=I(v,d);const t=[...u],e=[...h];T=Array.isArray(T)?[...T]:[T];const n=[...T];for(let i=0;i<d;i++){u.push(...t);for(let a=0;a<t.length;a++)h.push(e[a]+(i+1)),T.push(0===a?"linear":E(n,a-1))}P(h,d)}const $=R+v;F(i,u,T,h,R,$),A=Math.max(x+v,A),p=Math.max($,p)};if(d=l,Boolean(d&&d.getVelocity))b(y,g,q("default",j(l,u)));else{const t=$(l,y,i,c),e=t.length;for(let n=0;n<e;n++){const i=j(t[n],u);for(const t in y)b(y[t],V(g,t),q(t,i),n,e)}}f=m,m+=A}var d;return u.forEach(((t,i)=>{for(const r in t){const o=t[r];o.sort(N);const s=[],u=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];s.push(n),u.push(a(0,p,e)),c.push(i||"easeOut")}0!==u[0]&&(u.unshift(0),s.unshift(s[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),s.push(null)),l.has(i)||l.set(i,{keyframes:{},transition:{}});const h=l.get(i);h.keyframes[r]=s,h.transition[r]={...e,duration:p,ease:c,times:u,...n}}})),l}(t,e).forEach((({keyframes:t,transition:e},i)=>{n.push(...H(i,t,e))})),new u(n)}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function n(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=t=>t,a=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},r=t=>1e3*t,s=t=>t/1e3,o=n((()=>void 0!==window.ScrollTimeline));class l{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>o()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class u extends l{then(t,e){return this.finished.finally(t).then((()=>{}))}}const c=t=>t.startsWith("--"),h=(t,e,n)=>{c(e)?t.style.setProperty(e,n):t.style[e]=n},f=(t,e)=>c(e)?t.style.getPropertyValue(e):t.style[e],m=t=>null!==t;const d=n((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),p=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const y={value:null,addProjectionMetrics:null},g={};function A(t,e){const i=n(t);return()=>g[e]??i()}const b=A((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),v=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,T={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:v([0,.65,.55,1]),circOut:v([.55,0,1,.45]),backIn:v([.31,.01,.66,-.59]),backOut:v([.33,1.53,.69,.99])};function w(t,e){return t?"function"==typeof t&&b()?((t,e,n=10)=>{let i="";const a=Math.max(Math.round(e/n),2);for(let e=0;e<a;e++)i+=t(e/(a-1))+", ";return`linear(${i.substring(0,i.length-2)})`})(t,e):(t=>Array.isArray(t)&&"number"==typeof t[0])(t)?v(t):Array.isArray(t)?t.map((t=>w(t,e)||T.easeOut)):T[t]:void 0}function x(t){return"function"==typeof t&&"applyToOptions"in t}const M=new WeakMap;class k{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:i,pseudoElement:a,allowFlatten:r=!1}=t;let{transition:s}=t;this.allowFlatten=r;const o=function(t){const e=M.get(t)||new Map;return M.set(t,e),e}(e),l=((t,e)=>`${t}:${e}`)(n,a||""),u=o.get(l);u&&u.stop();const c=function(t,e,n,i){Array.isArray(n)||(n=[n]);for(let a=0;a<n.length;a++)null===n[a]&&(n[a]=0!==a||i?n[a-1]:f(t,e)),"number"==typeof n[a]&&p.has(e)&&(n[a]=n[a]+"px");return!i&&!d()&&n.length<2&&n.unshift(f(t,e)),n}(e,n,i,a);s.type,s=function({type:t,...e}){return x(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(s),this.animation=function(t,e,n,{delay:i=0,duration:a=300,repeat:r=0,repeatType:s="loop",ease:o="easeInOut",times:l}={},u){const c={[e]:n};l&&(c.offset=l);const h=w(o,a);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:i,duration:a,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===s?"alternate":"normal",pseudoElement:u})}(e,n,c,s,a),!1===s.autoplay&&this.animation.pause(),this.removeAnimation=()=>o.delete(l),this.animation.onfinish=()=>{a?this.commitStyles():h(e,n,function(t,{repeat:e,repeatType:n="loop"},i){const a=t.filter(m),r=e&&"loop"!==n&&e%2==1?0:a.length-1;return r&&void 0!==i?i:a[r]}(c,s)),this.cancel()},o.set(l,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.animation.commitStyles?.()}get duration(){console.log(this.animation.effect?.getComputedTiming());const t=this.animation.effect?.getComputedTiming().duration||0;return s(Number(t))}get time(){return s(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=r(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,i}then(t,e){return this.finished.then(t).catch(e)}}const R=2e4;function O(t,e=100,n){const i=n({...t,keyframes:[0,e]}),a=Math.min(function(t){let e=0,n=t.next(e);for(;!n.done&&e<R;)e+=50,n=t.next(e);return e>=R?1/0:e}(i),R);return{type:"keyframes",ease:t=>i.next(a*t).value/e,duration:s(a)}}const S=["read","resolveKeyframes","update","preRender","render","postRender"];function E(t,e){let n=!1,i=!0;const a={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,s=S.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,a=!1,r=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){s.has(e)&&(c.schedule(e),t()),l++,e(o)}const c={schedule:(t,e=!1,r=!1)=>{const o=r&&a?n:i;return e&&s.add(t),o.has(t)||o.add(t),t},cancel:t=>{i.delete(t),s.delete(t)},process:t=>{o=t,a?r=!0:(a=!0,[n,i]=[i,n],n.forEach(u),e&&y.value&&y.value.frameloop[e].push(l),l=0,n.clear(),a=!1,r&&(r=!1,c.process(t)))}};return c}(r,e?n:void 0),t)),{}),{read:o,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=s,m=()=>{const r=performance.now();n=!1,a.delta=i?1e3/60:Math.max(Math.min(r-a.timestamp,40),1),a.timestamp=r,a.isProcessing=!0,o.process(a),l.process(a),u.process(a),c.process(a),h.process(a),f.process(a),a.isProcessing=!1,n&&e&&(i=!1,t(m))};return{schedule:S.reduce(((e,r)=>{const o=s[r];return e[r]=(e,r=!1,s=!1)=>(n||(n=!0,i=!0,a.isProcessing||t(m)),o.schedule(e,r,s)),e}),{}),cancel:t=>{for(let e=0;e<S.length;e++)s[S[e]].cancel(t)},state:a,steps:s}}const{schedule:P,cancel:W,state:B,steps:F}=E("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:i,!0);function $(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const a=n?.[t]??i.querySelectorAll(t);return a?Array.from(a):[]}return Array.from(t)}S.reduce(((t,e)=>(t[e]=t=>W(t),t)),{});function I(t,e){return n=t,Array.isArray(n)&&"number"!=typeof n[0]?t[((t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t})(0,t.length,e)]:t;var n}const L=(t,e,n)=>t+(e-t)*n;function q(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=a(0,e,i);t.push(L(n,1,r))}}function N(t){const e=[0];return q(e,t.length-1),e}function j(t,e,n,i){return"string"==typeof t&&function(t){return"object"==typeof t&&!Array.isArray(t)}(e)?$(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function C(t,e,n){return t*(e+1)}function K(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:i.get(e)??t}function V(t,n,i,a,r,s){!function(t,n,i){for(let a=0;a<t.length;a++){const r=t[a];r.at>n&&r.at<i&&(e(t,r),a--)}}(t,r,s);for(let e=0;e<n.length;e++)t.push({value:n[e],at:L(r,s,a[e]),easing:I(i,e)})}function z(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function D(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function H(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function X(t,e){return e[t]||(e[t]=[]),e[t]}function Y(t){return Array.isArray(t)?t:[t]}function G(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const J=t=>"number"==typeof t,Q=t=>t.every(J);function U(t,e,n,i){const a=$(t,i),s=a.length,o=[];for(let t=0;t<s;t++){const i=a[t],c={...n};"function"==typeof c.delay&&(c.delay=c.delay(t,s));for(const t in e){const n=e[t],a={...(l=c,u=t,l?.[u]??l?.default??l)};a.duration&&(a.duration=r(a.duration)),a.delay&&(a.delay=r(a.delay)),o.push(new k({element:i,name:t,keyframes:n,transition:a,allowFlatten:!c.type&&!c.ease}))}}var l,u;return o}const Z=(t=>function(e,n,i){return new u(U(e,n,i,t))})();t.animate=Z,t.animateSequence=function(t,e){const n=[];return function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,l=new Map,u=new Map,c={},h=new Map;let f=0,m=0,d=0;for(let n=0;n<t.length;n++){const a=t[n];if("string"==typeof a){h.set(a,m);continue}if(!Array.isArray(a)){h.set(a.name,K(m,a.at,f,h));continue}let[l,y,g={}]=a;void 0!==g.at&&(m=K(m,g.at,f,h));let A=0;const b=(t,n,i,a=0,l=0)=>{const u=Y(t),{delay:c=0,times:h=N(u),type:f="keyframes",repeat:p,repeatType:y,repeatDelay:g=0,...b}=n;let{ease:v=e.ease||"easeOut",duration:T}=n;const w="function"==typeof c?c(a,l):c,M=u.length,k=x(f)?f:s?.[f];if(M<=2&&k){let t=100;if(2===M&&Q(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...b};void 0!==T&&(e.duration=r(T));const n=O(e,t,k);v=n.ease,T=n.duration}T??(T=o);const R=m+w;1===h.length&&0===h[0]&&(h[1]=1);const S=h.length-u.length;if(S>0&&q(h,S),1===u.length&&u.unshift(null),p){T=C(T,p);const t=[...u],e=[...h];v=Array.isArray(v)?[...v]:[v];const n=[...v];for(let i=0;i<p;i++){u.push(...t);for(let a=0;a<t.length;a++)h.push(e[a]+(i+1)),v.push(0===a?"linear":I(n,a-1))}z(h,p)}const E=R+T;V(i,u,v,h,R,E),A=Math.max(w+T,A),d=Math.max(E,d)};if(p=l,Boolean(p&&p.getVelocity))b(y,g,X("default",H(l,u)));else{const t=j(l,y,i,c),e=t.length;for(let n=0;n<e;n++){const i=H(t[n],u);for(const t in y)b(y[t],G(g,t),X(t,i),n,e)}}f=m,m+=A}var p;return u.forEach(((t,i)=>{for(const r in t){const s=t[r];s.sort(D);const o=[],u=[],c=[];for(let t=0;t<s.length;t++){const{at:e,value:n,easing:i}=s[t];o.push(n),u.push(a(0,d,e)),c.push(i||"easeOut")}0!==u[0]&&(u.unshift(0),o.unshift(o[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),o.push(null)),l.has(i)||l.set(i,{keyframes:{},transition:{}});const h=l.get(i);h.keyframes[r]=o,h.transition[r]={...e,duration:d,ease:c,times:u,...n}}})),l}(t,e).forEach((({keyframes:t,transition:e},i)=>{n.push(...U(i,t,e))})),new u(n)}}));
package/dist/dom.d.ts CHANGED
@@ -210,21 +210,6 @@ declare function delayInSeconds(callback: DelayedFunction, timeout: number): ()
210
210
  declare const distance: (a: number, b: number) => number;
211
211
  declare function distance2D(a: Point, b: Point): number;
212
212
 
213
- type RGBA = {
214
- red: number;
215
- green: number;
216
- blue: number;
217
- alpha: number;
218
- };
219
- type HSLA = {
220
- hue: number;
221
- saturation: number;
222
- lightness: number;
223
- alpha: number;
224
- };
225
-
226
- declare function hslaToRgba({ hue, saturation, lightness, alpha }: HSLA): RGBA;
227
-
228
213
  type Mix<T> = (v: number) => T;
229
214
  type MixerFactory<T> = (from: T, to: T) => Mix<T>;
230
215
  interface InterpolateOptions<T> {
@@ -355,4 +340,4 @@ declare function transform<T>(inputRange: number[], outputRange: T[], options?:
355
340
 
356
341
  declare const wrap: (min: number, max: number, v: number) => number;
357
342
 
358
- export { type AbsoluteKeyframe, type AnimationSequence, type At, type DOMSegment, type DOMSegmentWithTransition, type DelayedFunction, type Direction, type InterpolateOptions, type MixerFactory, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, type Segment, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceTime, type ValueSequence, animate, animateMini, anticipate, backIn, backInOut, backOut, circIn, circInOut, circOut, clamp, createScopedAnimate, cubicBezier, delayInSeconds as delay, distance, distance2D, easeIn, easeInOut, easeOut, hslaToRgba, inView, inertia, interpolate, keyframes, mirrorEasing, mix, pipe, reverseEasing, scroll, scrollInfo, spring, stagger, steps, transform, wrap };
343
+ export { type AbsoluteKeyframe, type AnimationSequence, type At, type DOMSegment, type DOMSegmentWithTransition, type DelayedFunction, type Direction, type InterpolateOptions, type MixerFactory, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, type Segment, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceTime, type ValueSequence, animate, animateMini, anticipate, backIn, backInOut, backOut, circIn, circInOut, circOut, clamp, createScopedAnimate, cubicBezier, delayInSeconds as delay, distance, distance2D, easeIn, easeInOut, easeOut, inView, inertia, interpolate, keyframes, mirrorEasing, mix, pipe, reverseEasing, scroll, scrollInfo, spring, stagger, steps, transform, wrap };
package/dist/dom.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let n=()=>{};const s={};function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=t=>t,o=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class a{constructor(){this.subscriptions=[]}add(t){var n,s;return n=this.subscriptions,s=t,-1===n.indexOf(s)&&n.push(s),()=>e(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const l=t=>1e3*t,u=t=>t/1e3;function c(t,e){return e?t*(1e3/e):0}const h=r((()=>void 0!==window.ScrollTimeline));class d{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>h()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class p extends d{then(t,e){return this.finished.finally(t).then((()=>{}))}}const f=t=>t.startsWith("--"),m=(t,e,n)=>{f(e)?t.style.setProperty(e,n):t.style[e]=n},g=(t,e)=>f(e)?t.style.getPropertyValue(e):t.style[e],y=t=>null!==t;const v=r((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),w=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const b={value:null,addProjectionMetrics:null},T=t=>Array.isArray(t)&&"number"==typeof t[0],x={};function S(t,e){const n=r(t);return()=>x[e]??n()}const M=S((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),A=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(e/(r-1))+", ";return`linear(${s.substring(0,s.length-2)})`},V=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,k={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:V([0,.65,.55,1]),circOut:V([.55,0,1,.45]),backIn:V([.31,.01,.66,-.59]),backOut:V([.33,1.53,.69,.99])};function P(t,e){return t?"function"==typeof t&&M()?A(t,e):T(t)?V(t):Array.isArray(t)?t.map((t=>P(t,e)||k.easeOut)):k[t]:void 0}function E(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=P(a,r);Array.isArray(h)&&(c.easing=h);return t.animate(c,{delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal",pseudoElement:u})}function C(t){return"function"==typeof t&&"applyToOptions"in t}const F=new WeakMap;class O{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:s,pseudoElement:r,allowFlatten:i=!1}=t;let{transition:o}=t;this.allowFlatten=i;const a=function(t){const e=F.get(t)||new Map;return F.set(t,e),e}(e),l=((t,e)=>`${t}:${e}`)(n,r||""),u=a.get(l);u&&u.stop();const c=function(t,e,n,s){Array.isArray(n)||(n=[n]);for(let r=0;r<n.length;r++)null===n[r]&&(n[r]=0!==r||s?n[r-1]:g(t,e)),"number"==typeof n[r]&&w.has(e)&&(n[r]=n[r]+"px");return!s&&!v()&&n.length<2&&n.unshift(g(t,e)),n}(e,n,s,r);o.type,o=function({type:t,...e}){return C(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(o),this.animation=E(e,n,c,o,r),!1===o.autoplay&&this.animation.pause(),this.removeAnimation=()=>a.delete(l),this.animation.onfinish=()=>{r?this.commitStyles():m(e,n,function(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(y),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}(c,o)),this.cancel()},a.set(l,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.animation.commitStyles?.()}get duration(){console.log(this.animation.effect?.getComputedTiming());const t=this.animation.effect?.getComputedTiming().duration||0;return u(Number(t))}get time(){return u(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=l(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,i}then(t,e){return this.finished.then(t).catch(e)}}function R(t,e){return t?.[e]??t?.default??t}const B=2e4;function L(t){let e=0;let n=t.next(e);for(;!n.done&&e<B;)e+=50,n=t.next(e);return e>=B?1/0:e}function I(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(L(s),B);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:u(r)}}function D(t){return Boolean("function"==typeof t&&M()||!t||"string"==typeof t&&(t in k||M())||T(t)||Array.isArray(t)&&t.every(D))}function W(t,e){t.timeline=e,t.onfinish=null}const N=["read","resolveKeyframes","update","preRender","render","postRender"];function K(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=N.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,r?i=!0:(r=!0,[n,s]=[s,n],n.forEach(u),e&&b.value&&b.value.frameloop[e].push(l),l=0,n.clear(),r=!1,i&&(i=!1,c.process(t)))}};return c}(o,e?n:void 0),t)),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const o=s.useManualTiming?i.timestamp:performance.now();n=!1,s.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))};return{schedule:N.reduce(((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(f)),o.schedule(e,s,a)),e}),{}),cancel:t=>{for(let e=0;e<N.length;e++)a[N[e]].cancel(t)},state:i,steps:a}}const{schedule:$,cancel:j,state:z,steps:Y}=K("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:i,!0);let U;function X(){U=void 0}const H={now:()=>(void 0===U&&H.set(z.isProcessing||s.useManualTiming?z.timestamp:performance.now()),U),set:t=>{U=t,queueMicrotask(X)}},q=!1;function G(){return q}function Z(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const r=n?.[t]??s.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function _(t,e){const n=Z(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function J(t){return!("touch"===t.pointerType||G())}const Q=(t,e)=>!!e&&(t===e||Q(t,e.parentElement)),tt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const et=new WeakSet;function nt(t){return e=>{"Enter"===e.key&&t(e)}}function st(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function rt(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!G()}class it{constructor(t,e={}){this.version="12.6.4-alpha.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=H.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=H.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new a);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ot(t,e){return new it(t,e)}const at=(t,e,n)=>n>e?e:n<t?t:n;function lt(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}const ut=100,ct=10,ht=1,dt=0,pt=800,ft=.3,mt=.3,gt={granular:.01,default:2},yt={granular:.005,default:.5},vt=.01,wt=10,bt=.05,Tt=1,xt=.001;function St({duration:t=pt,bounce:e=ft,velocity:n=dt,mass:s=ht}){let r,i,o=1-e;o=at(bt,Tt,o),t=at(vt,wt,u(t)),o<1?(r=e=>{const s=e*o,r=s*t,i=s-n,a=At(e,o),l=Math.exp(-r);return xt-i/a*l},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=At(Math.pow(e,2),o);return(-r(e)+xt>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<Mt;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=l(t),isNaN(a))return{stiffness:ut,damping:ct,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}const Mt=12;function At(t,e){return t*Math.sqrt(1-e*e)}const Vt=["duration","bounce"],kt=["stiffness","damping","mass"];function Pt(t,e){return e.some((e=>void 0!==t[e]))}function Et(t=mt,e=ft){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:h,mass:d,duration:p,velocity:f,isResolvedFromDuration:m}=function(t){let e={velocity:dt,stiffness:ut,damping:ct,mass:ht,isResolvedFromDuration:!1,...t};if(!Pt(t,kt)&&Pt(t,Vt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),r=s*s,i=2*at(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:ht,stiffness:r,damping:i}}else{const n=St(t);e={...e,...n,mass:ht},e.isResolvedFromDuration=!0}return e}({...n,velocity:-u(n.velocity||0)}),g=f||0,y=h/(2*Math.sqrt(c*d)),v=o-i,w=u(Math.sqrt(c/d)),b=Math.abs(v)<5;let T;if(s||(s=b?gt.granular:gt.default),r||(r=b?yt.granular:yt.default),y<1){const t=At(w,y);T=e=>{const n=Math.exp(-y*w*e);return o-n*((g+y*w*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===y)T=t=>o-Math.exp(-w*t)*(v+(g+w*v)*t);else{const t=w*Math.sqrt(y*y-1);T=e=>{const n=Math.exp(-y*w*e),s=Math.min(t*e,300);return o-n*((g+y*w*v)*Math.sinh(s)+t*v*Math.cosh(s))/t}}const x={calculatedDuration:m&&p||null,next:t=>{const e=T(t);if(m)a.done=t>=p;else{let n=0;y<1&&(n=0===t?l(g):lt(T,t,e));const i=Math.abs(n)<=s,u=Math.abs(o-e)<=r;a.done=i&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(L(x),B),e=A((e=>x.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return x}Et.applyToOptions=t=>{const e=I(t,100,Et);return t.ease=M()?e.ease:"easeOut",t.duration=l(e.duration),t.type="keyframes",t};const Ct=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Ft=t=>Array.isArray(t)&&"number"!=typeof t[0];function Ot(t,e){return Ft(t)?t[Ct(0,t.length,e)]:t}const Rt=(t,e,n)=>t+(e-t)*n;function Bt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=o(0,e,s);t.push(Rt(n,1,r))}}function Lt(t){const e=[0];return Bt(e,t.length-1),e}const It=t=>Boolean(t&&t.getVelocity);function Dt(t){return"object"==typeof t&&!Array.isArray(t)}function Wt(t,e,n,s){return"string"==typeof t&&Dt(e)?Z(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Nt(t,e,n){return t*(e+1)}function Kt(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:s.get(e)??t}function $t(t,n,s,r,i,o){!function(t,n,s){for(let r=0;r<t.length;r++){const i=t[r];i.at>n&&i.at<s&&(e(t,i),r--)}}(t,i,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:Rt(i,o,r[e]),easing:Ot(s,e)})}function jt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function zt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Yt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ut(t,e){return e[t]||(e[t]=[]),e[t]}function Xt(t){return Array.isArray(t)?t:[t]}function Ht(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const qt=t=>"number"==typeof t,Gt=t=>t.every(qt),Zt=new WeakMap,_t=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jt=new Set(_t),Qt=new Set(["width","height","top","left","right","bottom",..._t]),te=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function ee(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function ne(t,e,n,s){if("function"==typeof e){const[r,i]=ee(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=ee(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function se(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ot(n))}function re(t,e){const n=function(t,e,n){const s=t.getProps();return ne(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){se(t,e,te(i[e]))}}function ie(t,e){const n=t.getValue("willChange");if(s=n,Boolean(It(s)&&s.add))return n.add(e);var s}const oe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ae="data-"+oe("framerAppearId");function le(t){return t.props[ae]}const ue=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ce(t,e,n,s){if(t===e&&n===s)return i;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ue(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ue(r(t),e,s)}const he=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,de=t=>e=>1-t(1-e),pe=ce(.33,1.53,.69,.99),fe=de(pe),me=he(fe),ge=t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1))),ye=t=>1-Math.sin(Math.acos(t)),ve=de(ye),we=he(ye),be=t=>/^0[^.\s]+$/u.test(t);const Te={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},xe={...Te,transform:t=>at(0,1,t)},Se={...Te,default:1},Me=t=>Math.round(1e5*t)/1e5,Ae=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Ve=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ke=(t,e)=>n=>Boolean("string"==typeof n&&Ve.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Pe=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(Ae);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ee={...Te,transform:t=>Math.round((t=>at(0,255,t))(t))},Ce={test:ke("rgb","red"),parse:Pe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ee.transform(t)+", "+Ee.transform(e)+", "+Ee.transform(n)+", "+Me(xe.transform(s))+")"};const Fe={test:ke("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:Ce.transform},Oe=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Re=Oe("deg"),Be=Oe("%"),Le=Oe("px"),Ie=Oe("vh"),De=Oe("vw"),We={...Be,parse:t=>Be.parse(t)/100,transform:t=>Be.transform(100*t)},Ne={test:ke("hsl","hue"),parse:Pe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Be.transform(Me(e))+", "+Be.transform(Me(n))+", "+Me(xe.transform(s))+")"},Ke={test:t=>Ce.test(t)||Fe.test(t)||Ne.test(t),parse:t=>Ce.test(t)?Ce.parse(t):Ne.test(t)?Ne.parse(t):Fe.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ce.transform(t):Ne.transform(t)},$e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const je="number",ze="color",Ye=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ue(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ye,(t=>(Ke.test(t)?(s.color.push(i),r.push(ze),n.push(Ke.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push(je),n.push(parseFloat(t))),++i,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:r}}function Xe(t){return Ue(t).values}function He(t){const{split:e,types:n}=Ue(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+=e===je?Me(t[i]):e===ze?Ke.transform(t[i]):t[i]}return r}}const qe=t=>"number"==typeof t?0:t;const Ge={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Ae)?.length||0)+(t.match($e)?.length||0)>0},parse:Xe,createTransformer:He,getAnimatableNone:function(t){const e=Xe(t);return He(t)(e.map(qe))}},Ze=new Set(["brightness","contrast","saturate","opacity"]);function _e(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Ae)||[];if(!s)return t;const r=n.replace(s,"");let i=Ze.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Je=/\b([a-z-]*)\(.*?\)/gu,Qe={...Ge,getAnimatableNone:t=>{const e=t.match(Je);return e?e.map(_e).join(" "):t}},tn={borderWidth:Le,borderTopWidth:Le,borderRightWidth:Le,borderBottomWidth:Le,borderLeftWidth:Le,borderRadius:Le,radius:Le,borderTopLeftRadius:Le,borderTopRightRadius:Le,borderBottomRightRadius:Le,borderBottomLeftRadius:Le,width:Le,maxWidth:Le,height:Le,maxHeight:Le,top:Le,right:Le,bottom:Le,left:Le,padding:Le,paddingTop:Le,paddingRight:Le,paddingBottom:Le,paddingLeft:Le,margin:Le,marginTop:Le,marginRight:Le,marginBottom:Le,marginLeft:Le,backgroundPositionX:Le,backgroundPositionY:Le},en={rotate:Re,rotateX:Re,rotateY:Re,rotateZ:Re,scale:Se,scaleX:Se,scaleY:Se,scaleZ:Se,skew:Re,skewX:Re,skewY:Re,distance:Le,translateX:Le,translateY:Le,translateZ:Le,x:Le,y:Le,z:Le,perspective:Le,transformPerspective:Le,opacity:xe,originX:We,originY:We,originZ:Le},nn={...Te,transform:Math.round},sn={...tn,...en,zIndex:nn,size:Le,fillOpacity:xe,strokeOpacity:xe,numOctaves:nn},rn={...sn,color:Ke,backgroundColor:Ke,outlineColor:Ke,fill:Ke,stroke:Ke,borderColor:Ke,borderTopColor:Ke,borderRightColor:Ke,borderBottomColor:Ke,borderLeftColor:Ke,filter:Qe,WebkitFilter:Qe},on=t=>rn[t];function an(t,e){let n=on(t);return n!==Qe&&(n=Ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ln=new Set(["auto","none","0"]);const un=t=>180*t/Math.PI,cn=t=>{const e=un(Math.atan2(t[1],t[0]));return dn(e)},hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:cn,rotateZ:cn,skewX:t=>un(Math.atan(t[1])),skewY:t=>un(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},dn=t=>((t%=360)<0&&(t+=360),t),pn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),mn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pn,scaleY:fn,scale:t=>(pn(t)+fn(t))/2,rotateX:t=>dn(un(Math.atan2(t[6],t[5]))),rotateY:t=>dn(un(Math.atan2(-t[2],t[0]))),rotateZ:cn,rotate:cn,skewX:t=>un(Math.atan(t[4])),skewY:t=>un(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function gn(t){return t.includes("scale")?1:0}function yn(t,e){if(!t||"none"===t)return gn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=mn,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=hn,r=e}if(!r)return gn(e);const i=s[e],o=r[1].split(",").map(vn);return"function"==typeof i?i(o):o[i]}function vn(t){return parseFloat(t.trim())}const wn=t=>t===Te||t===Le,bn=new Set(["x","y","z"]),Tn=_t.filter((t=>!bn.has(t)));const xn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>yn(e,"x"),y:(t,{transform:e})=>yn(e,"y")};xn.translateX=xn.x,xn.translateY=xn.y;const Sn=new Set;let Mn=!1,An=!1;function Vn(){if(An){const t=Array.from(Sn).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Tn.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{t.getValue(e)?.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}An=!1,Mn=!1,Sn.forEach((t=>t.complete())),Sn.clear()}function kn(){Sn.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(An=!0)}))}class Pn{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Sn.add(this),Mn||(Mn=!0,$.read(kn),$.resolveKeyframes(Vn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=s?.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Sn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Sn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const En=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Cn=t=>e=>"string"==typeof e&&e.startsWith(t),Fn=Cn("--"),On=Cn("var(--"),Rn=t=>!!On(t)&&Bn.test(t.split("/*")[0].trim()),Bn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ln=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function In(t,e,n=1){const[s,r]=function(t){const e=Ln.exec(t);if(!e)return[,];const[,n,s,r]=e;return[`--${n??s}`,r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return En(t)?parseFloat(t):t}return Rn(r)?In(r,e,n+1):r}const Dn=t=>e=>e.test(t),Wn=[Te,Le,Be,Re,De,Ie,{test:t=>"auto"===t,parse:t=>t}],Nn=t=>Wn.find(Dn(t));class Kn extends Pn{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),Rn(s))){const r=In(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Qt.has(n)||2!==t.length)return;const[s,r]=t,i=Nn(s),o=Nn(r);if(i!==o)if(wn(i)&&wn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||be(s))&&n.push(e);var s;n.length&&function(t,e,n){let s,r=0;for(;r<t.length&&!s;){const e=t[r];"string"==typeof e&&!ln.has(e)&&Ue(e).values.length&&(s=t[r]),r++}if(s&&n)for(const r of e)t[r]=an(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,i=n[r];n[r]=xn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const $n=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Ge.test(t)&&"0"!==t||t.startsWith("url(")));function jn(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=$n(r,e),a=$n(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||C(n))&&s)}const zn=t=>null!==t;function Yn(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(zn),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}class Un{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=H.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(kn(),Vn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=H.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!jn(t,n,s,r)){if(!i)return a&&a(Yn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Xn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Hn({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Xn(a,s,t+1/3),i=Xn(a,s,t),o=Xn(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}function qn(t,e){return n=>n>0?e:t}const Gn=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Zn=[Fe,Ce,Ne];function _n(t){const e=(n=t,Zn.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Ne&&(s=Hn(s)),s}const Jn=(t,e)=>{const n=_n(t),s=_n(e);if(!n||!s)return qn(t,e);const r={...n};return t=>(r.red=Gn(n.red,s.red,t),r.green=Gn(n.green,s.green,t),r.blue=Gn(n.blue,s.blue,t),r.alpha=Rt(n.alpha,s.alpha,t),Ce.transform(r))},Qn=(t,e)=>n=>e(t(n)),ts=(...t)=>t.reduce(Qn),es=new Set(["none","hidden"]);function ns(t,e){return n=>Rt(t,e,n)}function ss(t){return"number"==typeof t?ns:"string"==typeof t?Rn(t)?qn:Ke.test(t)?Jn:os:Array.isArray(t)?rs:"object"==typeof t?Ke.test(t)?Jn:is:qn}function rs(t,e){const n=[...t],s=n.length,r=t.map(((t,n)=>ss(t)(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function is(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=ss(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const os=(t,e)=>{const n=Ge.createTransformer(e),s=Ue(t),r=Ue(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?es.has(t)&&!r.values.length||es.has(e)&&!s.values.length?function(t,e){return es.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):ts(rs(function(t,e){const n=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const i=e.types[r],o=t.indexes[i][s[i]],a=t.values[o]??0;n[r]=a,s[i]++}return n}(s,r),r.values),n):qn(t,e)};function as(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Rt(t,e,n);return ss(t)(t,e)}function ls({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=Et({keyframes:[d.value,p(d.value)],velocity:lt(v,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const us=ce(.42,0,1,1),cs=ce(0,0,.58,1),hs=ce(.42,0,.58,1),ds={linear:i,easeIn:us,easeInOut:hs,easeOut:cs,circIn:ye,circInOut:we,circOut:ve,backIn:fe,backInOut:me,backOut:pe,anticipate:ge},ps=t=>{if(T(t)){t.length;const[e,n,s,r]=t;return ce(e,n,s,r)}return"string"==typeof t?ds[t]:t};function fs(t,e,{clamp:n=!0,ease:r,mixer:a}={}){const l=t.length;if(e.length,1===l)return()=>e[0];if(2===l&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,n){const r=[],o=n||s.mix||as,a=t.length-1;for(let n=0;n<a;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||i:e;s=ts(t,s)}r.push(s)}return r}(e,r,a),h=c.length,d=n=>{if(u&&n<t[0])return e[0];let s=0;if(h>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const r=o(t[s],t[s+1],n);return c[s](r)};return n?e=>d(at(t[0],t[l-1],e)):d}function ms({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=Ft(s)?s.map(ps):ps(s),i={done:!1,value:e[0]},o=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:Lt(e),t),a=fs(o,e,{ease:Array.isArray(r)?r:(l=e,u=r,l.map((()=>u||hs)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(i.value=a(e),i.done=e>=t,i)}}const gs=t=>{const e=({timestamp:e})=>t(e);return{start:()=>$.update(e,!0),stop:()=>j(e),now:()=>z.isProcessing?z.timestamp:H.now()}},ys={decay:ls,inertia:ls,tween:ms,keyframes:ms,spring:Et},vs=t=>t/100;class ws extends Un{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=s?.KeyframeResolver||Pn;this.resolver=new i(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=C(e)?e:ys[e]||ms;let a,l;o!==ms&&"number"!=typeof t[0]&&(a=ts(vs,as(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=L(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),v=at(0,1,n)*c}const b=y?{done:!1,value:a[0]}:w.next(v);o&&(b.value=o(b.value));let{done:T}=b;y||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=Yn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?u(t.calculatedDuration):0}get time(){return u(this.currentTime)}set time(t){t=l(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=u(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=gs,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){this._resolved?(this.state="paused",this.holdTime=this.currentTime??0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const bs=new Set(["opacity","clipPath","filter","transform"]),Ts=r((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const xs={anticipate:ge,backInOut:me,circInOut:we};class Ss extends Un{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new Kn(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:r,type:i,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof r&&M()&&r in xs&&(r=xs[r]),C((u=this.options).type)||"spring"===u.type||!D(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new ws({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,r=c.ease,i="keyframes"}const c=E(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:r});return c.startTime=l??this.calcStartTime(),this.pendingTimeline?(W(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(Yn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:i,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return u(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return u(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=l(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return i;const{animation:n}=e;W(n,t)}else this.pendingTimeline=t;return i}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...c}=this.options,h=new ws({...c,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),d=l(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Ts()&&n&&bs.has(n)&&("transform"!==n||!l)&&!a&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const Ms={type:"spring",stiffness:500,damping:25,restSpeed:10},As={type:"keyframes",duration:.8},Vs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ks=(t,{keyframes:e})=>e.length>2?As:Jt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ms:Vs;const Ps=(t,e,n,r={},i,o)=>a=>{const u=R(r,t)||{},c=u.delay||r.delay||0;let{elapsed:h=0}=r;h-=l(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-h,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{a(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(u)||(d={...d,...ks(t,d)}),d.duration&&(d.duration=l(d.duration)),d.repeatDelay&&(d.repeatDelay=l(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let f=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(f=!0)),s.skipAnimations&&(f=!0,d.duration=0,d.delay=0),d.allowFlatten=!u.type&&!u.ease,f&&!o&&void 0!==e.get()){const t=Yn(d.keyframes,u);if(void 0!==t)return $.update((()=>{d.onUpdate(t),d.onComplete()})),new p([])}return!o&&Ss.supports(d)?new Ss(d):new ws(d)};function Es({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Cs(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(i=s);const l=[],u=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||u&&Es(u,e))continue;const o={delay:n,...R(i||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=le(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(o.startTime=t,c=!0)}}ie(t,e),s.start(Ps(e,s,r,t.shouldReduceMotion&&Qt.has(e)?{type:!1}:o,t,c));const h=s.animation;h&&l.push(h)}return o&&Promise.all(l).then((()=>{$.update((()=>{o&&re(t,o)}))})),l}const Fs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Os={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Rs={};for(const t in Os)Rs[t]={isEnabled:e=>Os[t].some((t=>!!e[t]))};const Bs="undefined"!=typeof window,Ls={current:null},Is={current:!1};const Ds=[...Wn,Ke,Ge];const Ws=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ns(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Ws.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}const Ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $s{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Pn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=H.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=i;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Ns(e),this.isVariantNode=function(t){return Boolean(Ns(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&It(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Zt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Is.current||function(){if(Is.current=!0,Bs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ls.current=t.matches;t.addListener(e),e()}else Ls.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ls.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),j(this.notifyUpdate),j(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Jt.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),r(),i&&i(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Rs){const e=Rs[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ks.length;e++){const n=Ks[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(It(r))t.addValue(s,r);else if(It(i))t.addValue(s,ot(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,ot(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=ot(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=n&&("string"==typeof n&&(En(n)||be(n))?n=parseFloat(n):(s=n,!Ds.find(Dn(s))&&Ge.test(e)&&(n=an(t,e))),this.setBaseTarget(t,It(n)?n.get():n)),It(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=ne(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||It(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class js extends $s{constructor(){super(...arguments),this.KeyframeResolver=Kn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;It(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const zs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Us=_t.length;function Xs(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Jt.has(t))o=!0;else if(Fn(t))r[t]=n;else{const e=zs(n,sn[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i<Us;i++){const o=_t[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=zs(a,sn[o]);l||(r=!1,s+=`${Ys[o]||o}(${t}) `),n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}const Hs={offset:"stroke-dashoffset",array:"stroke-dasharray"},qs={offset:"strokeDashoffset",array:"strokeDasharray"};function Gs(t,e,n){return"string"==typeof t?t:Le.transform(e+n*t)}function Zs(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Xs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Gs(e,t.x,t.width)} ${Gs(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Hs:qs;t[i.offset]=Le.transform(-s);const o=Le.transform(e),a=Le.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const _s=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Js(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Qs={};function tr(t,{layout:e,layoutId:n}){return Jt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Qs[t]||"opacity"===t)}function er(t,e,n){const{style:s}=t,r={};for(const i in s)(It(s[i])||e.style&&It(e.style[i])||tr(i,t)||void 0!==n?.getValue(i)?.liveStyle)&&(r[i]=s[i]);return r}class nr extends js{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fs,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Jt.has(e)){const t=on(e);return t&&t.default||0}return e=_s.has(e)?e:oe(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=er(t,e,n);for(const n in t)(It(t[n])||It(e[n]))&&(s[-1!==_t.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&$.postRender(this.updateDimensions)}build(t,e,n){Zs(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Js(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(_s.has(n)?n:oe(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class sr extends js{constructor(){super(...arguments),this.type="html",this.renderInstance=Js}readValueFromInstance(t,e){if(Jt.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return yn(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),r=(Fn(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Xs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return er(t,e,n)}}class rr extends $s{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function ir(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new nr(e):new sr(e);n.mount(t),Zt.set(t,n)}function or(t){const e=new rr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Zt.set(t,e)}function ar(t,e,n,s){const r=[];if(function(t,e){return It(t)||"number"==typeof t||"string"==typeof t&&!Dt(e)}(t,e))r.push(function(t,e,n){const s=It(t)?t:ot(t);return s.start(Ps("",s,e,n)),s.animation}(t,Dt(e)&&e.default||e,n&&n.default||n));else{const i=Wt(t,e,s),o=i.length;for(let t=0;t<o;t++){const s=i[t],a=s instanceof Element?ir:or;Zt.has(s)||a(s);const l=Zt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),r.push(...Cs(l,{...e,transition:u},{}))}}return r}function lr(t,e,n){const s=[],r=function(t,{defaultTransition:e={},...n}={},s,r){const i=e.duration||.3,a=new Map,u=new Map,c={},h=new Map;let d=0,p=0,f=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){h.set(o,p);continue}if(!Array.isArray(o)){h.set(o.name,Kt(p,o.at,d,h));continue}let[a,m,g={}]=o;void 0!==g.at&&(p=Kt(p,g.at,d,h));let y=0;const v=(t,n,s,o=0,a=0)=>{const u=Xt(t),{delay:c=0,times:h=Lt(u),type:d="keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof c?c(o,a):c,S=u.length,M=C(d)?d:r?.[d];if(S<=2&&M){let t=100;if(2===S&&Gt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=l(T));const n=I(e,t,M);b=n.ease,T=n.duration}T??(T=i);const A=p+x;1===h.length&&0===h[0]&&(h[1]=1);const V=h.length-u.length;if(V>0&&Bt(h,V),1===u.length&&u.unshift(null),m){T=Nt(T,m);const t=[...u],e=[...h];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s<m;s++){u.push(...t);for(let r=0;r<t.length;r++)h.push(e[r]+(s+1)),b.push(0===r?"linear":Ot(n,r-1))}jt(h,m)}const k=A+T;$t(s,u,b,h,A,k),y=Math.max(x+T,y),f=Math.max(k,f)};if(It(a))v(m,g,Ut("default",Yt(a,u)));else{const t=Wt(a,m,s,c),e=t.length;for(let n=0;n<e;n++){const s=Yt(t[n],u);for(const t in m)v(m[t],Ht(g,t),Ut(t,s),n,e)}}d=p,p+=y}return u.forEach(((t,s)=>{for(const r in t){const i=t[r];i.sort(zt);const l=[],u=[],c=[];for(let t=0;t<i.length;t++){const{at:e,value:n,easing:s}=i[t];l.push(n),u.push(o(0,f,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),l.unshift(l[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),l.push(null)),a.has(s)||a.set(s,{keyframes:{},transition:{}});const h=a.get(s);h.keyframes[r]=l,h.transition[r]={...e,duration:f,ease:c,times:u,...n}}})),a}(t,e,n,{spring:Et});return r.forEach((({keyframes:t,transition:e},n)=>{s.push(...ar(n,t,e))})),s}function ur(t){return function(e,n,s){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?lr(e,n,t):ar(e,n,s,t);const o=new p(r);return t&&t.animations.push(o),o}}const cr=ur();const hr=t=>function(e,n,s){return new p(function(t,e,n,s){const r=Z(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,i));for(const t in e){const n=e[t],r={...R(a,t)};r.duration&&(r.duration=l(r.duration)),r.delay&&(r.delay=l(r.delay)),o.push(new O({element:s,name:t,keyframes:n,transition:r,allowFlatten:!a.type&&!a.ease}))}}return o}(e,n,s,t))},dr=hr();function pr(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return $.update(s,!0),()=>j(s)}const fr=new WeakMap;let mr;function gr({target:t,contentRect:e,borderBoxSize:n}){fr.get(t)?.forEach((s=>{s({target:t,contentSize:e,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}}(t,n)}})}))}function yr(t){t.forEach(gr)}function vr(t,e){mr||"undefined"!=typeof ResizeObserver&&(mr=new ResizeObserver(yr));const n=Z(t);return n.forEach((t=>{let n=fr.get(t);n||(n=new Set,fr.set(t,n)),n.add(e),mr?.observe(t)})),()=>{n.forEach((t=>{const n=fr.get(t);n?.delete(e),n?.size||mr?.unobserve(t)}))}}const wr=new Set;let br;function Tr(t){return wr.add(t),br||(br=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};wr.forEach((t=>t(e)))},window.addEventListener("resize",br)),()=>{wr.delete(t),!wr.size&&br&&(br=void 0)}}const xr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Sr(t,e,n,s){const r=n[e],{length:i,position:a}=xr[e],l=r.current,u=n.time;r.current=t[`scroll${a}`],r.scrollLength=t[`scroll${i}`]-t[`client${i}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=o(0,r.scrollLength,r.current);const h=s-u;r.velocity=h>50?0:c(r.current-l,h)}const Mr={start:0,center:.5,end:1};function Ar(t,e,n=0){let s=0;if(t in Mr&&(t=Mr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const Vr=[0,0];function kr(t,e,n,s){let r=Array.isArray(t)?t:Vr,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Mr[t]?t:"0"]),i=Ar(r[0],n,s),o=Ar(r[1],e),i-o}const Pr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Er={x:0,y:0};function Cr(t,e,n){const{offset:s=Pr.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Er,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=kr(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=fs(e[i].offset,Lt(s),{clamp:!1}),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=at(0,1,e[i].interpolate(e[i].current))}function Fr(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.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,s.target,n),update:e=>{!function(t,e,n){Sr(t,"x",e,n),Sr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Cr(t,n,s)},notify:()=>e(n)}}const Or=new WeakMap,Rr=new WeakMap,Br=new WeakMap,Lr=t=>t===document.documentElement?window:t;function Ir(t,{container:e=document.documentElement,...n}={}){let s=Br.get(e);s||(s=new Set,Br.set(e,s));const r=Fr(e,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}},n);if(s.add(r),!Or.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(z.timestamp)},r=()=>{for(const t of s)t.notify()},a=()=>{$.read(t,!1,!0),$.read(n,!1,!0),$.update(r,!1,!0)};Or.set(e,a);const l=Lr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Rr.set(e,(o=a,"function"==typeof(i=e)?Tr(i):vr(i,o))),l.addEventListener("scroll",a,{passive:!0})}var i,o;const a=Or.get(e);return $.read(a,!1,!0),()=>{j(a);const t=Br.get(e);if(!t)return;if(t.delete(r),t.size)return;const n=Or.get(e);Or.delete(e),n&&(Lr(e).removeEventListener("scroll",n),Rr.get(e)?.(),window.removeEventListener("resize",n))}}const Dr=new Map;function Wr({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Dr.has(e)||Dr.set(e,{});const s=Dr.get(e);return s[n]||(s[n]=h()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},r=Ir((t=>{s.value=100*t[n].progress}),{container:e,axis:n});return{currentTime:s,cancel:r}}({source:e,axis:n})),s[n]}function Nr(t){return t&&(t.target||t.offset)}const Kr={some:0,all:1};const $r=(t,e)=>Math.abs(t-e);t.MotionValue=it,t.animate=cr,t.animateMini=dr,t.anticipate=ge,t.backIn=fe,t.backInOut=me,t.backOut=pe,t.cancelFrame=j,t.circIn=ye,t.circInOut=we,t.circOut=ve,t.clamp=at,t.createScopedAnimate=ur,t.cubicBezier=ce,t.delay=function(t,e){return function(t,e){const n=H.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(j(s),t(i-e))};return $.read(s,!0),()=>j(s)}(t,l(e))},t.distance=$r,t.distance2D=function(t,e){const n=$r(t.x,e.x),s=$r(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=us,t.easeInOut=hs,t.easeOut=cs,t.frame=$,t.frameData=z,t.hover=function(t,e,n={}){const[s,r,i]=_(t,n),o=t=>{if(!J(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const i=t=>{J(t)&&(s(t),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,r)};return s.forEach((t=>{t.addEventListener("pointerenter",o,r)})),i},t.hslaToRgba=Hn,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=Z(t),o=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))}))}),{root:n,rootMargin:s,threshold:"number"==typeof r?r:Kr[r]});return i.forEach((t=>a.observe(t))),()=>a.disconnect()},t.inertia=ls,t.interpolate=fs,t.invariant=n,t.isDragActive=G,t.keyframes=ms,t.mirrorEasing=he,t.mix=as,t.motionValue=ot,t.noop=i,t.pipe=ts,t.press=function(t,e,n={}){const[s,r,i]=_(t,n),o=t=>{const s=t.currentTarget;if(!rt(t)||et.has(s))return;et.add(s);const i=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),rt(t)&&et.has(s)&&(et.delete(s),"function"==typeof i&&i(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Q(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return s.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),t instanceof HTMLElement&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=nt((()=>{if(et.has(n))return;st(n,"down");const t=nt((()=>{st(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>st(n,"cancel")),e)}));n.addEventListener("keydown",s,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",s)),e)})(t,r))),e=t,tt.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),i},t.progress=o,t.reverseEasing=de,t.scroll=function(t,{axis:e="y",...n}={}){const s={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Nr(e)?Ir((n=>{t(n[e.axis].progress,n)}),e):pr(t,Wr(e))}(t,s):function(t,e){if(t.flatten(),Nr(e))return t.pause(),Ir((n=>{t.time=t.duration*n[e.axis].progress}),e);{const n=Wr(e);return t.attachTimeline?t.attachTimeline(n,(t=>(t.pause(),pr((e=>{t.time=t.duration*e}),n)))):i}}(t,s)},t.scrollInfo=Ir,t.spring=Et,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=ps(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(s):Math.ceil(s);return at(0,1,r/t)}},t.time=H,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=fs(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=Ct}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let n=()=>{};const s={skipAnimations:!1,useManualTiming:!1};function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=t=>t,o=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class a{constructor(){this.subscriptions=[]}add(t){var n,s;return n=this.subscriptions,s=t,-1===n.indexOf(s)&&n.push(s),()=>e(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const l=t=>1e3*t,u=t=>t/1e3;function c(t,e){return e?t*(1e3/e):0}const h=r((()=>void 0!==window.ScrollTimeline));class d{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>h()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class p extends d{then(t,e){return this.finished.finally(t).then((()=>{}))}}const f=t=>t.startsWith("--"),m=(t,e,n)=>{f(e)?t.style.setProperty(e,n):t.style[e]=n},g=(t,e)=>f(e)?t.style.getPropertyValue(e):t.style[e],y=t=>null!==t;const v=r((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),w=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const b={value:null,addProjectionMetrics:null},T=t=>Array.isArray(t)&&"number"==typeof t[0],x={};function S(t,e){const n=r(t);return()=>x[e]??n()}const M=S((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),A=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(e/(r-1))+", ";return`linear(${s.substring(0,s.length-2)})`},V=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,k={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:V([0,.65,.55,1]),circOut:V([.55,0,1,.45]),backIn:V([.31,.01,.66,-.59]),backOut:V([.33,1.53,.69,.99])};function P(t,e){return t?"function"==typeof t&&M()?A(t,e):T(t)?V(t):Array.isArray(t)?t.map((t=>P(t,e)||k.easeOut)):k[t]:void 0}function E(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=P(a,r);Array.isArray(h)&&(c.easing=h);return t.animate(c,{delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal",pseudoElement:u})}function C(t){return"function"==typeof t&&"applyToOptions"in t}const F=new WeakMap;class O{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:s,pseudoElement:r,allowFlatten:i=!1}=t;let{transition:o}=t;this.allowFlatten=i;const a=function(t){const e=F.get(t)||new Map;return F.set(t,e),e}(e),l=((t,e)=>`${t}:${e}`)(n,r||""),u=a.get(l);u&&u.stop();const c=function(t,e,n,s){Array.isArray(n)||(n=[n]);for(let r=0;r<n.length;r++)null===n[r]&&(n[r]=0!==r||s?n[r-1]:g(t,e)),"number"==typeof n[r]&&w.has(e)&&(n[r]=n[r]+"px");return!s&&!v()&&n.length<2&&n.unshift(g(t,e)),n}(e,n,s,r);o.type,o=function({type:t,...e}){return C(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(o),this.animation=E(e,n,c,o,r),!1===o.autoplay&&this.animation.pause(),this.removeAnimation=()=>a.delete(l),this.animation.onfinish=()=>{r?this.commitStyles():m(e,n,function(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(y),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}(c,o)),this.cancel()},a.set(l,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.animation.commitStyles?.()}get duration(){console.log(this.animation.effect?.getComputedTiming());const t=this.animation.effect?.getComputedTiming().duration||0;return u(Number(t))}get time(){return u(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=l(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,i}then(t,e){return this.finished.then(t).catch(e)}}function R(t,e){return t?.[e]??t?.default??t}const B=2e4;function L(t){let e=0;let n=t.next(e);for(;!n.done&&e<B;)e+=50,n=t.next(e);return e>=B?1/0:e}function I(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(L(s),B);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:u(r)}}function W(t){return Boolean("function"==typeof t&&M()||!t||"string"==typeof t&&(t in k||M())||T(t)||Array.isArray(t)&&t.every(W))}function D(t,e){t.timeline=e,t.onfinish=null}const N=["read","resolveKeyframes","update","preRender","render","postRender"];function K(t,e){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=N.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,r?i=!0:(r=!0,[n,s]=[s,n],n.forEach(u),e&&b.value&&b.value.frameloop[e].push(l),l=0,n.clear(),r=!1,i&&(i=!1,c.process(t)))}};return c}(i,e?n:void 0),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const i=performance.now();n=!1,r.delta=s?1e3/60:Math.max(Math.min(i-r.timestamp,40),1),r.timestamp=i,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),c.process(r),h.process(r),d.process(r),r.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:N.reduce(((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(n||(n=!0,s=!0,r.isProcessing||t(p)),a.schedule(e,i,o)),e}),{}),cancel:t=>{for(let e=0;e<N.length;e++)o[N[e]].cancel(t)},state:r,steps:o}}const{schedule:$,cancel:j,state:z,steps:Y}=K("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:i,!0);let U;function X(){U=void 0}const H={now:()=>(void 0===U&&H.set(z.isProcessing||s.useManualTiming?z.timestamp:performance.now()),U),set:t=>{U=t,queueMicrotask(X)}},q=!1;function G(){return q}function Z(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const r=n?.[t]??s.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function _(t,e){const n=Z(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function J(t){return!("touch"===t.pointerType||G())}const Q=(t,e)=>!!e&&(t===e||Q(t,e.parentElement)),tt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const et=new WeakSet;function nt(t){return e=>{"Enter"===e.key&&t(e)}}function st(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function rt(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!G()}class it{constructor(t,e={}){this.version="12.6.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=H.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=H.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new a);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ot(t,e){return new it(t,e)}N.reduce(((t,e)=>(t[e]=t=>j(t),t)),{});const at=(t,e,n)=>n>e?e:n<t?t:n;function lt(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}const ut=100,ct=10,ht=1,dt=0,pt=800,ft=.3,mt=.3,gt={granular:.01,default:2},yt={granular:.005,default:.5},vt=.01,wt=10,bt=.05,Tt=1,xt=.001;function St({duration:t=pt,bounce:e=ft,velocity:n=dt,mass:s=ht}){let r,i,o=1-e;o=at(bt,Tt,o),t=at(vt,wt,u(t)),o<1?(r=e=>{const s=e*o,r=s*t,i=s-n,a=At(e,o),l=Math.exp(-r);return xt-i/a*l},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=At(Math.pow(e,2),o);return(-r(e)+xt>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<Mt;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=l(t),isNaN(a))return{stiffness:ut,damping:ct,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}const Mt=12;function At(t,e){return t*Math.sqrt(1-e*e)}const Vt=["duration","bounce"],kt=["stiffness","damping","mass"];function Pt(t,e){return e.some((e=>void 0!==t[e]))}function Et(t=mt,e=ft){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:h,mass:d,duration:p,velocity:f,isResolvedFromDuration:m}=function(t){let e={velocity:dt,stiffness:ut,damping:ct,mass:ht,isResolvedFromDuration:!1,...t};if(!Pt(t,kt)&&Pt(t,Vt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),r=s*s,i=2*at(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:ht,stiffness:r,damping:i}}else{const n=St(t);e={...e,...n,mass:ht},e.isResolvedFromDuration=!0}return e}({...n,velocity:-u(n.velocity||0)}),g=f||0,y=h/(2*Math.sqrt(c*d)),v=o-i,w=u(Math.sqrt(c/d)),b=Math.abs(v)<5;let T;if(s||(s=b?gt.granular:gt.default),r||(r=b?yt.granular:yt.default),y<1){const t=At(w,y);T=e=>{const n=Math.exp(-y*w*e);return o-n*((g+y*w*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===y)T=t=>o-Math.exp(-w*t)*(v+(g+w*v)*t);else{const t=w*Math.sqrt(y*y-1);T=e=>{const n=Math.exp(-y*w*e),s=Math.min(t*e,300);return o-n*((g+y*w*v)*Math.sinh(s)+t*v*Math.cosh(s))/t}}const x={calculatedDuration:m&&p||null,next:t=>{const e=T(t);if(m)a.done=t>=p;else{let n=0;y<1&&(n=0===t?l(g):lt(T,t,e));const i=Math.abs(n)<=s,u=Math.abs(o-e)<=r;a.done=i&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(L(x),B),e=A((e=>x.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return x}Et.applyToOptions=t=>{const e=I(t,100,Et);return t.ease=M()?e.ease:"easeOut",t.duration=l(e.duration),t.type="keyframes",t};const Ct=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Ft=t=>Array.isArray(t)&&"number"!=typeof t[0];function Ot(t,e){return Ft(t)?t[Ct(0,t.length,e)]:t}const Rt=(t,e,n)=>t+(e-t)*n;function Bt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=o(0,e,s);t.push(Rt(n,1,r))}}function Lt(t){const e=[0];return Bt(e,t.length-1),e}const It=t=>Boolean(t&&t.getVelocity);function Wt(t){return"object"==typeof t&&!Array.isArray(t)}function Dt(t,e,n,s){return"string"==typeof t&&Wt(e)?Z(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Nt(t,e,n){return t*(e+1)}function Kt(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:s.get(e)??t}function $t(t,n,s,r,i,o){!function(t,n,s){for(let r=0;r<t.length;r++){const i=t[r];i.at>n&&i.at<s&&(e(t,i),r--)}}(t,i,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:Rt(i,o,r[e]),easing:Ot(s,e)})}function jt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function zt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Yt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ut(t,e){return e[t]||(e[t]=[]),e[t]}function Xt(t){return Array.isArray(t)?t:[t]}function Ht(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const qt=t=>"number"==typeof t,Gt=t=>t.every(qt),Zt=new WeakMap,_t=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jt=new Set(_t),Qt=new Set(["width","height","top","left","right","bottom",..._t]),te=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function ee(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function ne(t,e,n,s){if("function"==typeof e){const[r,i]=ee(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=ee(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function se(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ot(n))}function re(t,e){const n=function(t,e,n){const s=t.getProps();return ne(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){se(t,e,te(i[e]))}}function ie(t,e){const n=t.getValue("willChange");if(r=n,Boolean(It(r)&&r.add))return n.add(e);if(!n&&s.WillChange){const n=new s.WillChange("auto");t.addValue("willChange",n),n.add(e)}var r}const oe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ae="data-"+oe("framerAppearId");function le(t){return t.props[ae]}const ue=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ce(t,e,n,s){if(t===e&&n===s)return i;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ue(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ue(r(t),e,s)}const he=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,de=t=>e=>1-t(1-e),pe=ce(.33,1.53,.69,.99),fe=de(pe),me=he(fe),ge=t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1))),ye=t=>1-Math.sin(Math.acos(t)),ve=de(ye),we=he(ye),be=t=>/^0[^.\s]+$/u.test(t);const Te={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},xe={...Te,transform:t=>at(0,1,t)},Se={...Te,default:1},Me=t=>Math.round(1e5*t)/1e5,Ae=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Ve=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ke=(t,e)=>n=>Boolean("string"==typeof n&&Ve.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Pe=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(Ae);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ee={...Te,transform:t=>Math.round((t=>at(0,255,t))(t))},Ce={test:ke("rgb","red"),parse:Pe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ee.transform(t)+", "+Ee.transform(e)+", "+Ee.transform(n)+", "+Me(xe.transform(s))+")"};const Fe={test:ke("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:Ce.transform},Oe=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Re=Oe("deg"),Be=Oe("%"),Le=Oe("px"),Ie=Oe("vh"),We=Oe("vw"),De={...Be,parse:t=>Be.parse(t)/100,transform:t=>Be.transform(100*t)},Ne={test:ke("hsl","hue"),parse:Pe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Be.transform(Me(e))+", "+Be.transform(Me(n))+", "+Me(xe.transform(s))+")"},Ke={test:t=>Ce.test(t)||Fe.test(t)||Ne.test(t),parse:t=>Ce.test(t)?Ce.parse(t):Ne.test(t)?Ne.parse(t):Fe.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ce.transform(t):Ne.transform(t)},$e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const je="number",ze="color",Ye=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ue(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ye,(t=>(Ke.test(t)?(s.color.push(i),r.push(ze),n.push(Ke.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push(je),n.push(parseFloat(t))),++i,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:r}}function Xe(t){return Ue(t).values}function He(t){const{split:e,types:n}=Ue(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+=e===je?Me(t[i]):e===ze?Ke.transform(t[i]):t[i]}return r}}const qe=t=>"number"==typeof t?0:t;const Ge={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Ae)?.length||0)+(t.match($e)?.length||0)>0},parse:Xe,createTransformer:He,getAnimatableNone:function(t){const e=Xe(t);return He(t)(e.map(qe))}},Ze=new Set(["brightness","contrast","saturate","opacity"]);function _e(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Ae)||[];if(!s)return t;const r=n.replace(s,"");let i=Ze.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Je=/\b([a-z-]*)\(.*?\)/gu,Qe={...Ge,getAnimatableNone:t=>{const e=t.match(Je);return e?e.map(_e).join(" "):t}},tn={borderWidth:Le,borderTopWidth:Le,borderRightWidth:Le,borderBottomWidth:Le,borderLeftWidth:Le,borderRadius:Le,radius:Le,borderTopLeftRadius:Le,borderTopRightRadius:Le,borderBottomRightRadius:Le,borderBottomLeftRadius:Le,width:Le,maxWidth:Le,height:Le,maxHeight:Le,top:Le,right:Le,bottom:Le,left:Le,padding:Le,paddingTop:Le,paddingRight:Le,paddingBottom:Le,paddingLeft:Le,margin:Le,marginTop:Le,marginRight:Le,marginBottom:Le,marginLeft:Le,backgroundPositionX:Le,backgroundPositionY:Le},en={rotate:Re,rotateX:Re,rotateY:Re,rotateZ:Re,scale:Se,scaleX:Se,scaleY:Se,scaleZ:Se,skew:Re,skewX:Re,skewY:Re,distance:Le,translateX:Le,translateY:Le,translateZ:Le,x:Le,y:Le,z:Le,perspective:Le,transformPerspective:Le,opacity:xe,originX:De,originY:De,originZ:Le},nn={...Te,transform:Math.round},sn={...tn,...en,zIndex:nn,size:Le,fillOpacity:xe,strokeOpacity:xe,numOctaves:nn},rn={...sn,color:Ke,backgroundColor:Ke,outlineColor:Ke,fill:Ke,stroke:Ke,borderColor:Ke,borderTopColor:Ke,borderRightColor:Ke,borderBottomColor:Ke,borderLeftColor:Ke,filter:Qe,WebkitFilter:Qe},on=t=>rn[t];function an(t,e){let n=on(t);return n!==Qe&&(n=Ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ln=new Set(["auto","none","0"]);const un=t=>180*t/Math.PI,cn=t=>{const e=un(Math.atan2(t[1],t[0]));return dn(e)},hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:cn,rotateZ:cn,skewX:t=>un(Math.atan(t[1])),skewY:t=>un(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},dn=t=>((t%=360)<0&&(t+=360),t),pn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),mn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pn,scaleY:fn,scale:t=>(pn(t)+fn(t))/2,rotateX:t=>dn(un(Math.atan2(t[6],t[5]))),rotateY:t=>dn(un(Math.atan2(-t[2],t[0]))),rotateZ:cn,rotate:cn,skewX:t=>un(Math.atan(t[4])),skewY:t=>un(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function gn(t){return t.includes("scale")?1:0}function yn(t,e){if(!t||"none"===t)return gn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=mn,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=hn,r=e}if(!r)return gn(e);const i=s[e],o=r[1].split(",").map(vn);return"function"==typeof i?i(o):o[i]}function vn(t){return parseFloat(t.trim())}const wn=t=>t===Te||t===Le,bn=new Set(["x","y","z"]),Tn=_t.filter((t=>!bn.has(t)));const xn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>yn(e,"x"),y:(t,{transform:e})=>yn(e,"y")};xn.translateX=xn.x,xn.translateY=xn.y;const Sn=new Set;let Mn=!1,An=!1;function Vn(){if(An){const t=Array.from(Sn).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Tn.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{t.getValue(e)?.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}An=!1,Mn=!1,Sn.forEach((t=>t.complete())),Sn.clear()}function kn(){Sn.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(An=!0)}))}class Pn{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Sn.add(this),Mn||(Mn=!0,$.read(kn),$.resolveKeyframes(Vn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=s?.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Sn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Sn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const En=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Cn=t=>e=>"string"==typeof e&&e.startsWith(t),Fn=Cn("--"),On=Cn("var(--"),Rn=t=>!!On(t)&&Bn.test(t.split("/*")[0].trim()),Bn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ln=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function In(t,e,n=1){const[s,r]=function(t){const e=Ln.exec(t);if(!e)return[,];const[,n,s,r]=e;return[`--${n??s}`,r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return En(t)?parseFloat(t):t}return Rn(r)?In(r,e,n+1):r}const Wn=t=>e=>e.test(t),Dn=[Te,Le,Be,Re,We,Ie,{test:t=>"auto"===t,parse:t=>t}],Nn=t=>Dn.find(Wn(t));class Kn extends Pn{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),Rn(s))){const r=In(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Qt.has(n)||2!==t.length)return;const[s,r]=t,i=Nn(s),o=Nn(r);if(i!==o)if(wn(i)&&wn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||be(s))&&n.push(e);var s;n.length&&function(t,e,n){let s,r=0;for(;r<t.length&&!s;){const e=t[r];"string"==typeof e&&!ln.has(e)&&Ue(e).values.length&&(s=t[r]),r++}if(s&&n)for(const r of e)t[r]=an(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,i=n[r];n[r]=xn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const $n=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Ge.test(t)&&"0"!==t||t.startsWith("url(")));function jn(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=$n(r,e),a=$n(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||C(n))&&s)}const zn=t=>null!==t;function Yn(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(zn),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}class Un{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=H.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(kn(),Vn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=H.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!jn(t,n,s,r)){if(!i)return a&&a(Yn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Xn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Hn(t,e){return n=>n>0?e:t}const qn=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Gn=[Fe,Ce,Ne];function Zn(t){const e=(n=t,Gn.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Ne&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Xn(a,s,t+1/3),i=Xn(a,s,t),o=Xn(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const _n=(t,e)=>{const n=Zn(t),s=Zn(e);if(!n||!s)return Hn(t,e);const r={...n};return t=>(r.red=qn(n.red,s.red,t),r.green=qn(n.green,s.green,t),r.blue=qn(n.blue,s.blue,t),r.alpha=Rt(n.alpha,s.alpha,t),Ce.transform(r))},Jn=(t,e)=>n=>e(t(n)),Qn=(...t)=>t.reduce(Jn),ts=new Set(["none","hidden"]);function es(t,e){return n=>Rt(t,e,n)}function ns(t){return"number"==typeof t?es:"string"==typeof t?Rn(t)?Hn:Ke.test(t)?_n:is:Array.isArray(t)?ss:"object"==typeof t?Ke.test(t)?_n:rs:Hn}function ss(t,e){const n=[...t],s=n.length,r=t.map(((t,n)=>ns(t)(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function rs(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=ns(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const is=(t,e)=>{const n=Ge.createTransformer(e),s=Ue(t),r=Ue(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?ts.has(t)&&!r.values.length||ts.has(e)&&!s.values.length?function(t,e){return ts.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Qn(ss(function(t,e){const n=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const i=e.types[r],o=t.indexes[i][s[i]],a=t.values[o]??0;n[r]=a,s[i]++}return n}(s,r),r.values),n):Hn(t,e)};function os(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Rt(t,e,n);return ns(t)(t,e)}function as({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=Et({keyframes:[d.value,p(d.value)],velocity:lt(v,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const ls=ce(.42,0,1,1),us=ce(0,0,.58,1),cs=ce(.42,0,.58,1),hs={linear:i,easeIn:ls,easeInOut:cs,easeOut:us,circIn:ye,circInOut:we,circOut:ve,backIn:fe,backInOut:me,backOut:pe,anticipate:ge},ds=t=>{if(T(t)){t.length;const[e,n,s,r]=t;return ce(e,n,s,r)}return"string"==typeof t?hs[t]:t};function ps(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const u=function(t,e,n){const s=[],r=n||os,o=t.length-1;for(let n=0;n<o;n++){let o=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||i:e;o=Qn(t,o)}s.push(o)}return s}(e,s,r),c=u.length,h=n=>{if(l&&n<t[0])return e[0];let s=0;if(c>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const r=o(t[s],t[s+1],n);return u[s](r)};return n?e=>h(at(t[0],t[a-1],e)):h}function fs({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=Ft(s)?s.map(ds):ds(s),i={done:!1,value:e[0]},o=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:Lt(e),t),a=ps(o,e,{ease:Array.isArray(r)?r:(l=e,u=r,l.map((()=>u||cs)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(i.value=a(e),i.done=e>=t,i)}}const ms=t=>{const e=({timestamp:e})=>t(e);return{start:()=>$.update(e,!0),stop:()=>j(e),now:()=>z.isProcessing?z.timestamp:H.now()}},gs={decay:as,inertia:as,tween:fs,keyframes:fs,spring:Et},ys=t=>t/100;class vs extends Un{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=s?.KeyframeResolver||Pn;this.resolver=new i(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=C(e)?e:gs[e]||fs;let a,l;o!==fs&&"number"!=typeof t[0]&&(a=Qn(ys,os(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=L(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),v=at(0,1,n)*c}const b=y?{done:!1,value:a[0]}:w.next(v);o&&(b.value=o(b.value));let{done:T}=b;y||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=Yn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?u(t.calculatedDuration):0}get time(){return u(this.currentTime)}set time(t){t=l(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=u(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ms,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){this._resolved?(this.state="paused",this.holdTime=this.currentTime??0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const ws=new Set(["opacity","clipPath","filter","transform"]),bs=r((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Ts={anticipate:ge,backInOut:me,circInOut:we};class xs extends Un{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new Kn(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:r,type:i,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof r&&M()&&r in Ts&&(r=Ts[r]),C((u=this.options).type)||"spring"===u.type||!W(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new vs({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,r=c.ease,i="keyframes"}const c=E(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:r});return c.startTime=l??this.calcStartTime(),this.pendingTimeline?(D(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(Yn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:i,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return u(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return u(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=l(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return i;const{animation:n}=e;D(n,t)}else this.pendingTimeline=t;return i}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...c}=this.options,h=new vs({...c,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),d=l(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return bs()&&n&&ws.has(n)&&("transform"!==n||!l)&&!a&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const Ss={type:"spring",stiffness:500,damping:25,restSpeed:10},Ms={type:"keyframes",duration:.8},As={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vs=(t,{keyframes:e})=>e.length>2?Ms:Jt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ss:As;const ks=(t,e,n,s={},r,i)=>o=>{const a=R(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c-=l(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(h={...h,...Vs(t,h)}),h.duration&&(h.duration=l(h.duration)),h.repeatDelay&&(h.repeatDelay=l(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),h.allowFlatten=!a.type&&!a.ease,d&&!i&&void 0!==e.get()){const t=Yn(h.keyframes,a);if(void 0!==t)return $.update((()=>{h.onUpdate(t),h.onComplete()})),new p([])}return!i&&xs.supports(h)?new xs(h):new vs(h)};function Ps({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Es(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(i=s);const l=[],u=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||u&&Ps(u,e))continue;const o={delay:n,...R(i||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=le(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(o.startTime=t,c=!0)}}ie(t,e),s.start(ks(e,s,r,t.shouldReduceMotion&&Qt.has(e)?{type:!1}:o,t,c));const h=s.animation;h&&l.push(h)}return o&&Promise.all(l).then((()=>{$.update((()=>{o&&re(t,o)}))})),l}const Cs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Fs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Os={};for(const t in Fs)Os[t]={isEnabled:e=>Fs[t].some((t=>!!e[t]))};const Rs="undefined"!=typeof window,Bs={current:null},Ls={current:!1};const Is=[...Dn,Ke,Ge];const Ws=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ds(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Ws.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}const Ns=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ks{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Pn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=H.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=i;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Ds(e),this.isVariantNode=function(t){return Boolean(Ds(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&It(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Zt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Ls.current||function(){if(Ls.current=!0,Rs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Bs.current=t.matches;t.addListener(e),e()}else Bs.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Bs.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),j(this.notifyUpdate),j(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Jt.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),r(),i&&i(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Os){const e=Os[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ns.length;e++){const n=Ns[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(It(r))t.addValue(s,r);else if(It(i))t.addValue(s,ot(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,ot(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=ot(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=n&&("string"==typeof n&&(En(n)||be(n))?n=parseFloat(n):(s=n,!Is.find(Wn(s))&&Ge.test(e)&&(n=an(t,e))),this.setBaseTarget(t,It(n)?n.get():n)),It(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=ne(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||It(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class $s extends Ks{constructor(){super(...arguments),this.KeyframeResolver=Kn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;It(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const js=(t,e)=>e&&"number"==typeof t?e.transform(t):t,zs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ys=_t.length;function Us(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Jt.has(t))o=!0;else if(Fn(t))r[t]=n;else{const e=js(n,sn[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i<Ys;i++){const o=_t[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=js(a,sn[o]);l||(r=!1,s+=`${zs[o]||o}(${t}) `),n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}const Xs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hs={offset:"strokeDashoffset",array:"strokeDasharray"};function qs(t,e,n){return"string"==typeof t?t:Le.transform(e+n*t)}function Gs(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Us(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${qs(e,t.x,t.width)} ${qs(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Xs:Hs;t[i.offset]=Le.transform(-s);const o=Le.transform(e),a=Le.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Zs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _s(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Js={};function Qs(t,{layout:e,layoutId:n}){return Jt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Js[t]||"opacity"===t)}function tr(t,e,n){const{style:s}=t,r={};for(const i in s)(It(s[i])||e.style&&It(e.style[i])||Qs(i,t)||void 0!==n?.getValue(i)?.liveStyle)&&(r[i]=s[i]);return r}class er extends $s{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Cs,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Jt.has(e)){const t=on(e);return t&&t.default||0}return e=Zs.has(e)?e:oe(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=tr(t,e,n);for(const n in t)(It(t[n])||It(e[n]))&&(s[-1!==_t.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&$.postRender(this.updateDimensions)}build(t,e,n){Gs(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){_s(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Zs.has(n)?n:oe(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class nr extends $s{constructor(){super(...arguments),this.type="html",this.renderInstance=_s}readValueFromInstance(t,e){if(Jt.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return yn(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),r=(Fn(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Us(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return tr(t,e,n)}}class sr extends Ks{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function rr(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new er(e):new nr(e);n.mount(t),Zt.set(t,n)}function ir(t){const e=new sr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Zt.set(t,e)}function or(t,e,n,s){const r=[];if(function(t,e){return It(t)||"number"==typeof t||"string"==typeof t&&!Wt(e)}(t,e))r.push(function(t,e,n){const s=It(t)?t:ot(t);return s.start(ks("",s,e,n)),s.animation}(t,Wt(e)&&e.default||e,n&&n.default||n));else{const i=Dt(t,e,s),o=i.length;for(let t=0;t<o;t++){const s=i[t],a=s instanceof Element?rr:ir;Zt.has(s)||a(s);const l=Zt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),r.push(...Es(l,{...e,transition:u},{}))}}return r}function ar(t,e,n){const s=[],r=function(t,{defaultTransition:e={},...n}={},s,r){const i=e.duration||.3,a=new Map,u=new Map,c={},h=new Map;let d=0,p=0,f=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){h.set(o,p);continue}if(!Array.isArray(o)){h.set(o.name,Kt(p,o.at,d,h));continue}let[a,m,g={}]=o;void 0!==g.at&&(p=Kt(p,g.at,d,h));let y=0;const v=(t,n,s,o=0,a=0)=>{const u=Xt(t),{delay:c=0,times:h=Lt(u),type:d="keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof c?c(o,a):c,S=u.length,M=C(d)?d:r?.[d];if(S<=2&&M){let t=100;if(2===S&&Gt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=l(T));const n=I(e,t,M);b=n.ease,T=n.duration}T??(T=i);const A=p+x;1===h.length&&0===h[0]&&(h[1]=1);const V=h.length-u.length;if(V>0&&Bt(h,V),1===u.length&&u.unshift(null),m){T=Nt(T,m);const t=[...u],e=[...h];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s<m;s++){u.push(...t);for(let r=0;r<t.length;r++)h.push(e[r]+(s+1)),b.push(0===r?"linear":Ot(n,r-1))}jt(h,m)}const k=A+T;$t(s,u,b,h,A,k),y=Math.max(x+T,y),f=Math.max(k,f)};if(It(a))v(m,g,Ut("default",Yt(a,u)));else{const t=Dt(a,m,s,c),e=t.length;for(let n=0;n<e;n++){const s=Yt(t[n],u);for(const t in m)v(m[t],Ht(g,t),Ut(t,s),n,e)}}d=p,p+=y}return u.forEach(((t,s)=>{for(const r in t){const i=t[r];i.sort(zt);const l=[],u=[],c=[];for(let t=0;t<i.length;t++){const{at:e,value:n,easing:s}=i[t];l.push(n),u.push(o(0,f,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),l.unshift(l[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),l.push(null)),a.has(s)||a.set(s,{keyframes:{},transition:{}});const h=a.get(s);h.keyframes[r]=l,h.transition[r]={...e,duration:f,ease:c,times:u,...n}}})),a}(t,e,n,{spring:Et});return r.forEach((({keyframes:t,transition:e},n)=>{s.push(...or(n,t,e))})),s}function lr(t){return function(e,n,s){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?ar(e,n,t):or(e,n,s,t);const o=new p(r);return t&&t.animations.push(o),o}}const ur=lr();const cr=t=>function(e,n,s){return new p(function(t,e,n,s){const r=Z(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,i));for(const t in e){const n=e[t],r={...R(a,t)};r.duration&&(r.duration=l(r.duration)),r.delay&&(r.delay=l(r.delay)),o.push(new O({element:s,name:t,keyframes:n,transition:r,allowFlatten:!a.type&&!a.ease}))}}return o}(e,n,s,t))},hr=cr();function dr(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return $.update(s,!0),()=>j(s)}const pr=new WeakMap;let fr;function mr({target:t,contentRect:e,borderBoxSize:n}){pr.get(t)?.forEach((s=>{s({target:t,contentSize:e,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}}(t,n)}})}))}function gr(t){t.forEach(mr)}function yr(t,e){fr||"undefined"!=typeof ResizeObserver&&(fr=new ResizeObserver(gr));const n=Z(t);return n.forEach((t=>{let n=pr.get(t);n||(n=new Set,pr.set(t,n)),n.add(e),fr?.observe(t)})),()=>{n.forEach((t=>{const n=pr.get(t);n?.delete(e),n?.size||fr?.unobserve(t)}))}}const vr=new Set;let wr;function br(t){return vr.add(t),wr||(wr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};vr.forEach((t=>t(e)))},window.addEventListener("resize",wr)),()=>{vr.delete(t),!vr.size&&wr&&(wr=void 0)}}const Tr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function xr(t,e,n,s){const r=n[e],{length:i,position:a}=Tr[e],l=r.current,u=n.time;r.current=t[`scroll${a}`],r.scrollLength=t[`scroll${i}`]-t[`client${i}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=o(0,r.scrollLength,r.current);const h=s-u;r.velocity=h>50?0:c(r.current-l,h)}const Sr={start:0,center:.5,end:1};function Mr(t,e,n=0){let s=0;if(t in Sr&&(t=Sr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const Ar=[0,0];function Vr(t,e,n,s){let r=Array.isArray(t)?t:Ar,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Sr[t]?t:"0"]),i=Mr(r[0],n,s),o=Mr(r[1],e),i-o}const kr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Pr={x:0,y:0};function Er(t,e,n){const{offset:s=kr.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Pr,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=Vr(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=ps(e[i].offset,Lt(s),{clamp:!1}),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=at(0,1,e[i].interpolate(e[i].current))}function Cr(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.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,s.target,n),update:e=>{!function(t,e,n){xr(t,"x",e,n),xr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Er(t,n,s)},notify:()=>e(n)}}const Fr=new WeakMap,Or=new WeakMap,Rr=new WeakMap,Br=t=>t===document.documentElement?window:t;function Lr(t,{container:e=document.documentElement,...n}={}){let s=Rr.get(e);s||(s=new Set,Rr.set(e,s));const r=Cr(e,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}},n);if(s.add(r),!Fr.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(z.timestamp)},r=()=>{for(const t of s)t.notify()},a=()=>{$.read(t,!1,!0),$.read(n,!1,!0),$.update(r,!1,!0)};Fr.set(e,a);const l=Br(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Or.set(e,(o=a,"function"==typeof(i=e)?br(i):yr(i,o))),l.addEventListener("scroll",a,{passive:!0})}var i,o;const a=Fr.get(e);return $.read(a,!1,!0),()=>{j(a);const t=Rr.get(e);if(!t)return;if(t.delete(r),t.size)return;const n=Fr.get(e);Fr.delete(e),n&&(Br(e).removeEventListener("scroll",n),Or.get(e)?.(),window.removeEventListener("resize",n))}}const Ir=new Map;function Wr({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Ir.has(e)||Ir.set(e,{});const s=Ir.get(e);return s[n]||(s[n]=h()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},r=Lr((t=>{s.value=100*t[n].progress}),{container:e,axis:n});return{currentTime:s,cancel:r}}({source:e,axis:n})),s[n]}function Dr(t){return t&&(t.target||t.offset)}const Nr={some:0,all:1};const Kr=(t,e)=>Math.abs(t-e);t.MotionValue=it,t.animate=ur,t.animateMini=hr,t.anticipate=ge,t.backIn=fe,t.backInOut=me,t.backOut=pe,t.cancelFrame=j,t.circIn=ye,t.circInOut=we,t.circOut=ve,t.clamp=at,t.createScopedAnimate=lr,t.cubicBezier=ce,t.delay=function(t,e){return function(t,e){const n=H.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(j(s),t(i-e))};return $.read(s,!0),()=>j(s)}(t,l(e))},t.distance=Kr,t.distance2D=function(t,e){const n=Kr(t.x,e.x),s=Kr(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=ls,t.easeInOut=cs,t.easeOut=us,t.frame=$,t.frameData=z,t.hover=function(t,e,n={}){const[s,r,i]=_(t,n),o=t=>{if(!J(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const i=t=>{J(t)&&(s(t),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,r)};return s.forEach((t=>{t.addEventListener("pointerenter",o,r)})),i},t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=Z(t),o=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))}))}),{root:n,rootMargin:s,threshold:"number"==typeof r?r:Nr[r]});return i.forEach((t=>a.observe(t))),()=>a.disconnect()},t.inertia=as,t.interpolate=ps,t.invariant=n,t.isDragActive=G,t.keyframes=fs,t.mirrorEasing=he,t.mix=os,t.motionValue=ot,t.noop=i,t.pipe=Qn,t.press=function(t,e,n={}){const[s,r,i]=_(t,n),o=t=>{const s=t.currentTarget;if(!rt(t)||et.has(s))return;et.add(s);const i=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),rt(t)&&et.has(s)&&(et.delete(s),"function"==typeof i&&i(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Q(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return s.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),t instanceof HTMLElement&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=nt((()=>{if(et.has(n))return;st(n,"down");const t=nt((()=>{st(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>st(n,"cancel")),e)}));n.addEventListener("keydown",s,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",s)),e)})(t,r))),e=t,tt.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),i},t.progress=o,t.reverseEasing=de,t.scroll=function(t,{axis:e="y",...n}={}){const s={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Dr(e)?Lr((n=>{t(n[e.axis].progress,n)}),e):dr(t,Wr(e))}(t,s):function(t,e){if(t.flatten(),Dr(e))return t.pause(),Lr((n=>{t.time=t.duration*n[e.axis].progress}),e);{const n=Wr(e);return t.attachTimeline?t.attachTimeline(n,(t=>(t.pause(),dr((e=>{t.time=t.duration*e}),n)))):i}}(t,s)},t.scrollInfo=Lr,t.spring=Et,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=ds(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(s):Math.ceil(s);return at(0,1,r/t)}},t.time=H,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=ps(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=Ct}));
package/dist/es/dom.mjs CHANGED
@@ -20,7 +20,6 @@ export { stagger } from './animation/utils/stagger.mjs';
20
20
  export { clamp } from './utils/clamp.mjs';
21
21
  export { delayInSeconds as delay } from './utils/delay.mjs';
22
22
  export { distance, distance2D } from './utils/distance.mjs';
23
- export { hslaToRgba } from './utils/hsla-to-rgba.mjs';
24
23
  export { interpolate } from './utils/interpolate.mjs';
25
24
  export { mix } from './utils/mix/index.mjs';
26
25
  export { pipe } from './utils/pipe.mjs';
package/dist/es/index.mjs CHANGED
@@ -31,6 +31,7 @@ export { useTime } from './value/use-time.mjs';
31
31
  export { useTransform } from './value/use-transform.mjs';
32
32
  export { useVelocity } from './value/use-velocity.mjs';
33
33
  export { useWillChange } from './value/use-will-change/index.mjs';
34
+ export { WillChangeMotionValue } from './value/use-will-change/WillChangeMotionValue.mjs';
34
35
  export { resolveMotionValue } from './value/utils/resolve-motion-value.mjs';
35
36
  export { useReducedMotion } from './utils/reduced-motion/use-reduced-motion.mjs';
36
37
  export { useReducedMotionConfig } from './utils/reduced-motion/use-reduced-motion-config.mjs';
@@ -90,7 +91,6 @@ export { inertia } from './animation/generators/inertia.mjs';
90
91
  export { keyframes } from './animation/generators/keyframes.mjs';
91
92
  export { stagger } from './animation/utils/stagger.mjs';
92
93
  export { clamp } from './utils/clamp.mjs';
93
- export { hslaToRgba } from './utils/hsla-to-rgba.mjs';
94
94
  export { mix } from './utils/mix/index.mjs';
95
95
  export { pipe } from './utils/pipe.mjs';
96
96
  export { transform } from './utils/transform.mjs';
@@ -17,7 +17,7 @@ function updateMotionValuesFromProps(element, next, prev) {
17
17
  * and warn against mismatches.
18
18
  */
19
19
  if (process.env.NODE_ENV === "development") {
20
- warnOnce(nextValue.version === "12.6.4-alpha.0", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4-alpha.0 may not work as expected.`);
20
+ warnOnce(nextValue.version === "12.6.4", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4 may not work as expected.`);
21
21
  }
22
22
  }
23
23
  else if (isMotionValue(prevValue)) {