framer-motion 12.6.2 → 12.6.3-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var create = require('./create-BLp_edji.js');
5
+ var create = require('./create-CTAzqVbr.js');
6
6
  require('motion-dom');
7
7
  require('motion-utils');
8
8
  require('react/jsx-runtime');
@@ -5451,7 +5451,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5451
5451
  * and warn against mismatches.
5452
5452
  */
5453
5453
  if (process.env.NODE_ENV === "development") {
5454
- motionUtils.warnOnce(nextValue.version === "12.6.2", `Attempting to mix Motion versions ${nextValue.version} with 12.6.2 may not work as expected.`);
5454
+ motionUtils.warnOnce(nextValue.version === "12.6.3-alpha.0", `Attempting to mix Motion versions ${nextValue.version} with 12.6.3-alpha.0 may not work as expected.`);
5455
5455
  }
5456
5456
  }
5457
5457
  else if (isMotionValue(prevValue)) {
@@ -6371,6 +6371,11 @@ function addValueToWillChange(visualElement, key) {
6371
6371
  if (isWillChangeMotionValue(willChange)) {
6372
6372
  return willChange.add(key);
6373
6373
  }
6374
+ else if (!willChange && motionUtils.MotionGlobalConfig.WillChange) {
6375
+ const newWillChange = new motionUtils.MotionGlobalConfig.WillChange("auto");
6376
+ visualElement.addValue("willChange", newWillChange);
6377
+ newWillChange.add(key);
6378
+ }
6374
6379
  }
6375
6380
 
6376
6381
  /**
package/dist/cjs/dom.js CHANGED
@@ -793,6 +793,11 @@ function addValueToWillChange(visualElement, key) {
793
793
  if (isWillChangeMotionValue(willChange)) {
794
794
  return willChange.add(key);
795
795
  }
796
+ else if (!willChange && motionUtils.MotionGlobalConfig.WillChange) {
797
+ const newWillChange = new motionUtils.MotionGlobalConfig.WillChange("auto");
798
+ visualElement.addValue("willChange", newWillChange);
799
+ newWillChange.add(key);
800
+ }
796
801
  }
797
802
 
798
803
  /**
@@ -3461,7 +3466,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3461
3466
  * and warn against mismatches.
3462
3467
  */
3463
3468
  if (process.env.NODE_ENV === "development") {
3464
- motionUtils.warnOnce(nextValue.version === "12.6.2", `Attempting to mix Motion versions ${nextValue.version} with 12.6.2 may not work as expected.`);
3469
+ motionUtils.warnOnce(nextValue.version === "12.6.3-alpha.0", `Attempting to mix Motion versions ${nextValue.version} with 12.6.3-alpha.0 may not work as expected.`);
3465
3470
  }
3466
3471
  }
3467
3472
  else if (isMotionValue(prevValue)) {
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
- var create = require('./create-BLp_edji.js');
7
+ var create = require('./create-CTAzqVbr.js');
8
8
  var motionDom = require('motion-dom');
9
9
  var motionUtils = require('motion-utils');
10
10
 
@@ -3184,6 +3184,7 @@ exports.LayoutGroup = LayoutGroup;
3184
3184
  exports.LazyMotion = LazyMotion;
3185
3185
  exports.MotionConfig = MotionConfig;
3186
3186
  exports.Reorder = namespace;
3187
+ exports.WillChangeMotionValue = WillChangeMotionValue;
3187
3188
  exports.animate = animate;
3188
3189
  exports.animateMini = animateMini;
3189
3190
  exports.animationControls = animationControls;
package/dist/dom.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const n=t=>t;let s=n;const i=!1;function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const o=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class a{constructor(){this.subscriptions=[]}add(t){var n,s;return n=this.subscriptions,s=t,-1===n.indexOf(s)&&n.push(s),()=>e(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let 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 l=t=>1e3*t,u=t=>t/1e3;function c(t,e){return e?t*(1e3/e):0}const h=r(()=>void 0!==window.ScrollTimeline);class d extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>h()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function p(t,e){return t?t[e]||t.default||t:void 0}function f(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function m(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(f(s),2e4);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:u(i)}}function g(t){return"function"==typeof t}function v(t,e){t.timeline=e,t.onfinish=null}const y=t=>Array.isArray(t)&&"number"==typeof t[0],w={linearEasing:void 0};function b(t,e){const n=r(t);return()=>{var t;return null!==(t=w[e])&&void 0!==t?t:n()}}const T=b(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),x=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e<i;e++)s+=t(o(0,i-1,e))+", ";return`linear(${s.substring(0,s.length-2)})`};function S(t){return Boolean("function"==typeof t&&T()||!t||"string"==typeof t&&(t in A||T())||y(t)||Array.isArray(t)&&t.every(S))}const M=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,A={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:M([0,.65,.55,1]),circOut:M([.55,0,1,.45]),backIn:M([.31,.01,.66,-.59]),backOut:M([.33,1.53,.69,.99])};const V=["read","resolveKeyframes","update","preRender","render","postRender"],k={value:null,addProjectionMetrics:null};function P(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=V.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&&k.value&&k.value.frameloop[e].push(l),l=0,n.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(r,e?n:void 0),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:V.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<V.length;e++)o[V[e]].cancel(t)},state:i,steps:o}}const{schedule:E,cancel:F,state:C,steps:O}=P("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:n,!0);let B;function I(){B=void 0}const L={now:()=>(void 0===B&&L.set(C.isProcessing||i?C.timestamp:performance.now()),B),set:t=>{B=t,queueMicrotask(I)}},R=!1;function D(){return R}function W(t,e,n){var s;if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function N(t,e){const n=W(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function K(t){return!("touch"===t.pointerType||D())}const j=(t,e)=>!!e&&(t===e||j(t,e.parentElement)),z=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const U=new WeakSet;function Y(t){return e=>{"Enter"===e.key&&t(e)}}function $(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function X(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!D()}class H{constructor(t,e={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=L.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=L.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new a);const n=this.events[t].add(e);return"change"===t?()=>{n(),E.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=L.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function q(t,e){return new H(t,e)}const G=(t,e,n)=>n>e?e:n<t?t:n;function Z(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}const _=100,J=10,Q=1,tt=0,et=800,nt=.3,st=.3,it={granular:.01,default:2},rt={granular:.005,default:.5},ot=.01,at=10,lt=.05,ut=1;function ct({duration:t=et,bounce:e=nt,velocity:n=tt,mass:s=Q}){let i,r,o=1-e;o=G(lt,ut,o),t=G(ot,at,u(t)),o<1?(i=e=>{const s=e*o,i=s*t;return.001-(s-n)/ht(e,o)*Math.exp(-i)},r=e=>{const s=e*o*t,r=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=ht(Math.pow(e,2),o);return(.001-i(e)>0?-1:1)*((r-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,r,5/t);if(t=l(t),isNaN(a))return{stiffness:_,damping:J,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function ht(t,e){return t*Math.sqrt(1-e*e)}const dt=["duration","bounce"],pt=["stiffness","damping","mass"];function ft(t,e){return e.some(e=>void 0!==t[e])}function mt(t=st,e=nt){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:h,mass:d,duration:p,velocity:m,isResolvedFromDuration:g}=function(t){let e={velocity:tt,stiffness:_,damping:J,mass:Q,isResolvedFromDuration:!1,...t};if(!ft(t,pt)&&ft(t,dt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*G(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Q,stiffness:i,damping:r}}else{const n=ct(t);e={...e,...n,mass:Q},e.isResolvedFromDuration=!0}return e}({...n,velocity:-u(n.velocity||0)}),v=m||0,y=h/(2*Math.sqrt(c*d)),w=o-r,b=u(Math.sqrt(c/d)),T=Math.abs(w)<5;let S;if(s||(s=T?it.granular:it.default),i||(i=T?rt.granular:rt.default),y<1){const t=ht(b,y);S=e=>{const n=Math.exp(-y*b*e);return o-n*((v+y*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===y)S=t=>o-Math.exp(-b*t)*(w+(v+b*w)*t);else{const t=b*Math.sqrt(y*y-1);S=e=>{const n=Math.exp(-y*b*e),s=Math.min(t*e,300);return o-n*((v+y*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const M={calculatedDuration:g&&p||null,next:t=>{const e=S(t);if(g)a.done=t>=p;else{let n=0;y<1&&(n=0===t?l(v):Z(S,t,e));const r=Math.abs(n)<=s,u=Math.abs(o-e)<=i;a.done=r&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(f(M),2e4),e=x(e=>M.next(t*e).value,t,30);return t+"ms "+e}};return M}const gt=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},vt=t=>Array.isArray(t)&&"number"!=typeof t[0];function yt(t,e){return vt(t)?t[gt(0,t.length,e)]:t}const wt=(t,e,n)=>t+(e-t)*n;function bt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=o(0,e,s);t.push(wt(n,1,i))}}function Tt(t){const e=[0];return bt(e,t.length-1),e}const xt=t=>Boolean(t&&t.getVelocity);function St(t){return"object"==typeof t&&!Array.isArray(t)}function Mt(t,e,n,s){return"string"==typeof t&&St(e)?W(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function At(t,e,n){return t*(e+1)}function Vt(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}function kt(t,n,s,i,r,o){!function(t,n,s){for(let i=0;i<t.length;i++){const r=t[i];r.at>n&&r.at<s&&(e(t,r),i--)}}(t,r,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:wt(r,o,i[e]),easing:yt(s,e)})}function Pt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Et(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Ft(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ct(t,e){return e[t]||(e[t]=[]),e[t]}function Ot(t){return Array.isArray(t)?t:[t]}function Bt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const It=t=>"number"==typeof t,Lt=t=>t.every(It),Rt=new WeakMap,Dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wt=new Set(Dt),Nt=new Set(["width","height","top","left","right","bottom",...Dt]),Kt=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function jt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function zt(t,e,n,s){if("function"==typeof e){const[i,r]=jt(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]=jt(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function Ut(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,q(n))}function Yt(t,e){const n=function(t,e,n){const s=t.getProps();return zt(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){Ut(t,e,Kt(r[e]))}}function $t(t,e){const n=t.getValue("willChange");if(s=n,Boolean(xt(s)&&s.add))return n.add(e);var s}const Xt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ht="data-"+Xt("framerAppearId");function qt(t){return t.props[Ht]}const Gt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Zt(t,e,s,i){if(t===e&&s===i)return n;const r=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=Gt(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:Gt(r(t),e,i)}const _t=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Jt=t=>e=>1-t(1-e),Qt=Zt(.33,1.53,.69,.99),te=Jt(Qt),ee=_t(te),ne=t=>(t*=2)<1?.5*te(t):.5*(2-Math.pow(2,-10*(t-1))),se=t=>1-Math.sin(Math.acos(t)),ie=Jt(se),re=_t(se),oe=t=>/^0[^.\s]+$/u.test(t);const ae={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},le={...ae,transform:t=>G(0,1,t)},ue={...ae,default:1},ce=t=>Math.round(1e5*t)/1e5,he=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const de=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pe=(t,e)=>n=>Boolean("string"==typeof n&&de.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),fe=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(he);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},me={...ae,transform:t=>Math.round((t=>G(0,255,t))(t))},ge={test:pe("rgb","red"),parse:fe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+me.transform(t)+", "+me.transform(e)+", "+me.transform(n)+", "+ce(le.transform(s))+")"};const ve={test:pe("#"),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:ge.transform},ye=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),we=ye("deg"),be=ye("%"),Te=ye("px"),xe=ye("vh"),Se=ye("vw"),Me={...be,parse:t=>be.parse(t)/100,transform:t=>be.transform(100*t)},Ae={test:pe("hsl","hue"),parse:fe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+be.transform(ce(e))+", "+be.transform(ce(n))+", "+ce(le.transform(s))+")"},Ve={test:t=>ge.test(t)||ve.test(t)||Ae.test(t),parse:t=>ge.test(t)?ge.parse(t):Ae.test(t)?Ae.parse(t):ve.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ge.transform(t):Ae.transform(t)},ke=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Pe=/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 Ee(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Pe,t=>(Ve.test(t)?(s.color.push(r),i.push("color"),n.push(Ve.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push("number"),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function Fe(t){return Ee(t).values}function Ce(t){const{split:e,types:n}=Ee(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+="number"===e?ce(t[r]):"color"===e?Ve.transform(t[r]):t[r]}return i}}const Oe=t=>"number"==typeof t?0:t;const Be={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(he))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(ke))||void 0===n?void 0:n.length)||0)>0},parse:Fe,createTransformer:Ce,getAnimatableNone:function(t){const e=Fe(t);return Ce(t)(e.map(Oe))}},Ie=new Set(["brightness","contrast","saturate","opacity"]);function Le(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(he)||[];if(!s)return t;const i=n.replace(s,"");let r=Ie.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Re=/\b([a-z-]*)\(.*?\)/gu,De={...Be,getAnimatableNone:t=>{const e=t.match(Re);return e?e.map(Le).join(" "):t}},We={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,backgroundPositionX:Te,backgroundPositionY:Te},Ne={rotate:we,rotateX:we,rotateY:we,rotateZ:we,scale:ue,scaleX:ue,scaleY:ue,scaleZ:ue,skew:we,skewX:we,skewY:we,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:le,originX:Me,originY:Me,originZ:Te},Ke={...ae,transform:Math.round},je={...We,...Ne,zIndex:Ke,size:Te,fillOpacity:le,strokeOpacity:le,numOctaves:Ke},ze={...je,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:De,WebkitFilter:De},Ue=t=>ze[t];function Ye(t,e){let n=Ue(t);return n!==De&&(n=Be),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const $e=new Set(["auto","none","0"]);const Xe=t=>180*t/Math.PI,He=t=>{const e=Xe(Math.atan2(t[1],t[0]));return Ge(e)},qe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:He,rotateZ:He,skewX:t=>Xe(Math.atan(t[1])),skewY:t=>Xe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ge=t=>((t%=360)<0&&(t+=360),t),Ze=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),_e=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Je={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ze,scaleY:_e,scale:t=>(Ze(t)+_e(t))/2,rotateX:t=>Ge(Xe(Math.atan2(t[6],t[5]))),rotateY:t=>Ge(Xe(Math.atan2(-t[2],t[0]))),rotateZ:He,rotate:He,skewX:t=>Xe(Math.atan(t[4])),skewY:t=>Xe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Qe(t){return t.includes("scale")?1:0}function tn(t,e){if(!t||"none"===t)return Qe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Je,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=qe,i=e}if(!i)return Qe(e);const r=s[e],o=i[1].split(",").map(en);return"function"==typeof r?r(o):o[r]}function en(t){return parseFloat(t.trim())}const nn=t=>t===ae||t===Te,sn=new Set(["x","y","z"]),rn=Dt.filter(t=>!sn.has(t));const on={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})=>tn(e,"x"),y:(t,{transform:e})=>tn(e,"y")};on.translateX=on.x,on.translateY=on.y;const an=new Set;let ln=!1,un=!1;function cn(){if(un){const t=Array.from(an).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 rn.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])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}un=!1,ln=!1,an.forEach(t=>t.complete()),an.clear()}function hn(){an.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(un=!0)})}class dn{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(an.add(this),ln||(ln=!0,E.read(hn),E.resolveKeyframes(cn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0: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])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),an.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,an.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const pn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),fn=t=>e=>"string"==typeof e&&e.startsWith(t),mn=fn("--"),gn=fn("var(--"),vn=t=>!!gn(t)&&yn.test(t.split("/*")[0].trim()),yn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,wn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bn(t,e,n=1){const[s,i]=function(t){const e=wn.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return pn(t)?parseFloat(t):t}return vn(i)?bn(i,e,n+1):i}const Tn=t=>e=>e.test(t),xn=[ae,Te,be,we,Se,xe,{test:t=>"auto"===t,parse:t=>t}],Sn=t=>xn.find(Tn(t));class Mn extends dn{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(),vn(s))){const i=bn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Nt.has(n)||2!==t.length)return;const[s,i]=t,r=Sn(s),o=Sn(i);if(r!==o)if(nn(r)&&nn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||oe(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!$e.has(e)&&Ee(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Ye(n,i)}(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=on[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(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=on[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const An=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Be.test(t)&&"0"!==t||t.startsWith("url(")));function Vn(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=An(i,e),a=An(r,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||g(n))&&s)}const kn=t=>null!==t;function Pn(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(kn),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}class En{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=L.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(hn(),cn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=L.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Vn(t,n,s,i)){if(!r)return a&&a(Pn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Fn(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 Cn(t,e){return n=>n>0?e:t}const On=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Bn=[ve,ge,Ae];function In(t){const e=(n=t,Bn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Ae&&(s=function({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=Fn(a,s,t+1/3),r=Fn(a,s,t),o=Fn(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}}(s)),s}const Ln=(t,e)=>{const n=In(t),s=In(e);if(!n||!s)return Cn(t,e);const i={...n};return t=>(i.red=On(n.red,s.red,t),i.green=On(n.green,s.green,t),i.blue=On(n.blue,s.blue,t),i.alpha=wt(n.alpha,s.alpha,t),ge.transform(i))},Rn=(t,e)=>n=>e(t(n)),Dn=(...t)=>t.reduce(Rn),Wn=new Set(["none","hidden"]);function Nn(t,e){return n=>wt(t,e,n)}function Kn(t){return"number"==typeof t?Nn:"string"==typeof t?vn(t)?Cn:Ve.test(t)?Ln:Un:Array.isArray(t)?jn:"object"==typeof t?Ve.test(t)?Ln:zn:Cn}function jn(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Kn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function zn(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Kn(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Un=(t,e)=>{const n=Be.createTransformer(e),s=Ee(t),i=Ee(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Wn.has(t)&&!i.values.length||Wn.has(e)&&!s.values.length?function(t,e){return Wn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Dn(jn(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):Cn(t,e)};function Yn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return wt(t,e,n);return Kn(t)(t,e)}function $n({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 v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(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=mt({keyframes:[d.value,p(d.value)],velocity:Z(y,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)}}}const Xn=Zt(.42,0,1,1),Hn=Zt(0,0,.58,1),qn=Zt(.42,0,.58,1),Gn={linear:n,easeIn:Xn,easeInOut:qn,easeOut:Hn,circIn:se,circInOut:re,circOut:ie,backIn:te,backInOut:ee,backOut:Qt,anticipate:ne},Zn=t=>{if(y(t)){s(4===t.length);const[e,n,i,r]=t;return Zt(e,n,i,r)}return"string"==typeof t?Gn[t]:t};function _n(t,e,{clamp:i=!0,ease:r,mixer:a}={}){const l=t.length;if(s(l===e.length),1===l)return()=>e[0];if(2===l&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,s){const i=[],r=s||Yn,o=t.length-1;for(let s=0;s<o;s++){let o=r(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||n:e;o=Dn(t,o)}i.push(o)}return i}(e,r,a),h=c.length,d=n=>{if(u&&n<t[0])return e[0];let s=0;if(h>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const i=o(t[s],t[s+1],n);return c[s](i)};return i?e=>d(G(t[0],t[l-1],e)):d}function Jn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=vt(s)?s.map(Zn):Zn(s),r={done:!1,value:e[0]},o=_n(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Tt(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||qn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const Qn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>E.update(e,!0),stop:()=>F(e),now:()=>C.isProcessing?C.timestamp:L.now()}},ts={decay:$n,inertia:$n,tween:Jn,keyframes:Jn,spring:mt},es=t=>t/100;class ns extends En{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||dn;this.resolver=new r(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=this.options,o=g(e)?e:ts[e]||Jn;let a,l;o!==Jn&&"number"!=typeof t[0]&&(a=Dn(es,Yn(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=f(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=i;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=r)),y=G(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:T}=b;v||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=Pn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?u(t.calculatedDuration):0}get time(){return u(this.currentTime)}set time(t){t=l(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=u(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Qn,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ss=new Set(["opacity","clipPath","filter","transform"]);function is(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&T()?x(e,n):y(e)?M(e):Array.isArray(e)?e.map(e=>t(e,n)||A.easeOut):A[e]:void 0}(a,i);Array.isArray(c)&&(u.easing=c);return t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}const rs=r(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const os={anticipate:ne,backInOut:ee,circInOut:re};class as extends En{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new Mn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:i,type:r,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof i&&T()&&i in os&&(i=os[i]),g((u=this.options).type)||"spring"===u.type||!S(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new ns({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,i=c.ease,r="keyframes"}const c=is(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:i});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(v(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(Pn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:r,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return u(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return u(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=l(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return n;const{animation:s}=e;v(s,t)}else this.pendingTimeline=t;return n}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:r,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...c}=this.options,h=new ns({...c,keyframes:n,duration:s,type:i,ease:r,times:o,isGenerator:!0}),d=l(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return rs()&&n&&ss.has(n)&&("transform"!==n||!l)&&!a&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const ls={type:"spring",stiffness:500,damping:25,restSpeed:10},us={type:"keyframes",duration:.8},cs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hs=(t,{keyframes:e})=>e.length>2?us:Wt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ls:cs;const ds=(t,e,n,s={},i,r)=>o=>{const a=p(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c-=l(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?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})(a)||(h={...h,...hs(t,h)}),h.duration&&(h.duration=l(h.duration)),h.repeatDelay&&(h.repeatDelay=l(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let f=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(f=!0)),h.allowFlatten=!a.type&&!a.ease,f&&!r&&void 0!==e.get()){const t=Pn(h.keyframes,a);if(void 0!==t)return E.update(()=>{h.onUpdate(t),h.onComplete()}),new d([])}return!r&&as.supports(h)?new as(h):new ns(h)};function ps({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function fs(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=l[e];if(void 0===i||c&&ps(c,e))continue;const a={delay:n,...p(o||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=qt(t);if(n){const t=window.MotionHandoffAnimation(n,e,E);null!==t&&(a.startTime=t,h=!0)}}$t(t,e),s.start(ds(e,s,i,t.shouldReduceMotion&&Nt.has(e)?{type:!1}:a,t,h));const d=s.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{E.update(()=>{a&&Yt(t,a)})}),u}const ms=()=>({x:{min:0,max:0},y:{min:0,max:0}}),gs={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"]},vs={};for(const t in gs)vs[t]={isEnabled:e=>gs[t].some(t=>!!e[t])};const ys="undefined"!=typeof window,ws={current:null},bs={current:!1};const Ts=[...xn,Ve,Be];const xs=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ss(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||xs.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const Ms=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class As{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=dn,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=L.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,E.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=r;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Ss(e),this.isVariantNode=function(t){return Boolean(Ss(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&xt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Rt.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)),bs.current||function(){if(bs.current=!0,ys)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ws.current=t.matches;t.addListener(e),e()}else ws.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ws.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),F(this.notifyUpdate),F(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Wt.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&E.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i(),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 vs){const e=vs[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<Ms.length;e++){const n=Ms[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(xt(i))t.addValue(s,i);else if(xt(r))t.addValue(s,q(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,q(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(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=q(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(pn(s)||oe(s))?s=parseFloat(s):(i=s,!Ts.find(Tn(i))&&Be.test(e)&&(s=Ye(t,e))),this.setBaseTarget(t,xt(s)?s.get():s)),xt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=zt(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||xt(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Vs extends As{constructor(){super(...arguments),this.KeyframeResolver=Mn}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;xt(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const ks=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Ps={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Es=Dt.length;function Fs(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(Wt.has(t))o=!0;else if(mn(t))i[t]=n;else{const e=ks(n,je[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<Es;r++){const o=Dt[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=ks(a,je[o]);if(!l){i=!1;s+=`${Ps[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}`}}const Cs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Os={offset:"strokeDashoffset",array:"strokeDasharray"};function Bs(t,e,n){return"string"==typeof t?t:Te.transform(e+n*t)}function Is(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Fs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Bs(e,t.x,t.width)} ${Bs(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Cs:Os;t[r.offset]=Te.transform(-s);const o=Te.transform(e),a=Te.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const Ls=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Rs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Ds={};function Ws(t,{layout:e,layoutId:n}){return Wt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ds[t]||"opacity"===t)}function Ns(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(xt(i[o])||e.style&&xt(e.style[o])||Ws(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}class Ks extends Vs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ms,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Wt.has(e)){const t=Ue(e);return t&&t.default||0}return e=Ls.has(e)?e:Xt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Ns(t,e,n);for(const n in t)if(xt(t[n])||xt(e[n])){s[-1!==Dt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&E.postRender(this.updateDimensions)}build(t,e,n){Is(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Rs(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Ls.has(n)?n:Xt(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class js extends Vs{constructor(){super(...arguments),this.type="html",this.renderInstance=Rs}readValueFromInstance(t,e){if(Wt.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return tn(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),i=(mn(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){Fs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ns(t,e,n)}}class zs extends As{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Us(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new Ks(e):new js(e);n.mount(t),Rt.set(t,n)}function Ys(t){const e=new zs({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Rt.set(t,e)}function $s(t,e,n,s){const i=[];if(function(t,e){return xt(t)||"number"==typeof t||"string"==typeof t&&!St(e)}(t,e))i.push(function(t,e,n){const s=xt(t)?t:q(t);return s.start(ds("",s,e,n)),s.animation}(t,St(e)&&e.default||e,n&&n.default||n));else{const r=Mt(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Us:Ys;Rt.has(s)||a(s);const l=Rt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...fs(l,{...e,transition:u},{}))}}return i}function Xs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,a=new Map,u=new Map,c={},h=new Map;let d=0,p=0,f=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){h.set(o,p);continue}if(!Array.isArray(o)){h.set(o.name,Vt(p,o.at,d,h));continue}let[a,v,y={}]=o;void 0!==y.at&&(p=Vt(p,y.at,d,h));let w=0;const b=(t,n,s,o=0,a=0)=>{const u=Ot(t),{delay:c=0,times:h=Tt(u),type:d="keyframes",repeat:v,repeatType:y,repeatDelay:b=0,...T}=n;let{ease:x=e.ease||"easeOut",duration:S}=n;const M="function"==typeof c?c(o,a):c,A=u.length,V=g(d)?d:null==i?void 0:i[d];if(A<=2&&V){let t=100;if(2===A&&Lt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==S&&(e.duration=l(S));const n=m(e,t,V);x=n.ease,S=n.duration}null!=S||(S=r);const k=p+M;1===h.length&&0===h[0]&&(h[1]=1);const P=h.length-u.length;if(P>0&&bt(h,P),1===u.length&&u.unshift(null),v){S=At(S,v);const t=[...u],e=[...h];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let s=0;s<v;s++){u.push(...t);for(let i=0;i<t.length;i++)h.push(e[i]+(s+1)),x.push(0===i?"linear":yt(n,i-1))}Pt(h,v)}const E=k+S;kt(s,u,x,h,k,E),w=Math.max(M+S,w),f=Math.max(E,f)};if(xt(a)){b(v,y,Ct("default",Ft(a,u)))}else{const t=Mt(a,v,s,c),e=t.length;for(let n=0;n<e;n++){v=v,y=y;const s=Ft(t[n],u);for(const t in v)b(v[t],Bt(y,t),Ct(t,s),n,e)}}d=p,p+=w}return u.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Et);const l=[],u=[],c=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];l.push(n),u.push(o(0,f,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),l.unshift(l[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),l.push(null)),a.has(s)||a.set(s,{keyframes:{},transition:{}});const h=a.get(s);h.keyframes[i]=l,h.transition[i]={...e,duration:f,ease:c,times:u,...n}}}),a}(t,e,n,{spring:mt}).forEach(({keyframes:t,transition:e},n)=>{s.push(...$s(n,t,e))}),s}function Hs(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?Xs(e,n,t):$s(e,n,s,t);const o=new d(i);return t&&t.animations.push(o),o}}const qs=Hs();function Gs(t,e,n){t.style.setProperty(e,n)}function Zs(t,e,n){t.style[e]=n}const _s=r(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Js=new WeakMap;function Qs(t){const e=Js.get(t)||new Map;return Js.set(t,e),Js.get(t)}class ti extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const s=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return u(Number(s))}get time(){var t;return this.animation?u((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=l(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t,e;this.animation&&(null===(t=this.options)||void 0===t?void 0:t.allowFlatten)&&(null===(e=this.animation.effect)||void 0===e||e.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&v(this.animation,t),n}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,n,i){const r=e.startsWith("--");s("string"!=typeof i.type);const o=Qs(t).get(e);o&&o.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let s=0;s<e.length;s++)null===e[s]&&(e[s]=0===s?n():e[s-1]),"number"==typeof e[s]&&We[t]&&(e[s]=We[t].transform(e[s]));!_s()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),g(i.type)){const t=m(i,100,i.type);i.ease=T()?t.ease:"easeOut",i.duration=l(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const a=()=>{this.setValue(t,e,Pn(n,i)),this.cancel(),this.resolveFinishedPromise()},u=()=>{this.setValue=r?Gs:Zs,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=Js.get(t);n&&n.delete(e)}};rs()?(super(is(t,e,n,i)),u(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=a,Qs(t).set(e,this)):(super(),u(),a())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const ei=(t=>function(e,n,s){return new d(function(t,e,n,s){const i=W(t,s),r=i.length,o=[];for(let t=0;t<r;t++){const s=i[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,r));for(const t in e){const n=e[t],i={...p(a,t)};i.duration=i.duration?l(i.duration):i.duration,i.delay=l(i.delay||0),i.allowFlatten=!a.type&&!a.ease,o.push(new ti(s,t,n,i))}}return o}(e,n,s,t))})();function ni(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return E.update(s,!0),()=>F(s)}const si=new WeakMap;let ii;function ri({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=si.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function oi(t){t.forEach(ri)}function ai(t,e){ii||"undefined"!=typeof ResizeObserver&&(ii=new ResizeObserver(oi));const n=W(t);return n.forEach(t=>{let n=si.get(t);n||(n=new Set,si.set(t,n)),n.add(e),null==ii||ii.observe(t)}),()=>{n.forEach(t=>{const n=si.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ii||ii.unobserve(t)})}}const li=new Set;let ui;function ci(t){return li.add(t),ui||(ui=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};li.forEach(t=>t(e))},window.addEventListener("resize",ui)),()=>{li.delete(t),!li.size&&ui&&(ui=void 0)}}const hi={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function di(t,e,n,s){const i=n[e],{length:r,position:a}=hi[e],l=i.current,u=n.time;i.current=t["scroll"+a],i.scrollLength=t["scroll"+r]-t["client"+r],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=o(0,i.scrollLength,i.current);const h=s-u;i.velocity=h>50?0:c(i.current-l,h)}const pi={start:0,center:.5,end:1};function fi(t,e,n=0){let s=0;if(t in pi&&(t=pi[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 mi=[0,0];function gi(t,e,n,s){let i=Array.isArray(t)?t:mi,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,pi[t]?t:"0"]),r=fi(i[0],n,s),o=fi(i[1],e),r-o}const vi={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},yi={x:0,y:0};function wi(t,e,n){const{offset:s=vi.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):yi,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),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=gi(s[t],u[o],l[o],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=_n(e[r].offset,Tt(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=G(0,1,e[r].interpolate(e[r].current))}function bi(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){di(t,"x",e,n),di(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&wi(t,n,s)},notify:()=>e(n)}}const Ti=new WeakMap,xi=new WeakMap,Si=new WeakMap,Mi=t=>t===document.documentElement?window:t;function Ai(t,{container:e=document.documentElement,...n}={}){let s=Si.get(e);s||(s=new Set,Si.set(e,s));const i=bi(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),!Ti.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(C.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{E.read(t,!1,!0),E.read(n,!1,!0),E.update(i,!1,!0)};Ti.set(e,a);const l=Mi(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&xi.set(e,(o=a,"function"==typeof(r=e)?ci(r):ai(r,o))),l.addEventListener("scroll",a,{passive:!0})}var r,o;const a=Ti.get(e);return E.read(a,!1,!0),()=>{var t;F(a);const n=Si.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=Ti.get(e);Ti.delete(e),s&&(Mi(e).removeEventListener("scroll",s),null===(t=xi.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Vi=new Map;function ki({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Vi.has(e)||Vi.set(e,{});const s=Vi.get(e);return s[n]||(s[n]=h()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=Ai(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function Pi(t){return t&&(t.target||t.offset)}const Ei={some:0,all:1};const Fi=(t,e)=>Math.abs(t-e);t.MotionValue=H,t.animate=qs,t.animateMini=ei,t.anticipate=ne,t.backIn=te,t.backInOut=ee,t.backOut=Qt,t.cancelFrame=F,t.circIn=se,t.circInOut=re,t.circOut=ie,t.clamp=G,t.createScopedAnimate=Hs,t.cubicBezier=Zt,t.delay=function(t,e){return function(t,e){const n=L.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(F(s),t(r-e))};return E.read(s,!0),()=>F(s)}(t,l(e))},t.distance=Fi,t.distance2D=function(t,e){const n=Fi(t.x,e.x),s=Fi(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=Xn,t.easeInOut=qn,t.easeOut=Hn,t.frame=E,t.frameData=C,t.hover=function(t,e,n={}){const[s,i,r]=N(t,n),o=t=>{if(!K(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{K(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=W(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:Ei[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=$n,t.interpolate=_n,t.invariant=s,t.isDragActive=D,t.keyframes=Jn,t.mirrorEasing=_t,t.mix=Yn,t.motionValue=q,t.noop=n,t.pipe=Dn,t.press=function(t,e,n={}){const[s,i,r]=N(t,n),o=t=>{const s=t.currentTarget;if(!X(t)||U.has(s))return;U.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),X(t)&&U.has(s)&&(U.delete(s),"function"==typeof r&&r(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||j(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),t instanceof HTMLElement&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=Y(()=>{if(U.has(n))return;$(n,"down");const t=Y(()=>{$(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>$(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i)),e=t,z.has(e.tagName)||-1!==e.tabIndex||null!==t.tabIndex||(t.tabIndex=0))}),r},t.progress=o,t.reverseEasing=Jt,t.scroll=function(t,{axis:e="y",...s}={}){const i={axis:e,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Pi(e)?Ai(n=>{t(n[e.axis].progress,n)},e):ni(t,ki(e))}(t,i):function(t,e){if(t.flatten(),Pi(e))return t.pause(),Ai(n=>{t.time=t.duration*n[e.axis].progress},e);{const s=ki(e);return t.attachTimeline?t.attachTimeline(s,t=>(t.pause(),ni(e=>{t.time=t.duration*e},s))):n}}(t,i)},t.scrollInfo=Ai,t.spring=mt,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=Zn(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(s):Math.ceil(s);return G(0,1,i/t)}},t.time=L,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=_n(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=gt}));
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)}const n=t=>t;let s=n;const i={skipAnimations:!1,useManualTiming:!1};function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const o=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class a{constructor(){this.subscriptions=[]}add(t){var n,s;return n=this.subscriptions,s=t,-1===n.indexOf(s)&&n.push(s),()=>e(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let 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 l=t=>1e3*t,u=t=>t/1e3;function c(t,e){return e?t*(1e3/e):0}const h=r(()=>void 0!==window.ScrollTimeline);class d extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>h()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function p(t,e){return t?t[e]||t.default||t:void 0}function f(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function m(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(f(s),2e4);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:u(i)}}function g(t){return"function"==typeof t}function v(t,e){t.timeline=e,t.onfinish=null}const y=t=>Array.isArray(t)&&"number"==typeof t[0],w={linearEasing:void 0};function b(t,e){const n=r(t);return()=>{var t;return null!==(t=w[e])&&void 0!==t?t:n()}}const T=b(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),x=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e<i;e++)s+=t(o(0,i-1,e))+", ";return`linear(${s.substring(0,s.length-2)})`};function S(t){return Boolean("function"==typeof t&&T()||!t||"string"==typeof t&&(t in A||T())||y(t)||Array.isArray(t)&&t.every(S))}const M=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,A={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:M([0,.65,.55,1]),circOut:M([.55,0,1,.45]),backIn:M([.31,.01,.66,-.59]),backOut:M([.33,1.53,.69,.99])};const V=["read","resolveKeyframes","update","preRender","render","postRender"],k={value:null,addProjectionMetrics:null};function P(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=V.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&&k.value&&k.value.frameloop[e].push(l),l=0,n.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(r,e?n:void 0),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:V.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<V.length;e++)o[V[e]].cancel(t)},state:i,steps:o}}const{schedule:E,cancel:C,state:F,steps:O}=P("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:n,!0);let B;function I(){B=void 0}const L={now:()=>(void 0===B&&L.set(F.isProcessing||i.useManualTiming?F.timestamp:performance.now()),B),set:t=>{B=t,queueMicrotask(I)}},R=!1;function D(){return R}function W(t,e,n){var s;if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function N(t,e){const n=W(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function K(t){return!("touch"===t.pointerType||D())}const j=(t,e)=>!!e&&(t===e||j(t,e.parentElement)),z=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const U=new WeakSet;function Y(t){return e=>{"Enter"===e.key&&t(e)}}function $(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function X(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!D()}class H{constructor(t,e={}){this.version="12.6.3-alpha.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=L.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=L.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new a);const n=this.events[t].add(e);return"change"===t?()=>{n(),E.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=L.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function q(t,e){return new H(t,e)}const G=(t,e,n)=>n>e?e:n<t?t:n;function Z(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}const _=100,J=10,Q=1,tt=0,et=800,nt=.3,st=.3,it={granular:.01,default:2},rt={granular:.005,default:.5},ot=.01,at=10,lt=.05,ut=1;function ct({duration:t=et,bounce:e=nt,velocity:n=tt,mass:s=Q}){let i,r,o=1-e;o=G(lt,ut,o),t=G(ot,at,u(t)),o<1?(i=e=>{const s=e*o,i=s*t;return.001-(s-n)/ht(e,o)*Math.exp(-i)},r=e=>{const s=e*o*t,r=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=ht(Math.pow(e,2),o);return(.001-i(e)>0?-1:1)*((r-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,r,5/t);if(t=l(t),isNaN(a))return{stiffness:_,damping:J,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function ht(t,e){return t*Math.sqrt(1-e*e)}const dt=["duration","bounce"],pt=["stiffness","damping","mass"];function ft(t,e){return e.some(e=>void 0!==t[e])}function mt(t=st,e=nt){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:h,mass:d,duration:p,velocity:m,isResolvedFromDuration:g}=function(t){let e={velocity:tt,stiffness:_,damping:J,mass:Q,isResolvedFromDuration:!1,...t};if(!ft(t,pt)&&ft(t,dt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*G(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Q,stiffness:i,damping:r}}else{const n=ct(t);e={...e,...n,mass:Q},e.isResolvedFromDuration=!0}return e}({...n,velocity:-u(n.velocity||0)}),v=m||0,y=h/(2*Math.sqrt(c*d)),w=o-r,b=u(Math.sqrt(c/d)),T=Math.abs(w)<5;let S;if(s||(s=T?it.granular:it.default),i||(i=T?rt.granular:rt.default),y<1){const t=ht(b,y);S=e=>{const n=Math.exp(-y*b*e);return o-n*((v+y*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===y)S=t=>o-Math.exp(-b*t)*(w+(v+b*w)*t);else{const t=b*Math.sqrt(y*y-1);S=e=>{const n=Math.exp(-y*b*e),s=Math.min(t*e,300);return o-n*((v+y*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const M={calculatedDuration:g&&p||null,next:t=>{const e=S(t);if(g)a.done=t>=p;else{let n=0;y<1&&(n=0===t?l(v):Z(S,t,e));const r=Math.abs(n)<=s,u=Math.abs(o-e)<=i;a.done=r&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(f(M),2e4),e=x(e=>M.next(t*e).value,t,30);return t+"ms "+e}};return M}const gt=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},vt=t=>Array.isArray(t)&&"number"!=typeof t[0];function yt(t,e){return vt(t)?t[gt(0,t.length,e)]:t}const wt=(t,e,n)=>t+(e-t)*n;function bt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=o(0,e,s);t.push(wt(n,1,i))}}function Tt(t){const e=[0];return bt(e,t.length-1),e}const xt=t=>Boolean(t&&t.getVelocity);function St(t){return"object"==typeof t&&!Array.isArray(t)}function Mt(t,e,n,s){return"string"==typeof t&&St(e)?W(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function At(t,e,n){return t*(e+1)}function Vt(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}function kt(t,n,s,i,r,o){!function(t,n,s){for(let i=0;i<t.length;i++){const r=t[i];r.at>n&&r.at<s&&(e(t,r),i--)}}(t,r,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:wt(r,o,i[e]),easing:yt(s,e)})}function Pt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Et(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Ct(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ft(t,e){return e[t]||(e[t]=[]),e[t]}function Ot(t){return Array.isArray(t)?t:[t]}function Bt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const It=t=>"number"==typeof t,Lt=t=>t.every(It),Rt=new WeakMap,Dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wt=new Set(Dt),Nt=new Set(["width","height","top","left","right","bottom",...Dt]),Kt=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function jt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function zt(t,e,n,s){if("function"==typeof e){const[i,r]=jt(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]=jt(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function Ut(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,q(n))}function Yt(t,e){const n=function(t,e,n){const s=t.getProps();return zt(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){Ut(t,e,Kt(r[e]))}}function $t(t,e){const n=t.getValue("willChange");if(s=n,Boolean(xt(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 Xt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ht="data-"+Xt("framerAppearId");function qt(t){return t.props[Ht]}const Gt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Zt(t,e,s,i){if(t===e&&s===i)return n;const r=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=Gt(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:Gt(r(t),e,i)}const _t=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Jt=t=>e=>1-t(1-e),Qt=Zt(.33,1.53,.69,.99),te=Jt(Qt),ee=_t(te),ne=t=>(t*=2)<1?.5*te(t):.5*(2-Math.pow(2,-10*(t-1))),se=t=>1-Math.sin(Math.acos(t)),ie=Jt(se),re=_t(se),oe=t=>/^0[^.\s]+$/u.test(t);const ae={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},le={...ae,transform:t=>G(0,1,t)},ue={...ae,default:1},ce=t=>Math.round(1e5*t)/1e5,he=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const de=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pe=(t,e)=>n=>Boolean("string"==typeof n&&de.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),fe=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(he);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},me={...ae,transform:t=>Math.round((t=>G(0,255,t))(t))},ge={test:pe("rgb","red"),parse:fe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+me.transform(t)+", "+me.transform(e)+", "+me.transform(n)+", "+ce(le.transform(s))+")"};const ve={test:pe("#"),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:ge.transform},ye=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),we=ye("deg"),be=ye("%"),Te=ye("px"),xe=ye("vh"),Se=ye("vw"),Me={...be,parse:t=>be.parse(t)/100,transform:t=>be.transform(100*t)},Ae={test:pe("hsl","hue"),parse:fe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+be.transform(ce(e))+", "+be.transform(ce(n))+", "+ce(le.transform(s))+")"},Ve={test:t=>ge.test(t)||ve.test(t)||Ae.test(t),parse:t=>ge.test(t)?ge.parse(t):Ae.test(t)?Ae.parse(t):ve.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ge.transform(t):Ae.transform(t)},ke=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Pe=/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 Ee(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Pe,t=>(Ve.test(t)?(s.color.push(r),i.push("color"),n.push(Ve.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push("number"),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function Ce(t){return Ee(t).values}function Fe(t){const{split:e,types:n}=Ee(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+="number"===e?ce(t[r]):"color"===e?Ve.transform(t[r]):t[r]}return i}}const Oe=t=>"number"==typeof t?0:t;const Be={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(he))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(ke))||void 0===n?void 0:n.length)||0)>0},parse:Ce,createTransformer:Fe,getAnimatableNone:function(t){const e=Ce(t);return Fe(t)(e.map(Oe))}},Ie=new Set(["brightness","contrast","saturate","opacity"]);function Le(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(he)||[];if(!s)return t;const i=n.replace(s,"");let r=Ie.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Re=/\b([a-z-]*)\(.*?\)/gu,De={...Be,getAnimatableNone:t=>{const e=t.match(Re);return e?e.map(Le).join(" "):t}},We={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,backgroundPositionX:Te,backgroundPositionY:Te},Ne={rotate:we,rotateX:we,rotateY:we,rotateZ:we,scale:ue,scaleX:ue,scaleY:ue,scaleZ:ue,skew:we,skewX:we,skewY:we,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:le,originX:Me,originY:Me,originZ:Te},Ke={...ae,transform:Math.round},je={...We,...Ne,zIndex:Ke,size:Te,fillOpacity:le,strokeOpacity:le,numOctaves:Ke},ze={...je,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:De,WebkitFilter:De},Ue=t=>ze[t];function Ye(t,e){let n=Ue(t);return n!==De&&(n=Be),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const $e=new Set(["auto","none","0"]);const Xe=t=>180*t/Math.PI,He=t=>{const e=Xe(Math.atan2(t[1],t[0]));return Ge(e)},qe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:He,rotateZ:He,skewX:t=>Xe(Math.atan(t[1])),skewY:t=>Xe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ge=t=>((t%=360)<0&&(t+=360),t),Ze=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),_e=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Je={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ze,scaleY:_e,scale:t=>(Ze(t)+_e(t))/2,rotateX:t=>Ge(Xe(Math.atan2(t[6],t[5]))),rotateY:t=>Ge(Xe(Math.atan2(-t[2],t[0]))),rotateZ:He,rotate:He,skewX:t=>Xe(Math.atan(t[4])),skewY:t=>Xe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Qe(t){return t.includes("scale")?1:0}function tn(t,e){if(!t||"none"===t)return Qe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Je,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=qe,i=e}if(!i)return Qe(e);const r=s[e],o=i[1].split(",").map(en);return"function"==typeof r?r(o):o[r]}function en(t){return parseFloat(t.trim())}const nn=t=>t===ae||t===Te,sn=new Set(["x","y","z"]),rn=Dt.filter(t=>!sn.has(t));const on={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})=>tn(e,"x"),y:(t,{transform:e})=>tn(e,"y")};on.translateX=on.x,on.translateY=on.y;const an=new Set;let ln=!1,un=!1;function cn(){if(un){const t=Array.from(an).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 rn.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])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}un=!1,ln=!1,an.forEach(t=>t.complete()),an.clear()}function hn(){an.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(un=!0)})}class dn{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(an.add(this),ln||(ln=!0,E.read(hn),E.resolveKeyframes(cn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0: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])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),an.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,an.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const pn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),fn=t=>e=>"string"==typeof e&&e.startsWith(t),mn=fn("--"),gn=fn("var(--"),vn=t=>!!gn(t)&&yn.test(t.split("/*")[0].trim()),yn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,wn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bn(t,e,n=1){const[s,i]=function(t){const e=wn.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return pn(t)?parseFloat(t):t}return vn(i)?bn(i,e,n+1):i}const Tn=t=>e=>e.test(t),xn=[ae,Te,be,we,Se,xe,{test:t=>"auto"===t,parse:t=>t}],Sn=t=>xn.find(Tn(t));class Mn extends dn{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(),vn(s))){const i=bn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Nt.has(n)||2!==t.length)return;const[s,i]=t,r=Sn(s),o=Sn(i);if(r!==o)if(nn(r)&&nn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||oe(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!$e.has(e)&&Ee(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Ye(n,i)}(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=on[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(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=on[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const An=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Be.test(t)&&"0"!==t||t.startsWith("url(")));function Vn(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=An(i,e),a=An(r,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||g(n))&&s)}const kn=t=>null!==t;function Pn(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(kn),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}class En{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=L.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(hn(),cn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=L.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Vn(t,n,s,i)){if(!r)return a&&a(Pn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Cn(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 Fn(t,e){return n=>n>0?e:t}const On=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Bn=[ve,ge,Ae];function In(t){const e=(n=t,Bn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Ae&&(s=function({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=Cn(a,s,t+1/3),r=Cn(a,s,t),o=Cn(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}}(s)),s}const Ln=(t,e)=>{const n=In(t),s=In(e);if(!n||!s)return Fn(t,e);const i={...n};return t=>(i.red=On(n.red,s.red,t),i.green=On(n.green,s.green,t),i.blue=On(n.blue,s.blue,t),i.alpha=wt(n.alpha,s.alpha,t),ge.transform(i))},Rn=(t,e)=>n=>e(t(n)),Dn=(...t)=>t.reduce(Rn),Wn=new Set(["none","hidden"]);function Nn(t,e){return n=>wt(t,e,n)}function Kn(t){return"number"==typeof t?Nn:"string"==typeof t?vn(t)?Fn:Ve.test(t)?Ln:Un:Array.isArray(t)?jn:"object"==typeof t?Ve.test(t)?Ln:zn:Fn}function jn(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Kn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function zn(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Kn(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Un=(t,e)=>{const n=Be.createTransformer(e),s=Ee(t),i=Ee(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Wn.has(t)&&!i.values.length||Wn.has(e)&&!s.values.length?function(t,e){return Wn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Dn(jn(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):Fn(t,e)};function Yn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return wt(t,e,n);return Kn(t)(t,e)}function $n({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 v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(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=mt({keyframes:[d.value,p(d.value)],velocity:Z(y,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)}}}const Xn=Zt(.42,0,1,1),Hn=Zt(0,0,.58,1),qn=Zt(.42,0,.58,1),Gn={linear:n,easeIn:Xn,easeInOut:qn,easeOut:Hn,circIn:se,circInOut:re,circOut:ie,backIn:te,backInOut:ee,backOut:Qt,anticipate:ne},Zn=t=>{if(y(t)){s(4===t.length);const[e,n,i,r]=t;return Zt(e,n,i,r)}return"string"==typeof t?Gn[t]:t};function _n(t,e,{clamp:i=!0,ease:r,mixer:a}={}){const l=t.length;if(s(l===e.length),1===l)return()=>e[0];if(2===l&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,s){const i=[],r=s||Yn,o=t.length-1;for(let s=0;s<o;s++){let o=r(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||n:e;o=Dn(t,o)}i.push(o)}return i}(e,r,a),h=c.length,d=n=>{if(u&&n<t[0])return e[0];let s=0;if(h>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const i=o(t[s],t[s+1],n);return c[s](i)};return i?e=>d(G(t[0],t[l-1],e)):d}function Jn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=vt(s)?s.map(Zn):Zn(s),r={done:!1,value:e[0]},o=_n(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Tt(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||qn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const Qn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>E.update(e,!0),stop:()=>C(e),now:()=>F.isProcessing?F.timestamp:L.now()}},ts={decay:$n,inertia:$n,tween:Jn,keyframes:Jn,spring:mt},es=t=>t/100;class ns extends En{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||dn;this.resolver=new r(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=this.options,o=g(e)?e:ts[e]||Jn;let a,l;o!==Jn&&"number"!=typeof t[0]&&(a=Dn(es,Yn(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=f(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=i;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=r)),y=G(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:T}=b;v||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=Pn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?u(t.calculatedDuration):0}get time(){return u(this.currentTime)}set time(t){t=l(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=u(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Qn,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ss=new Set(["opacity","clipPath","filter","transform"]);function is(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&T()?x(e,n):y(e)?M(e):Array.isArray(e)?e.map(e=>t(e,n)||A.easeOut):A[e]:void 0}(a,i);Array.isArray(c)&&(u.easing=c);return t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}const rs=r(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const os={anticipate:ne,backInOut:ee,circInOut:re};class as extends En{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new Mn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:i,type:r,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof i&&T()&&i in os&&(i=os[i]),g((u=this.options).type)||"spring"===u.type||!S(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new ns({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,i=c.ease,r="keyframes"}const c=is(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:i});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(v(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(Pn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:r,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return u(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return u(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=l(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return n;const{animation:s}=e;v(s,t)}else this.pendingTimeline=t;return n}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:r,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...c}=this.options,h=new ns({...c,keyframes:n,duration:s,type:i,ease:r,times:o,isGenerator:!0}),d=l(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return rs()&&n&&ss.has(n)&&("transform"!==n||!l)&&!a&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const ls={type:"spring",stiffness:500,damping:25,restSpeed:10},us={type:"keyframes",duration:.8},cs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hs=(t,{keyframes:e})=>e.length>2?us:Wt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ls:cs;const ds=(t,e,n,s={},i,r)=>o=>{const a=p(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c-=l(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?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})(a)||(h={...h,...hs(t,h)}),h.duration&&(h.duration=l(h.duration)),h.repeatDelay&&(h.repeatDelay=l(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let f=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(f=!0)),h.allowFlatten=!a.type&&!a.ease,f&&!r&&void 0!==e.get()){const t=Pn(h.keyframes,a);if(void 0!==t)return E.update(()=>{h.onUpdate(t),h.onComplete()}),new d([])}return!r&&as.supports(h)?new as(h):new ns(h)};function ps({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function fs(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=l[e];if(void 0===i||c&&ps(c,e))continue;const a={delay:n,...p(o||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=qt(t);if(n){const t=window.MotionHandoffAnimation(n,e,E);null!==t&&(a.startTime=t,h=!0)}}$t(t,e),s.start(ds(e,s,i,t.shouldReduceMotion&&Nt.has(e)?{type:!1}:a,t,h));const d=s.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{E.update(()=>{a&&Yt(t,a)})}),u}const ms=()=>({x:{min:0,max:0},y:{min:0,max:0}}),gs={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"]},vs={};for(const t in gs)vs[t]={isEnabled:e=>gs[t].some(t=>!!e[t])};const ys="undefined"!=typeof window,ws={current:null},bs={current:!1};const Ts=[...xn,Ve,Be];const xs=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ss(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||xs.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const Ms=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class As{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=dn,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=L.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,E.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=r;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Ss(e),this.isVariantNode=function(t){return Boolean(Ss(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&xt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Rt.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)),bs.current||function(){if(bs.current=!0,ys)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ws.current=t.matches;t.addListener(e),e()}else ws.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ws.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),C(this.notifyUpdate),C(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Wt.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&E.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i(),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 vs){const e=vs[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<Ms.length;e++){const n=Ms[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(xt(i))t.addValue(s,i);else if(xt(r))t.addValue(s,q(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,q(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(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=q(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(pn(s)||oe(s))?s=parseFloat(s):(i=s,!Ts.find(Tn(i))&&Be.test(e)&&(s=Ye(t,e))),this.setBaseTarget(t,xt(s)?s.get():s)),xt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=zt(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||xt(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Vs extends As{constructor(){super(...arguments),this.KeyframeResolver=Mn}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;xt(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const ks=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Ps={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Es=Dt.length;function Cs(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(Wt.has(t))o=!0;else if(mn(t))i[t]=n;else{const e=ks(n,je[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<Es;r++){const o=Dt[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=ks(a,je[o]);if(!l){i=!1;s+=`${Ps[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}`}}const Fs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Os={offset:"strokeDashoffset",array:"strokeDasharray"};function Bs(t,e,n){return"string"==typeof t?t:Te.transform(e+n*t)}function Is(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Cs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Bs(e,t.x,t.width)} ${Bs(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Fs:Os;t[r.offset]=Te.transform(-s);const o=Te.transform(e),a=Te.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const Ls=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Rs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Ds={};function Ws(t,{layout:e,layoutId:n}){return Wt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ds[t]||"opacity"===t)}function Ns(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(xt(i[o])||e.style&&xt(e.style[o])||Ws(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}class Ks extends Vs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ms,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Wt.has(e)){const t=Ue(e);return t&&t.default||0}return e=Ls.has(e)?e:Xt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Ns(t,e,n);for(const n in t)if(xt(t[n])||xt(e[n])){s[-1!==Dt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&E.postRender(this.updateDimensions)}build(t,e,n){Is(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Rs(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Ls.has(n)?n:Xt(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class js extends Vs{constructor(){super(...arguments),this.type="html",this.renderInstance=Rs}readValueFromInstance(t,e){if(Wt.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return tn(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),i=(mn(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){Cs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ns(t,e,n)}}class zs extends As{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Us(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new Ks(e):new js(e);n.mount(t),Rt.set(t,n)}function Ys(t){const e=new zs({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Rt.set(t,e)}function $s(t,e,n,s){const i=[];if(function(t,e){return xt(t)||"number"==typeof t||"string"==typeof t&&!St(e)}(t,e))i.push(function(t,e,n){const s=xt(t)?t:q(t);return s.start(ds("",s,e,n)),s.animation}(t,St(e)&&e.default||e,n&&n.default||n));else{const r=Mt(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Us:Ys;Rt.has(s)||a(s);const l=Rt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...fs(l,{...e,transition:u},{}))}}return i}function Xs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,a=new Map,u=new Map,c={},h=new Map;let d=0,p=0,f=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){h.set(o,p);continue}if(!Array.isArray(o)){h.set(o.name,Vt(p,o.at,d,h));continue}let[a,v,y={}]=o;void 0!==y.at&&(p=Vt(p,y.at,d,h));let w=0;const b=(t,n,s,o=0,a=0)=>{const u=Ot(t),{delay:c=0,times:h=Tt(u),type:d="keyframes",repeat:v,repeatType:y,repeatDelay:b=0,...T}=n;let{ease:x=e.ease||"easeOut",duration:S}=n;const M="function"==typeof c?c(o,a):c,A=u.length,V=g(d)?d:null==i?void 0:i[d];if(A<=2&&V){let t=100;if(2===A&&Lt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==S&&(e.duration=l(S));const n=m(e,t,V);x=n.ease,S=n.duration}null!=S||(S=r);const k=p+M;1===h.length&&0===h[0]&&(h[1]=1);const P=h.length-u.length;if(P>0&&bt(h,P),1===u.length&&u.unshift(null),v){S=At(S,v);const t=[...u],e=[...h];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let s=0;s<v;s++){u.push(...t);for(let i=0;i<t.length;i++)h.push(e[i]+(s+1)),x.push(0===i?"linear":yt(n,i-1))}Pt(h,v)}const E=k+S;kt(s,u,x,h,k,E),w=Math.max(M+S,w),f=Math.max(E,f)};if(xt(a)){b(v,y,Ft("default",Ct(a,u)))}else{const t=Mt(a,v,s,c),e=t.length;for(let n=0;n<e;n++){v=v,y=y;const s=Ct(t[n],u);for(const t in v)b(v[t],Bt(y,t),Ft(t,s),n,e)}}d=p,p+=w}return u.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Et);const l=[],u=[],c=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];l.push(n),u.push(o(0,f,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),l.unshift(l[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),l.push(null)),a.has(s)||a.set(s,{keyframes:{},transition:{}});const h=a.get(s);h.keyframes[i]=l,h.transition[i]={...e,duration:f,ease:c,times:u,...n}}}),a}(t,e,n,{spring:mt}).forEach(({keyframes:t,transition:e},n)=>{s.push(...$s(n,t,e))}),s}function Hs(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?Xs(e,n,t):$s(e,n,s,t);const o=new d(i);return t&&t.animations.push(o),o}}const qs=Hs();function Gs(t,e,n){t.style.setProperty(e,n)}function Zs(t,e,n){t.style[e]=n}const _s=r(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Js=new WeakMap;function Qs(t){const e=Js.get(t)||new Map;return Js.set(t,e),Js.get(t)}class ti extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const s=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return u(Number(s))}get time(){var t;return this.animation?u((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=l(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t,e;this.animation&&(null===(t=this.options)||void 0===t?void 0:t.allowFlatten)&&(null===(e=this.animation.effect)||void 0===e||e.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&v(this.animation,t),n}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,n,i){const r=e.startsWith("--");s("string"!=typeof i.type);const o=Qs(t).get(e);o&&o.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let s=0;s<e.length;s++)null===e[s]&&(e[s]=0===s?n():e[s-1]),"number"==typeof e[s]&&We[t]&&(e[s]=We[t].transform(e[s]));!_s()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),g(i.type)){const t=m(i,100,i.type);i.ease=T()?t.ease:"easeOut",i.duration=l(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const a=()=>{this.setValue(t,e,Pn(n,i)),this.cancel(),this.resolveFinishedPromise()},u=()=>{this.setValue=r?Gs:Zs,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=Js.get(t);n&&n.delete(e)}};rs()?(super(is(t,e,n,i)),u(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=a,Qs(t).set(e,this)):(super(),u(),a())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const ei=(t=>function(e,n,s){return new d(function(t,e,n,s){const i=W(t,s),r=i.length,o=[];for(let t=0;t<r;t++){const s=i[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,r));for(const t in e){const n=e[t],i={...p(a,t)};i.duration=i.duration?l(i.duration):i.duration,i.delay=l(i.delay||0),i.allowFlatten=!a.type&&!a.ease,o.push(new ti(s,t,n,i))}}return o}(e,n,s,t))})();function ni(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return E.update(s,!0),()=>C(s)}const si=new WeakMap;let ii;function ri({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=si.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function oi(t){t.forEach(ri)}function ai(t,e){ii||"undefined"!=typeof ResizeObserver&&(ii=new ResizeObserver(oi));const n=W(t);return n.forEach(t=>{let n=si.get(t);n||(n=new Set,si.set(t,n)),n.add(e),null==ii||ii.observe(t)}),()=>{n.forEach(t=>{const n=si.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ii||ii.unobserve(t)})}}const li=new Set;let ui;function ci(t){return li.add(t),ui||(ui=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};li.forEach(t=>t(e))},window.addEventListener("resize",ui)),()=>{li.delete(t),!li.size&&ui&&(ui=void 0)}}const hi={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function di(t,e,n,s){const i=n[e],{length:r,position:a}=hi[e],l=i.current,u=n.time;i.current=t["scroll"+a],i.scrollLength=t["scroll"+r]-t["client"+r],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=o(0,i.scrollLength,i.current);const h=s-u;i.velocity=h>50?0:c(i.current-l,h)}const pi={start:0,center:.5,end:1};function fi(t,e,n=0){let s=0;if(t in pi&&(t=pi[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 mi=[0,0];function gi(t,e,n,s){let i=Array.isArray(t)?t:mi,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,pi[t]?t:"0"]),r=fi(i[0],n,s),o=fi(i[1],e),r-o}const vi={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},yi={x:0,y:0};function wi(t,e,n){const{offset:s=vi.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):yi,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),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=gi(s[t],u[o],l[o],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=_n(e[r].offset,Tt(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=G(0,1,e[r].interpolate(e[r].current))}function bi(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){di(t,"x",e,n),di(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&wi(t,n,s)},notify:()=>e(n)}}const Ti=new WeakMap,xi=new WeakMap,Si=new WeakMap,Mi=t=>t===document.documentElement?window:t;function Ai(t,{container:e=document.documentElement,...n}={}){let s=Si.get(e);s||(s=new Set,Si.set(e,s));const i=bi(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),!Ti.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(F.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{E.read(t,!1,!0),E.read(n,!1,!0),E.update(i,!1,!0)};Ti.set(e,a);const l=Mi(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&xi.set(e,(o=a,"function"==typeof(r=e)?ci(r):ai(r,o))),l.addEventListener("scroll",a,{passive:!0})}var r,o;const a=Ti.get(e);return E.read(a,!1,!0),()=>{var t;C(a);const n=Si.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=Ti.get(e);Ti.delete(e),s&&(Mi(e).removeEventListener("scroll",s),null===(t=xi.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Vi=new Map;function ki({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Vi.has(e)||Vi.set(e,{});const s=Vi.get(e);return s[n]||(s[n]=h()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=Ai(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function Pi(t){return t&&(t.target||t.offset)}const Ei={some:0,all:1};const Ci=(t,e)=>Math.abs(t-e);t.MotionValue=H,t.animate=qs,t.animateMini=ei,t.anticipate=ne,t.backIn=te,t.backInOut=ee,t.backOut=Qt,t.cancelFrame=C,t.circIn=se,t.circInOut=re,t.circOut=ie,t.clamp=G,t.createScopedAnimate=Hs,t.cubicBezier=Zt,t.delay=function(t,e){return function(t,e){const n=L.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(C(s),t(r-e))};return E.read(s,!0),()=>C(s)}(t,l(e))},t.distance=Ci,t.distance2D=function(t,e){const n=Ci(t.x,e.x),s=Ci(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=Xn,t.easeInOut=qn,t.easeOut=Hn,t.frame=E,t.frameData=F,t.hover=function(t,e,n={}){const[s,i,r]=N(t,n),o=t=>{if(!K(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{K(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=W(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:Ei[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=$n,t.interpolate=_n,t.invariant=s,t.isDragActive=D,t.keyframes=Jn,t.mirrorEasing=_t,t.mix=Yn,t.motionValue=q,t.noop=n,t.pipe=Dn,t.press=function(t,e,n={}){const[s,i,r]=N(t,n),o=t=>{const s=t.currentTarget;if(!X(t)||U.has(s))return;U.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),X(t)&&U.has(s)&&(U.delete(s),"function"==typeof r&&r(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||j(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),t instanceof HTMLElement&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=Y(()=>{if(U.has(n))return;$(n,"down");const t=Y(()=>{$(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>$(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i)),e=t,z.has(e.tagName)||-1!==e.tabIndex||null!==t.tabIndex||(t.tabIndex=0))}),r},t.progress=o,t.reverseEasing=Jt,t.scroll=function(t,{axis:e="y",...s}={}){const i={axis:e,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Pi(e)?Ai(n=>{t(n[e.axis].progress,n)},e):ni(t,ki(e))}(t,i):function(t,e){if(t.flatten(),Pi(e))return t.pause(),Ai(n=>{t.time=t.duration*n[e.axis].progress},e);{const s=ki(e);return t.attachTimeline?t.attachTimeline(s,t=>(t.pause(),ni(e=>{t.time=t.duration*e},s))):n}}(t,i)},t.scrollInfo=Ai,t.spring=mt,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=Zn(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(s):Math.ceil(s);return G(0,1,i/t)}},t.time=L,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=_n(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=gt}));
package/dist/es/index.mjs CHANGED
@@ -31,6 +31,7 @@ export { useTime } from './value/use-time.mjs';
31
31
  export { useTransform } from './value/use-transform.mjs';
32
32
  export { useVelocity } from './value/use-velocity.mjs';
33
33
  export { useWillChange } from './value/use-will-change/index.mjs';
34
+ export { WillChangeMotionValue } from './value/use-will-change/WillChangeMotionValue.mjs';
34
35
  export { resolveMotionValue } from './value/utils/resolve-motion-value.mjs';
35
36
  export { useReducedMotion } from './utils/reduced-motion/use-reduced-motion.mjs';
36
37
  export { useReducedMotionConfig } from './utils/reduced-motion/use-reduced-motion-config.mjs';
@@ -17,7 +17,7 @@ function updateMotionValuesFromProps(element, next, prev) {
17
17
  * and warn against mismatches.
18
18
  */
19
19
  if (process.env.NODE_ENV === "development") {
20
- warnOnce(nextValue.version === "12.6.2", `Attempting to mix Motion versions ${nextValue.version} with 12.6.2 may not work as expected.`);
20
+ warnOnce(nextValue.version === "12.6.3-alpha.0", `Attempting to mix Motion versions ${nextValue.version} with 12.6.3-alpha.0 may not work as expected.`);
21
21
  }
22
22
  }
23
23
  else if (isMotionValue(prevValue)) {
@@ -1,3 +1,4 @@
1
+ import { MotionGlobalConfig } from 'motion-utils';
1
2
  import { isWillChangeMotionValue } from './is.mjs';
2
3
 
3
4
  function addValueToWillChange(visualElement, key) {
@@ -9,6 +10,11 @@ function addValueToWillChange(visualElement, key) {
9
10
  if (isWillChangeMotionValue(willChange)) {
10
11
  return willChange.add(key);
11
12
  }
13
+ else if (!willChange && MotionGlobalConfig.WillChange) {
14
+ const newWillChange = new MotionGlobalConfig.WillChange("auto");
15
+ visualElement.addValue("willChange", newWillChange);
16
+ newWillChange.add(key);
17
+ }
12
18
  }
13
19
 
14
20
  export { addValueToWillChange };
@@ -1373,7 +1373,7 @@
1373
1373
  * This will be replaced by the build step with the latest version number.
1374
1374
  * When MotionValues are provided to motion components, warn if versions are mixed.
1375
1375
  */
1376
- this.version = "12.6.1";
1376
+ this.version = "12.6.3-alpha.0";
1377
1377
  /**
1378
1378
  * Tracks whether this value can output a velocity. Currently this is only true
1379
1379
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -6968,7 +6968,7 @@
6968
6968
  * and warn against mismatches.
6969
6969
  */
6970
6970
  {
6971
- warnOnce(nextValue.version === "12.6.2", `Attempting to mix Motion versions ${nextValue.version} with 12.6.2 may not work as expected.`);
6971
+ warnOnce(nextValue.version === "12.6.3-alpha.0", `Attempting to mix Motion versions ${nextValue.version} with 12.6.3-alpha.0 may not work as expected.`);
6972
6972
  }
6973
6973
  }
6974
6974
  else if (isMotionValue(prevValue)) {
@@ -8074,6 +8074,11 @@
8074
8074
  if (isWillChangeMotionValue(willChange)) {
8075
8075
  return willChange.add(key);
8076
8076
  }
8077
+ else if (!willChange && MotionGlobalConfig.WillChange) {
8078
+ const newWillChange = new MotionGlobalConfig.WillChange("auto");
8079
+ visualElement.addValue("willChange", newWillChange);
8080
+ newWillChange.add(key);
8081
+ }
8077
8082
  }
8078
8083
 
8079
8084
  /**
@@ -13220,6 +13225,7 @@
13220
13225
  exports.Reorder = namespace;
13221
13226
  exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext;
13222
13227
  exports.VisualElement = VisualElement;
13228
+ exports.WillChangeMotionValue = WillChangeMotionValue;
13223
13229
  exports.addPointerEvent = addPointerEvent;
13224
13230
  exports.addPointerInfo = addPointerInfo;
13225
13231
  exports.addScaleCorrector = addScaleCorrector;