framer-motion 12.23.27 → 12.23.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.js +1 -1
- package/dist/cjs/{feature-bundle-kvRbMDEA.js → feature-bundle-Dt2VtvSZ.js} +3 -3
- package/dist/cjs/{feature-bundle-kvRbMDEA.js.map → feature-bundle-Dt2VtvSZ.js.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/dom-mini.js +1 -1
- package/dist/dom.js +1 -1
- package/dist/es/projection/geometry/delta-apply.mjs +1 -1
- package/dist/es/projection/geometry/delta-apply.mjs.map +1 -1
- package/dist/es/projection/node/create-projection-node.mjs +1 -1
- package/dist/es/projection/node/create-projection-node.mjs.map +1 -1
- package/dist/framer-motion.dev.js +28 -5
- package/dist/framer-motion.js +1 -1
- package/dist/m.d.ts +1 -1
- package/dist/mini.js +1 -1
- package/dist/size-rollup-animate.js +1 -1
- package/dist/size-rollup-animate.js.map +1 -1
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js.map +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-rollup-motion.js.map +1 -1
- package/dist/size-rollup-scroll.js +1 -1
- package/dist/size-rollup-scroll.js.map +1 -1
- package/dist/size-rollup-waapi-animate.js +1 -1
- package/dist/size-rollup-waapi-animate.js.map +1 -1
- package/dist/types/client.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/{types.d-DagZKalS.d.ts → types.d-C8SDx5n-.d.ts} +1 -1
- package/package.json +4 -4
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 featureBundle = require('./feature-bundle-
|
|
7
|
+
var featureBundle = require('./feature-bundle-Dt2VtvSZ.js');
|
|
8
8
|
var motionDom = require('motion-dom');
|
|
9
9
|
var motionUtils = require('motion-utils');
|
|
10
10
|
|
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,s=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},o=t=>1e3*t,a=t=>t/1e3;function r(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 u=(t,e,n)=>t+(e-t)*n,l=2e4;function h(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(function(t){let e=0,n=t.next(e);for(;!n.done&&e<l;)e+=50,n=t.next(e);return e>=l?1/0:e}(i),l);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:a(s)}}function c(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const o=s(0,e,i);t.push(u(n,1,o))}}function f(t){const e=[0];return c(e,t.length-1),e}const d=t=>null!==t;class m{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}function p(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const y=t=>t.startsWith("--");const g=n(()=>void 0!==window.ScrollTimeline),A={};function b(t,e){const i=n(t);return()=>A[e]??i()}const T=b(()=>{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})`,w={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 M(t,e){return t?"function"==typeof t?T()?((t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`})(t,e):"ease-out":(t=>Array.isArray(t)&&"number"==typeof t[0])(t)?v(t):Array.isArray(t)?t.map(t=>M(t,e)||w.easeOut):w[t]:void 0}function k(t){return"function"==typeof t&&"applyToOptions"in t}class x extends m{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:r}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,t.type;const u=function({type:t,...e}){return k(t)&&T()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:r="easeOut",times:u}={},l){const h={[e]:n};u&&(h.offset=u);const c=M(r,s);Array.isArray(c)&&(h.easing=c);const f={delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return l&&(f.pseudoElement=l),t.animate(h,f)}(e,n,i,u,s),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=function(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(d),a=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return a&&void 0!==i?i:o[a]}(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){y(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}r?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return a(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+a(t)}get time(){return a(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=o(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&g()?(this.animation.timeline=t,i):e(this)}}class E{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){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return O(this.animations,"duration")}get iterationDuration(){return O(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function O(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class S extends E{then(t,e){return this.finished.finally(t).then(()=>{})}}const R=new WeakMap,F=(t,e="")=>`${t}:${e}`;function W(t){const e=R.get(t)||new Map;return R.set(t,e),e}function P(t,e){return t?.[e]??t?.default??t}const B=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"]);function $(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&B.has(e)&&(t[n]=t[n]+"px")}function L(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function V(t,e){const n=window.getComputedStyle(t);return y(e)?n.getPropertyValue(e):n[e]}const I=t=>Boolean(t&&t.getVelocity);function D(t,e,n,i){return"string"==typeof t&&function(t){return"object"==typeof t&&!Array.isArray(t)}(e)?L(t,0,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function N(t,e,n){return t*(e+1)}function C(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function K(t,n,i,s,o,a){!function(t,n,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>n&&o.at<i&&(e(t,o),s--)}}(t,o,a);for(let e=0;e<n.length;e++)t.push({value:n[e],at:u(o,a,s[e]),easing:r(i,e)})}function j(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function q(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function _(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function z(t,e){return e[t]||(e[t]=[]),e[t]}function H(t){return Array.isArray(t)?t:[t]}function X(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Y=t=>"number"==typeof t,G=t=>t.every(Y);function J(t,e,n,i){const s=L(t),a=s.length,r=[];for(let t=0;t<a;t++){const i=s[t],u={...n};"function"==typeof u.delay&&(u.delay=u.delay(t,a));for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const s={...P(u,t)};s.duration&&(s.duration=o(s.duration)),s.delay&&(s.delay=o(s.delay));const a=W(i),l=F(t,s.pseudoElement||""),h=a.get(l);h&&h.stop(),r.push({map:a,key:l,unresolvedKeyframes:n,options:{...s,element:i,name:t,allowFlatten:!u.type&&!u.ease}})}}for(let t=0;t<r.length;t++){const{unresolvedKeyframes:e,options:n}=r[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=V(i,s)),p(e),$(e,s),!o&&e.length<2&&e.unshift(V(i,s)),n.keyframes=e}const u=[];for(let t=0;t<r.length;t++){const{map:e,key:n,options:i}=r[t],s=new x(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),u.push(s)}return u}const Q=(()=>function(t,e,n){return new S(J(t,e,n))})();t.animate=Q,t.animateSequence=function(t,e){const n=[];return function(t,{defaultTransition:e={},...n}={},i,a){const u=e.duration||.3,l=new Map,d=new Map,m={},p=new Map;let y=0,g=0,A=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){p.set(i,g);continue}if(!Array.isArray(i)){p.set(i.name,C(g,i.at,y,p));continue}let[s,l,b={}]=i;void 0!==b.at&&(g=C(g,b.at,y,p));let T=0;const v=(t,n,i,s=0,l=0)=>{const d=H(t),{delay:m=0,times:p=f(d),type:y="keyframes",repeat:b,repeatType:v,repeatDelay:w=0,...M}=n;let{ease:x=e.ease||"easeOut",duration:E}=n;const O="function"==typeof m?m(s,l):m,S=d.length,R=k(y)?y:a?.[y||"keyframes"];if(S<=2&&R){let t=100;if(2===S&&G(d)){const e=d[1]-d[0];t=Math.abs(e)}const e={...M};void 0!==E&&(e.duration=o(E));const n=h(e,t,R);x=n.ease,E=n.duration}E??(E=u);const F=g+O;1===p.length&&0===p[0]&&(p[1]=1);const W=p.length-d.length;if(W>0&&c(p,W),1===d.length&&d.unshift(null),b){E=N(E,b);const t=[...d],e=[...p];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let i=0;i<b;i++){d.push(...t);for(let s=0;s<t.length;s++)p.push(e[s]+(i+1)),x.push(0===s?"linear":r(n,s-1))}j(p,b)}const P=F+E;K(i,d,x,p,F,P),T=Math.max(O+E,T),A=Math.max(P,A)};if(I(s))v(l,b,z("default",_(s,d)));else{const t=D(s,l,0,m),e=t.length;for(let n=0;n<e;n++){const i=_(t[n],d);for(const t in l)v(l[t],X(b,t),z(t,i),n,e)}}y=g,g+=T}return d.forEach((t,i)=>{for(const o in t){const a=t[o];a.sort(q);const r=[],u=[],h=[];for(let t=0;t<a.length;t++){const{at:e,value:n,easing:i}=a[t];r.push(n),u.push(s(0,A,e)),h.push(i||"easeOut")}0!==u[0]&&(u.unshift(0),r.unshift(r[0]),h.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),r.push(null)),l.has(i)||l.set(i,{keyframes:{},transition:{}});const c=l.get(i);c.keyframes[o]=r,c.transition[o]={...e,duration:A,ease:h,times:u,...n}}}),l}(t,e).forEach(({keyframes:t,transition:e},i)=>{n.push(...J(i,t,e))}),new S(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)}let n=()=>{};function i(t){let e;return()=>(void 0===e&&(e=t()),e)}"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(n=(t,e,n)=>{if(!t)throw new Error(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n))});const s=t=>t,o=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},a=t=>1e3*t,r=t=>t/1e3;function u(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,h=2e4;function c(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(function(t){let e=0,n=t.next(e);for(;!n.done&&e<h;)e+=50,n=t.next(e);return e>=h?1/0:e}(i),h);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:r(s)}}function f(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=o(0,e,i);t.push(l(n,1,s))}}function d(t){const e=[0];return f(e,t.length-1),e}const p=t=>null!==t;class m{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}function y(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const g=t=>t.startsWith("--");const A=i(()=>void 0!==window.ScrollTimeline),b={};function T(t,e){const n=i(t);return()=>b[e]??n()}const v=T(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),w=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,M={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:w([0,.65,.55,1]),circOut:w([.55,0,1,.45]),backIn:w([.31,.01,.66,-.59]),backOut:w([.33,1.53,.69,.99])};function k(t,e){return t?"function"==typeof t?v()?((t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`})(t,e):"ease-out":(t=>Array.isArray(t)&&"number"==typeof t[0])(t)?w(t):Array.isArray(t)?t.map(t=>k(t,e)||M.easeOut):M[t]:void 0}function x(t){return"function"==typeof t&&"applyToOptions"in t}class E extends m{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:i,keyframes:s,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:r,onComplete:u}=t;this.isPseudoElement=Boolean(o),this.allowFlatten=a,this.options=t,n("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return x(t)&&v()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:r="easeOut",times:u}={},l){const h={[e]:n};u&&(h.offset=u);const c=k(r,s);Array.isArray(c)&&(h.easing=c);const f={delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return l&&(f.pseudoElement=l),t.animate(h,f)}(e,i,s,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=function(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(p),a=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return a&&void 0!==i?i:o[a]}(s,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){g(e)?t.style.setProperty(e,n):t.style[e]=n}(e,i,t),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return r(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+r(t)}get time(){return r(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=a(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&A()?(this.animation.timeline=t,s):e(this)}}class O{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){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return R(this.animations,"duration")}get iterationDuration(){return R(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function R(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class S extends O{then(t,e){return this.finished.finally(t).then(()=>{})}}const F=new WeakMap,W=(t,e="")=>`${t}:${e}`;function B(t){const e=F.get(t)||new Map;return F.set(t,e),e}function P(t,e){return t?.[e]??t?.default??t}const $=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"]);function N(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&$.has(e)&&(t[n]=t[n]+"px")}function V(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function L(t,e){const n=window.getComputedStyle(t);return g(e)?n.getPropertyValue(e):n[e]}const D=t=>Boolean(t&&t.getVelocity);function I(t,e,n,i){return"string"==typeof t&&function(t){return"object"==typeof t&&!Array.isArray(t)}(e)?V(t,0,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:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function _(t,n,i,s,o,a){!function(t,n,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>n&&o.at<i&&(e(t,o),s--)}}(t,o,a);for(let e=0;e<n.length;e++)t.push({value:n[e],at:l(o,a,s[e]),easing:u(i,e)})}function j(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function q(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function z(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function H(t,e){return e[t]||(e[t]=[]),e[t]}function X(t){return Array.isArray(t)?t:[t]}function Y(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const G=t=>"number"==typeof t,J=t=>t.every(G);function Q(t,e,i,s){const o=V(t),r=o.length;n(Boolean(r),"No valid elements provided.","no-valid-elements");const u=[];for(let t=0;t<r;t++){const n=o[t],s={...i};"function"==typeof s.delay&&(s.delay=s.delay(t,r));for(const t in e){let i=e[t];Array.isArray(i)||(i=[i]);const o={...P(s,t)};o.duration&&(o.duration=a(o.duration)),o.delay&&(o.delay=a(o.delay));const r=B(n),l=W(t,o.pseudoElement||""),h=r.get(l);h&&h.stop(),u.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:n,name:t,allowFlatten:!s.type&&!s.ease}})}}for(let t=0;t<u.length;t++){const{unresolvedKeyframes:e,options:n}=u[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=L(i,s)),y(e),N(e,s),!o&&e.length<2&&e.unshift(L(i,s)),n.keyframes=e}const l=[];for(let t=0;t<u.length;t++){const{map:e,key:n,options:i}=u[t],s=new E(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}const U=(()=>function(t,e,n){return new S(Q(t,e,n))})();t.animate=U,t.animateSequence=function(t,e){const i=[];return function(t,{defaultTransition:e={},...i}={},s,r){const l=e.duration||.3,h=new Map,p=new Map,m={},y=new Map;let g=0,A=0,b=0;for(let i=0;i<t.length;i++){const s=t[i];if("string"==typeof s){y.set(s,A);continue}if(!Array.isArray(s)){y.set(s.name,K(A,s.at,g,y));continue}let[o,h,T={}]=s;void 0!==T.at&&(A=K(A,T.at,g,y));let v=0;const w=(t,i,s,o=0,h=0)=>{const p=X(t),{delay:m=0,times:y=d(p),type:g="keyframes",repeat:T,repeatType:w,repeatDelay:M=0,...k}=i;let{ease:E=e.ease||"easeOut",duration:O}=i;const R="function"==typeof m?m(o,h):m,S=p.length,F=x(g)?g:r?.[g||"keyframes"];if(S<=2&&F){let t=100;if(2===S&&J(p)){const e=p[1]-p[0];t=Math.abs(e)}const e={...k};void 0!==O&&(e.duration=a(O));const n=c(e,t,F);E=n.ease,O=n.duration}O??(O=l);const W=A+R;1===y.length&&0===y[0]&&(y[1]=1);const B=y.length-p.length;if(B>0&&f(y,B),1===p.length&&p.unshift(null),T){n(T<20,"Repeat count too high, must be less than 20","repeat-count-high"),O=C(O,T);const t=[...p],e=[...y];E=Array.isArray(E)?[...E]:[E];const i=[...E];for(let n=0;n<T;n++){p.push(...t);for(let s=0;s<t.length;s++)y.push(e[s]+(n+1)),E.push(0===s?"linear":u(i,s-1))}j(y,T)}const P=W+O;_(s,p,E,y,W,P),v=Math.max(R+O,v),b=Math.max(P,b)};if(D(o))w(h,T,H("default",z(o,p)));else{const t=I(o,h,0,m),e=t.length;for(let n=0;n<e;n++){const i=z(t[n],p);for(const t in h)w(h[t],Y(T,t),H(t,i),n,e)}}g=A,A+=v}return p.forEach((t,n)=>{for(const s in t){const a=t[s];a.sort(q);const r=[],u=[],l=[];for(let t=0;t<a.length;t++){const{at:e,value:n,easing:i}=a[t];r.push(n),u.push(o(0,b,e)),l.push(i||"easeOut")}0!==u[0]&&(u.unshift(0),r.unshift(r[0]),l.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),r.push(null)),h.has(n)||h.set(n,{keyframes:{},transition:{}});const c=h.get(n);c.keyframes[s]=r,c.transition[s]={...e,duration:b,ease:l,times:u,...i}}}),h}(t,e).forEach(({keyframes:t,transition:e},n)=>{i.push(...Q(n,t,e))}),new S(i)}});
|
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){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const s=(t,e,n)=>n>e?e:n<t?t:n;let r=()=>{};const i={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function a(t){return"object"==typeof t&&null!==t}const u=t=>/^0[^.\s]+$/u.test(t);function l(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class f{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(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 m=t=>1e3*t,g=t=>t/1e3;function y(t,e){return e?t*(1e3/e):0}const v=new Set;const w=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},b=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,s){if(t===e&&n===s)return c;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=b(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:b(r(t),e,s)}const x=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),V=T(.33,1.53,.69,.99),M=S(V),A=x(M),k=t=>(t*=2)<1?.5*M(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),P=S(E),C=x(E),O=T(.42,0,1,1),R=T(0,0,.58,1),F=T(.42,0,.58,1);const D=t=>Array.isArray(t)&&"number"!=typeof t[0];function B(t,e){return D(t)?t[w(0,t.length,e)]:t}const L=t=>Array.isArray(t)&&"number"==typeof t[0],I={linear:c,easeIn:O,easeInOut:F,easeOut:R,circIn:E,circInOut:C,circOut:P,backIn:M,backInOut:A,backOut:V,anticipate:k},W=t=>{if(L(t)){t.length;const[e,n,s,r]=t;return T(e,n,s,r)}return"string"==typeof t?I[t]:t},j=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],N={value:null,addProjectionMetrics:null};function $(t,e){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=j.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},u=0;function l(e){o.has(e)&&(c.schedule(e),t()),u++,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(l),e&&N.value&&N.value.frameloop[e].push(u),u=0,n.clear(),r=!1,i&&(i=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{setup:u,read:l,resolveKeyframes:c,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const o=i.useManualTiming?r.timestamp:performance.now();n=!1,i.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,u.process(r),l.process(r),c.process(r),h.process(r),d.process(r),p.process(r),f.process(r),m.process(r),r.isProcessing=!1,n&&e&&(s=!1,t(g))};return{schedule:j.reduce((e,i)=>{const o=a[i];return e[i]=(e,i=!1,a=!1)=>(n||(n=!0,s=!0,r.isProcessing||t(g)),o.schedule(e,i,a)),e},{}),cancel:t=>{for(let e=0;e<j.length;e++)a[j[e]].cancel(t)},state:r,steps:a}}const{schedule:K,cancel:U,state:Y,steps:z}=$("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let X;function H(){X=void 0}const G={now:()=>(void 0===X&&G.set(Y.isProcessing||i.useManualTiming?Y.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},Z={layout:0,mainThread:0,waapi:0},q=t=>e=>"string"==typeof e&&e.startsWith(t),_=q("--"),J=q("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt={...et,transform:t=>s(0,1,t)},st={...et,default:1},rt=t=>Math.round(1e5*t)/1e5,it=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ot=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,at=(t,e)=>n=>Boolean("string"==typeof n&&ot.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ut=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(it);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},lt={...et,transform:t=>Math.round((t=>s(0,255,t))(t))},ct={test:at("rgb","red"),parse:ut("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+lt.transform(t)+", "+lt.transform(e)+", "+lt.transform(n)+", "+rt(nt.transform(s))+")"};const ht={test:at("#"),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:ct.transform},dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=dt("deg"),ft=dt("%"),mt=dt("px"),gt=dt("vh"),yt=dt("vw"),vt=(()=>({...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(100*t)}))(),wt={test:at("hsl","hue"),parse:ut("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ft.transform(rt(e))+", "+ft.transform(rt(n))+", "+rt(nt.transform(s))+")"},bt={test:t=>ct.test(t)||ht.test(t)||wt.test(t),parse:t=>ct.test(t)?ct.parse(t):wt.test(t)?wt.parse(t):ht.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ct.transform(t):wt.transform(t),getAnimatableNone:t=>{const e=bt.parse(t);return e.alpha=0,bt.transform(e)}},Tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const xt="number",St="color",Vt=/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 Mt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Vt,t=>(bt.test(t)?(s.color.push(i),r.push(St),n.push(bt.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push(xt),n.push(parseFloat(t))),++i,"${}")).split("${}");return{values:n,split:o,indexes:s,types:r}}function At(t){return Mt(t).values}function kt(t){const{split:e,types:n}=Mt(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===xt?rt(t[i]):e===St?bt.transform(t[i]):t[i]}return r}}const Et=t=>"number"==typeof t?0:bt.test(t)?bt.getAnimatableNone(t):t;const Pt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(it)?.length||0)+(t.match(Tt)?.length||0)>0},parse:At,createTransformer:kt,getAnimatableNone:function(t){const e=At(t);return kt(t)(e.map(Et))}};function Ct(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 Ot({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=Ct(a,s,t+1/3),i=Ct(a,s,t),o=Ct(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 Rt(t,e){return n=>n>0?e:t}const Ft=(t,e,n)=>t+(e-t)*n,Dt=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Bt=[ht,ct,wt];function Lt(t){const e=(n=t,Bt.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===wt&&(s=Ot(s)),s}const It=(t,e)=>{const n=Lt(t),s=Lt(e);if(!n||!s)return Rt(t,e);const r={...n};return t=>(r.red=Dt(n.red,s.red,t),r.green=Dt(n.green,s.green,t),r.blue=Dt(n.blue,s.blue,t),r.alpha=Ft(n.alpha,s.alpha,t),ct.transform(r))},Wt=new Set(["none","hidden"]);function jt(t,e){return Wt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Nt(t,e){return n=>Ft(t,e,n)}function $t(t){return"number"==typeof t?Nt:"string"==typeof t?Q(t)?Rt:bt.test(t)?It:Yt:Array.isArray(t)?Kt:"object"==typeof t?bt.test(t)?It:Ut:Rt}function Kt(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>$t(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function Ut(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=$t(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Yt=(t,e)=>{const n=Pt.createTransformer(e),s=Mt(t),r=Mt(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?Wt.has(t)&&!r.values.length||Wt.has(e)&&!s.values.length?jt(t,e):d(Kt(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):Rt(t,e)};function zt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ft(t,e,n);return $t(t)(t,e)}const Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>K.update(e,t),stop:()=>U(e),now:()=>Y.isProcessing?Y.timestamp:G.now()}},Ht=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Gt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<Gt;)e+=50,n=t.next(e);return e>=Gt?1/0:e}function qt(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(Zt(s),Gt);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:g(r)}}function _t(t,e,n){const s=Math.max(e-5,0);return y(n-t(s),e-s)}const Jt=100,Qt=10,te=1,ee=0,ne=800,se=.3,re=.3,ie={granular:.01,default:2},oe={granular:.005,default:.5},ae=.01,ue=10,le=.05,ce=1,he=.001;function de({duration:t=ne,bounce:e=se,velocity:n=ee,mass:r=te}){let i,o,a=1-e;a=s(le,ce,a),t=s(ae,ue,g(t)),a<1?(i=e=>{const s=e*a,r=s*t,i=s-n,o=fe(e,a),u=Math.exp(-r);return he-i/o*u},o=e=>{const s=e*a*t,r=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),l=fe(Math.pow(e,2),a);return(-i(e)+he>0?-1:1)*((r-o)*u)/l}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<pe;n++)s-=t(s)/e(s);return s}(i,o,5/t);if(t=m(t),isNaN(u))return{stiffness:Jt,damping:Qt,duration:t};{const e=Math.pow(u,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}const pe=12;function fe(t,e){return t*Math.sqrt(1-e*e)}const me=["duration","bounce"],ge=["stiffness","damping","mass"];function ye(t,e){return e.some(e=>void 0!==t[e])}function ve(t=re,e=se){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:f}=function(t){let e={velocity:ee,stiffness:Jt,damping:Qt,mass:te,isResolvedFromDuration:!1,...t};if(!ye(t,ge)&&ye(t,me))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*s(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:te,stiffness:i,damping:o}}else{const n=de(t);e={...e,...n,mass:te},e.isResolvedFromDuration=!0}return e}({...n,velocity:-g(n.velocity||0)}),y=p||0,v=c/(2*Math.sqrt(l*h)),w=a-o,b=g(Math.sqrt(l/h)),T=Math.abs(w)<5;let x;if(r||(r=T?ie.granular:ie.default),i||(i=T?oe.granular:oe.default),v<1){const t=fe(b,v);x=e=>{const n=Math.exp(-v*b*e);return a-n*((y+v*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===v)x=t=>a-Math.exp(-b*t)*(w+(y+b*w)*t);else{const t=b*Math.sqrt(v*v-1);x=e=>{const n=Math.exp(-v*b*e),s=Math.min(t*e,300);return a-n*((y+v*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const S={calculatedDuration:f&&d||null,next:t=>{const e=x(t);if(f)u.done=t>=d;else{let n=0===t?y:0;v<1&&(n=0===t?m(y):_t(x,t,e));const s=Math.abs(n)<=r,o=Math.abs(a-e)<=i;u.done=s&&o}return u.value=u.done?a:e,u},toString:()=>{const t=Math.min(Zt(S),Gt),e=Ht(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function we({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;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)<=l,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(b=t,T=ve({keyframes:[d.value,p(d.value)],velocity:_t(v,t,d.value),damping:r,stiffness:i,restDelta:l,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)}}}function be(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const l=function(t,e,n){const s=[],r=n||i.mix||zt,o=t.length-1;for(let n=0;n<o;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||c:e;i=d(t,i)}s.push(i)}return s}(e,r,o),h=l.length,f=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=p(t[s],t[s+1],n);return l[s](r)};return n?e=>f(s(t[0],t[a-1],e)):f}function Te(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=p(0,e,s);t.push(Ft(n,1,r))}}function xe(t){const e=[0];return Te(e,t.length-1),e}function Se(t,e){return t.map(t=>t*e)}function Ve(t,e){return t.map(()=>e||F).splice(0,t.length-1)}function Me({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=D(s)?s.map(W):W(s),i={done:!1,value:e[0]},o=be(Se(n&&n.length===e.length?n:xe(e),t),e,{ease:Array.isArray(r)?r:Ve(e,r)});return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}ve.applyToOptions=t=>{const e=qt(t,100,ve);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};const Ae=t=>null!==t;function ke(t,{repeat:e,repeatType:n="loop"},s,r=1){const i=t.filter(Ae),o=r<0||e&&"loop"!==n&&e%2==1?0:i.length-1;return o&&void 0!==s?s:i[o]}const Ee={decay:we,inertia:we,tween:Me,keyframes:Me,spring:ve};function Pe(t){"string"==typeof t.type&&(t.type=Ee[t.type])}class Ce{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Oe=t=>t/100;class Re extends Ce{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},Z.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Pe(t);const{type:e=Me,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=t;let{keyframes:o}=t;const a=e||Me;a!==Me&&"number"!=typeof o[0]&&(this.mixKeyframes=d(Oe,zt(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=Zt(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let w=this.currentTime,b=n;if(h){const t=Math.min(this.currentTime,r)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(b=o)),w=s(0,1,n)*a}const T=v?{done:!1,value:c[0]}:b.next(w);i&&(T.value=i(T.value));let{done:x}=T;v||null===u||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&f!==we&&(T.value=ke(c,this.options,g,this.speed)),m&&m(T.value),S&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return g(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+g(t)}get time(){return g(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=g(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,Z.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Fe(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const De=t=>180*t/Math.PI,Be=t=>{const e=De(Math.atan2(t[1],t[0]));return Ie(e)},Le={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Be,rotateZ:Be,skewX:t=>De(Math.atan(t[1])),skewY:t=>De(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),We=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),je=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:We,scaleY:je,scale:t=>(We(t)+je(t))/2,rotateX:t=>Ie(De(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(De(Math.atan2(-t[2],t[0]))),rotateZ:Be,rotate:Be,skewX:t=>De(Math.atan(t[4])),skewY:t=>De(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $e(t){return t.includes("scale")?1:0}function Ke(t,e){if(!t||"none"===t)return $e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Ne,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Le,r=e}if(!r)return $e(e);const i=s[e],o=r[1].split(",").map(Ye);return"function"==typeof i?i(o):o[i]}const Ue=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ke(n,e)};function Ye(t){return parseFloat(t.trim())}const ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xe=(()=>new Set(ze))(),He=t=>t===et||t===mt,Ge=new Set(["x","y","z"]),Ze=ze.filter(t=>!Ge.has(t));const qe={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})=>Ke(e,"x"),y:(t,{transform:e})=>Ke(e,"y")};qe.translateX=qe.x,qe.translateY=qe.y;const _e=new Set;let Je=!1,Qe=!1,tn=!1;function en(){if(Qe){const t=Array.from(_e).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 Ze.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)})}Qe=!1,Je=!1,_e.forEach(t=>t.complete(tn)),_e.clear()}function nn(){_e.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Qe=!0)})}function sn(){tn=!0,nn(),en(),tn=!1}class rn{constructor(t,e,n,s,r,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(_e.add(this),Je||(Je=!0,K.read(nn),K.resolveKeyframes(en))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;if(null===t[0]){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])}Fe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),_e.delete(this)}cancel(){"scheduled"===this.state&&(_e.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const on=t=>t.startsWith("--");function an(t,e,n){on(e)?t.style.setProperty(e,n):t.style[e]=n}const un=l(()=>void 0!==window.ScrollTimeline),ln={};function cn(t,e){const n=l(t);return()=>ln[e]??n()}const hn=cn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),dn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,pn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dn([0,.65,.55,1]),circOut:dn([.55,0,1,.45]),backIn:dn([.31,.01,.66,-.59]),backOut:dn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t?hn()?Ht(t,e):"ease-out":L(t)?dn(t):Array.isArray(t)?t.map(t=>fn(t,e)||pn.easeOut):pn[t]:void 0}function mn(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=fn(a,r);Array.isArray(h)&&(c.easing=h),N.value&&Z.waapi++;const d={delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"};l&&(d.pseudoElement=l);const p=t.animate(c,d);return N.value&&p.finished.finally(()=>{Z.waapi--}),p}function gn(t){return"function"==typeof t&&"applyToOptions"in t}function yn({type:t,...e}){return gn(t)&&hn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class vn extends Ce{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:s,pseudoElement:r,allowFlatten:i=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=i,this.options=t,t.type;const u=yn(t);this.animation=mn(e,n,s,u,r),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=ke(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):an(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return g(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+g(t)}get time(){return g(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=m(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&un()?(this.animation.timeline=t,c):e(this)}}const wn={anticipate:k,backInOut:A,circInOut:C};function bn(t){"string"==typeof t.ease&&t.ease in wn&&(t.ease=wn[t.ease])}class Tn extends vn{constructor(t){bn(t),Pe(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:r,...i}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new Re({...i,autoplay:!1}),a=m(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const xn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Pt.test(t)&&"0"!==t||t.startsWith("url(")));function Sn(t){t.duration=0,t.type="keyframes"}const Vn=new Set(["opacity","clipPath","filter","transform"]),Mn=l(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function An(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return Mn()&&n&&Vn.has(n)&&("transform"!==n||!l)&&!u&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}class kn extends Ce{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",keyframes:o,name:a,motionValue:u,element:l,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,name:a,motionValue:u,element:l,...c},d=l?.KeyframeResolver||rn;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:l,onUpdate:h}=n;this.resolvedAt=G.now(),function(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=xn(r,e),a=xn(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||gn(n))&&s)}(t,r,o,a)||(!i.instantAnimations&&u||h?.(ke(t,n,e)),t[0]=t[t.length-1],Sn(n),n.repeat=0);const d={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},p=!l&&An(d)?new Tn({...d,element:d.motionValue.owner.current}):new Re(d);p.finished.then(()=>this.notifyFinished()).catch(c),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class En{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){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Pn(this.animations,"duration")}get iterationDuration(){return Pn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Pn(t,e){let n=0;for(let s=0;s<t.length;s++){const r=t[s][e];null!==r&&r>n&&(n=r)}return n}class Cn extends En{then(t,e){return this.finished.finally(t).then(()=>{})}}class On extends vn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Rn=new WeakMap,Fn=(t,e="")=>`${t}:${e}`;function Dn(t){const e=Rn.get(t)||new Map;return Rn.set(t,e),e}const Bn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ln(t){const e=Bn.exec(t);if(!e)return[,];const[,n,s,r]=e;return[`--${n??s}`,r]}function In(t,e,n=1){const[s,r]=Ln(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return o(t)?parseFloat(t):t}return Q(r)?In(r,e,n+1):r}function Wn(t,e){return t?.[e]??t?.default??t}const jn=new Set(["width","height","top","left","right","bottom",...ze]),Nn=t=>e=>e.test(t),$n=[et,mt,ft,pt,yt,gt,{test:t=>"auto"===t,parse:t=>t}],Kn=t=>$n.find(Nn(t));function Un(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||u(t))}const Yn=new Set(["brightness","contrast","saturate","opacity"]);function zn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(it)||[];if(!s)return t;const r=n.replace(s,"");let i=Yn.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Xn=/\b([a-z-]*)\(.*?\)/gu,Hn={...Pt,getAnimatableNone:t=>{const e=t.match(Xn);return e?e.map(zn).join(" "):t}},Gn={...et,transform:Math.round},Zn={rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:pt,skewX:pt,skewY:pt,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:nt,originX:vt,originY:vt,originZ:mt},qn={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,backgroundPositionX:mt,backgroundPositionY:mt,...Zn,zIndex:Gn,fillOpacity:nt,strokeOpacity:nt,numOctaves:Gn},_n={...qn,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Hn,WebkitFilter:Hn},Jn=t=>_n[t];function Qn(t,e){let n=Jn(t);return n!==Hn&&(n=Pt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ts=new Set(["auto","none","0"]);class es extends rn{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(),Q(s))){const r=In(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!jn.has(n)||2!==t.length)return;const[s,r]=t,i=Kn(s),o=Kn(r);if(i!==o)if(He(i)&&He(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else qe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Un(t[e]))&&n.push(e);n.length&&function(t,e,n){let s,r=0;for(;r<t.length&&!s;){const e=t[r];"string"==typeof e&&!ts.has(e)&&Mt(e).values.length&&(s=t[r]),r++}if(s&&n)for(const r of e)t[r]=Qn(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=qe[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]=qe[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 ns=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"]);function ss(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ns.has(e)&&(t[n]=t[n]+"px")}const rs=l(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),is=new Set(["opacity","clipPath","filter","transform"]);function os(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 as(t){return(e,n)=>{const s=os(e),r=[];for(const e of s){const s=t(e,n);r.push(s)}return()=>{for(const t of r)t()}}}const us=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ls{constructor(){this.latest={},this.values=new Map}set(t,e,n,s,r=!0){const i=this.values.get(t);i&&i.onRemove();const o=()=>{const s=e.get();this.latest[t]=r?us(s,qn[t]):s,n&&K.render(n)};o();const a=e.on("change",o);s&&e.addDependent(s);const u=()=>{a(),n&&U(n),this.values.delete(t),s&&e.removeDependent(s)};return this.values.set(t,{value:e,onRemove:u}),u}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function cs(t){const e=new WeakMap,n=[];return(s,r)=>{const i=e.get(s)??new ls;e.set(s,i);for(const e in r){const o=r[e],a=t(s,i,e,o);n.push(a)}return()=>{for(const t of n)t()}}}const hs=(t,e,n,s)=>{const r=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),i=r?n:n.startsWith("data")||n.startsWith("aria")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const o=r?()=>{t[i]=e.latest[n]}:()=>{const s=e.latest[n];null==s?t.removeAttribute(i):t.setAttribute(i,String(s))};return e.set(n,s,o)},ds=as(cs(hs)),ps=cs((t,e,n,s)=>e.set(n,s,()=>{t[n]=e.latest[n]},void 0,!1));function fs(t){return a(t)&&"offsetHeight"in t}const ms={current:void 0};class gs{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.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 f);const n=this.events[t].add(e);return"change"===t?()=>{n(),K.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ms.current&&ms.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ys(t,e){return new gs(t,e)}const vs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const ws=new Set(["originX","originY","originZ"]),bs=(t,e,n,s)=>{let r,i;return Xe.has(n)?(e.get("transform")||(fs(t)||e.get("transformBox")||bs(t,e,"transformBox",new gs("fill-box")),e.set("transform",new gs("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let s=0;s<ze.length;s++){const r=ze[s],i=t.latest[r];if(void 0===i)continue;let o=!0;o="number"==typeof i?i===(r.startsWith("scale")?1:0):0===parseFloat(i),o||(n=!1,e+=`${vs[r]||r}(${t.latest[r]}) `)}return n?"none":e.trim()}(e)})),i=e.get("transform")):ws.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new gs(""),()=>{const n=e.latest.originX??"50%",s=e.latest.originY??"50%",r=e.latest.originZ??0;t.style.transformOrigin=`${n} ${s} ${r}`}),i=e.get("transformOrigin")):r=on(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,s,r,i)},Ts=as(cs(bs)),xs=mt.transform;const Ss=as(cs((t,e,n,s)=>{if(n.startsWith("path"))return function(t,e,n,s){return K.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,s,()=>t.setAttribute("stroke-dashoffset",xs(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new gs("1 1"),()=>{const{pathLength:n=1,pathSpacing:s}=e.latest;t.setAttribute("stroke-dasharray",`${xs(n)} ${xs(s??1-Number(n))}`)}),e.set(n,s,void 0,e.get("stroke-dasharray")))}(t,e,n,s);if(n.startsWith("attr"))return hs(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),s);return(n in t.style?bs:hs)(t,e,n,s)}));const{schedule:Vs,cancel:Ms}=$(queueMicrotask,!1),As={x:!1,y:!1};function ks(){return As.x||As.y}function Es(t,e){const n=os(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function Ps(t){return!("touch"===t.pointerType||ks())}const Cs=(t,e)=>!!e&&(t===e||Cs(t,e.parentElement)),Os=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Rs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Fs=new WeakSet;function Ds(t){return e=>{"Enter"===e.key&&t(e)}}function Bs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ls(t){return Os(t)&&!ks()}function Is(t,e){const n=window.getComputedStyle(t);return on(e)?n.getPropertyValue(e):n[e]}function Ws(t){return a(t)&&"ownerSVGElement"in t}const js=new WeakMap;let Ns;const $s=(t,e,n)=>(s,r)=>r&&r[0]?r[0][t+"Size"]:Ws(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ks=$s("inline","width","offsetWidth"),Us=$s("block","height","offsetHeight");function Ys({target:t,borderBoxSize:e}){js.get(t)?.forEach(n=>{n(t,{get width(){return Ks(t,e)},get height(){return Us(t,e)}})})}function zs(t){t.forEach(Ys)}function Xs(t,e){Ns||"undefined"!=typeof ResizeObserver&&(Ns=new ResizeObserver(zs));const n=os(t);return n.forEach(t=>{let n=js.get(t);n||(n=new Set,js.set(t,n)),n.add(e),Ns?.observe(t)}),()=>{n.forEach(t=>{const n=js.get(t);n?.delete(e),n?.size||Ns?.unobserve(t)})}}const Hs=new Set;let Gs;function Zs(t){return Hs.add(t),Gs||(Gs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Hs.forEach(e=>e(t))},window.addEventListener("resize",Gs)),()=>{Hs.delete(t),Hs.size||"function"!=typeof Gs||(window.removeEventListener("resize",Gs),Gs=void 0)}}function qs(t,e){return"function"==typeof t?Zs(t):Xs(t,e)}function _s(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return K.preUpdate(s,!0),()=>U(s)}function Js(){const{value:t}=N;null!==t?(t.frameloop.rate.push(Y.delta),t.animations.mainThread.push(Z.mainThread),t.animations.waapi.push(Z.waapi),t.animations.layout.push(Z.layout)):U(Js)}function Qs(t){return t.reduce((t,e)=>t+e,0)/t.length}function tr(t,e=Qs){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const er=t=>Math.round(1e3/t);function nr(){N.value=null,N.addProjectionMetrics=null}function sr(){const{value:t}=N;if(!t)throw new Error("Stats are not being measured");nr(),U(Js);const e={frameloop:{setup:tr(t.frameloop.setup),rate:tr(t.frameloop.rate),read:tr(t.frameloop.read),resolveKeyframes:tr(t.frameloop.resolveKeyframes),preUpdate:tr(t.frameloop.preUpdate),update:tr(t.frameloop.update),preRender:tr(t.frameloop.preRender),render:tr(t.frameloop.render),postRender:tr(t.frameloop.postRender)},animations:{mainThread:tr(t.animations.mainThread),waapi:tr(t.animations.waapi),layout:tr(t.animations.layout)},layoutProjection:{nodes:tr(t.layoutProjection.nodes),calculatedTargetDeltas:tr(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:tr(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=er(n.min),n.max=er(n.max),n.avg=er(n.avg),[n.min,n.max]=[n.max,n.min],e}function rr(t){return Ws(t)&&"svg"===t.tagName}function ir(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function or(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=be(t[1+n],t[2+n],t[3+n]);return e?r(s):r}function ar(t){const e=[];ms.current=e;const n=t();ms.current=void 0;const s=ys(n);return function(t,e,n){const s=()=>e.set(n()),r=()=>K.preRender(s,!1,!0),i=t.map(t=>t.on("change",r));e.on("destroy",()=>{i.forEach(t=>t()),U(s)})}(e,s,t),s}const ur=t=>Boolean(t&&t.getVelocity);function lr(t,e,n){const s=t.get();let r,i=null,o=s;const a="string"==typeof s?s.replace(/[\d.-]/g,""):void 0,u=()=>{i&&(i.stop(),i=null)},l=()=>{u(),i=new Re({keyframes:[hr(t.get()),hr(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:r})};if(t.attach((t,e)=>{o=t,r=t=>e(cr(t,a)),K.postRender(l)},u),ur(e)){const n=e.on("change",e=>t.set(cr(e,a))),s=t.on("destroy",n);return()=>{n(),s()}}return u}function cr(t,e){return e?t+e:t}function hr(t){return"number"==typeof t?t:parseFloat(t)}const dr=[...$n,bt,Pt],pr=t=>dr.find(Nn(t));function fr(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let mr={},gr=null;const yr=(t,e)=>{mr[t]=e},vr=()=>{gr||(gr=document.createElement("style"),gr.id="motion-view");let t="";for(const e in mr){const n=mr[e];t+=`${e} {\n`;for(const[e,s]of Object.entries(n))t+=` ${e}: ${s};\n`;t+="}\n"}gr.textContent=t,document.head.appendChild(gr),mr={}},wr=()=>{gr&&gr.parentElement&&gr.parentElement.removeChild(gr)};function br(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Tr(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function xr(){return document.getAnimations().filter(Tr)}const Sr=["layout","enter","exit","new","old"];function Vr(t){const{update:e,targets:n,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new En([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||yr(":root",{"view-transition-name":"none"}),yr("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),vr();const r=document.startViewTransition(async()=>{await e()});return r.finished.finally(()=>{wr()}),new Promise(t=>{r.ready.then(()=>{const e=xr(),r=[];n.forEach((t,e)=>{for(const n of Sr){if(!t[n])continue;const{keyframes:i,options:o}=t[n];for(let[t,a]of Object.entries(i)){if(!a)continue;const i={...Wn(s,t),...Wn(o,t)},u=fr(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===u?0:1,a]}"function"==typeof i.delay&&(i.delay=i.delay(0,1)),i.duration&&(i.duration=m(i.duration)),i.delay&&(i.delay=m(i.delay));const l=new vn({...i,element:document.documentElement,name:t,pseudoElement:`::view-transition-${u}(${e})`,keyframes:a});r.push(l)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:i}=e;if(!i)continue;const o=br(i);if(!o)continue;const a=n.get(o.layer);if(a)Mr(a,"enter")&&Mr(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?r.push(new On(t)):t.cancel();else{const n="group"===o.type?"layout":"";let i={...Wn(s,n)};i.duration&&(i.duration=m(i.duration)),i=yn(i);const a=fn(i.ease,i.duration);e.updateTiming({delay:m(i.delay??0),duration:i.duration,easing:a}),r.push(new On(t))}}t(new En(r))})})}function Mr(t,e){return t?.[e]?.keyframes.opacity}let Ar=[],kr=null;function Er(){kr=null;const[t]=Ar;var e;t&&(n(Ar,e=t),kr=e,Vr(e).then(t=>{e.notifyReady(t),t.finished.finally(Er)}))}function Pr(){for(let t=Ar.length-1;t>=0;t--){const e=Ar[t],{interrupt:n}=e.options;if("immediate"===n){const n=Ar.slice(0,t+1).map(t=>t.update),s=Ar.slice(t+1);e.update=()=>{n.forEach(t=>t())},Ar=[e,...s];break}}kr&&"immediate"!==Ar[0]?.options.interrupt||Er()}class Cr{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=c,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Ar.push(n),Vs.render(Pr)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:s,targets:r}=this;r.has(s)||r.set(s,{});r.get(s)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Or=K,Rr=j.reduce((t,e)=>(t[e]=t=>U(t),t),{});function Fr(t){return"object"==typeof t&&!Array.isArray(t)}function Dr(t,e,n,s){return"string"==typeof t&&Fr(e)?os(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Br(t,e,n){return t*(e+1)}function Lr(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}function Ir(t,e,s,r,i,o){!function(t,e,s){for(let r=0;r<t.length;r++){const i=t[r];i.at>e&&i.at<s&&(n(t,i),r--)}}(t,i,o);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Ft(i,o,r[n]),easing:B(s,n)})}function Wr(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function jr(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Nr(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function $r(t,e){return e[t]||(e[t]=[]),e[t]}function Kr(t){return Array.isArray(t)?t:[t]}function Ur(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Yr=t=>"number"==typeof t,zr=t=>t.every(Yr),Xr=new WeakMap;function Hr(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Gr(t,e,n,s){if("function"==typeof e){const[r,i]=Hr(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]=Hr(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function Zr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ys(n))}function qr(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function _r(t,e){const n=function(t,e){const n=t.getProps();return Gr(n,e,n.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){Zr(t,e,qr(i[e]))}}function Jr(t,e){const n=t.getValue("willChange");if(s=n,Boolean(ur(s)&&s.add))return n.add(e);if(!n&&i.WillChange){const n=new i.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}const Qr=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ti="data-"+Qr("framerAppearId");function ei(t){return t.props[ti]}const ni=t=>null!==t;const si={type:"spring",stiffness:500,damping:25,restSpeed:10},ri={type:"keyframes",duration:.8},ii={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oi=(t,{keyframes:e})=>e.length>2?ri:Xe.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:si:ii;const ai=(t,e,n,s={},r,o)=>a=>{const u=Wn(s,t)||{},l=u.delay||s.delay||0;let{elapsed:c=0}=s;c-=m(l);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-c,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{a(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length})(u)||Object.assign(h,oi(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Sn(h),0===h.delay&&(d=!0)),(i.instantAnimations||i.skipAnimations)&&(d=!0,Sn(h),h.delay=0),h.allowFlatten=!u.type&&!u.ease,d&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(ni),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}(h.keyframes,u);if(void 0!==t)return void K.update(()=>{h.onUpdate(t),h.onComplete()})}return u.isSync?new Re(h):new kn(h)};function ui({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function li(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(i=s);const u=[],l=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||l&&ui(l,e))continue;const o={delay:n,...Wn(i||{},e)},c=s.get();if(void 0!==c&&!s.isAnimating&&!Array.isArray(r)&&r===c&&!o.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=ei(t);if(n){const t=window.MotionHandoffAnimation(n,e,K);null!==t&&(o.startTime=t,h=!0)}}Jr(t,e),s.start(ai(e,s,r,t.shouldReduceMotion&&jn.has(e)?{type:!1}:o,t,h));const d=s.animation;d&&u.push(d)}return o&&Promise.all(u).then(()=>{K.update(()=>{o&&_r(t,o)})}),u}const ci={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"]},hi={};for(const t in ci)hi[t]={isEnabled:e=>ci[t].some(t=>!!e[t])};const di=()=>({x:{min:0,max:0},y:{min:0,max:0}}),pi="undefined"!=typeof window,fi={current:null},mi={current:!1};const gi=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function yi(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||gi.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const vi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class wi{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=rn,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=G.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,K.render(this.render,!1,!0))};const{latestValues:a,renderState:u}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=u,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=yi(e),this.isVariantNode=function(t){return Boolean(yi(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ur(e)&&e.set(a[t])}}mount(t){this.current=t,Xr.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)),mi.current||function(){if(mi.current=!0,pi)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fi.current=t.matches;t.addEventListener("change",e),e()}else fi.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||fi.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),U(this.notifyUpdate),U(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Xe.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&K.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),r&&r(),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 hi){const e=hi[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<vi.length;e++){const n=vi[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(ur(r))t.addValue(s,r);else if(ur(i))t.addValue(s,ys(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,ys(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()}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=ys(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];return null!=n&&("string"==typeof n&&(o(n)||u(n))?n=parseFloat(n):!pr(n)&&Pt.test(e)&&(n=Qn(t,e)),this.setBaseTarget(t,ur(n)?n.get():n)),ur(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=Gr(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||ur(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 f),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Vs.render(this.render)}}class bi extends wi{constructor(){super(...arguments),this.KeyframeResolver=es}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;ur(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const Ti={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xi=ze.length;function Si(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(Xe.has(t))o=!0;else if(_(t))r[t]=n;else{const e=us(n,qn[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<xi;i++){const o=ze[i],a=t[o];if(void 0===a)continue;let u=!0;if(u="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!u||n){const t=us(a,qn[o]);u||(r=!1,s+=`${Ti[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}`}}function Vi(t,{style:e,vars:n},s,r){const i=t.style;let o;for(o in e)i[o]=e[o];for(o in r?.applyProjectionStyles(i,s),n)i.setProperty(o,n[o])}function Mi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ai={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!mt.test(t))return t;t=parseFloat(t)}return`${Mi(t,e.target.x)}% ${Mi(t,e.target.y)}%`}},ki={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,r=Pt.parse(t);if(r.length>5)return s;const i=Pt.createTransformer(t),o="number"!=typeof r[0]?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;r[0+o]/=a,r[1+o]/=u;const l=Ft(a,u,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}},Ei={borderRadius:{...Ai,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ai,borderTopRightRadius:Ai,borderBottomLeftRadius:Ai,borderBottomRightRadius:Ai,boxShadow:ki};function Pi(t,{layout:e,layoutId:n}){return Xe.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ei[t]||"opacity"===t)}function Ci(t,e,n){const{style:s}=t,r={};for(const i in s)(ur(s[i])||e.style&&ur(e.style[i])||Pi(i,t)||void 0!==n?.getValue(i)?.liveStyle)&&(r[i]=s[i]);return r}class Oi extends bi{constructor(){super(...arguments),this.type="html",this.renderInstance=Vi}readValueFromInstance(t,e){if(Xe.has(e))return this.projection?.isProjecting?$e(e):Ue(t,e);{const s=(n=t,window.getComputedStyle(n)),r=(_(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){Si(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ci(t,e,n)}}class Ri extends wi{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}}const Fi={offset:"stroke-dashoffset",array:"stroke-dasharray"},Di={offset:"strokeDashoffset",array:"strokeDasharray"};function Bi(t,{attrX:e,attrY:n,attrScale:s,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...a},u,l,c){if(Si(t,a,l),u)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==s&&(h.scale=s),void 0!==r&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Fi:Di;t[i.offset]=mt.transform(-s);const o=mt.transform(e),a=mt.transform(n);t[i.array]=`${o} ${a}`}(h,r,i,o,!1)}const Li=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"]);class Ii extends bi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=di}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Xe.has(e)){const t=Jn(e);return t&&t.default||0}return e=Li.has(e)?e:Qr(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Ci(t,e,n);for(const n in t)(ur(t[n])||ur(e[n]))&&(s[-1!==ze.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}build(t,e,n){Bi(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,s){!function(t,e,n,s){Vi(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Li.has(n)?n:Qr(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)}}function Wi(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ws(t)&&!rr(t)?new Ii(e):new Oi(e);n.mount(t),Xr.set(t,n)}function ji(t){const e=new Ri({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Xr.set(t,e)}function Ni(t,e,n,s){const r=[];if(function(t,e){return ur(t)||"number"==typeof t||"string"==typeof t&&!Fr(e)}(t,e))r.push(function(t,e,n){const s=ur(t)?t:ys(t);return s.start(ai("",s,e,n)),s.animation}(t,Fr(e)&&e.default||e,n&&n.default||n));else{const i=Dr(t,e,s),o=i.length;for(let t=0;t<o;t++){const s=i[t],a=s instanceof Element?Wi:ji;Xr.has(s)||a(s);const u=Xr.get(s),l={...n};"delay"in l&&"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...li(u,{...e,transition:l},{}))}}return r}function $i(t,e,n){const s=[],r=function(t,{defaultTransition:e={},...n}={},s,r){const i=e.duration||.3,o=new Map,a=new Map,u={},l=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,h);continue}if(!Array.isArray(o)){l.set(o.name,Lr(h,o.at,c,l));continue}let[p,f,g={}]=o;void 0!==g.at&&(h=Lr(h,g.at,c,l));let y=0;const v=(t,n,s,o=0,a=0)=>{const u=Kr(t),{delay:l=0,times:c=xe(u),type:p="keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof l?l(o,a):l,S=u.length,V=gn(p)?p:r?.[p||"keyframes"];if(S<=2&&V){let t=100;if(2===S&&zr(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=m(T));const n=qt(e,t,V);b=n.ease,T=n.duration}T??(T=i);const M=h+x;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-u.length;if(A>0&&Te(c,A),1===u.length&&u.unshift(null),f){T=Br(T,f);const t=[...u],e=[...c];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s<f;s++){u.push(...t);for(let r=0;r<t.length;r++)c.push(e[r]+(s+1)),b.push(0===r?"linear":B(n,r-1))}Wr(c,f)}const k=M+T;Ir(s,u,b,c,M,k),y=Math.max(x+T,y),d=Math.max(k,d)};if(ur(p))v(f,g,$r("default",Nr(p,a)));else{const t=Dr(p,f,s,u),e=t.length;for(let n=0;n<e;n++){const s=Nr(t[n],a);for(const t in f)v(f[t],Ur(g,t),$r(t,s),n,e)}}c=h,h+=y}return a.forEach((t,s)=>{for(const r in t){const i=t[r];i.sort(jr);const a=[],u=[],l=[];for(let t=0;t<i.length;t++){const{at:e,value:n,easing:s}=i[t];a.push(n),u.push(p(0,d,e)),l.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),l.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const c=o.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:d,ease:l,times:u,...n}}}),o}(t,e,n,{spring:ve});return r.forEach(({keyframes:t,transition:e},n)=>{s.push(...Ni(n,t,e))}),s}function Ki(t){return function(e,s,r){let i,o=[];if(a=e,Array.isArray(a)&&a.some(Array.isArray))o=$i(e,s,t);else{const{onComplete:n,...a}=r||{};"function"==typeof n&&(i=n),o=Ni(e,s,a,t)}var a;const u=new Cn(o);return i&&u.finished.then(i),t&&(t.animations.push(u),u.finished.then(()=>{n(t.animations,u)})),u}}const Ui=Ki();const Yi=t=>function(e,n,s){return new Cn(function(t,e,n,s){const r=os(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){let n=e[t];Array.isArray(n)||(n=[n]);const r={...Wn(a,t)};r.duration&&(r.duration=m(r.duration)),r.delay&&(r.delay=m(r.delay));const i=Dn(s),u=Fn(t,r.pseudoElement||""),l=i.get(u);l&&l.stop(),o.push({map:i,key:u,unresolvedKeyframes:n,options:{...r,element:s,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<o.length;t++){const{unresolvedKeyframes:e,options:n}=o[t],{element:s,name:r,pseudoElement:i}=n;i||null!==e[0]||(e[0]=Is(s,r)),Fe(e),ss(e,r),!i&&e.length<2&&e.unshift(Is(s,r)),n.keyframes=e}const a=[];for(let t=0;t<o.length;t++){const{map:e,key:n,options:s}=o[t],r=new vn(s);e.set(n,r),r.finished.finally(()=>e.delete(n)),a.push(r)}return a}(e,n,s,t))},zi=Yi(),Xi={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Hi(t,e,n,s){const r=n[e],{length:i,position:o}=Xi[e],a=r.current,u=n.time;r.current=t[`scroll${o}`],r.scrollLength=t[`scroll${i}`]-t[`client${i}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=p(0,r.scrollLength,r.current);const l=s-u;r.velocity=l>50?0:y(r.current-a,l)}const Gi={start:0,center:.5,end:1};function Zi(t,e,n=0){let s=0;if(t in Gi&&(t=Gi[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 qi=[0,0];function _i(t,e,n,s){let r=Array.isArray(t)?t:qi,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Gi[t]?t:"0"]),i=Zi(r[0],n,s),o=Zi(r[1],e),i-o}const Ji={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Qi={x:0,y:0};function to(t,e,n){const{offset:r=Ji.All}=n,{target:i=t,axis:o="y"}=n,a="y"===o?"height":"width",u=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(fs(s))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}(i,t):Qi,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let h=!e[o].interpolate;const d=r.length;for(let t=0;t<d;t++){const n=_i(r[t],c[a],l[a],u[o]);h||n===e[o].interpolatorOffsets[t]||(h=!0),e[o].offset[t]=n}h&&(e[o].interpolate=be(e[o].offset,xe(r),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=s(0,1,e[o].interpolate(e[o].current))}function eo(t,e,n,s={}){return{measure:e=>{!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),function(t,e,n){Hi(t,"x",e,n),Hi(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&to(t,n,s)},notify:()=>e(n)}}const no=new WeakMap,so=new WeakMap,ro=new WeakMap,io=t=>t===document.scrollingElement?window:t;function oo(t,{container:e=document.scrollingElement,...n}={}){if(!e)return c;let s=ro.get(e);s||(s=new Set,ro.set(e,s));const r=eo(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),!no.has(e)){const t=()=>{for(const t of s)t.measure(Y.timestamp);K.preUpdate(n)},n=()=>{for(const t of s)t.notify()},r=()=>K.read(t);no.set(e,r);const i=io(e);window.addEventListener("resize",r,{passive:!0}),e!==document.documentElement&&so.set(e,qs(e,r)),i.addEventListener("scroll",r,{passive:!0}),r()}const i=no.get(e);return K.read(i,!1,!0),()=>{U(i);const t=ro.get(e);if(!t)return;if(t.delete(r),t.size)return;const n=no.get(e);no.delete(e),n&&(io(e).removeEventListener("scroll",n),so.get(e)?.(),window.removeEventListener("resize",n))}}const ao=new Map;function uo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const r=ao.get(e)??new Map;ao.set(e,r);const i=n.target??"self",o=r.get(i)??{},a=s+(n.offset??[]).join(",");return o[a]||(o[a]=!n.target&&un()?new ScrollTimeline({source:e,axis:s}):function(t){const e={value:0},n=oo(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),o[a]}const lo={some:0,all:1};const co=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=kn,t.DOMKeyframesResolver=es,t.GroupAnimation=En,t.GroupAnimationWithThen=Cn,t.JSAnimation=Re,t.KeyframeResolver=rn,t.MotionGlobalConfig=i,t.MotionValue=gs,t.NativeAnimation=vn,t.NativeAnimationExtended=Tn,t.NativeAnimationWrapper=On,t.SubscriptionManager=f,t.ViewTransitionBuilder=Cr,t.acceleratedValues=is,t.activeAnimations=Z,t.addAttrValue=hs,t.addStyleValue=bs,t.addUniqueItem=e,t.alpha=nt,t.analyseComplexValue=Mt,t.animate=Ui,t.animateMini=zi,t.animateValue=function(t){return new Re(t)},t.animateView=function(t,e={}){return new Cr(t,e)},t.animationMapKey=Fn,t.anticipate=k,t.applyGeneratorOptions=yn,t.applyPxDefaults=ss,t.attachSpring=lr,t.attrEffect=ds,t.backIn=M,t.backInOut=A,t.backOut=V,t.calcGeneratorDuration=Zt,t.cancelFrame=U,t.cancelMicrotask=Ms,t.cancelSync=Rr,t.circIn=E,t.circInOut=C,t.circOut=P,t.clamp=s,t.collectMotionValues=ms,t.color=bt,t.complex=Pt,t.convertOffsetToTimes=Se,t.createGeneratorEasing=qt,t.createRenderBatcher=$,t.createScopedAnimate=Ki,t.cubicBezier=T,t.cubicBezierAsString=dn,t.defaultEasing=Ve,t.defaultOffset=xe,t.defaultTransformValue=$e,t.defaultValueTypes=_n,t.degrees=pt,t.delay=function(t,e){return function(t,e){const n=G.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(U(s),t(i-e))};return K.setup(s,!0),()=>U(s)}(t,m(e))},t.dimensionValueTypes=$n,t.distance=co,t.distance2D=function(t,e){const n=co(t.x,e.x),s=co(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=O,t.easeInOut=F,t.easeOut=R,t.easingDefinitionToFunction=W,t.fillOffset=Te,t.fillWildcards=Fe,t.findDimensionValueType=Kn,t.findValueType=pr,t.flushKeyframeResolvers=sn,t.frame=K,t.frameData=Y,t.frameSteps=z,t.generateLinearEasing=Ht,t.getAnimatableNone=Qn,t.getAnimationMap=Dn,t.getComputedStyle=Is,t.getDefaultValueType=Jn,t.getEasingForSegment=B,t.getMixer=$t,t.getOriginIndex=ir,t.getValueAsType=us,t.getValueTransition=Wn,t.getVariableValue=In,t.getViewAnimationLayerInfo=br,t.getViewAnimations=xr,t.hasWarned=function(t){return v.has(t)},t.hex=ht,t.hover=function(t,e,n={}){const[s,r,i]=Es(t,n),o=t=>{if(!Ps(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const i=t=>{Ps(t)&&(s(t),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,r)};return s.forEach(t=>{t.addEventListener("pointerenter",o,r)}),i},t.hsla=wt,t.hslaToRgba=Ot,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=os(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:lo[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=we,t.interpolate=be,t.invariant=r,t.invisibleValues=Wt,t.isBezierDefinition=L,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isDragActive=ks,t.isDragging=As,t.isEasingArray=D,t.isGenerator=gn,t.isHTMLElement=fs,t.isMotionValue=ur,t.isNodeOrChild=Cs,t.isNumericalString=o,t.isObject=a,t.isPrimaryPointer=Os,t.isSVGElement=Ws,t.isSVGSVGElement=rr,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&hn()||!e||"string"==typeof e&&(e in pn||hn())||L(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=u,t.keyframes=Me,t.makeAnimationInstant=Sn,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,s){const r=or(e,n,s);return ar(()=>r(t.get()))},t.maxGeneratorDuration=Gt,t.memo=l,t.microtask=Vs,t.millisecondsToSeconds=g,t.mirrorEasing=x,t.mix=zt,t.mixArray=Kt,t.mixColor=It,t.mixComplex=Yt,t.mixImmediate=Rt,t.mixLinearColor=Dt,t.mixNumber=Ft,t.mixObject=Ut,t.mixVisibility=jt,t.motionValue=ys,t.moveItem=function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(s,0,r)}return t},t.noop=c,t.number=et,t.numberValueTypes=qn,t.observeTimeline=_s,t.parseCSSVariable=Ln,t.parseValueFromTransform=Ke,t.percent=ft,t.pipe=d,t.positionalKeys=jn,t.press=function(t,e,n={}){const[s,r,i]=Es(t,n),o=t=>{const s=t.currentTarget;if(!Ls(t))return;Fs.add(s);const i=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),Fs.has(s)&&Fs.delete(s),Ls(t)&&"function"==typeof i&&i(t,{success:e})},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Cs(s,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",u,r)};return s.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),fs(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ds(()=>{if(Fs.has(n))return;Bs(n,"down");const t=Ds(()=>{Bs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Bs(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,r)),e=t,Rs.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),i},t.progress=p,t.progressPercentage=vt,t.propEffect=ps,t.px=mt,t.readTransformValue=Ue,t.recordStats=function(){if(N.value)throw nr(),new Error("Stats are already being measured");const t=N;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},K.postRender(Js,!0),sr},t.removeItem=n,t.resize=qs,t.resolveElements=os,t.reverseEasing=S,t.rgbUnit=lt,t.rgba=ct,t.scale=st,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return c;const r={axis:e,container:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?oo(n=>{t(n[e.axis].progress,n)},e):_s(t,uo(e))}(t,r):function(t,e){const n=uo(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),_s(e=>{t.time=t.iterationDuration*e},n))})}(t,r)},t.scrollInfo=oo,t.secondsToMilliseconds=m,t.setDragLock=function(t){return"x"===t||"y"===t?As[t]?null:(As[t]=!0,()=>{As[t]=!1}):As.x||As.y?null:(As.x=As.y=!0,()=>{As.x=As.y=!1})},t.setStyle=an,t.spring=ve,t.springValue=function(t,e){const n=ys(ur(t)?t.get():t);return lr(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:ir(n,i),a=Math.abs(o-r);let u=t*a;if(s){const e=i*t;u=W(s)(u/e)*e}return e+u}},t.startWaapiAnimation=mn,t.statsBuffer=N,t.steps=function(t,e="end"){return n=>{const r=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(r):Math.ceil(r);return s(0,1,i/t)}},t.styleEffect=Ts,t.supportedWaapiEasing=pn,t.supportsBrowserAnimation=An,t.supportsFlags=ln,t.supportsLinearEasing=hn,t.supportsPartialKeyframes=rs,t.supportsScrollTimeline=un,t.svgEffect=Ss,t.sync=Or,t.testValueType=Nn,t.time=G,t.transform=or,t.transformPropOrder=ze,t.transformProps=Xe,t.transformValue=ar,t.transformValueTypes=Zn,t.velocityPerSecond=y,t.vh=gt,t.vw=yt,t.warnOnce=function(t,e,n){t||v.has(e)||(console.warn(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n)),v.add(e))},t.warning=()=>{},t.wrap=w});
|
|
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){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const s=(t,e,n)=>n>e?e:n<t?t:n;function i(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(i(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(i(e,n))});const r={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function a(t){return"object"==typeof t&&null!==t}const l=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class f{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(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 i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const m=t=>1e3*t,g=t=>t/1e3;function y(t,e){return e?t*(1e3/e):0}const v=new Set;const w=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},b=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,s){if(t===e&&n===s)return c;const i=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=b(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:b(i(t),e,s)}const x=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),V=T(.33,1.53,.69,.99),M=S(V),A=x(M),k=t=>(t*=2)<1?.5*M(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),C=S(E),P=x(E),O=T(.42,0,1,1),R=T(0,0,.58,1),F=T(.42,0,.58,1);const B=t=>Array.isArray(t)&&"number"!=typeof t[0];function D(t,e){return B(t)?t[w(0,t.length,e)]:t}const L=t=>Array.isArray(t)&&"number"==typeof t[0],I={linear:c,easeIn:O,easeInOut:F,easeOut:R,circIn:E,circInOut:P,circOut:C,backIn:M,backInOut:A,backOut:V,anticipate:k},W=e=>{if(L(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,s,i,r]=e;return T(n,s,i,r)}return"string"==typeof e?(t.invariant(void 0!==I[e],`Invalid easing type '${e}'`,"invalid-easing-type"),I[e]):e},N=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],j={value:null,addProjectionMetrics:null};function $(t,e){let n=!1,s=!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,i=!1,r=!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,r=!1)=>{const a=r&&i?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,i?r=!0:(i=!0,[n,s]=[s,n],n.forEach(u),e&&j.value&&j.value.frameloop[e].push(l),l=0,n.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const o=r.useManualTiming?i.timestamp:performance.now();n=!1,r.useManualTiming||(i.delta=s?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),f.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))};return{schedule:N.reduce((e,r)=>{const o=a[r];return e[r]=(e,r=!1,a=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(g)),o.schedule(e,r,a)),e},{}),cancel:t=>{for(let e=0;e<N.length;e++)a[N[e]].cancel(t)},state:i,steps:a}}const{schedule:K,cancel:U,state:Y,steps:z}=$("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let X;function H(){X=void 0}const G={now:()=>(void 0===X&&G.set(Y.isProcessing||r.useManualTiming?Y.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},q={layout:0,mainThread:0,waapi:0},Z=t=>e=>"string"==typeof e&&e.startsWith(t),_=Z("--"),J=Z("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function et(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},st={...nt,transform:t=>s(0,1,t)},it={...nt,default:1},rt=t=>Math.round(1e5*t)/1e5,ot=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const at=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lt=(t,e)=>n=>Boolean("string"==typeof n&&at.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ut=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(ot);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ct={...nt,transform:t=>Math.round((t=>s(0,255,t))(t))},ht={test:lt("rgb","red"),parse:ut("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ct.transform(t)+", "+ct.transform(e)+", "+ct.transform(n)+", "+rt(st.transform(s))+")"};const dt={test:lt("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:ht.transform},pt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ft=pt("deg"),mt=pt("%"),gt=pt("px"),yt=pt("vh"),vt=pt("vw"),wt=(()=>({...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(100*t)}))(),bt={test:lt("hsl","hue"),parse:ut("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+mt.transform(rt(e))+", "+mt.transform(rt(n))+", "+rt(st.transform(s))+")"},Tt={test:t=>ht.test(t)||dt.test(t)||bt.test(t),parse:t=>ht.test(t)?ht.parse(t):bt.test(t)?bt.parse(t):dt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ht.transform(t):bt.transform(t),getAnimatableNone:t=>{const e=Tt.parse(t);return e.alpha=0,Tt.transform(e)}},xt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const St="number",Vt="color",Mt=/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 At(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Mt,t=>(Tt.test(t)?(s.color.push(r),i.push(Vt),n.push(Tt.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push(St),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function kt(t){return At(t).values}function Et(t){const{split:e,types:n}=At(t),s=e.length;return t=>{let i="";for(let r=0;r<s;r++)if(i+=e[r],void 0!==t[r]){const e=n[r];i+=e===St?rt(t[r]):e===Vt?Tt.transform(t[r]):t[r]}return i}}const Ct=t=>"number"==typeof t?0:Tt.test(t)?Tt.getAnimatableNone(t):t;const Pt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(ot)?.length||0)+(t.match(xt)?.length||0)>0},parse:kt,createTransformer:Et,getAnimatableNone:function(t){const e=kt(t);return Et(t)(e.map(Ct))}};function Ot(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 Rt({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Ot(a,s,t+1/3),r=Ot(a,s,t),o=Ot(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}function Ft(t,e){return n=>n>0?e:t}const Bt=(t,e,n)=>t+(e-t)*n,Dt=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Lt=[dt,ht,bt];function It(e){const n=(s=e,Lt.find(t=>t.test(s)));var s;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let i=n.parse(e);return n===bt&&(i=Rt(i)),i}const Wt=(t,e)=>{const n=It(t),s=It(e);if(!n||!s)return Ft(t,e);const i={...n};return t=>(i.red=Dt(n.red,s.red,t),i.green=Dt(n.green,s.green,t),i.blue=Dt(n.blue,s.blue,t),i.alpha=Bt(n.alpha,s.alpha,t),ht.transform(i))},Nt=new Set(["none","hidden"]);function jt(t,e){return Nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function $t(t,e){return n=>Bt(t,e,n)}function Kt(t){return"number"==typeof t?$t:"string"==typeof t?Q(t)?Ft:Tt.test(t)?Wt:zt:Array.isArray(t)?Ut:"object"==typeof t?Tt.test(t)?Wt:Yt:Ft}function Ut(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Kt(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function Yt(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Kt(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const zt=(e,n)=>{const s=Pt.createTransformer(n),i=At(e),r=At(n);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Nt.has(e)&&!r.values.length||Nt.has(n)&&!i.values.length?jt(e,n):d(Ut(function(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}(i,r),r.values),s):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ft(e,n))};function Xt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Bt(t,e,n);return Kt(t)(t,e)}const Ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>K.update(e,t),stop:()=>U(e),now:()=>Y.isProcessing?Y.timestamp:G.now()}},Gt=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e<i;e++)s+=Math.round(1e4*t(e/(i-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},qt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<qt;)e+=50,n=t.next(e);return e>=qt?1/0:e}function _t(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Zt(s),qt);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:g(i)}}function Jt(t,e,n){const s=Math.max(e-5,0);return y(n-t(s),e-s)}const Qt=100,te=10,ee=1,ne=0,se=800,ie=.3,re=.3,oe={granular:.01,default:2},ae={granular:.005,default:.5},le=.01,ue=10,ce=.05,he=1,de=.001;function pe({duration:e=se,bounce:n=ie,velocity:i=ne,mass:r=ee}){let o,a;t.warning(e<=m(ue),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=s(ce,he,l),e=s(le,ue,g(e)),l<1?(o=t=>{const n=t*l,s=n*e,r=n-i,o=me(t,l),a=Math.exp(-s);return de-r/o*a},a=t=>{const n=t*l*e,s=n*i+i,r=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),u=me(Math.pow(t,2),l);return(-o(t)+de>0?-1:1)*((s-r)*a)/u}):(o=t=>Math.exp(-t*e)*((t-i)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(i-t)));const u=function(t,e,n){let s=n;for(let n=1;n<fe;n++)s-=t(s)/e(s);return s}(o,a,5/e);if(e=m(e),isNaN(u))return{stiffness:Qt,damping:te,duration:e};{const t=Math.pow(u,2)*r;return{stiffness:t,damping:2*l*Math.sqrt(r*t),duration:e}}}const fe=12;function me(t,e){return t*Math.sqrt(1-e*e)}const ge=["duration","bounce"],ye=["stiffness","damping","mass"];function ve(t,e){return e.some(e=>void 0!==t[e])}function we(t=re,e=ie){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:u,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:f}=function(t){let e={velocity:ne,stiffness:Qt,damping:te,mass:ee,isResolvedFromDuration:!1,...t};if(!ve(t,ye)&&ve(t,ge))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*s(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:ee,stiffness:r,damping:o}}else{const n=pe(t);e={...e,...n,mass:ee},e.isResolvedFromDuration=!0}return e}({...n,velocity:-g(n.velocity||0)}),y=p||0,v=c/(2*Math.sqrt(u*h)),w=a-o,b=g(Math.sqrt(u/h)),T=Math.abs(w)<5;let x;if(i||(i=T?oe.granular:oe.default),r||(r=T?ae.granular:ae.default),v<1){const t=me(b,v);x=e=>{const n=Math.exp(-v*b*e);return a-n*((y+v*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===v)x=t=>a-Math.exp(-b*t)*(w+(y+b*w)*t);else{const t=b*Math.sqrt(v*v-1);x=e=>{const n=Math.exp(-v*b*e),s=Math.min(t*e,300);return a-n*((y+v*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const S={calculatedDuration:f&&d||null,next:t=>{const e=x(t);if(f)l.done=t>=d;else{let n=0===t?y:0;v<1&&(n=0===t?m(y):Jt(x,t,e));const s=Math.abs(n)<=i,o=Math.abs(a-e)<=r;l.done=s&&o}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(Zt(S),qt),e=Gt(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function be({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=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=we({keyframes:[d.value,p(d.value)],velocity:Jt(v,t,d.value),damping:i,stiffness:r,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)}}}function Te(e,n,{clamp:i=!0,ease:o,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=function(t,e,n){const s=[],i=n||r.mix||Xt,o=t.length-1;for(let n=0;n<o;n++){let r=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||c:e;r=d(t,r)}s.push(r)}return s}(n,o,a),f=h.length,m=t=>{if(u&&t<e[0])return n[0];let s=0;if(f>1)for(;s<e.length-2&&!(t<e[s+1]);s++);const i=p(e[s],e[s+1],t);return h[s](i)};return i?t=>m(s(e[0],e[l-1],t)):m}function xe(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=p(0,e,s);t.push(Bt(n,1,i))}}function Se(t){const e=[0];return xe(e,t.length-1),e}function Ve(t,e){return t.map(t=>t*e)}function Me(t,e){return t.map(()=>e||F).splice(0,t.length-1)}function Ae({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=B(s)?s.map(W):W(s),r={done:!1,value:e[0]},o=Te(Ve(n&&n.length===e.length?n:Se(e),t),e,{ease:Array.isArray(i)?i:Me(e,i)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}we.applyToOptions=t=>{const e=_t(t,100,we);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};const ke=t=>null!==t;function Ee(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(ke),o=i<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==s?s:r[o]}const Ce={decay:be,inertia:be,tween:Ae,keyframes:Ae,spring:we};function Pe(t){"string"==typeof t.type&&(t.type=Ce[t.type])}class Oe{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Re=t=>t/100;class Fe extends Oe{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},q.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Pe(t);const{type:e=Ae,repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:o}=t;const a=e||Ae;a!==Ae&&"number"!=typeof o[0]&&(this.mixKeyframes=d(Re,Xt(o[0],o[1])),o=[0,100]);const l=a({...t,keyframes:o});"mirror"===i&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=Zt(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let w=this.currentTime,b=n;if(h){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(b=o)),w=s(0,1,n)*a}const T=v?{done:!1,value:c[0]}:b.next(w);r&&(T.value=r(T.value));let{done:x}=T;v||null===l||(x=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&f!==be&&(T.value=Ee(c,this.options,g,this.speed)),m&&m(T.value),S&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return g(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+g(t)}get time(){return g(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=g(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,q.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Be(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const De=t=>180*t/Math.PI,Le=t=>{const e=De(Math.atan2(t[1],t[0]));return We(e)},Ie={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Le,rotateZ:Le,skewX:t=>De(Math.atan(t[1])),skewY:t=>De(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},We=t=>((t%=360)<0&&(t+=360),t),Ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),je=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),$e={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ne,scaleY:je,scale:t=>(Ne(t)+je(t))/2,rotateX:t=>We(De(Math.atan2(t[6],t[5]))),rotateY:t=>We(De(Math.atan2(-t[2],t[0]))),rotateZ:Le,rotate:Le,skewX:t=>De(Math.atan(t[4])),skewY:t=>De(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ke(t){return t.includes("scale")?1:0}function Ue(t,e){if(!t||"none"===t)return Ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=$e,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ie,i=e}if(!i)return Ke(e);const r=s[e],o=i[1].split(",").map(ze);return"function"==typeof r?r(o):o[r]}const Ye=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ue(n,e)};function ze(t){return parseFloat(t.trim())}const Xe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=(()=>new Set(Xe))(),Ge=t=>t===nt||t===gt,qe=new Set(["x","y","z"]),Ze=Xe.filter(t=>!qe.has(t));const _e={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})=>Ue(e,"x"),y:(t,{transform:e})=>Ue(e,"y")};_e.translateX=_e.x,_e.translateY=_e.y;const Je=new Set;let Qe=!1,tn=!1,en=!1;function nn(){if(tn){const t=Array.from(Je).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 Ze.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)})}tn=!1,Qe=!1,Je.forEach(t=>t.complete(en)),Je.clear()}function sn(){Je.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tn=!0)})}function rn(){en=!0,sn(),nn(),en=!1}class on{constructor(t,e,n,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Je.add(this),Qe||(Qe=!0,K.read(sn),K.resolveKeyframes(nn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;if(null===t[0]){const i=s?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}Be(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Je.delete(this)}cancel(){"scheduled"===this.state&&(Je.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const an=t=>t.startsWith("--");function ln(t,e,n){an(e)?t.style.setProperty(e,n):t.style[e]=n}const un=u(()=>void 0!==window.ScrollTimeline),cn={};function hn(t,e){const n=u(t);return()=>cn[e]??n()}const dn=hn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),pn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,fn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function mn(t,e){return t?"function"==typeof t?dn()?Gt(t,e):"ease-out":L(t)?pn(t):Array.isArray(t)?t.map(t=>mn(t,e)||fn.easeOut):fn[t]:void 0}function gn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=mn(a,i);Array.isArray(h)&&(c.easing=h),j.value&&q.waapi++;const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return j.value&&p.finished.finally(()=>{q.waapi--}),p}function yn(t){return"function"==typeof t&&"applyToOptions"in t}function vn({type:t,...e}){return yn(t)&&dn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class wn extends Oe{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(r),this.allowFlatten=o,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=vn(e);this.animation=gn(n,s,i,u,r),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=Ee(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):ln(n,s,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return g(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+g(t)}get time(){return g(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=m(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&un()?(this.animation.timeline=t,c):e(this)}}const bn={anticipate:k,backInOut:A,circInOut:P};function Tn(t){"string"==typeof t.ease&&t.ease in bn&&(t.ease=bn[t.ease])}class xn extends wn{constructor(t){Tn(t),Pe(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:i,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new Fe({...r,autoplay:!1}),a=m(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const Sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Pt.test(t)&&"0"!==t||t.startsWith("url(")));function Vn(t){t.duration=0,t.type="keyframes"}const Mn=new Set(["opacity","clipPath","filter","transform"]),An=u(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function kn(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return An()&&n&&Mn.has(n)&&("transform"!==n||!u)&&!l&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}class En extends Oe{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||on;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:l,delay:u,isHandoff:h,onUpdate:d}=s;this.resolvedAt=G.now(),function(e,n,s,i){const r=e[0];if(null===r)return!1;if("display"===n||"visibility"===n)return!0;const o=e[e.length-1],a=Sn(r,n),l=Sn(o,n);return t.warning(a===l,`You are trying to animate ${n} from "${r}" to "${o}". "${a?o:r}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(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}(e)||("spring"===s||yn(s))&&i)}(e,o,a,l)||(!r.instantAnimations&&u||d?.(Ee(e,s,n)),e[0]=e[e.length-1],Vn(s),s.repeat=0);const p={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!h&&kn(p)?new xn({...p,element:p.motionValue.owner.current}):new Fe(p);f.finished.then(()=>this.notifyFinished()).catch(c),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),rn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Cn{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){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Pn(this.animations,"duration")}get iterationDuration(){return Pn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Pn(t,e){let n=0;for(let s=0;s<t.length;s++){const i=t[s][e];null!==i&&i>n&&(n=i)}return n}class On extends Cn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Rn extends wn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Fn=new WeakMap,Bn=(t,e="")=>`${t}:${e}`;function Dn(t){const e=Fn.get(t)||new Map;return Fn.set(t,e),e}const Ln=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function In(t){const e=Ln.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Wn(e,n,s=1){t.invariant(s<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=In(e);if(!i)return;const a=window.getComputedStyle(n).getPropertyValue(i);if(a){const t=a.trim();return o(t)?parseFloat(t):t}return Q(r)?Wn(r,n,s+1):r}function Nn(t,e){return t?.[e]??t?.default??t}const jn=new Set(["width","height","top","left","right","bottom",...Xe]),$n=t=>e=>e.test(t),Kn=[nt,gt,mt,ft,vt,yt,{test:t=>"auto"===t,parse:t=>t}],Un=t=>Kn.find($n(t));function Yn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const zn=new Set(["brightness","contrast","saturate","opacity"]);function Xn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(ot)||[];if(!s)return t;const i=n.replace(s,"");let r=zn.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Hn=/\b([a-z-]*)\(.*?\)/gu,Gn={...Pt,getAnimatableNone:t=>{const e=t.match(Hn);return e?e.map(Xn).join(" "):t}},qn={...nt,transform:Math.round},Zn={rotate:ft,rotateX:ft,rotateY:ft,rotateZ:ft,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:ft,skewX:ft,skewY:ft,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:st,originX:wt,originY:wt,originZ:gt},_n={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,radius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,top:gt,right:gt,bottom:gt,left:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,backgroundPositionX:gt,backgroundPositionY:gt,...Zn,zIndex:qn,fillOpacity:st,strokeOpacity:st,numOctaves:qn},Jn={..._n,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Gn,WebkitFilter:Gn},Qn=t=>Jn[t];function ts(t,e){let n=Qn(t);return n!==Gn&&(n=Pt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const es=new Set(["auto","none","0"]);class ns extends on{constructor(t,e,n,s,i){super(t,e,n,s,i,!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(),Q(s))){const i=Wn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!jn.has(n)||2!==t.length)return;const[s,i]=t,r=Un(s),o=Un(i);if(et(s)!==et(i)&&_e[n])this.needsMeasurement=!0;else if(r!==o)if(Ge(r)&&Ge(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else _e[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Yn(t[e]))&&n.push(e);n.length&&function(t,e,n){let s,i=0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!es.has(e)&&At(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=ts(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=_e[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 i=n.length-1,r=n[i];n[i]=_e[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const ss=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"]);function is(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ss.has(e)&&(t[n]=t[n]+"px")}const rs=u(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),os=new Set(["opacity","clipPath","filter","transform"]);function as(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function ls(t){return(e,n)=>{const s=as(e),i=[];for(const e of s){const s=t(e,n);i.push(s)}return()=>{for(const t of i)t()}}}const us=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class cs{constructor(){this.latest={},this.values=new Map}set(t,e,n,s,i=!0){const r=this.values.get(t);r&&r.onRemove();const o=()=>{const s=e.get();this.latest[t]=i?us(s,_n[t]):s,n&&K.render(n)};o();const a=e.on("change",o);s&&e.addDependent(s);const l=()=>{a(),n&&U(n),this.values.delete(t),s&&e.removeDependent(s)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function hs(t){const e=new WeakMap,n=[];return(s,i)=>{const r=e.get(s)??new cs;e.set(s,r);for(const e in i){const o=i[e],a=t(s,r,e,o);n.push(a)}return()=>{for(const t of n)t()}}}const ds=(t,e,n,s)=>{const i=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),r=i?n:n.startsWith("data")||n.startsWith("aria")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const o=i?()=>{t[r]=e.latest[n]}:()=>{const s=e.latest[n];null==s?t.removeAttribute(r):t.setAttribute(r,String(s))};return e.set(n,s,o)},ps=ls(hs(ds)),fs=hs((t,e,n,s)=>e.set(n,s,()=>{t[n]=e.latest[n]},void 0,!1));function ms(t){return a(t)&&"offsetHeight"in t}const gs={current:void 0};class ys{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.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 f);const n=this.events[t].add(e);return"change"===t?()=>{n(),K.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return gs.current&&gs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function vs(t,e){return new ys(t,e)}const ws={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const bs=new Set(["originX","originY","originZ"]),Ts=(t,e,n,s)=>{let i,r;return He.has(n)?(e.get("transform")||(ms(t)||e.get("transformBox")||Ts(t,e,"transformBox",new ys("fill-box")),e.set("transform",new ys("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let s=0;s<Xe.length;s++){const i=Xe[s],r=t.latest[i];if(void 0===r)continue;let o=!0;o="number"==typeof r?r===(i.startsWith("scale")?1:0):0===parseFloat(r),o||(n=!1,e+=`${ws[i]||i}(${t.latest[i]}) `)}return n?"none":e.trim()}(e)})),r=e.get("transform")):bs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ys(""),()=>{const n=e.latest.originX??"50%",s=e.latest.originY??"50%",i=e.latest.originZ??0;t.style.transformOrigin=`${n} ${s} ${i}`}),r=e.get("transformOrigin")):i=an(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,s,i,r)},xs=ls(hs(Ts)),Ss=gt.transform;const Vs=ls(hs((t,e,n,s)=>{if(n.startsWith("path"))return function(t,e,n,s){return K.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,s,()=>t.setAttribute("stroke-dashoffset",Ss(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ys("1 1"),()=>{const{pathLength:n=1,pathSpacing:s}=e.latest;t.setAttribute("stroke-dasharray",`${Ss(n)} ${Ss(s??1-Number(n))}`)}),e.set(n,s,void 0,e.get("stroke-dasharray")))}(t,e,n,s);if(n.startsWith("attr"))return ds(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),s);return(n in t.style?Ts:ds)(t,e,n,s)}));const{schedule:Ms,cancel:As}=$(queueMicrotask,!1),ks={x:!1,y:!1};function Es(){return ks.x||ks.y}function Cs(t,e){const n=as(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function Ps(t){return!("touch"===t.pointerType||Es())}const Os=(t,e)=>!!e&&(t===e||Os(t,e.parentElement)),Rs=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Fs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Bs=new WeakSet;function Ds(t){return e=>{"Enter"===e.key&&t(e)}}function Ls(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Is(t){return Rs(t)&&!Es()}function Ws(t,e){const n=window.getComputedStyle(t);return an(e)?n.getPropertyValue(e):n[e]}function Ns(t){return a(t)&&"ownerSVGElement"in t}const js=new WeakMap;let $s;const Ks=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Ns(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Us=Ks("inline","width","offsetWidth"),Ys=Ks("block","height","offsetHeight");function zs({target:t,borderBoxSize:e}){js.get(t)?.forEach(n=>{n(t,{get width(){return Us(t,e)},get height(){return Ys(t,e)}})})}function Xs(t){t.forEach(zs)}function Hs(t,e){$s||"undefined"!=typeof ResizeObserver&&($s=new ResizeObserver(Xs));const n=as(t);return n.forEach(t=>{let n=js.get(t);n||(n=new Set,js.set(t,n)),n.add(e),$s?.observe(t)}),()=>{n.forEach(t=>{const n=js.get(t);n?.delete(e),n?.size||$s?.unobserve(t)})}}const Gs=new Set;let qs;function Zs(t){return Gs.add(t),qs||(qs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Gs.forEach(e=>e(t))},window.addEventListener("resize",qs)),()=>{Gs.delete(t),Gs.size||"function"!=typeof qs||(window.removeEventListener("resize",qs),qs=void 0)}}function _s(t,e){return"function"==typeof t?Zs(t):Hs(t,e)}function Js(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return K.preUpdate(s,!0),()=>U(s)}function Qs(){const{value:t}=j;null!==t?(t.frameloop.rate.push(Y.delta),t.animations.mainThread.push(q.mainThread),t.animations.waapi.push(q.waapi),t.animations.layout.push(q.layout)):U(Qs)}function ti(t){return t.reduce((t,e)=>t+e,0)/t.length}function ei(t,e=ti){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ni=t=>Math.round(1e3/t);function si(){j.value=null,j.addProjectionMetrics=null}function ii(){const{value:t}=j;if(!t)throw new Error("Stats are not being measured");si(),U(Qs);const e={frameloop:{setup:ei(t.frameloop.setup),rate:ei(t.frameloop.rate),read:ei(t.frameloop.read),resolveKeyframes:ei(t.frameloop.resolveKeyframes),preUpdate:ei(t.frameloop.preUpdate),update:ei(t.frameloop.update),preRender:ei(t.frameloop.preRender),render:ei(t.frameloop.render),postRender:ei(t.frameloop.postRender)},animations:{mainThread:ei(t.animations.mainThread),waapi:ei(t.animations.waapi),layout:ei(t.animations.layout)},layoutProjection:{nodes:ei(t.layoutProjection.nodes),calculatedTargetDeltas:ei(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:ei(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ni(n.min),n.max=ni(n.max),n.avg=ni(n.avg),[n.min,n.max]=[n.max,n.min],e}function ri(t){return Ns(t)&&"svg"===t.tagName}function oi(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function ai(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=Te(t[1+n],t[2+n],t[3+n]);return e?i(s):i}function li(t){const e=[];gs.current=e;const n=t();gs.current=void 0;const s=vs(n);return function(t,e,n){const s=()=>e.set(n()),i=()=>K.preRender(s,!1,!0),r=t.map(t=>t.on("change",i));e.on("destroy",()=>{r.forEach(t=>t()),U(s)})}(e,s,t),s}const ui=t=>Boolean(t&&t.getVelocity);function ci(t,e,n){const s=t.get();let i,r=null,o=s;const a="string"==typeof s?s.replace(/[\d.-]/g,""):void 0,l=()=>{r&&(r.stop(),r=null)},u=()=>{l(),r=new Fe({keyframes:[di(t.get()),di(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:i})};if(t.attach((t,e)=>{o=t,i=t=>e(hi(t,a)),K.postRender(u)},l),ui(e)){const n=e.on("change",e=>t.set(hi(e,a))),s=t.on("destroy",n);return()=>{n(),s()}}return l}function hi(t,e){return e?t+e:t}function di(t){return"number"==typeof t?t:parseFloat(t)}const pi=[...Kn,Tt,Pt],fi=t=>pi.find($n(t));function mi(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let gi={},yi=null;const vi=(t,e)=>{gi[t]=e},wi=()=>{yi||(yi=document.createElement("style"),yi.id="motion-view");let t="";for(const e in gi){const n=gi[e];t+=`${e} {\n`;for(const[e,s]of Object.entries(n))t+=` ${e}: ${s};\n`;t+="}\n"}yi.textContent=t,document.head.appendChild(yi),gi={}},bi=()=>{yi&&yi.parentElement&&yi.parentElement.removeChild(yi)};function Ti(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function xi(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Si(){return document.getAnimations().filter(xi)}const Vi=["layout","enter","exit","new","old"];function Mi(t){const{update:e,targets:n,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Cn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||vi(":root",{"view-transition-name":"none"}),vi("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),wi();const i=document.startViewTransition(async()=>{await e()});return i.finished.finally(()=>{bi()}),new Promise(t=>{i.ready.then(()=>{const e=Si(),i=[];n.forEach((t,e)=>{for(const n of Vi){if(!t[n])continue;const{keyframes:r,options:o}=t[n];for(let[t,a]of Object.entries(r)){if(!a)continue;const r={...Nn(s,t),...Nn(o,t)},l=mi(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof r.delay&&(r.delay=r.delay(0,1)),r.duration&&(r.duration=m(r.duration)),r.delay&&(r.delay=m(r.delay));const u=new wn({...r,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});i.push(u)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:r}=e;if(!r)continue;const o=Ti(r);if(!o)continue;const a=n.get(o.layer);if(a)Ai(a,"enter")&&Ai(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?i.push(new Rn(t)):t.cancel();else{const n="group"===o.type?"layout":"";let r={...Nn(s,n)};r.duration&&(r.duration=m(r.duration)),r=vn(r);const a=mn(r.ease,r.duration);e.updateTiming({delay:m(r.delay??0),duration:r.duration,easing:a}),i.push(new Rn(t))}}t(new Cn(i))})})}function Ai(t,e){return t?.[e]?.keyframes.opacity}let ki=[],Ei=null;function Ci(){Ei=null;const[t]=ki;var e;t&&(n(ki,e=t),Ei=e,Mi(e).then(t=>{e.notifyReady(t),t.finished.finally(Ci)}))}function Pi(){for(let t=ki.length-1;t>=0;t--){const e=ki[t],{interrupt:n}=e.options;if("immediate"===n){const n=ki.slice(0,t+1).map(t=>t.update),s=ki.slice(t+1);e.update=()=>{n.forEach(t=>t())},ki=[e,...s];break}}Ei&&"immediate"!==ki[0]?.options.interrupt||Ci()}class Oi{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=c,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,ki.push(n),Ms.render(Pi)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:s,targets:i}=this;i.has(s)||i.set(s,{});i.get(s)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Ri=K,Fi=N.reduce((t,e)=>(t[e]=t=>U(t),t),{});function Bi(t){return"object"==typeof t&&!Array.isArray(t)}function Di(t,e,n,s){return"string"==typeof t&&Bi(e)?as(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Li(t,e,n){return t*(e+1)}function Ii(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}function Wi(t,e,s,i,r,o){!function(t,e,s){for(let i=0;i<t.length;i++){const r=t[i];r.at>e&&r.at<s&&(n(t,r),i--)}}(t,r,o);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Bt(r,o,i[n]),easing:D(s,n)})}function Ni(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function ji(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function $i(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ki(t,e){return e[t]||(e[t]=[]),e[t]}function Ui(t){return Array.isArray(t)?t:[t]}function Yi(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const zi=t=>"number"==typeof t,Xi=t=>t.every(zi),Hi=new WeakMap;function Gi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function qi(t,e,n,s){if("function"==typeof e){const[i,r]=Gi(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Gi(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function Zi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,vs(n))}function _i(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function Ji(t,e){const n=function(t,e){const n=t.getProps();return qi(n,e,n.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){Zi(t,e,_i(r[e]))}}function Qi(t,e){const n=t.getValue("willChange");if(s=n,Boolean(ui(s)&&s.add))return n.add(e);if(!n&&r.WillChange){const n=new r.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}const tr=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),er="data-"+tr("framerAppearId");function nr(t){return t.props[er]}const sr=t=>null!==t;const ir={type:"spring",stiffness:500,damping:25,restSpeed:10},rr={type:"keyframes",duration:.8},or={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ar=(t,{keyframes:e})=>e.length>2?rr:He.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ir:or;const lr=(t,e,n,s={},i,o)=>a=>{const l=Nn(s,t)||{},u=l.delay||s.delay||0;let{elapsed:c=0}=s;c-=m(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||Object.assign(h,ar(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Vn(h),0===h.delay&&(d=!0)),(r.instantAnimations||r.skipAnimations)&&(d=!0,Vn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(sr),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}(h.keyframes,l);if(void 0!==t)return void K.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Fe(h):new En(h)};function ur({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function cr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),i=a[e];if(void 0===i||u&&ur(u,e))continue;const o={delay:n,...Nn(r||{},e)},c=s.get();if(void 0!==c&&!s.isAnimating&&!Array.isArray(i)&&i===c&&!o.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=nr(t);if(n){const t=window.MotionHandoffAnimation(n,e,K);null!==t&&(o.startTime=t,h=!0)}}Qi(t,e),s.start(lr(e,s,i,t.shouldReduceMotion&&jn.has(e)?{type:!1}:o,t,h));const d=s.animation;d&&l.push(d)}return o&&Promise.all(l).then(()=>{K.update(()=>{o&&Ji(t,o)})}),l}const hr={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"]},dr={};for(const t in hr)dr[t]={isEnabled:e=>hr[t].some(t=>!!e[t])};const pr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),fr="undefined"!=typeof window,mr={current:null},gr={current:!1};const yr=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function vr(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||yr.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const wr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class br{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=on,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=G.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,K.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=r;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(i),this.isControllingVariants=vr(e),this.isVariantNode=function(t){return Boolean(vr(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ui(e)&&e.set(a[t])}}mount(t){this.current=t,Hi.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)),gr.current||function(){if(gr.current=!0,fr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>mr.current=t.matches;t.addEventListener("change",e),e()}else mr.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||mr.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),U(this.notifyUpdate),U(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=He.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&K.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),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 dr){const e=dr[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<wr.length;e++){const n=wr[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 i=e[s],r=n[s];if(ui(i))t.addValue(s,i);else if(ui(r))t.addValue(s,vs(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(s);t.addValue(s,vs(void 0!==e?e:i,{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()}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=vs(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];return null!=n&&("string"==typeof n&&(o(n)||l(n))?n=parseFloat(n):!fi(n)&&Pt.test(e)&&(n=ts(t,e)),this.setBaseTarget(t,ui(n)?n.get():n)),ui(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=qi(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||ui(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 f),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ms.render(this.render)}}class Tr extends br{constructor(){super(...arguments),this.KeyframeResolver=ns}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;ui(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const xr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Sr=Xe.length;function Vr(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(He.has(t))o=!0;else if(_(t))i[t]=n;else{const e=us(n,_n[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r<Sr;r++){const o=Xe[r],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=us(a,_n[o]);l||(i=!1,s+=`${xr[o]||o}(${t}) `),n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;s.transformOrigin=`${t} ${e} ${n}`}}function Mr(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];for(o in i?.applyProjectionStyles(r,s),n)r.setProperty(o,n[o])}function Ar(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const kr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!gt.test(t))return t;t=parseFloat(t)}return`${Ar(t,e.target.x)}% ${Ar(t,e.target.y)}%`}},Er={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Pt.parse(t);if(i.length>5)return s;const r=Pt.createTransformer(t),o="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=Bt(a,l,.5);return"number"==typeof i[2+o]&&(i[2+o]/=u),"number"==typeof i[3+o]&&(i[3+o]/=u),r(i)}},Cr={borderRadius:{...kr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kr,borderTopRightRadius:kr,borderBottomLeftRadius:kr,borderBottomRightRadius:kr,boxShadow:Er};function Pr(t,{layout:e,layoutId:n}){return He.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Cr[t]||"opacity"===t)}function Or(t,e,n){const{style:s}=t,i={};for(const r in s)(ui(s[r])||e.style&&ui(e.style[r])||Pr(r,t)||void 0!==n?.getValue(r)?.liveStyle)&&(i[r]=s[r]);return i}class Rr extends Tr{constructor(){super(...arguments),this.type="html",this.renderInstance=Mr}readValueFromInstance(t,e){if(He.has(e))return this.projection?.isProjecting?Ke(e):Ye(t,e);{const s=(n=t,window.getComputedStyle(n)),i=(_(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}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){Vr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Or(t,e,n)}}class Fr extends br{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}}const Br={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dr={offset:"strokeDashoffset",array:"strokeDasharray"};function Lr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Vr(t,a,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==s&&(h.scale=s),void 0!==i&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Br:Dr;t[r.offset]=gt.transform(-s);const o=gt.transform(e),a=gt.transform(n);t[r.array]=`${o} ${a}`}(h,i,r,o,!1)}const Ir=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"]);class Wr extends Tr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const t=Qn(e);return t&&t.default||0}return e=Ir.has(e)?e:tr(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Or(t,e,n);for(const n in t)(ui(t[n])||ui(e[n]))&&(s[-1!==Xe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}build(t,e,n){Lr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,s){!function(t,e,n,s){Mr(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Ir.has(n)?n:tr(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)}}function Nr(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ns(t)&&!ri(t)?new Wr(e):new Rr(e);n.mount(t),Hi.set(t,n)}function jr(t){const e=new Fr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Hi.set(t,e)}function $r(e,n,s,i){const r=[];if(function(t,e){return ui(t)||"number"==typeof t||"string"==typeof t&&!Bi(e)}(e,n))r.push(function(t,e,n){const s=ui(t)?t:vs(t);return s.start(lr("",s,e,n)),s.animation}(e,Bi(n)&&n.default||n,s&&s.default||s));else{const o=Di(e,n,i),a=o.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let e=0;e<a;e++){const i=o[e];t.invariant(null!==i,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const l=i instanceof Element?Nr:jr;Hi.has(i)||l(i);const u=Hi.get(i),c={...s};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(e,a)),r.push(...cr(u,{...n,transition:c},{}))}}return r}function Kr(e,n,s){const i=[],r=function(e,{defaultTransition:n={},...s}={},i,r){const o=n.duration||.3,a=new Map,l=new Map,u={},c=new Map;let h=0,d=0,f=0;for(let s=0;s<e.length;s++){const a=e[s];if("string"==typeof a){c.set(a,d);continue}if(!Array.isArray(a)){c.set(a.name,Ii(d,a.at,h,c));continue}let[p,g,y={}]=a;void 0!==y.at&&(d=Ii(d,y.at,h,c));let v=0;const w=(e,s,i,a=0,l=0)=>{const u=Ui(e),{delay:c=0,times:h=Se(u),type:p="keyframes",repeat:g,repeatType:y,repeatDelay:w=0,...b}=s;let{ease:T=n.ease||"easeOut",duration:x}=s;const S="function"==typeof c?c(a,l):c,V=u.length,M=yn(p)?p:r?.[p||"keyframes"];if(V<=2&&M){let t=100;if(2===V&&Xi(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...b};void 0!==x&&(e.duration=m(x));const n=_t(e,t,M);T=n.ease,x=n.duration}x??(x=o);const A=d+S;1===h.length&&0===h[0]&&(h[1]=1);const k=h.length-u.length;if(k>0&&xe(h,k),1===u.length&&u.unshift(null),g){t.invariant(g<20,"Repeat count too high, must be less than 20","repeat-count-high"),x=Li(x,g);const e=[...u],n=[...h];T=Array.isArray(T)?[...T]:[T];const s=[...T];for(let t=0;t<g;t++){u.push(...e);for(let i=0;i<e.length;i++)h.push(n[i]+(t+1)),T.push(0===i?"linear":D(s,i-1))}Ni(h,g)}const E=A+x;Wi(i,u,T,h,A,E),v=Math.max(S+x,v),f=Math.max(E,f)};if(ui(p))w(g,y,Ki("default",$i(p,l)));else{const t=Di(p,g,i,u),e=t.length;for(let n=0;n<e;n++){const s=$i(t[n],l);for(const t in g)w(g[t],Yi(y,t),Ki(t,s),n,e)}}h=d,d+=v}return l.forEach((t,e)=>{for(const i in t){const r=t[i];r.sort(ji);const o=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];o.push(n),l.push(p(0,f,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),o.unshift(o[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),o.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const c=a.get(e);c.keyframes[i]=o,c.transition[i]={...n,duration:f,ease:u,times:l,...s}}}),a}(e,n,s,{spring:we});return r.forEach(({keyframes:t,transition:e},n)=>{i.push(...$r(n,t,e))}),i}function Ur(t){return function(e,s,i){let r,o=[];if(a=e,Array.isArray(a)&&a.some(Array.isArray))o=Kr(e,s,t);else{const{onComplete:n,...a}=i||{};"function"==typeof n&&(r=n),o=$r(e,s,a,t)}var a;const l=new On(o);return r&&l.finished.then(r),t&&(t.animations.push(l),l.finished.then(()=>{n(t.animations,l)})),l}}const Yr=Ur();const zr=e=>function(n,s,i){return new On(function(e,n,s,i){const r=as(e,i),o=r.length;t.invariant(Boolean(o),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<o;t++){const e=r[t],i={...s};"function"==typeof i.delay&&(i.delay=i.delay(t,o));for(const t in n){let s=n[t];Array.isArray(s)||(s=[s]);const r={...Nn(i,t)};r.duration&&(r.duration=m(r.duration)),r.delay&&(r.delay=m(r.delay));const o=Dn(e),l=Bn(t,r.pseudoElement||""),u=o.get(l);u&&u.stop(),a.push({map:o,key:l,unresolvedKeyframes:s,options:{...r,element:e,name:t,allowFlatten:!i.type&&!i.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:s,name:i,pseudoElement:r}=n;r||null!==e[0]||(e[0]=Ws(s,i)),Be(e),is(e,i),!r&&e.length<2&&e.unshift(Ws(s,i)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:s}=a[t],i=new wn(s);e.set(n,i),i.finished.finally(()=>e.delete(n)),l.push(i)}return l}(n,s,i,e))},Xr=zr(),Hr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Gr(t,e,n,s){const i=n[e],{length:r,position:o}=Hr[e],a=i.current,l=n.time;i.current=t[`scroll${o}`],i.scrollLength=t[`scroll${r}`]-t[`client${r}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=p(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>50?0:y(i.current-a,u)}const qr={start:0,center:.5,end:1};function Zr(t,e,n=0){let s=0;if(t in qr&&(t=qr[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 _r=[0,0];function Jr(t,e,n,s){let i=Array.isArray(t)?t:_r,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,qr[t]?t:"0"]),r=Zr(i[0],n,s),o=Zr(i[1],e),r-o}const Qr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},to={x:0,y:0};function eo(t,e,n){const{offset:i=Qr.All}=n,{target:r=t,axis:o="y"}=n,a="y"===o?"height":"width",l=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(ms(s))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 i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(r,t):to,u=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),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let h=!e[o].interpolate;const d=i.length;for(let t=0;t<d;t++){const n=Jr(i[t],c[a],u[a],l[o]);h||n===e[o].interpolatorOffsets[t]||(h=!0),e[o].offset[t]=n}h&&(e[o].interpolate=Te(e[o].offset,Se(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=s(0,1,e[o].interpolate(e[o].current))}function no(t,e,n,s={}){return{measure:e=>{!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),function(t,e,n){Gr(t,"x",e,n),Gr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&eo(t,n,s)},notify:()=>e(n)}}const so=new WeakMap,io=new WeakMap,ro=new WeakMap,oo=t=>t===document.scrollingElement?window:t;function ao(t,{container:e=document.scrollingElement,...n}={}){if(!e)return c;let s=ro.get(e);s||(s=new Set,ro.set(e,s));const i=no(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(i),!so.has(e)){const t=()=>{for(const t of s)t.measure(Y.timestamp);K.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>K.read(t);so.set(e,i);const r=oo(e);window.addEventListener("resize",i,{passive:!0}),e!==document.documentElement&&io.set(e,_s(e,i)),r.addEventListener("scroll",i,{passive:!0}),i()}const r=so.get(e);return K.read(r,!1,!0),()=>{U(r);const t=ro.get(e);if(!t)return;if(t.delete(i),t.size)return;const n=so.get(e);so.delete(e),n&&(oo(e).removeEventListener("scroll",n),io.get(e)?.(),window.removeEventListener("resize",n))}}const lo=new Map;function uo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=lo.get(e)??new Map;lo.set(e,i);const r=n.target??"self",o=i.get(r)??{},a=s+(n.offset??[]).join(",");return o[a]||(o[a]=!n.target&&un()?new ScrollTimeline({source:e,axis:s}):function(t){const e={value:0},n=ao(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),o[a]}const co={some:0,all:1};const ho=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=En,t.DOMKeyframesResolver=ns,t.GroupAnimation=Cn,t.GroupAnimationWithThen=On,t.JSAnimation=Fe,t.KeyframeResolver=on,t.MotionGlobalConfig=r,t.MotionValue=ys,t.NativeAnimation=wn,t.NativeAnimationExtended=xn,t.NativeAnimationWrapper=Rn,t.SubscriptionManager=f,t.ViewTransitionBuilder=Oi,t.acceleratedValues=os,t.activeAnimations=q,t.addAttrValue=ds,t.addStyleValue=Ts,t.addUniqueItem=e,t.alpha=st,t.analyseComplexValue=At,t.animate=Yr,t.animateMini=Xr,t.animateValue=function(t){return new Fe(t)},t.animateView=function(t,e={}){return new Oi(t,e)},t.animationMapKey=Bn,t.anticipate=k,t.applyGeneratorOptions=vn,t.applyPxDefaults=is,t.attachSpring=ci,t.attrEffect=ps,t.backIn=M,t.backInOut=A,t.backOut=V,t.calcGeneratorDuration=Zt,t.cancelFrame=U,t.cancelMicrotask=As,t.cancelSync=Fi,t.circIn=E,t.circInOut=P,t.circOut=C,t.clamp=s,t.collectMotionValues=gs,t.color=Tt,t.complex=Pt,t.containsCSSVariable=et,t.convertOffsetToTimes=Ve,t.createGeneratorEasing=_t,t.createRenderBatcher=$,t.createScopedAnimate=Ur,t.cubicBezier=T,t.cubicBezierAsString=pn,t.defaultEasing=Me,t.defaultOffset=Se,t.defaultTransformValue=Ke,t.defaultValueTypes=Jn,t.degrees=ft,t.delay=function(t,e){return function(t,e){const n=G.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(U(s),t(r-e))};return K.setup(s,!0),()=>U(s)}(t,m(e))},t.dimensionValueTypes=Kn,t.distance=ho,t.distance2D=function(t,e){const n=ho(t.x,e.x),s=ho(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=O,t.easeInOut=F,t.easeOut=R,t.easingDefinitionToFunction=W,t.fillOffset=xe,t.fillWildcards=Be,t.findDimensionValueType=Un,t.findValueType=fi,t.flushKeyframeResolvers=rn,t.frame=K,t.frameData=Y,t.frameSteps=z,t.generateLinearEasing=Gt,t.getAnimatableNone=ts,t.getAnimationMap=Dn,t.getComputedStyle=Ws,t.getDefaultValueType=Qn,t.getEasingForSegment=D,t.getMixer=Kt,t.getOriginIndex=oi,t.getValueAsType=us,t.getValueTransition=Nn,t.getVariableValue=Wn,t.getViewAnimationLayerInfo=Ti,t.getViewAnimations=Si,t.hasWarned=function(t){return v.has(t)},t.hex=dt,t.hover=function(t,e,n={}){const[s,i,r]=Cs(t,n),o=t=>{if(!Ps(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{Ps(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.hsla=bt,t.hslaToRgba=Rt,t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=as(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 i?i:co[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=be,t.interpolate=Te,t.invisibleValues=Nt,t.isBezierDefinition=L,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isDragActive=Es,t.isDragging=ks,t.isEasingArray=B,t.isGenerator=yn,t.isHTMLElement=ms,t.isMotionValue=ui,t.isNodeOrChild=Os,t.isNumericalString=o,t.isObject=a,t.isPrimaryPointer=Rs,t.isSVGElement=Ns,t.isSVGSVGElement=ri,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&dn()||!e||"string"==typeof e&&(e in fn||dn())||L(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=l,t.keyframes=Ae,t.makeAnimationInstant=Vn,t.mapEasingToNativeEasing=mn,t.mapValue=function(t,e,n,s){const i=ai(e,n,s);return li(()=>i(t.get()))},t.maxGeneratorDuration=qt,t.memo=u,t.microtask=Ms,t.millisecondsToSeconds=g,t.mirrorEasing=x,t.mix=Xt,t.mixArray=Ut,t.mixColor=Wt,t.mixComplex=zt,t.mixImmediate=Ft,t.mixLinearColor=Dt,t.mixNumber=Bt,t.mixObject=Yt,t.mixVisibility=jt,t.motionValue=vs,t.moveItem=function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t},t.noop=c,t.number=nt,t.numberValueTypes=_n,t.observeTimeline=Js,t.parseCSSVariable=In,t.parseValueFromTransform=Ue,t.percent=mt,t.pipe=d,t.positionalKeys=jn,t.press=function(t,e,n={}){const[s,i,r]=Cs(t,n),o=t=>{const s=t.currentTarget;if(!Is(t))return;Bs.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Bs.has(s)&&Bs.delete(s),Is(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Os(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),ms(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ds(()=>{if(Bs.has(n))return;Ls(n,"down");const t=Ds(()=>{Ls(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Ls(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i)),e=t,Fs.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r},t.progress=p,t.progressPercentage=wt,t.propEffect=fs,t.px=gt,t.readTransformValue=Ye,t.recordStats=function(){if(j.value)throw si(),new Error("Stats are already being measured");const t=j;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},K.postRender(Qs,!0),ii},t.removeItem=n,t.resize=_s,t.resolveElements=as,t.reverseEasing=S,t.rgbUnit=ct,t.rgba=ht,t.scale=it,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return c;const i={axis:e,container:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?ao(n=>{t(n[e.axis].progress,n)},e):Js(t,uo(e))}(t,i):function(t,e){const n=uo(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),Js(e=>{t.time=t.iterationDuration*e},n))})}(t,i)},t.scrollInfo=ao,t.secondsToMilliseconds=m,t.setDragLock=function(t){return"x"===t||"y"===t?ks[t]?null:(ks[t]=!0,()=>{ks[t]=!1}):ks.x||ks.y?null:(ks.x=ks.y=!0,()=>{ks.x=ks.y=!1})},t.setStyle=ln,t.spring=we,t.springValue=function(t,e){const n=vs(ui(t)?t.get():t);return ci(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:oi(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=W(s)(l/e)*e}return e+l}},t.startWaapiAnimation=gn,t.statsBuffer=j,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(i):Math.ceil(i);return s(0,1,r/t)}},t.styleEffect=xs,t.supportedWaapiEasing=fn,t.supportsBrowserAnimation=kn,t.supportsFlags=cn,t.supportsLinearEasing=dn,t.supportsPartialKeyframes=rs,t.supportsScrollTimeline=un,t.svgEffect=Vs,t.sync=Ri,t.testValueType=$n,t.time=G,t.transform=ai,t.transformPropOrder=Xe,t.transformProps=He,t.transformValue=li,t.transformValueTypes=Zn,t.velocityPerSecond=y,t.vh=yt,t.vw=vt,t.warnOnce=function(t,e,n){t||v.has(e)||(console.warn(i(e,n)),v.add(e))},t.wrap=w});
|
|
@@ -71,7 +71,7 @@ function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
if (delta) {
|
|
74
|
-
// Incoporate each ancestor's scale into a
|
|
74
|
+
// Incoporate each ancestor's scale into a cumulative treeScale for this component
|
|
75
75
|
treeScale.x *= delta.x.scale;
|
|
76
76
|
treeScale.y *= delta.y.scale;
|
|
77
77
|
// Apply each ancestor's calculated delta into this component's recorded layout box
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delta-apply.mjs","sources":["../../../../src/projection/geometry/delta-apply.ts"],"sourcesContent":["import { mixNumber } from \"motion-dom\"\nimport { Axis, Box, Delta, Point } from \"motion-utils\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { IProjectionNode } from \"../node/types\"\nimport { hasTransform } from \"../utils/has-transform\"\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nexport function scalePoint(point: number, scale: number, originPoint: number) {\n const distanceFromOrigin = point - originPoint\n const scaled = scale * distanceFromOrigin\n return originPoint + scaled\n}\n\n/**\n * Applies a translate/scale delta to a point\n */\nexport function applyPointDelta(\n point: number,\n translate: number,\n scale: number,\n originPoint: number,\n boxScale?: number\n): number {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint)\n }\n\n return scalePoint(point, scale, originPoint) + translate\n}\n\n/**\n * Applies a translate/scale delta to an axis\n */\nexport function applyAxisDelta(\n axis: Axis,\n translate: number = 0,\n scale: number = 1,\n originPoint: number,\n boxScale?: number\n): void {\n axis.min = applyPointDelta(\n axis.min,\n translate,\n scale,\n originPoint,\n boxScale\n )\n\n axis.max = applyPointDelta(\n axis.max,\n translate,\n scale,\n originPoint,\n boxScale\n )\n}\n\n/**\n * Applies a translate/scale delta to a box\n */\nexport function applyBoxDelta(box: Box, { x, y }: Delta): void {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint)\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint)\n}\n\nconst TREE_SCALE_SNAP_MIN = 0.999999999999\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001\n\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nexport function applyTreeDeltas(\n box: Box,\n treeScale: Point,\n treePath: IProjectionNode[],\n isSharedTransition: boolean = false\n) {\n const treeLength = treePath.length\n if (!treeLength) return\n\n // Reset the treeScale\n treeScale.x = treeScale.y = 1\n\n let node: IProjectionNode\n let delta: Delta | undefined\n\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i]\n delta = node.projectionDelta\n\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options\n if (\n visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\"\n ) {\n continue\n }\n\n if (\n isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root\n ) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n })\n }\n\n if (delta) {\n // Incoporate each ancestor's scale into a
|
|
1
|
+
{"version":3,"file":"delta-apply.mjs","sources":["../../../../src/projection/geometry/delta-apply.ts"],"sourcesContent":["import { mixNumber } from \"motion-dom\"\nimport { Axis, Box, Delta, Point } from \"motion-utils\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { IProjectionNode } from \"../node/types\"\nimport { hasTransform } from \"../utils/has-transform\"\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nexport function scalePoint(point: number, scale: number, originPoint: number) {\n const distanceFromOrigin = point - originPoint\n const scaled = scale * distanceFromOrigin\n return originPoint + scaled\n}\n\n/**\n * Applies a translate/scale delta to a point\n */\nexport function applyPointDelta(\n point: number,\n translate: number,\n scale: number,\n originPoint: number,\n boxScale?: number\n): number {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint)\n }\n\n return scalePoint(point, scale, originPoint) + translate\n}\n\n/**\n * Applies a translate/scale delta to an axis\n */\nexport function applyAxisDelta(\n axis: Axis,\n translate: number = 0,\n scale: number = 1,\n originPoint: number,\n boxScale?: number\n): void {\n axis.min = applyPointDelta(\n axis.min,\n translate,\n scale,\n originPoint,\n boxScale\n )\n\n axis.max = applyPointDelta(\n axis.max,\n translate,\n scale,\n originPoint,\n boxScale\n )\n}\n\n/**\n * Applies a translate/scale delta to a box\n */\nexport function applyBoxDelta(box: Box, { x, y }: Delta): void {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint)\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint)\n}\n\nconst TREE_SCALE_SNAP_MIN = 0.999999999999\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001\n\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nexport function applyTreeDeltas(\n box: Box,\n treeScale: Point,\n treePath: IProjectionNode[],\n isSharedTransition: boolean = false\n) {\n const treeLength = treePath.length\n if (!treeLength) return\n\n // Reset the treeScale\n treeScale.x = treeScale.y = 1\n\n let node: IProjectionNode\n let delta: Delta | undefined\n\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i]\n delta = node.projectionDelta\n\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options\n if (\n visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\"\n ) {\n continue\n }\n\n if (\n isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root\n ) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n })\n }\n\n if (delta) {\n // Incoporate each ancestor's scale into a cumulative treeScale for this component\n treeScale.x *= delta.x.scale\n treeScale.y *= delta.y.scale\n\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta)\n }\n\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues)\n }\n }\n\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (\n treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN\n ) {\n treeScale.x = 1.0\n }\n if (\n treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN\n ) {\n treeScale.y = 1.0\n }\n}\n\nexport function translateAxis(axis: Axis, distance: number) {\n axis.min = axis.min + distance\n axis.max = axis.max + distance\n}\n\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nexport function transformAxis(\n axis: Axis,\n axisTranslate?: number,\n axisScale?: number,\n boxScale?: number,\n axisOrigin: number = 0.5\n): void {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin)\n\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale)\n}\n\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nexport function transformBox(box: Box, transform: ResolvedValues) {\n transformAxis(\n box.x,\n transform.x as number,\n transform.scaleX as number,\n transform.scale as number,\n transform.originX as number\n )\n transformAxis(\n box.y,\n transform.y as number,\n transform.scaleY as number,\n transform.scale as number,\n transform.originY as number\n )\n}\n"],"names":[],"mappings":";;;AAMA;;AAEG;SACa,UAAU,CAAC,KAAa,EAAE,KAAa,EAAE,WAAmB,EAAA;AACxE,IAAA,MAAM,kBAAkB,GAAG,KAAK,GAAG,WAAW,CAAA;AAC9C,IAAA,MAAM,MAAM,GAAG,KAAK,GAAG,kBAAkB,CAAA;IACzC,OAAO,WAAW,GAAG,MAAM,CAAA;AAC/B,CAAC;AAED;;AAEG;AACG,SAAU,eAAe,CAC3B,KAAa,EACb,SAAiB,EACjB,KAAa,EACb,WAAmB,EACnB,QAAiB,EAAA;AAEjB,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;QACxB,KAAK,GAAG,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;KACnD;IAED,OAAO,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,SAAS,CAAA;AAC5D,CAAC;AAED;;AAEG;AACa,SAAA,cAAc,CAC1B,IAAU,EACV,SAAA,GAAoB,CAAC,EACrB,KAAgB,GAAA,CAAC,EACjB,WAAmB,EACnB,QAAiB,EAAA;AAEjB,IAAA,IAAI,CAAC,GAAG,GAAG,eAAe,CACtB,IAAI,CAAC,GAAG,EACR,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,CACX,CAAA;AAED,IAAA,IAAI,CAAC,GAAG,GAAG,eAAe,CACtB,IAAI,CAAC,GAAG,EACR,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,CACX,CAAA;AACL,CAAC;AAED;;AAEG;AACG,SAAU,aAAa,CAAC,GAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAS,EAAA;AACnD,IAAA,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;AAC1D,IAAA,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;AAC9D,CAAC;AAED,MAAM,mBAAmB,GAAG,cAAc,CAAA;AAC1C,MAAM,mBAAmB,GAAG,eAAe,CAAA;AAE3C;;;;;AAKG;AACG,SAAU,eAAe,CAC3B,GAAQ,EACR,SAAgB,EAChB,QAA2B,EAC3B,kBAAA,GAA8B,KAAK,EAAA;AAEnC,IAAA,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAA;AAClC,IAAA,IAAI,CAAC,UAAU;QAAE,OAAM;;IAGvB,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,CAAC,CAAA;AAE7B,IAAA,IAAI,IAAqB,CAAA;AACzB,IAAA,IAAI,KAAwB,CAAA;AAE5B,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;AACjC,QAAA,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;AAClB,QAAA,KAAK,GAAG,IAAI,CAAC,eAAe,CAAA;AAE5B;;;AAGG;AACH,QAAA,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,OAAO,CAAA;AACtC,QAAA,IACI,aAAa;YACb,aAAa,CAAC,KAAK,CAAC,KAAK;YACzB,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,UAAU,EAClD;YACE,SAAQ;SACX;AAED,QAAA,IACI,kBAAkB;YAClB,IAAI,CAAC,OAAO,CAAC,YAAY;AACzB,YAAA,IAAI,CAAC,MAAM;AACX,YAAA,IAAI,KAAK,IAAI,CAAC,IAAI,EACpB;YACE,YAAY,CAAC,GAAG,EAAE;gBACd,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACxB,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3B,aAAA,CAAC,CAAA;SACL;QAED,IAAI,KAAK,EAAE;;YAEP,SAAS,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;YAC5B,SAAS,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;;AAG5B,YAAA,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;SAC5B;QAED,IAAI,kBAAkB,IAAI,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;AACvD,YAAA,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;SACvC;KACJ;AAED;;;AAGG;AACH,IAAA,IACI,SAAS,CAAC,CAAC,GAAG,mBAAmB;AACjC,QAAA,SAAS,CAAC,CAAC,GAAG,mBAAmB,EACnC;AACE,QAAA,SAAS,CAAC,CAAC,GAAG,GAAG,CAAA;KACpB;AACD,IAAA,IACI,SAAS,CAAC,CAAC,GAAG,mBAAmB;AACjC,QAAA,SAAS,CAAC,CAAC,GAAG,mBAAmB,EACnC;AACE,QAAA,SAAS,CAAC,CAAC,GAAG,GAAG,CAAA;KACpB;AACL,CAAC;AAEe,SAAA,aAAa,CAAC,IAAU,EAAE,QAAgB,EAAA;IACtD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAA;IAC9B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAA;AAClC,CAAC;AAED;;;;AAIG;AACa,SAAA,aAAa,CACzB,IAAU,EACV,aAAsB,EACtB,SAAkB,EAClB,QAAiB,EACjB,UAAA,GAAqB,GAAG,EAAA;AAExB,IAAA,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;;IAG7D,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAA;AACzE,CAAC;AAED;;AAEG;AACa,SAAA,YAAY,CAAC,GAAQ,EAAE,SAAyB,EAAA;IAC5D,aAAa,CACT,GAAG,CAAC,CAAC,EACL,SAAS,CAAC,CAAW,EACrB,SAAS,CAAC,MAAgB,EAC1B,SAAS,CAAC,KAAe,EACzB,SAAS,CAAC,OAAiB,CAC9B,CAAA;IACD,aAAa,CACT,GAAG,CAAC,CAAC,EACL,SAAS,CAAC,CAAW,EACrB,SAAS,CAAC,MAAgB,EAC1B,SAAS,CAAC,KAAe,EACzB,SAAS,CAAC,OAAiB,CAC9B,CAAA;AACL;;;;"}
|
|
@@ -334,7 +334,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
334
334
|
/**
|
|
335
335
|
* If the layout hasn't changed and we have an animation that hasn't started yet,
|
|
336
336
|
* finish it immediately. Otherwise it will be animating from a location
|
|
337
|
-
* that was probably never
|
|
337
|
+
* that was probably never committed to screen and look like a jumpy box.
|
|
338
338
|
*/
|
|
339
339
|
if (!hasLayoutChanged) {
|
|
340
340
|
finishAnimation(this);
|