framer-motion 11.3.13 → 11.3.14

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.
@@ -279,7 +279,7 @@ class MotionValue {
279
279
  * This will be replaced by the build step with the latest version number.
280
280
  * When MotionValues are provided to motion components, warn if versions are mixed.
281
281
  */
282
- this.version = "11.3.13";
282
+ this.version = "11.3.14";
283
283
  /**
284
284
  * Tracks whether this value can output a velocity. Currently this is only true
285
285
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -3752,7 +3752,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3752
3752
  * and warn against mismatches.
3753
3753
  */
3754
3754
  if (process.env.NODE_ENV === "development") {
3755
- warnOnce(nextValue.version === "11.3.13", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.13 may not work as expected.`);
3755
+ warnOnce(nextValue.version === "11.3.14", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.14 may not work as expected.`);
3756
3756
  }
3757
3757
  }
3758
3758
  else if (isMotionValue(prevValue)) {
package/dist/cjs/index.js CHANGED
@@ -4813,7 +4813,7 @@ class MotionValue {
4813
4813
  * This will be replaced by the build step with the latest version number.
4814
4814
  * When MotionValues are provided to motion components, warn if versions are mixed.
4815
4815
  */
4816
- this.version = "11.3.13";
4816
+ this.version = "11.3.14";
4817
4817
  /**
4818
4818
  * Tracks whether this value can output a velocity. Currently this is only true
4819
4819
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -7277,7 +7277,7 @@ function updateMotionValuesFromProps(element, next, prev) {
7277
7277
  * and warn against mismatches.
7278
7278
  */
7279
7279
  if (process.env.NODE_ENV === "development") {
7280
- warnOnce(nextValue.version === "11.3.13", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.13 may not work as expected.`);
7280
+ warnOnce(nextValue.version === "11.3.14", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.14 may not work as expected.`);
7281
7281
  }
7282
7282
  }
7283
7283
  else if (isMotionValue(prevValue)) {
@@ -10605,7 +10605,7 @@ function usePresence() {
10605
10605
  // either be null or non-null for the lifespan of the component.
10606
10606
  const id = React.useId();
10607
10607
  React.useEffect(() => register(id), []);
10608
- const safeToRemove = () => onExitComplete && onExitComplete(id);
10608
+ const safeToRemove = React.useCallback(() => onExitComplete && onExitComplete(id), [id, onExitComplete]);
10609
10609
  return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
10610
10610
  }
10611
10611
  /**
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";const e=t=>t,n=!1;const s=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:r,cancel:i,state:o,steps:a}=function(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,r=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){i.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,r=!1,o=!1)=>{const a=o&&s?e:n;return r&&i.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),i.delete(t)},process:t=>{o=t,s?r=!0:(s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,r&&(r=!1,l.process(t)))}};return l}(o),t),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const s=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1),i.timestamp=s,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))};return{schedule:s.reduce((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(f)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<s.length;e++)a[s[e]].cancel(t)},state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function l(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class u{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>l(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function c(t,e){return e?t*(1e3/e):0}let h;function d(){h=void 0}const p={now:()=>(void 0===h&&p.set(o.isProcessing||n?o.timestamp:performance.now()),h),set:t=>{h=t,queueMicrotask(d)}};class f{constructor(t,e={}){this.version="11.3.13",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=p.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=p.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 u);const n=this.events[t].add(e);return"change"===t?()=>{n(),r.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=p.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 m(t,e){return new f(t,e)}let g=e,v=e;function y(t,e,n){var s;if("string"==typeof t){let r=document;e&&(v(Boolean(e.current)),r=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=r.querySelectorAll(t)),t=n[t]):t=r.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const w=new WeakMap;function b(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return r.update(s,!0),()=>i(s)}function x(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=x(()=>void 0!==window.ScrollTimeline);class V{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!S()||!e.attachTimeline)return e.pause(),b(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const T=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],A=new Set(T),M=t=>1e3*t,k=t=>t/1e3,P={type:"spring",stiffness:500,damping:25,restSpeed:10},C={type:"keyframes",duration:.8},F={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},E=(t,{keyframes:e})=>e.length>2?C:A.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:P:F;function O(t,e){return t[e]||t.default||t}const R=t=>null!==t;function B(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(R),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}const I=t=>/^0[^.\s]+$/u.test(t);const W=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),D=t=>e=>"string"==typeof e&&e.startsWith(t),L=D("--"),K=D("var(--"),N=t=>!!K(t)&&z.test(t.split("/*")[0].trim()),z=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,j=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $(t,e,n=1){const[s,r]=function(t){const e=j.exec(t);if(!e)return[,];const[,n,s,r]=e;return["--"+(null!=n?n:s),r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return W(t)?parseFloat(t):t}return N(r)?$(r,e,n+1):r}const H=(t,e,n)=>n>e?e:n<t?t:n,U={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Y={...U,transform:t=>H(0,1,t)},q={...U,default:1},X=t=>Math.round(1e5*t)/1e5,G=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Z=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function J(t){return"string"==typeof t}const Q=t=>({test:e=>J(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),tt=Q("deg"),et=Q("%"),nt=Q("px"),st=Q("vh"),rt=Q("vw"),it={...et,parse:t=>et.parse(t)/100,transform:t=>et.transform(100*t)},ot=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),at=t=>t===U||t===nt,lt=(t,e)=>parseFloat(t.split(", ")[e]),ut=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return lt(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?lt(e[1],t):0}},ct=new Set(["x","y","z"]),ht=T.filter(t=>!ct.has(t));const dt={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:ut(4,13),y:ut(5,14)};dt.translateX=dt.x,dt.translateY=dt.y;const pt=t=>e=>e.test(t),ft=[U,nt,et,tt,rt,st,{test:t=>"auto"===t,parse:t=>t}],mt=t=>ft.find(pt(t)),gt=new Set;let vt=!1,yt=!1;function wt(){if(yt){const t=Array.from(gt).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 ht.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)})}yt=!1,vt=!1,gt.forEach(t=>t.complete()),gt.clear()}function bt(){gt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yt=!0)})}class xt{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gt.add(this),vt||(vt=!0,r.read(bt),r.resolveKeyframes(wt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0:s.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),gt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,gt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const St=(t,e)=>n=>Boolean(J(n)&&_.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vt=(t,e,n)=>s=>{if(!J(s))return s;const[r,i,o,a]=s.match(G);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Tt={...U,transform:t=>Math.round((t=>H(0,255,t))(t))},At={test:St("rgb","red"),parse:Vt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Tt.transform(t)+", "+Tt.transform(e)+", "+Tt.transform(n)+", "+X(Y.transform(s))+")"};const Mt={test:St("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:At.transform},kt={test:St("hsl","hue"),parse:Vt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+et.transform(X(e))+", "+et.transform(X(n))+", "+X(Y.transform(s))+")"},Pt={test:t=>At.test(t)||Mt.test(t)||kt.test(t),parse:t=>At.test(t)?At.parse(t):kt.test(t)?kt.parse(t):Mt.parse(t),transform:t=>J(t)?t:t.hasOwnProperty("red")?At.transform(t):kt.transform(t)};const Ct=/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 Ft(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ct,t=>(Pt.test(t)?(s.color.push(i),r.push("color"),n.push(Pt.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push("number"),n.push(parseFloat(t))),++i,"${}")).split("${}");return{values:n,split:o,indexes:s,types:r}}function Et(t){return Ft(t).values}function Ot(t){const{split:e,types:n}=Ft(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+="number"===e?X(t[i]):"color"===e?Pt.transform(t[i]):t[i]}return r}}const Rt=t=>"number"==typeof t?0:t;const Bt={test:function(t){var e,n;return isNaN(t)&&J(t)&&((null===(e=t.match(G))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Z))||void 0===n?void 0:n.length)||0)>0},parse:Et,createTransformer:Ot,getAnimatableNone:function(t){const e=Et(t);return Ot(t)(e.map(Rt))}},It=new Set(["brightness","contrast","saturate","opacity"]);function Wt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(G)||[];if(!s)return t;const r=n.replace(s,"");let i=It.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Dt=/\b([a-z-]*)\(.*?\)/gu,Lt={...Bt,getAnimatableNone:t=>{const e=t.match(Dt);return e?e.map(Wt).join(" "):t}},Kt={...U,transform:Math.round},Nt={borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,size:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:q,scaleX:q,scaleY:q,scaleZ:q,skew:tt,skewX:tt,skewY:tt,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:Y,originX:it,originY:it,originZ:nt,zIndex:Kt,backgroundPositionX:nt,backgroundPositionY:nt,fillOpacity:Y,strokeOpacity:Y,numOctaves:Kt},zt={...Nt,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:Lt,WebkitFilter:Lt},jt=t=>zt[t];function $t(t,e){let n=jt(t);return n!==Lt&&(n=Bt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ht=new Set(["auto","none","0"]);class Ut extends xt{constructor(t,e,n,s){super(t,e,n,s,null==s?void 0:s.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),N(s))){const r=$(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!ot.has(n)||2!==t.length)return;const[s,r]=t,i=mt(s),o=mt(r);if(i!==o)if(at(i)&&at(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||I(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!Ht.has(e)&&Ft(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=$t(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[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.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=dt[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 Yt=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Bt.test(t)&&"0"!==t||t.startsWith("url(")));class qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(bt(),wt()),this._resolved}onKeyframesResolved(t,e){this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=Yt(r,e),a=Yt(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||"spring"===n&&s)}(t,n,s,r)){if(!i)return null==a||a(B(t,this.options,e)),null==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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Xt(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}function Gt({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,o=1-e;o=H(.05,1,o),t=H(.01,10,k(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/Zt(e,o)*Math.exp(-r)},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Zt(Math.pow(e,2),o);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=M(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function Zt(t,e){return t*Math.sqrt(1-e*e)}const _t=["duration","bounce"],Jt=["stiffness","damping","mass"];function Qt(t,e){return e.some(e=>void 0!==t[e])}function te({keyframes:t,restDelta:e,restSpeed:n,...s}){const r=t[0],i=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Qt(t,Jt)&&Qt(t,_t)){const n=Gt(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-k(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=k(Math.sqrt(a/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),f<1){const t=Zt(g,f);y=e=>{const n=Math.exp(-f*g*e);return i-n*((p+f*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>i-Math.exp(-g*t)*(m+(p+g*m)*t);else{const t=g*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*g*e),s=Math.min(t*e,300);return i-n*((p+f*g*m)*Math.sinh(s)+t*m*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=y(t);if(d)o.done=t>=c;else{let r=p;0!==t&&(r=f<1?Xt(y,t,s):0);const a=Math.abs(r)<=n,l=Math.abs(i-s)<=e;o.done=a&&l}return o.value=o.done?i:s,o}}}function ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const 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,x;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=te({keyframes:[d.value,p(d.value)],velocity:Xt(y,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),S(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const ne=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function se(t,n,s,r){if(t===n&&s===r)return e;const i=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ne(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:ne(i(t),n,r)}const re=se(.42,0,1,1),ie=se(0,0,.58,1),oe=se(.42,0,.58,1),ae=t=>Array.isArray(t)&&"number"!=typeof t[0],le=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ue=t=>e=>1-t(1-e),ce=t=>1-Math.sin(Math.acos(t)),he=ue(ce),de=le(ce),pe=se(.33,1.53,.69,.99),fe=ue(pe),me=le(fe),ge=t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1))),ve={linear:e,easeIn:re,easeInOut:oe,easeOut:ie,circIn:ce,circInOut:de,circOut:he,backIn:fe,backInOut:me,backOut:pe,anticipate:ge},ye=t=>{if(Array.isArray(t)){v(4===t.length);const[e,n,s,r]=t;return se(e,n,s,r)}return"string"==typeof t?ve[t]:t},we=(t,e)=>n=>e(t(n)),be=(...t)=>t.reduce(we),xe=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Se=(t,e,n)=>t+(e-t)*n;function Ve(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 Te(t,e){return n=>n>0?e:t}const Ae=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Me=[Mt,At,kt];function ke(t){const e=(n=t,Me.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===kt&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Ve(a,s,t+1/3),i=Ve(a,s,t),o=Ve(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const Pe=(t,e)=>{const n=ke(t),s=ke(e);if(!n||!s)return Te(t,e);const r={...n};return t=>(r.red=Ae(n.red,s.red,t),r.green=Ae(n.green,s.green,t),r.blue=Ae(n.blue,s.blue,t),r.alpha=Se(n.alpha,s.alpha,t),At.transform(r))},Ce=new Set(["none","hidden"]);function Fe(t,e){return n=>Se(t,e,n)}function Ee(t){return"number"==typeof t?Fe:"string"==typeof t?N(t)?Te:Pt.test(t)?Pe:Be:Array.isArray(t)?Oe:"object"==typeof t?Pt.test(t)?Pe:Re:Te}function Oe(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>Ee(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function Re(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Ee(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Be=(t,e)=>{const n=Bt.createTransformer(e),s=Ft(t),r=Ft(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Ce.has(t)&&!r.values.length||Ce.has(e)&&!s.values.length?function(t,e){return Ce.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):be(Oe(function(t,e){var n;const s=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],a=t.indexes[o][r[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[i]=l,r[o]++}return s}(s,r),r.values),n):Te(t,e)};function Ie(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Se(t,e,n);return Ee(t)(t,e)}function We(t,n,{clamp:s=!0,ease:r,mixer:i}={}){const o=t.length;if(v(o===n.length),1===o)return()=>n[0];if(2===o&&t[0]===t[1])return()=>n[1];t[0]>t[o-1]&&(t=[...t].reverse(),n=[...n].reverse());const a=function(t,n,s){const r=[],i=s||Ie,o=t.length-1;for(let s=0;s<o;s++){let o=i(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=be(t,o)}r.push(o)}return r}(n,r,i),l=a.length,u=e=>{let n=0;if(l>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=xe(t[n],t[n+1],e);return a[n](s)};return s?e=>u(H(t[0],t[o-1],e)):u}function De(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=xe(0,e,s);t.push(Se(n,1,r))}}function Le(t){const e=[0];return De(e,t.length-1),e}function Ke({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=ae(s)?s.map(ye):ye(s),i={done:!1,value:e[0]},o=We(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Le(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||oe).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}function Ne(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}const ze=t=>{const e=({timestamp:e})=>t(e);return{start:()=>r.update(e,!0),stop:()=>i(e),now:()=>o.isProcessing?o.timestamp:p.now()}},je={decay:ee,inertia:ee,tween:Ke,keyframes:Ke,spring:te},$e=t=>t/100;class He extends qt{constructor({KeyframeResolver:t=xt,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",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:n,motionValue:s,keyframes:r}=this.options,i=(t,e)=>this.onKeyframesResolved(t,e);n&&s&&s.owner?this.resolver=s.owner.resolveKeyframes(r,i,n,s):this.resolver=new t(r,i,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=je[e]||Ke;let a,l;o!==Ke&&"number"!=typeof t[0]&&(a=be($e,Ie(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=Ne(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),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=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),y=H(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:x}=b;v||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&void 0!==s&&(b.value=B(a,this.options,s)),m&&m(b.value),S&&this.finish(),b}get duration(){const{resolved:t}=this;return t?k(t.calculatedDuration):0}get time(){return k(this.currentTime)}set time(t){t=M(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=k(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ze,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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 Ue=new Set(["opacity","clipPath","filter","transform"]),Ye=t=>Array.isArray(t)&&"number"==typeof t[0];function qe(t){return Boolean(!t||"string"==typeof t&&t in Ge||Ye(t)||Array.isArray(t)&&t.every(qe))}const Xe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xe([0,.65,.55,1]),circOut:Xe([.55,0,1,.45]),backIn:Xe([.31,.01,.66,-.59]),backOut:Xe([.33,1.53,.69,.99])};function Ze(t){return _e(t)||Ge.easeOut}function _e(t){return t?Ye(t)?Xe(t):Array.isArray(t)?t.map(Ze):Ge[t]:void 0}const Je=x(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Qe extends qt{constructor(t){super(t);const{name:e,motionValue:n,keyframes:s}=this.options;this.resolver=new Ut(s,(t,e)=>this.onKeyframesResolved(t,e),e,n),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:r,ease:i,type:o,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!qe(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,...l}=this.options,u=function(t,e){const n=new He({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,l);1===(t=u.keyframes).length&&(t[1]=t[0]),s=u.duration,r=u.times,i=u.ease,o="keyframes"}var u;const c=function(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=_e(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:s,times:r,ease:i});return c.startTime=p.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(B(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:s,times:r,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return k(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return k(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=M(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}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;s.timeline=t,s.onfinish=null}else this.pendingTimeline=t;return e}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;const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,...l}=this.options,u=new He({...l,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),c=M(this.time);t.setWithVelocity(u.sample(c-10).value,u.sample(c).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return Je()&&n&&Ue.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const tn=(t,e,n,s={},i,o,a)=>l=>{const u=O(s,t)||{},c=u.delay||s.delay||0;let{elapsed:h=0}=s;h-=M(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-h,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete(),a&&a()},onStop:a,name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(u)||(d={...d,...E(t,d)}),d.duration&&(d.duration=M(d.duration)),d.repeatDelay&&(d.repeatDelay=M(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(p=!0)),p&&!o&&void 0!==e.get()){const t=B(d.keyframes,u);if(void 0!==t)return r.update(()=>{d.onUpdate(t),d.onComplete()}),new V([])}return!o&&Qe.supports(d)?new Qe(d):new He(d)},en=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function nn(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function sn(t,e,n,s){if("function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function rn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,m(n))}function on(t,e){const n=function(t,e,n){const s=t.getProps();return sn(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){rn(t,e,en(i[e]))}}const an=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ln="data-"+an("framerAppearId");function un(t){return t.getProps()[ln]}class cn extends f{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=function(t){return A.has(t)?"transform":Ue.has(t)?an(t):void 0}(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let s=!1;return()=>{if(s)return;s=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(l(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const hn=t=>Boolean(t&&t.getVelocity);function dn(t,e){var n;if(!t.applyWillChange)return;let s=t.getValue("willChange");return s||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(s=new cn("auto"),t.addValue("willChange",s)),r=s,Boolean(hn(r)&&r.add)?s.add(e):void 0;var r}function pn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function fn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;s&&(a=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in u){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=u[e];if(void 0===i||h&&pn(h,e))continue;const l={delay:n,elapsed:0,...O(a||{},e)};let d=!1;if(window.HandoffAppearAnimations){const n=un(t);if(n){const t=window.HandoffAppearAnimations(n,e,s,r);null!==t&&(l.elapsed=t,d=!0)}}s.start(tn(e,s,i,t.shouldReduceMotion&&A.has(e)?{type:!1}:l,t,d,dn(t,e)));const p=s.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{r.update(()=>{l&&on(t,l)})}),c}const mn={};function gn(t,{layout:e,layoutId:n}){return A.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!mn[t]||"opacity"===t)}function vn(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(hn(r[o])||e.style&&hn(e.style[o])||gn(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return n&&r&&"string"==typeof r.willChange&&(n.applyWillChange=!1),i}const yn="undefined"!=typeof window,wn={current:null},bn={current:!1};function xn(t){return"string"==typeof t||Array.isArray(t)}const Sn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Vn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Sn.some(e=>xn(t[e]));var e}const Tn={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"]},An={};for(const t in Tn)An[t]={isEnabled:e=>Tn[t].some(t=>!!e[t])};const Mn=[...ft,Pt,Bt],kn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Pn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Cn=Sn.length;class Fn extends class{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.applyWillChange=!1,this.resolveKeyframes=(t,e,n,s)=>new this.KeyframeResolver(t,e,n,s,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,r.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Vn(e),this.isVariantNode=function(t){return Boolean(Vn(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!==l[t]&&hn(e)&&e.set(l[t],!1)}}mount(t){this.current=t,w.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)),bn.current||function(){if(bn.current=!0,yn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>wn.current=t.matches;t.addListener(e),e()}else wn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||wn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){w.delete(this.current),this.projection&&this.projection.unmount(),i(this.notifyUpdate),i(this.render),this.valueSubscriptions.forEach(t=>t()),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){const n=A.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&r.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in An){const e=An[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<Pn.length;e++){const n=Pn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(hn(r))t.addValue(s,r);else if(hn(i))t.addValue(s,m(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,m(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Cn;t++){const n=Sn[t],s=this.props[n];(xn(s)||!1===s)&&(e[n]=s)}return e}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=m(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 r;return null!=s&&("string"==typeof s&&(W(s)||I(s))?s=parseFloat(s):(r=s,!Mn.find(pt(r))&&Bt.test(e)&&(s=$t(t,e))),this.setBaseTarget(t,hn(s)?s.get():s)),hn(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 r=sn(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||hn(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new u),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=Ut}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]}}const En={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},On=T.length;const Rn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Bn(t,e,n){const{style:s,vars:r,transform:i,transformOrigin:o}=t;let a=!1,l=!1,u=!0;for(const t in e){const n=e[t];if(L(t)){r[t]=n;continue}const c=Nt[t],h=Rn(n,c);if(A.has(t)){if(a=!0,i[t]=h,!u)continue;n!==(c.default||0)&&(u=!1)}else t.startsWith("origin")?(l=!0,o[t]=h):s[t]=h}if(e.transform||(a||n?s.transform=function(t,e,n){let s="";for(let e=0;e<On;e++){const n=T[e];if(void 0!==t[n]){s+=`${En[n]||n}(${t[n]}) `}}return s=s.trim(),n?s=n(t,e?"":s):e&&(s="none"),s}(t.transform,u,n):s.transform&&(s.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;s.transformOrigin=`${t} ${e} ${n}`}}function In(t,e,n){return"string"==typeof t?t:nt.transform(e+n*t)}const Wn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dn={offset:"strokeDashoffset",array:"strokeDasharray"};function Ln(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Bn(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${In(e,t.x,t.width)} ${In(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Wn:Dn;t[i.offset]=nt.transform(-s);const o=nt.transform(e),a=nt.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Kn=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 Nn(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}class zn extends Fn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}return e=Kn.has(e)?e:an(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=vn(t,e,n);for(const n in t)if(hn(t[n])||hn(e[n])){s[-1!==T.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){Ln(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Nn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Kn.has(n)?n:an(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 jn extends Fn{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Nn}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(L(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Bn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return vn(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;hn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function $n(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 zn(e):new jn(e);n.mount(t),w.set(t,n)}function Hn(t,e,n){const s=hn(t)?t:m(t);return s.start(tn("",s,e,n)),s.animation}function Un(t,e=100){const n=te({keyframes:[0,e],...t}),s=Math.min(Ne(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:k(s)}}function Yn(t,e,n,s){var r;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(r=s.get(e))&&void 0!==r?r:t}const qn=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Xn(t,e){return ae(t)?t[qn(0,t.length,e)]:t}function Gn(t,e,n,s,r,i){!function(t,e,n){for(let s=0;s<t.length;s++){const r=t[s];r.at>e&&r.at<n&&(l(t,r),s--)}}(t,r,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:Se(r,i,s[o]),easing:Xn(n,o)})}function Zn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function _n(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Jn(t,e){return e[t]||(e[t]=[]),e[t]}function Qn(t){return Array.isArray(t)?t:[t]}function ts(t,e){return t[e]?{...t,...t[e]}:{...t}}const es=t=>"number"==typeof t,ns=t=>t.every(es);function ss(t,e,n,s){const r=y(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];w.has(s)||$n(s);const a=w.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...fn(a,{...e,transition:l},{}))}return new V(o)}function rs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const r=e.duration||.3,i=new Map,o=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){l.set(i,c);continue}if(!Array.isArray(i)){l.set(i.name,Yn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=Yn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=Qn(t),{delay:l=0,times:u=Le(a),type:d="keyframes",...p}=n;let{ease:f=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(i,o):l,y=a.length;if(y<=2&&"spring"===d){let t=100;if(2===y&&ns(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=M(g));const n=Un(e,t);f=n.ease,g=n.duration}null!=g||(g=r);const w=c+v,b=w+g;1===u.length&&0===u[0]&&(u[1]=1);const x=u.length-a.length;x>0&&De(u,x),1===a.length&&a.unshift(null),Gn(s,a,f,u,w,b),m=Math.max(v+g,m),h=Math.max(b,h)};if(hn(d)){g(p,f,Jn("default",_n(d,o)))}else{const t=y(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=_n(t[n],o);for(const t in p)g(p[t],ts(f,t),Jn(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(Zn);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),l.push(xe(0,h,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),i.has(s)||i.set(s,{keyframes:{},transition:{}});const c=i.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:h,ease:u,times:l,...n}}}),i}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let r;r=hn(n)?Hn(n,t.default,e.default):ss(n,t,e),s.push(r)}),new V(s)}const is=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?rs(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?ss(e,n,s,t):Hn(e,n,s),t&&t.animations.push(r),r},os=is(),as=new WeakMap;let ls;function us({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=as.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 cs(t){t.forEach(us)}function hs(t,e){ls||"undefined"!=typeof ResizeObserver&&(ls=new ResizeObserver(cs));const n=y(t);return n.forEach(t=>{let n=as.get(t);n||(n=new Set,as.set(t,n)),n.add(e),null==ls||ls.observe(t)}),()=>{n.forEach(t=>{const n=as.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ls||ls.unobserve(t)})}}const ds=new Set;let ps;function fs(t){return ds.add(t),ps||(ps=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ds.forEach(t=>t(e))},window.addEventListener("resize",ps)),()=>{ds.delete(t),!ds.size&&ps&&(ps=void 0)}}const ms={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function gs(t,e,n,s){const r=n[e],{length:i,position:o}=ms[e],a=r.current,l=n.time;r.current=t["scroll"+o],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=xe(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:c(r.current-a,u)}const vs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ys={start:0,center:.5,end:1};function ws(t,e,n=0){let s=0;if(t in ys&&(t=ys[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 bs=[0,0];function xs(t,e,n,s){let r=Array.isArray(t)?t:bs,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,ys[t]?t:"0"]),i=ws(r[0],n,s),o=ws(r[1],e),i-o}const Ss={x:0,y:0};function Vs(t,e,n){const{offset:s=vs.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Ss,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=xs(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=We(e[i].offset,Le(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function Ts(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){gs(t,"x",e,n),gs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Vs(t,n,s)},notify:()=>e(n)}}const As=new WeakMap,Ms=new WeakMap,ks=new WeakMap,Ps=t=>t===document.documentElement?window:t;function Cs(t,{container:e=document.documentElement,...n}={}){let s=ks.get(e);s||(s=new Set,ks.set(e,s));const a=Ts(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(a),!As.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(o.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{r.read(t,!1,!0),r.read(n,!1,!0),r.update(i,!1,!0)};As.set(e,a);const c=Ps(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Ms.set(e,(u=a,"function"==typeof(l=e)?fs(l):hs(l,u))),c.addEventListener("scroll",a,{passive:!0})}var l,u;const c=As.get(e);return r.read(c,!1,!0),()=>{var t;i(c);const n=ks.get(e);if(!n)return;if(n.delete(a),n.size)return;const s=As.get(e);As.delete(e),s&&(Ps(e).removeEventListener("scroll",s),null===(t=Ms.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Fs=new Map;function Es({source:t=document.documentElement,axis:e="y"}={}){Fs.has(t)||Fs.set(t,{});const n=Fs.get(t);return n[e]||(n[e]=S()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Cs(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Os={some:0,all:1};const Rs=(t,e)=>Math.abs(t-e);const Bs=r,Is=s.reduce((t,e)=>(t[e]=t=>i(t),t),{});t.MotionValue=f,t.animate=os,t.anticipate=ge,t.backIn=fe,t.backInOut=me,t.backOut=pe,t.cancelFrame=i,t.cancelSync=Is,t.circIn=ce,t.circInOut=de,t.circOut=he,t.clamp=H,t.createScopedAnimate=is,t.cubicBezier=se,t.delay=function(t,e){const n=p.now(),s=({timestamp:r})=>{const o=r-n;o>=e&&(i(s),t(o-e))};return r.read(s,!0),()=>i(s)},t.distance=Rs,t.distance2D=function(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=re,t.easeInOut=oe,t.easeOut=ie,t.frame=r,t.frameData=o,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=y(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);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof r?r:Os[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=We,t.invariant=v,t.mirrorEasing=le,t.mix=Ie,t.motionValue=m,t.pipe=be,t.progress=xe,t.reverseEasing=ue,t.scroll=function(t,e){const n=Es(e);return"function"==typeof t?b(t,n):t.attachTimeline(n)},t.scrollInfo=Cs,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=ye(s)(l/e)*e}return e+l}},t.steps=a,t.sync=Bs,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=We(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.warning=g,t.wrap=qn}));
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";const e=t=>t,n=!1;const s=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:r,cancel:i,state:o,steps:a}=function(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,r=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){i.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,r=!1,o=!1)=>{const a=o&&s?e:n;return r&&i.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),i.delete(t)},process:t=>{o=t,s?r=!0:(s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,r&&(r=!1,l.process(t)))}};return l}(o),t),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const s=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1),i.timestamp=s,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))};return{schedule:s.reduce((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(f)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<s.length;e++)a[s[e]].cancel(t)},state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function l(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class u{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>l(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function c(t,e){return e?t*(1e3/e):0}let h;function d(){h=void 0}const p={now:()=>(void 0===h&&p.set(o.isProcessing||n?o.timestamp:performance.now()),h),set:t=>{h=t,queueMicrotask(d)}};class f{constructor(t,e={}){this.version="11.3.14",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=p.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=p.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 u);const n=this.events[t].add(e);return"change"===t?()=>{n(),r.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=p.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 m(t,e){return new f(t,e)}let g=e,v=e;function y(t,e,n){var s;if("string"==typeof t){let r=document;e&&(v(Boolean(e.current)),r=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=r.querySelectorAll(t)),t=n[t]):t=r.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const w=new WeakMap;function b(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return r.update(s,!0),()=>i(s)}function x(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=x(()=>void 0!==window.ScrollTimeline);class V{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!S()||!e.attachTimeline)return e.pause(),b(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const T=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],A=new Set(T),M=t=>1e3*t,k=t=>t/1e3,P={type:"spring",stiffness:500,damping:25,restSpeed:10},C={type:"keyframes",duration:.8},F={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},E=(t,{keyframes:e})=>e.length>2?C:A.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:P:F;function O(t,e){return t[e]||t.default||t}const R=t=>null!==t;function B(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(R),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}const I=t=>/^0[^.\s]+$/u.test(t);const W=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),D=t=>e=>"string"==typeof e&&e.startsWith(t),L=D("--"),K=D("var(--"),N=t=>!!K(t)&&z.test(t.split("/*")[0].trim()),z=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,j=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $(t,e,n=1){const[s,r]=function(t){const e=j.exec(t);if(!e)return[,];const[,n,s,r]=e;return["--"+(null!=n?n:s),r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return W(t)?parseFloat(t):t}return N(r)?$(r,e,n+1):r}const H=(t,e,n)=>n>e?e:n<t?t:n,U={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Y={...U,transform:t=>H(0,1,t)},q={...U,default:1},X=t=>Math.round(1e5*t)/1e5,G=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Z=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function J(t){return"string"==typeof t}const Q=t=>({test:e=>J(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),tt=Q("deg"),et=Q("%"),nt=Q("px"),st=Q("vh"),rt=Q("vw"),it={...et,parse:t=>et.parse(t)/100,transform:t=>et.transform(100*t)},ot=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),at=t=>t===U||t===nt,lt=(t,e)=>parseFloat(t.split(", ")[e]),ut=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return lt(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?lt(e[1],t):0}},ct=new Set(["x","y","z"]),ht=T.filter(t=>!ct.has(t));const dt={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:ut(4,13),y:ut(5,14)};dt.translateX=dt.x,dt.translateY=dt.y;const pt=t=>e=>e.test(t),ft=[U,nt,et,tt,rt,st,{test:t=>"auto"===t,parse:t=>t}],mt=t=>ft.find(pt(t)),gt=new Set;let vt=!1,yt=!1;function wt(){if(yt){const t=Array.from(gt).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 ht.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)})}yt=!1,vt=!1,gt.forEach(t=>t.complete()),gt.clear()}function bt(){gt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yt=!0)})}class xt{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gt.add(this),vt||(vt=!0,r.read(bt),r.resolveKeyframes(wt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0:s.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),gt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,gt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const St=(t,e)=>n=>Boolean(J(n)&&_.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vt=(t,e,n)=>s=>{if(!J(s))return s;const[r,i,o,a]=s.match(G);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Tt={...U,transform:t=>Math.round((t=>H(0,255,t))(t))},At={test:St("rgb","red"),parse:Vt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Tt.transform(t)+", "+Tt.transform(e)+", "+Tt.transform(n)+", "+X(Y.transform(s))+")"};const Mt={test:St("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:At.transform},kt={test:St("hsl","hue"),parse:Vt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+et.transform(X(e))+", "+et.transform(X(n))+", "+X(Y.transform(s))+")"},Pt={test:t=>At.test(t)||Mt.test(t)||kt.test(t),parse:t=>At.test(t)?At.parse(t):kt.test(t)?kt.parse(t):Mt.parse(t),transform:t=>J(t)?t:t.hasOwnProperty("red")?At.transform(t):kt.transform(t)};const Ct=/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 Ft(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ct,t=>(Pt.test(t)?(s.color.push(i),r.push("color"),n.push(Pt.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push("number"),n.push(parseFloat(t))),++i,"${}")).split("${}");return{values:n,split:o,indexes:s,types:r}}function Et(t){return Ft(t).values}function Ot(t){const{split:e,types:n}=Ft(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+="number"===e?X(t[i]):"color"===e?Pt.transform(t[i]):t[i]}return r}}const Rt=t=>"number"==typeof t?0:t;const Bt={test:function(t){var e,n;return isNaN(t)&&J(t)&&((null===(e=t.match(G))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Z))||void 0===n?void 0:n.length)||0)>0},parse:Et,createTransformer:Ot,getAnimatableNone:function(t){const e=Et(t);return Ot(t)(e.map(Rt))}},It=new Set(["brightness","contrast","saturate","opacity"]);function Wt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(G)||[];if(!s)return t;const r=n.replace(s,"");let i=It.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Dt=/\b([a-z-]*)\(.*?\)/gu,Lt={...Bt,getAnimatableNone:t=>{const e=t.match(Dt);return e?e.map(Wt).join(" "):t}},Kt={...U,transform:Math.round},Nt={borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,size:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:q,scaleX:q,scaleY:q,scaleZ:q,skew:tt,skewX:tt,skewY:tt,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:Y,originX:it,originY:it,originZ:nt,zIndex:Kt,backgroundPositionX:nt,backgroundPositionY:nt,fillOpacity:Y,strokeOpacity:Y,numOctaves:Kt},zt={...Nt,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:Lt,WebkitFilter:Lt},jt=t=>zt[t];function $t(t,e){let n=jt(t);return n!==Lt&&(n=Bt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ht=new Set(["auto","none","0"]);class Ut extends xt{constructor(t,e,n,s){super(t,e,n,s,null==s?void 0:s.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),N(s))){const r=$(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!ot.has(n)||2!==t.length)return;const[s,r]=t,i=mt(s),o=mt(r);if(i!==o)if(at(i)&&at(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||I(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!Ht.has(e)&&Ft(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=$t(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[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.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=dt[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 Yt=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Bt.test(t)&&"0"!==t||t.startsWith("url(")));class qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(bt(),wt()),this._resolved}onKeyframesResolved(t,e){this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=Yt(r,e),a=Yt(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||"spring"===n&&s)}(t,n,s,r)){if(!i)return null==a||a(B(t,this.options,e)),null==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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Xt(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}function Gt({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,o=1-e;o=H(.05,1,o),t=H(.01,10,k(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/Zt(e,o)*Math.exp(-r)},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Zt(Math.pow(e,2),o);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=M(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function Zt(t,e){return t*Math.sqrt(1-e*e)}const _t=["duration","bounce"],Jt=["stiffness","damping","mass"];function Qt(t,e){return e.some(e=>void 0!==t[e])}function te({keyframes:t,restDelta:e,restSpeed:n,...s}){const r=t[0],i=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Qt(t,Jt)&&Qt(t,_t)){const n=Gt(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-k(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=k(Math.sqrt(a/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),f<1){const t=Zt(g,f);y=e=>{const n=Math.exp(-f*g*e);return i-n*((p+f*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>i-Math.exp(-g*t)*(m+(p+g*m)*t);else{const t=g*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*g*e),s=Math.min(t*e,300);return i-n*((p+f*g*m)*Math.sinh(s)+t*m*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=y(t);if(d)o.done=t>=c;else{let r=p;0!==t&&(r=f<1?Xt(y,t,s):0);const a=Math.abs(r)<=n,l=Math.abs(i-s)<=e;o.done=a&&l}return o.value=o.done?i:s,o}}}function ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const 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,x;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=te({keyframes:[d.value,p(d.value)],velocity:Xt(y,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),S(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const ne=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function se(t,n,s,r){if(t===n&&s===r)return e;const i=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ne(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:ne(i(t),n,r)}const re=se(.42,0,1,1),ie=se(0,0,.58,1),oe=se(.42,0,.58,1),ae=t=>Array.isArray(t)&&"number"!=typeof t[0],le=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ue=t=>e=>1-t(1-e),ce=t=>1-Math.sin(Math.acos(t)),he=ue(ce),de=le(ce),pe=se(.33,1.53,.69,.99),fe=ue(pe),me=le(fe),ge=t=>(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1))),ve={linear:e,easeIn:re,easeInOut:oe,easeOut:ie,circIn:ce,circInOut:de,circOut:he,backIn:fe,backInOut:me,backOut:pe,anticipate:ge},ye=t=>{if(Array.isArray(t)){v(4===t.length);const[e,n,s,r]=t;return se(e,n,s,r)}return"string"==typeof t?ve[t]:t},we=(t,e)=>n=>e(t(n)),be=(...t)=>t.reduce(we),xe=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Se=(t,e,n)=>t+(e-t)*n;function Ve(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 Te(t,e){return n=>n>0?e:t}const Ae=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Me=[Mt,At,kt];function ke(t){const e=(n=t,Me.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===kt&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Ve(a,s,t+1/3),i=Ve(a,s,t),o=Ve(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const Pe=(t,e)=>{const n=ke(t),s=ke(e);if(!n||!s)return Te(t,e);const r={...n};return t=>(r.red=Ae(n.red,s.red,t),r.green=Ae(n.green,s.green,t),r.blue=Ae(n.blue,s.blue,t),r.alpha=Se(n.alpha,s.alpha,t),At.transform(r))},Ce=new Set(["none","hidden"]);function Fe(t,e){return n=>Se(t,e,n)}function Ee(t){return"number"==typeof t?Fe:"string"==typeof t?N(t)?Te:Pt.test(t)?Pe:Be:Array.isArray(t)?Oe:"object"==typeof t?Pt.test(t)?Pe:Re:Te}function Oe(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>Ee(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function Re(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Ee(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Be=(t,e)=>{const n=Bt.createTransformer(e),s=Ft(t),r=Ft(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Ce.has(t)&&!r.values.length||Ce.has(e)&&!s.values.length?function(t,e){return Ce.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):be(Oe(function(t,e){var n;const s=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],a=t.indexes[o][r[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[i]=l,r[o]++}return s}(s,r),r.values),n):Te(t,e)};function Ie(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Se(t,e,n);return Ee(t)(t,e)}function We(t,n,{clamp:s=!0,ease:r,mixer:i}={}){const o=t.length;if(v(o===n.length),1===o)return()=>n[0];if(2===o&&t[0]===t[1])return()=>n[1];t[0]>t[o-1]&&(t=[...t].reverse(),n=[...n].reverse());const a=function(t,n,s){const r=[],i=s||Ie,o=t.length-1;for(let s=0;s<o;s++){let o=i(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=be(t,o)}r.push(o)}return r}(n,r,i),l=a.length,u=e=>{let n=0;if(l>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=xe(t[n],t[n+1],e);return a[n](s)};return s?e=>u(H(t[0],t[o-1],e)):u}function De(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=xe(0,e,s);t.push(Se(n,1,r))}}function Le(t){const e=[0];return De(e,t.length-1),e}function Ke({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=ae(s)?s.map(ye):ye(s),i={done:!1,value:e[0]},o=We(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Le(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||oe).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}function Ne(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}const ze=t=>{const e=({timestamp:e})=>t(e);return{start:()=>r.update(e,!0),stop:()=>i(e),now:()=>o.isProcessing?o.timestamp:p.now()}},je={decay:ee,inertia:ee,tween:Ke,keyframes:Ke,spring:te},$e=t=>t/100;class He extends qt{constructor({KeyframeResolver:t=xt,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",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:n,motionValue:s,keyframes:r}=this.options,i=(t,e)=>this.onKeyframesResolved(t,e);n&&s&&s.owner?this.resolver=s.owner.resolveKeyframes(r,i,n,s):this.resolver=new t(r,i,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=je[e]||Ke;let a,l;o!==Ke&&"number"!=typeof t[0]&&(a=be($e,Ie(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=Ne(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),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=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),y=H(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:x}=b;v||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&void 0!==s&&(b.value=B(a,this.options,s)),m&&m(b.value),S&&this.finish(),b}get duration(){const{resolved:t}=this;return t?k(t.calculatedDuration):0}get time(){return k(this.currentTime)}set time(t){t=M(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=k(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ze,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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 Ue=new Set(["opacity","clipPath","filter","transform"]),Ye=t=>Array.isArray(t)&&"number"==typeof t[0];function qe(t){return Boolean(!t||"string"==typeof t&&t in Ge||Ye(t)||Array.isArray(t)&&t.every(qe))}const Xe=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xe([0,.65,.55,1]),circOut:Xe([.55,0,1,.45]),backIn:Xe([.31,.01,.66,-.59]),backOut:Xe([.33,1.53,.69,.99])};function Ze(t){return _e(t)||Ge.easeOut}function _e(t){return t?Ye(t)?Xe(t):Array.isArray(t)?t.map(Ze):Ge[t]:void 0}const Je=x(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Qe extends qt{constructor(t){super(t);const{name:e,motionValue:n,keyframes:s}=this.options;this.resolver=new Ut(s,(t,e)=>this.onKeyframesResolved(t,e),e,n),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:r,ease:i,type:o,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!qe(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,...l}=this.options,u=function(t,e){const n=new He({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,l);1===(t=u.keyframes).length&&(t[1]=t[0]),s=u.duration,r=u.times,i=u.ease,o="keyframes"}var u;const c=function(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=_e(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:s,times:r,ease:i});return c.startTime=p.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(B(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:s,times:r,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return k(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return k(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=M(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}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;s.timeline=t,s.onfinish=null}else this.pendingTimeline=t;return e}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;const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,...l}=this.options,u=new He({...l,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),c=M(this.time);t.setWithVelocity(u.sample(c-10).value,u.sample(c).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return Je()&&n&&Ue.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const tn=(t,e,n,s={},i,o,a)=>l=>{const u=O(s,t)||{},c=u.delay||s.delay||0;let{elapsed:h=0}=s;h-=M(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-h,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete(),a&&a()},onStop:a,name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(u)||(d={...d,...E(t,d)}),d.duration&&(d.duration=M(d.duration)),d.repeatDelay&&(d.repeatDelay=M(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(p=!0)),p&&!o&&void 0!==e.get()){const t=B(d.keyframes,u);if(void 0!==t)return r.update(()=>{d.onUpdate(t),d.onComplete()}),new V([])}return!o&&Qe.supports(d)?new Qe(d):new He(d)},en=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function nn(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function sn(t,e,n,s){if("function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=nn(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function rn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,m(n))}function on(t,e){const n=function(t,e,n){const s=t.getProps();return sn(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){rn(t,e,en(i[e]))}}const an=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ln="data-"+an("framerAppearId");function un(t){return t.getProps()[ln]}class cn extends f{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=function(t){return A.has(t)?"transform":Ue.has(t)?an(t):void 0}(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let s=!1;return()=>{if(s)return;s=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(l(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const hn=t=>Boolean(t&&t.getVelocity);function dn(t,e){var n;if(!t.applyWillChange)return;let s=t.getValue("willChange");return s||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(s=new cn("auto"),t.addValue("willChange",s)),r=s,Boolean(hn(r)&&r.add)?s.add(e):void 0;var r}function pn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function fn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;s&&(a=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in u){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=u[e];if(void 0===i||h&&pn(h,e))continue;const l={delay:n,elapsed:0,...O(a||{},e)};let d=!1;if(window.HandoffAppearAnimations){const n=un(t);if(n){const t=window.HandoffAppearAnimations(n,e,s,r);null!==t&&(l.elapsed=t,d=!0)}}s.start(tn(e,s,i,t.shouldReduceMotion&&A.has(e)?{type:!1}:l,t,d,dn(t,e)));const p=s.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{r.update(()=>{l&&on(t,l)})}),c}const mn={};function gn(t,{layout:e,layoutId:n}){return A.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!mn[t]||"opacity"===t)}function vn(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(hn(r[o])||e.style&&hn(e.style[o])||gn(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return n&&r&&"string"==typeof r.willChange&&(n.applyWillChange=!1),i}const yn="undefined"!=typeof window,wn={current:null},bn={current:!1};function xn(t){return"string"==typeof t||Array.isArray(t)}const Sn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Vn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Sn.some(e=>xn(t[e]));var e}const Tn={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"]},An={};for(const t in Tn)An[t]={isEnabled:e=>Tn[t].some(t=>!!e[t])};const Mn=[...ft,Pt,Bt],kn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Pn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Cn=Sn.length;class Fn extends class{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.applyWillChange=!1,this.resolveKeyframes=(t,e,n,s)=>new this.KeyframeResolver(t,e,n,s,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,r.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Vn(e),this.isVariantNode=function(t){return Boolean(Vn(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!==l[t]&&hn(e)&&e.set(l[t],!1)}}mount(t){this.current=t,w.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)),bn.current||function(){if(bn.current=!0,yn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>wn.current=t.matches;t.addListener(e),e()}else wn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||wn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){w.delete(this.current),this.projection&&this.projection.unmount(),i(this.notifyUpdate),i(this.render),this.valueSubscriptions.forEach(t=>t()),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){const n=A.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&r.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in An){const e=An[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<Pn.length;e++){const n=Pn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(hn(r))t.addValue(s,r);else if(hn(i))t.addValue(s,m(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,m(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Cn;t++){const n=Sn[t],s=this.props[n];(xn(s)||!1===s)&&(e[n]=s)}return e}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=m(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 r;return null!=s&&("string"==typeof s&&(W(s)||I(s))?s=parseFloat(s):(r=s,!Mn.find(pt(r))&&Bt.test(e)&&(s=$t(t,e))),this.setBaseTarget(t,hn(s)?s.get():s)),hn(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 r=sn(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||hn(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new u),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=Ut}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]}}const En={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},On=T.length;const Rn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Bn(t,e,n){const{style:s,vars:r,transform:i,transformOrigin:o}=t;let a=!1,l=!1,u=!0;for(const t in e){const n=e[t];if(L(t)){r[t]=n;continue}const c=Nt[t],h=Rn(n,c);if(A.has(t)){if(a=!0,i[t]=h,!u)continue;n!==(c.default||0)&&(u=!1)}else t.startsWith("origin")?(l=!0,o[t]=h):s[t]=h}if(e.transform||(a||n?s.transform=function(t,e,n){let s="";for(let e=0;e<On;e++){const n=T[e];if(void 0!==t[n]){s+=`${En[n]||n}(${t[n]}) `}}return s=s.trim(),n?s=n(t,e?"":s):e&&(s="none"),s}(t.transform,u,n):s.transform&&(s.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;s.transformOrigin=`${t} ${e} ${n}`}}function In(t,e,n){return"string"==typeof t?t:nt.transform(e+n*t)}const Wn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dn={offset:"strokeDashoffset",array:"strokeDasharray"};function Ln(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Bn(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${In(e,t.x,t.width)} ${In(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Wn:Dn;t[i.offset]=nt.transform(-s);const o=nt.transform(e),a=nt.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Kn=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 Nn(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}class zn extends Fn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}return e=Kn.has(e)?e:an(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=vn(t,e,n);for(const n in t)if(hn(t[n])||hn(e[n])){s[-1!==T.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){Ln(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Nn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Kn.has(n)?n:an(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 jn extends Fn{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Nn}readValueFromInstance(t,e){if(A.has(e)){const t=jt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(L(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Bn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return vn(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;hn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function $n(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 zn(e):new jn(e);n.mount(t),w.set(t,n)}function Hn(t,e,n){const s=hn(t)?t:m(t);return s.start(tn("",s,e,n)),s.animation}function Un(t,e=100){const n=te({keyframes:[0,e],...t}),s=Math.min(Ne(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:k(s)}}function Yn(t,e,n,s){var r;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(r=s.get(e))&&void 0!==r?r:t}const qn=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Xn(t,e){return ae(t)?t[qn(0,t.length,e)]:t}function Gn(t,e,n,s,r,i){!function(t,e,n){for(let s=0;s<t.length;s++){const r=t[s];r.at>e&&r.at<n&&(l(t,r),s--)}}(t,r,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:Se(r,i,s[o]),easing:Xn(n,o)})}function Zn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function _n(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Jn(t,e){return e[t]||(e[t]=[]),e[t]}function Qn(t){return Array.isArray(t)?t:[t]}function ts(t,e){return t[e]?{...t,...t[e]}:{...t}}const es=t=>"number"==typeof t,ns=t=>t.every(es);function ss(t,e,n,s){const r=y(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];w.has(s)||$n(s);const a=w.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...fn(a,{...e,transition:l},{}))}return new V(o)}function rs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const r=e.duration||.3,i=new Map,o=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){l.set(i,c);continue}if(!Array.isArray(i)){l.set(i.name,Yn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=Yn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=Qn(t),{delay:l=0,times:u=Le(a),type:d="keyframes",...p}=n;let{ease:f=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(i,o):l,y=a.length;if(y<=2&&"spring"===d){let t=100;if(2===y&&ns(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=M(g));const n=Un(e,t);f=n.ease,g=n.duration}null!=g||(g=r);const w=c+v,b=w+g;1===u.length&&0===u[0]&&(u[1]=1);const x=u.length-a.length;x>0&&De(u,x),1===a.length&&a.unshift(null),Gn(s,a,f,u,w,b),m=Math.max(v+g,m),h=Math.max(b,h)};if(hn(d)){g(p,f,Jn("default",_n(d,o)))}else{const t=y(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=_n(t[n],o);for(const t in p)g(p[t],ts(f,t),Jn(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(Zn);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),l.push(xe(0,h,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),i.has(s)||i.set(s,{keyframes:{},transition:{}});const c=i.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:h,ease:u,times:l,...n}}}),i}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let r;r=hn(n)?Hn(n,t.default,e.default):ss(n,t,e),s.push(r)}),new V(s)}const is=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?rs(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?ss(e,n,s,t):Hn(e,n,s),t&&t.animations.push(r),r},os=is(),as=new WeakMap;let ls;function us({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=as.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 cs(t){t.forEach(us)}function hs(t,e){ls||"undefined"!=typeof ResizeObserver&&(ls=new ResizeObserver(cs));const n=y(t);return n.forEach(t=>{let n=as.get(t);n||(n=new Set,as.set(t,n)),n.add(e),null==ls||ls.observe(t)}),()=>{n.forEach(t=>{const n=as.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ls||ls.unobserve(t)})}}const ds=new Set;let ps;function fs(t){return ds.add(t),ps||(ps=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ds.forEach(t=>t(e))},window.addEventListener("resize",ps)),()=>{ds.delete(t),!ds.size&&ps&&(ps=void 0)}}const ms={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function gs(t,e,n,s){const r=n[e],{length:i,position:o}=ms[e],a=r.current,l=n.time;r.current=t["scroll"+o],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=xe(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:c(r.current-a,u)}const vs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ys={start:0,center:.5,end:1};function ws(t,e,n=0){let s=0;if(t in ys&&(t=ys[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 bs=[0,0];function xs(t,e,n,s){let r=Array.isArray(t)?t:bs,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,ys[t]?t:"0"]),i=ws(r[0],n,s),o=ws(r[1],e),i-o}const Ss={x:0,y:0};function Vs(t,e,n){const{offset:s=vs.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Ss,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=xs(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=We(e[i].offset,Le(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function Ts(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){gs(t,"x",e,n),gs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Vs(t,n,s)},notify:()=>e(n)}}const As=new WeakMap,Ms=new WeakMap,ks=new WeakMap,Ps=t=>t===document.documentElement?window:t;function Cs(t,{container:e=document.documentElement,...n}={}){let s=ks.get(e);s||(s=new Set,ks.set(e,s));const a=Ts(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(a),!As.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(o.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{r.read(t,!1,!0),r.read(n,!1,!0),r.update(i,!1,!0)};As.set(e,a);const c=Ps(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Ms.set(e,(u=a,"function"==typeof(l=e)?fs(l):hs(l,u))),c.addEventListener("scroll",a,{passive:!0})}var l,u;const c=As.get(e);return r.read(c,!1,!0),()=>{var t;i(c);const n=ks.get(e);if(!n)return;if(n.delete(a),n.size)return;const s=As.get(e);As.delete(e),s&&(Ps(e).removeEventListener("scroll",s),null===(t=Ms.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Fs=new Map;function Es({source:t=document.documentElement,axis:e="y"}={}){Fs.has(t)||Fs.set(t,{});const n=Fs.get(t);return n[e]||(n[e]=S()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Cs(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Os={some:0,all:1};const Rs=(t,e)=>Math.abs(t-e);const Bs=r,Is=s.reduce((t,e)=>(t[e]=t=>i(t),t),{});t.MotionValue=f,t.animate=os,t.anticipate=ge,t.backIn=fe,t.backInOut=me,t.backOut=pe,t.cancelFrame=i,t.cancelSync=Is,t.circIn=ce,t.circInOut=de,t.circOut=he,t.clamp=H,t.createScopedAnimate=is,t.cubicBezier=se,t.delay=function(t,e){const n=p.now(),s=({timestamp:r})=>{const o=r-n;o>=e&&(i(s),t(o-e))};return r.read(s,!0),()=>i(s)},t.distance=Rs,t.distance2D=function(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=re,t.easeInOut=oe,t.easeOut=ie,t.frame=r,t.frameData=o,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=y(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);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof r?r:Os[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=We,t.invariant=v,t.mirrorEasing=le,t.mix=Ie,t.motionValue=m,t.pipe=be,t.progress=xe,t.reverseEasing=ue,t.scroll=function(t,e){const n=Es(e);return"function"==typeof t?b(t,n):t.attachTimeline(n)},t.scrollInfo=Cs,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=ye(s)(l/e)*e}return e+l}},t.steps=a,t.sync=Bs,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=We(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.warning=g,t.wrap=qn}));
@@ -1,4 +1,4 @@
1
- import { useContext, useId, useEffect } from 'react';
1
+ import { useContext, useId, useEffect, useCallback } from 'react';
2
2
  import { PresenceContext } from '../../context/PresenceContext.mjs';
3
3
 
4
4
  /**
@@ -33,7 +33,7 @@ function usePresence() {
33
33
  // either be null or non-null for the lifespan of the component.
34
34
  const id = useId();
35
35
  useEffect(() => register(id), []);
36
- const safeToRemove = () => onExitComplete && onExitComplete(id);
36
+ const safeToRemove = useCallback(() => onExitComplete && onExitComplete(id), [id, onExitComplete]);
37
37
  return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
38
38
  }
39
39
  /**
@@ -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 === "11.3.13", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.13 may not work as expected.`);
20
+ warnOnce(nextValue.version === "11.3.14", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.14 may not work as expected.`);
21
21
  }
22
22
  }
23
23
  else if (isMotionValue(prevValue)) {
@@ -34,7 +34,7 @@ class MotionValue {
34
34
  * This will be replaced by the build step with the latest version number.
35
35
  * When MotionValues are provided to motion components, warn if versions are mixed.
36
36
  */
37
- this.version = "11.3.13";
37
+ this.version = "11.3.14";
38
38
  /**
39
39
  * Tracks whether this value can output a velocity. Currently this is only true
40
40
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -4844,7 +4844,7 @@
4844
4844
  * This will be replaced by the build step with the latest version number.
4845
4845
  * When MotionValues are provided to motion components, warn if versions are mixed.
4846
4846
  */
4847
- this.version = "11.3.13";
4847
+ this.version = "11.3.14";
4848
4848
  /**
4849
4849
  * Tracks whether this value can output a velocity. Currently this is only true
4850
4850
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -7308,7 +7308,7 @@
7308
7308
  * and warn against mismatches.
7309
7309
  */
7310
7310
  {
7311
- warnOnce(nextValue.version === "11.3.13", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.13 may not work as expected.`);
7311
+ warnOnce(nextValue.version === "11.3.14", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.3.14 may not work as expected.`);
7312
7312
  }
7313
7313
  }
7314
7314
  else if (isMotionValue(prevValue)) {
@@ -10636,7 +10636,7 @@
10636
10636
  // either be null or non-null for the lifespan of the component.
10637
10637
  const id = React$1.useId();
10638
10638
  React$1.useEffect(() => register(id), []);
10639
- const safeToRemove = () => onExitComplete && onExitComplete(id);
10639
+ const safeToRemove = React$1.useCallback(() => onExitComplete && onExitComplete(id), [id, onExitComplete]);
10640
10640
  return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
10641
10641
  }
10642
10642
  /**
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),f=e.createContext({}),g=e.createContext(null),v="undefined"!=typeof window,y=v?e.useLayoutEffect:e.useEffect,x=e.createContext({strict:!1}),P=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),w="data-"+P("framerAppearId"),S={skipAnimations:!1,useManualTiming:!1};const T=["read","resolveKeyframes","update","preRender","render","postRender"];function b(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=T.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{r=t,i?s=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,s&&(s=!1,l.process(t)))}};return l}(o),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=r,p=()=>{const o=S.useManualTiming?s.timestamp:performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:T.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<T.length;e++)r[T[e]].cancel(t)},state:s,steps:r}}const{schedule:A,cancel:E}=b(queueMicrotask,!1);function C(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const V=e.createContext({});let M=!1;function R(t,n,i,s,o){const{visualElement:r}=e.useContext(f),a=e.useContext(x),l=e.useContext(g),u=e.useContext(m).reducedMotion,c=e.useRef();s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:n,parent:r,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const h=c.current,d=e.useContext(V);!h||h.projection||!o||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){return e?!1!==e.options.allowProjection?e.projection:t(e.parent):void 0}(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&C(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}(c.current,i,o,d),e.useInsertionEffect(()=>{h&&h.update(i,l)});const p=e.useRef(Boolean(i[w]&&!window.HandoffComplete));return y(()=>{h&&(h.updateFeatures(),A.render(h.render),p.current&&h.animationState&&h.animationState.animateChanges())}),e.useEffect(()=>{h&&(!p.current&&h.animationState&&h.animationState.animateChanges(),p.current&&(p.current=!1,M||(M=!0,queueMicrotask(D))))}),h}function D(){window.HandoffComplete=!0}function k(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):C(i)&&(i.current=e))},[n])}function L(t){return"string"==typeof t||Array.isArray(t)}function B(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const j=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],F=["initial",...j];function O(t){return B(t.animate)||F.some(e=>L(t[e]))}function I(t){return Boolean(O(t)||t.variants)}function U(t){const{initial:n,animate:i}=function(t,e){if(O(t)){const{initial:e,animate:n}=t;return{initial:!1===e||L(e)?e:void 0,animate:L(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(f));return e.useMemo(()=>({initial:n,animate:i}),[W(n),W(i)])}function W(t){return Array.isArray(t)?t.join(" "):t}const N={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"]},z={};for(const t in N)z[t]={isEnabled:e=>N[t].some(t=>!!e[t])};function $(t){for(const e in t)z[e]={...z[e],...t[e]}}const H=e.createContext({}),Y=Symbol.for("motionComponentSymbol"),K=t=>t;let X=K,G=K;function _({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){t&&$(t);const r=e.forwardRef((function(t,r){let a;const l={...e.useContext(m),...t,layoutId:q(t)},{isStatic:u}=l,c=U(t),h=s(t,u);if(!u&&v){e.useContext(x).strict;const t=function(t){const{drag:e,layout:n}=z;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);a=t.MeasureLayout,c.visualElement=R(o,h,l,n,t.ProjectionNode)}return p(f.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,k(h,c.visualElement,r),h,u,c.visualElement)]})}));return r[Y]=o,r}function q({layoutId:t}){const n=e.useContext(H).id;return n&&void 0!==t?n+"-"+t:t}function Z(t){function e(e,n={}){return _(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const J=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Q(t){return"string"==typeof t&&!t.includes("-")&&!!(J.indexOf(t)>-1||/[A-Z]/u.test(t))}const tt={};function et(t){Object.assign(tt,t)}const nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(nt);function st(t,{layout:e,layoutId:n}){return it.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!tt[t]||"opacity"===t)}const ot=t=>Boolean(t&&t.getVelocity),rt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},at=nt.length;function lt(t,e,n){let i="";for(let e=0;e<at;e++){const n=nt[e];if(void 0!==t[n]){i+=`${rt[n]||n}(${t[n]}) `}}return i=i.trim(),n?i=n(t,e?"":i):e&&(i="none"),i}const ut=t=>e=>"string"==typeof e&&e.startsWith(t),ct=ut("--"),ht=ut("var(--"),dt=t=>!!ht(t)&&pt.test(t.split("/*")[0].trim()),pt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mt=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ft=(t,e,n)=>n>e?e:n<t?t:n,gt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},vt={...gt,transform:t=>ft(0,1,t)},yt={...gt,default:1},xt=t=>Math.round(1e5*t)/1e5,Pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,St=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Tt(t){return"string"==typeof t}const bt=t=>({test:e=>Tt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),At=bt("deg"),Et=bt("%"),Ct=bt("px"),Vt=bt("vh"),Mt=bt("vw"),Rt={...Et,parse:t=>Et.parse(t)/100,transform:t=>Et.transform(100*t)},Dt={...gt,transform:Math.round},kt={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:At,rotateX:At,rotateY:At,rotateZ:At,scale:yt,scaleX:yt,scaleY:yt,scaleZ:yt,skew:At,skewX:At,skewY:At,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:vt,originX:Rt,originY:Rt,originZ:Ct,zIndex:Dt,backgroundPositionX:Ct,backgroundPositionY:Ct,fillOpacity:vt,strokeOpacity:vt,numOctaves:Dt};function Lt(t,e,n){const{style:i,vars:s,transform:o,transformOrigin:r}=t;let a=!1,l=!1,u=!0;for(const t in e){const n=e[t];if(ct(t)){s[t]=n;continue}const c=kt[t],h=mt(n,c);if(it.has(t)){if(a=!0,o[t]=h,!u)continue;n!==(c.default||0)&&(u=!1)}else t.startsWith("origin")?(l=!0,r[t]=h):i[t]=h}if(e.transform||(a||n?i.transform=lt(t.transform,u,n):i.transform&&(i.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;i.transformOrigin=`${t} ${e} ${n}`}}const Bt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jt(t,e,n){for(const i in e)ot(e[i])||st(i,n)||(t[i]=e[i])}function Ft(t,n){const i={};return jt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Lt(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function Ot(t,e){const n={},i=Ft(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const It=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ut(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||It.has(t)}let Wt=t=>!Ut(t);function Nt(t){t&&(Wt=e=>e.startsWith("on")?!Ut(e):t(e))}try{Nt(require("@emotion/is-prop-valid").default)}catch(t){}function zt(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Wt(s)||!0===n&&Ut(s)||!e&&!Ut(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function $t(t,e,n){return"string"==typeof t?t:Ct.transform(e+n*t)}const Ht={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yt={offset:"strokeDashoffset",array:"strokeDasharray"};function Kt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Lt(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:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${$t(e,t.x,t.width)} ${$t(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ht:Yt;t[o.offset]=Ct.transform(-i);const r=Ct.transform(e),a=Ct.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const Xt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Gt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function _t(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Kt(e,n,Gt(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};jt(e,t.style,t),o.style={...e,...o.style}}return o}function qt(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(Q(n)?_t:Ot)(i,o,r,n),l=zt(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>ot(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}function Zt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Jt=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 Qt(t,e,n,i){Zt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Jt.has(n)?n:P(n),e.attrs[n])}function te(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(ot(s[r])||e.style&&ot(e.style[r])||st(r,t)||void 0!==(null===(i=null==n?void 0:n.getValue(r))||void 0===i?void 0:i.liveStyle))&&(o[r]=s[r]);return n&&s&&"string"==typeof s.willChange&&(n.applyWillChange=!1),o}function ee(t,e,n){const i=te(t,e,n);for(const n in t)if(ot(t[n])||ot(e[n])){i[-1!==nt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function ne(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ie(t,e,n,i){if("function"==typeof e){const[s,o]=ne(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ne(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function se(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const oe=t=>Array.isArray(t);function re(t){const e=ot(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const ae=new Set(["opacity","clipPath","filter","transform"]);function le(t){return it.has(t)?"transform":ae.has(t)?P(t):void 0}function ue(t,e){-1===t.indexOf(e)&&t.push(e)}function ce(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const he=t=>(n,i)=>{const s=e.useContext(f),o=e.useContext(g),r=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:i},s,o,r,a){const l={latestValues:me(s,o,r,!a&&t,e),renderState:n()};return i&&(l.mount=t=>i(s,t,l)),l}(t,n,s,o,i);return i?r():se(r)};function de(t,e){const n=le(e);n&&ue(t,n)}function pe(t,e,n){const i=Array.isArray(e)?e:[e];for(let e=0;e<i.length;e++){const s=ie(t,i[e]);if(s){const{transitionEnd:t,transition:e,...i}=s;n(i,t)}}}function me(t,e,n,i,s){var o;const r={},a=[],l=i&&void 0===(null===(o=t.style)||void 0===o?void 0:o.willChange),u=s(t,{});for(const t in u)r[t]=re(u[t]);let{initial:c,animate:h}=t;const d=O(t),p=I(t);e&&p&&!d&&!1!==t.inherit&&(void 0===c&&(c=e.initial),void 0===h&&(h=e.animate));let m=!!n&&!1===n.initial;m=m||!1===c;const f=m?h:c;return f&&"boolean"!=typeof f&&!B(f)&&pe(t,f,(t,e)=>{for(const e in t){let n=t[e];if(Array.isArray(n)){n=n[m?n.length-1:0]}null!==n&&(r[e]=n)}for(const t in e)r[t]=e[t]}),l&&(h&&!1!==c&&!B(h)&&pe(t,h,t=>{for(const e in t)de(a,e)}),a.length&&(r.willChange=a.join(","))),r}const{schedule:fe,cancel:ge,state:ve,steps:ye}=b("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:K,!0),xe={useVisualState:he({scrapeMotionValuesFromProps:ee,createRenderState:Xt,onMount:(t,e,{renderState:n,latestValues:i})=>{fe.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),fe.render(()=>{Kt(n,i,Gt(e.tagName),t.transformTemplate),Qt(e,n)})}})},Pe={useVisualState:he({applyWillChange:!0,scrapeMotionValuesFromProps:te,createRenderState:Bt})};function we(t,{forwardMotionProps:e=!1},n,i){return{...Q(t)?xe:Pe,preloadedFeatures:n,useRender:qt(e),createVisualElement:i,Component:t}}function Se(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Te=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function be(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Ae=t=>e=>Te(e)&&t(e,be(e));function Ee(t,e,n,i){return Se(t,e,Ae(n),i)}const Ce=(t,e)=>n=>e(t(n)),Ve=(...t)=>t.reduce(Ce);function Me(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Re=Me("dragHorizontal"),De=Me("dragVertical");function ke(t){let e=!1;if("y"===t)e=De();else if("x"===t)e=Re();else{const t=Re(),n=De();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Le(){const t=ke(!0);return!t||(t(),!1)}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}function je(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return Ee(t.current,n,(n,s)=>{if("touch"===n.pointerType||Le())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const r=o[i];r&&fe.postRender(()=>r(n,s))},{passive:!t.getProps()[i]})}const Fe=(t,e)=>!!e&&(t===e||Fe(t,e.parentElement));function Oe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,be(n))}const Ie=new WeakMap,Ue=new WeakMap,We=t=>{const e=Ie.get(t.target);e&&e(t)},Ne=t=>{t.forEach(We)};function ze(t,e,n){const i=function({root:t,...e}){const n=t||document;Ue.has(n)||Ue.set(n,{});const i=Ue.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Ne,{root:t,...e})),i[s]}(e);return Ie.set(t,n),i.observe(t),()=>{Ie.delete(t),i.unobserve(t)}}const $e={some:0,all:1};const He={inView:{Feature:class extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:$e[i]};return ze(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Be{constructor(){super(...arguments),this.removeStartListeners=K,this.removeEndListeners=K,this.removeAccessibleListeners=K,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Ee(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps(),o=s||Fe(this.node.current,t.target)?n:i;o&&fe.update(()=>o(t,e))},{passive:!(n.onTap||n.onPointerUp)}),s=Ee(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Ve(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Se(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Se(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&Oe("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&fe.postRender(()=>n(t,e))})}),Oe("down",(t,e)=>{this.startPress(t,e)})}),e=Se(this.node.current,"blur",()=>{this.isPressing&&Oe("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Ve(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&fe.postRender(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Le()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&fe.postRender(()=>n(t,e))}mount(){const t=this.node.getProps(),e=Ee(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Se(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ve(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Be{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ve(Se(this.node.current,"focus",()=>this.onFocus()),Se(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Be{mount(){this.unmount=Ve(je(this.node,!0),je(this.node,!1))}unmount(){}}}};function Ye(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Ke(t,e,n){const i=t.getProps();return ie(i,e,void 0!==n?n:i.custom,t)}const Xe=t=>1e3*t,Ge=t=>t/1e3,_e={type:"spring",stiffness:500,damping:25,restSpeed:10},qe={type:"keyframes",duration:.8},Ze={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Je=(t,{keyframes:e})=>e.length>2?qe:it.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:_e:Ze;function Qe(t,e){return t[e]||t.default||t}const tn={current:!1},en=t=>null!==t;function nn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(en),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}let sn;function on(){sn=void 0}const rn={now:()=>(void 0===sn&&rn.set(ve.isProcessing||S.useManualTiming?ve.timestamp:performance.now()),sn),set:t=>{sn=t,queueMicrotask(on)}},an=t=>/^0[^.\s]+$/u.test(t);const ln=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cn(t,e,n=1){const[i,s]=function(t){const e=un.exec(t);if(!e)return[,];const[,n,i,s]=e;return["--"+(null!=n?n:i),s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ln(t)?parseFloat(t):t}return dt(s)?cn(s,e,n+1):s}const hn=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dn=t=>t===gt||t===Ct,pn=(t,e)=>parseFloat(t.split(", ")[e]),mn=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return pn(s[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?pn(e[1],t):0}},fn=new Set(["x","y","z"]),gn=nt.filter(t=>!fn.has(t));const vn={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:mn(4,13),y:mn(5,14)};vn.translateX=vn.x,vn.translateY=vn.y;const yn=t=>e=>e.test(t),xn=[gt,Ct,Et,At,Mt,Vt,{test:t=>"auto"===t,parse:t=>t}],Pn=t=>xn.find(yn(t)),wn=new Set;let Sn=!1,Tn=!1;function bn(){if(Tn){const t=Array.from(wn).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 gn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.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 i;null===(i=t.getValue(e))||void 0===i||i.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Tn=!1,Sn=!1,wn.forEach(t=>t.complete()),wn.clear()}function An(){wn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Tn=!0)})}class En{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(wn.add(this),Sn||(Sn=!0,fe.read(An),fe.resolveKeyframes(bn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),wn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,wn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cn=(t,e)=>n=>Boolean(Tt(n)&&St.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vn=(t,e,n)=>i=>{if(!Tt(i))return i;const[s,o,r,a]=i.match(Pt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Mn={...gt,transform:t=>Math.round((t=>ft(0,255,t))(t))},Rn={test:Cn("rgb","red"),parse:Vn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Mn.transform(t)+", "+Mn.transform(e)+", "+Mn.transform(n)+", "+xt(vt.transform(i))+")"};const Dn={test:Cn("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Rn.transform},kn={test:Cn("hsl","hue"),parse:Vn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Et.transform(xt(e))+", "+Et.transform(xt(n))+", "+xt(vt.transform(i))+")"},Ln={test:t=>Rn.test(t)||Dn.test(t)||kn.test(t),parse:t=>Rn.test(t)?Rn.parse(t):kn.test(t)?kn.parse(t):Dn.parse(t),transform:t=>Tt(t)?t:t.hasOwnProperty("red")?Rn.transform(t):kn.transform(t)};const Bn=/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 jn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Bn,t=>(Ln.test(t)?(i.color.push(o),s.push("color"),n.push(Ln.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Fn(t){return jn(t).values}function On(t){const{split:e,types:n}=jn(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+="number"===e?xt(t[o]):"color"===e?Ln.transform(t[o]):t[o]}return s}}const In=t=>"number"==typeof t?0:t;const Un={test:function(t){var e,n;return isNaN(t)&&Tt(t)&&((null===(e=t.match(Pt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(wt))||void 0===n?void 0:n.length)||0)>0},parse:Fn,createTransformer:On,getAnimatableNone:function(t){const e=Fn(t);return On(t)(e.map(In))}},Wn=new Set(["brightness","contrast","saturate","opacity"]);function Nn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Pt)||[];if(!i)return t;const s=n.replace(i,"");let o=Wn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const zn=/\b([a-z-]*)\(.*?\)/gu,$n={...Un,getAnimatableNone:t=>{const e=t.match(zn);return e?e.map(Nn).join(" "):t}},Hn={...kt,color:Ln,backgroundColor:Ln,outlineColor:Ln,fill:Ln,stroke:Ln,borderColor:Ln,borderTopColor:Ln,borderRightColor:Ln,borderBottomColor:Ln,borderLeftColor:Ln,filter:$n,WebkitFilter:$n},Yn=t=>Hn[t];function Kn(t,e){let n=Yn(t);return n!==$n&&(n=Un),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Xn=new Set(["auto","none","0"]);class Gn extends En{constructor(t,e,n,i){super(t,e,n,i,null==i?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),dt(i))){const s=cn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!hn.has(n)||2!==t.length)return;const[i,s]=t,o=Pn(i),r=Pn(s);if(o!==r)if(dn(o)&&dn(r))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(i=t[e])?0===i:null===i||"none"===i||"0"===i||an(i))&&n.push(e);var i;n.length&&function(t,e,n){let i=0,s=void 0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Xn.has(e)&&jn(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Kn(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=vn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function _n(t){let e;return()=>(void 0===e&&(e=t()),e)}const qn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Un.test(t)&&"0"!==t||t.startsWith("url(")));class Zn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(An(),bn()),this._resolved}onKeyframesResolved(t,e){this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=qn(s,e),a=qn(o,e);return!(!r||!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&&i)}(t,n,i,s)){if(tn.current||!o)return null==a||a(nn(t,this.options,e)),null==r||r(),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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Jn(t,e){return e?t*(1e3/e):0}function Qn(t,e,n){const i=Math.max(e-5,0);return Jn(n-t(i),e-i)}function ti({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o,r=1-e;r=ft(.05,1,r),t=ft(.01,10,Ge(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/ei(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=ei(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=Xe(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function ei(t,e){return t*Math.sqrt(1-e*e)}const ni=["duration","bounce"],ii=["stiffness","damping","mass"];function si(t,e){return e.some(e=>void 0!==t[e])}function oi({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!si(t,ii)&&si(t,ni)){const n=ti(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Ge(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,g=Ge(Math.sqrt(a/u)),v=Math.abs(f)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),m<1){const t=ei(g,m);y=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)y=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);y=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=y(t);if(d)r.done=t>=c;else{let s=p;0!==t&&(s=m<1?Qn(y,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function ri({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,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 m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const v=t=>-m*Math.exp(-t/i),y=t=>g+v(t),x=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=oi({keyframes:[d.value,p(d.value)],velocity:Qn(y,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),S(t)),void 0!==P&&t>=P?w.next(t-P):(!e&&x(t),d)}}}const ai=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function li(t,e,n,i){if(t===e&&n===i)return K;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=ai(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:ai(s(t),e,i)}const ui=li(.42,0,1,1),ci=li(0,0,.58,1),hi=li(.42,0,.58,1),di=t=>Array.isArray(t)&&"number"!=typeof t[0],pi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,mi=t=>e=>1-t(1-e),fi=t=>1-Math.sin(Math.acos(t)),gi=mi(fi),vi=pi(fi),yi=li(.33,1.53,.69,.99),xi=mi(yi),Pi=pi(xi),wi=t=>(t*=2)<1?.5*xi(t):.5*(2-Math.pow(2,-10*(t-1))),Si={linear:K,easeIn:ui,easeInOut:hi,easeOut:ci,circIn:fi,circInOut:vi,circOut:gi,backIn:xi,backInOut:Pi,backOut:yi,anticipate:wi},Ti=t=>{if(Array.isArray(t)){G(4===t.length);const[e,n,i,s]=t;return li(e,n,i,s)}return"string"==typeof t?Si[t]:t},bi=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Ai=(t,e,n)=>t+(e-t)*n;function Ei(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 Ci(t,e){return n=>n>0?e:t}const Vi=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Mi=[Dn,Rn,kn];function Ri(t){const e=(n=t,Mi.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===kn&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Ei(a,i,t+1/3),o=Ei(a,i,t),r=Ei(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Di=(t,e)=>{const n=Ri(t),i=Ri(e);if(!n||!i)return Ci(t,e);const s={...n};return t=>(s.red=Vi(n.red,i.red,t),s.green=Vi(n.green,i.green,t),s.blue=Vi(n.blue,i.blue,t),s.alpha=Ai(n.alpha,i.alpha,t),Rn.transform(s))},ki=new Set(["none","hidden"]);function Li(t,e){return n=>Ai(t,e,n)}function Bi(t){return"number"==typeof t?Li:"string"==typeof t?dt(t)?Ci:Ln.test(t)?Di:Oi:Array.isArray(t)?ji:"object"==typeof t?Ln.test(t)?Di:Fi:Ci}function ji(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Bi(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Fi(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Bi(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Oi=(t,e)=>{const n=Un.createTransformer(e),i=jn(t),s=jn(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?ki.has(t)&&!s.values.length||ki.has(e)&&!i.values.length?function(t,e){return ki.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ve(ji(function(t,e){var n;const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,s[r]++}return i}(i,s),s.values),n):Ci(t,e)};function Ii(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ai(t,e,n);return Bi(t)(t,e)}function Ui(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(G(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const i=[],s=n||Ii,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||K:e;o=Ve(t,o)}i.push(o)}return i}(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=bi(t[n],t[n+1],e);return r[n](i)};return n?e=>l(ft(t[0],t[o-1],e)):l}function Wi(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=bi(0,e,i);t.push(Ai(n,1,s))}}function Ni(t){const e=[0];return Wi(e,t.length-1),e}function zi({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=di(i)?i.map(Ti):Ti(i),o={done:!1,value:e[0]},r=Ui(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ni(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||hi).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function $i(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}const Hi=t=>{const e=({timestamp:e})=>t(e);return{start:()=>fe.update(e,!0),stop:()=>ge(e),now:()=>ve.isProcessing?ve.timestamp:rn.now()}},Yi={decay:ri,inertia:ri,tween:zi,keyframes:zi,spring:oi},Ki=t=>t/100;class Xi extends Zn{constructor({KeyframeResolver:t=En,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",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:n,motionValue:i,keyframes:s}=this.options,o=(t,e)=>this.onKeyframesResolved(t,e);n&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(s,o,n,i):this.resolver=new t(s,o,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=Yi[e]||zi;let a,l;r!==zi&&"number"!=typeof t[0]&&(a=Ve(Ki,Ii(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===s&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=$i(u));const{calculatedDuration:c}=u,h=c+i;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}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:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=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,x=s;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,m&&(n-=m/c)):"mirror"===p&&(x=o)),y=ft(0,1,n)*c}const P=v?{done:!1,value:a[0]}:x.next(y);r&&(P.value=r(P.value));let{done:w}=P;v||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&void 0!==i&&(P.value=nn(a,this.options,i)),f&&f(P.value),S&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Ge(t.calculatedDuration):0}get time(){return Ge(this.currentTime)}set time(t){t=Xe(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=Ge(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Hi,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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)}}function Gi(t){return new Xi(t)}const _i=t=>Array.isArray(t)&&"number"==typeof t[0];function qi(t){return Boolean(!t||"string"==typeof t&&t in Ji||_i(t)||Array.isArray(t)&&t.every(qi))}const Zi=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Ji={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zi([0,.65,.55,1]),circOut:Zi([.55,0,1,.45]),backIn:Zi([.31,.01,.66,-.59]),backOut:Zi([.33,1.53,.69,.99])};function Qi(t){return ts(t)||Ji.easeOut}function ts(t){return t?_i(t)?Zi(t):Array.isArray(t)?t.map(Qi):Ji[t]:void 0}function es(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ts(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const ns=_n(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class is extends Zn{constructor(t){super(t);const{name:e,motionValue:n,keyframes:i}=this.options;this.resolver=new Gn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:s,ease:o,type:r,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!qi(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,...l}=this.options,u=function(t,e){const n=new Xi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,l);1===(t=u.keyframes).length&&(t[1]=t[0]),i=u.duration,s=u.times,o=u.ease,r="keyframes"}var u;const c=es(a.owner.current,l,t,{...this.options,duration:i,times:s,ease:o});return c.startTime=rn.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(nn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:s,type:r,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Ge(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Ge(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Xe(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}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return K;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return K}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;const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,...l}=this.options,u=new Xi({...l,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),c=Xe(this.time);t.setWithVelocity(u.sample(c-10).value,u.sample(c).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:i,repeatType:s,damping:o,type:r}=t;return ns()&&n&&ae.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}function ss(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return fe.update(i,!0),()=>ge(i)}const os=_n(()=>void 0!==window.ScrollTimeline);class rs{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!os()||!e.attachTimeline)return e.pause(),ss(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const as=(t,e,n,i={},s,o,r)=>a=>{const l=Qe(i,t)||{},u=l.delay||i.delay||0;let{elapsed:c=0}=i;c-=Xe(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),r&&r()},onStop:r,name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(h={...h,...Je(t,h)}),h.duration&&(h.duration=Xe(h.duration)),h.repeatDelay&&(h.repeatDelay=Xe(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),(tn.current||S.skipAnimations)&&(d=!0,h.duration=0,h.delay=0),d&&!o&&void 0!==e.get()){const t=nn(h.keyframes,l);if(void 0!==t)return fe.update(()=>{h.onUpdate(t),h.onComplete()}),new rs([])}return!o&&is.supports(h)?new is(h):new Xi(h)};class ls{constructor(){this.subscriptions=[]}add(t){return ue(this.subscriptions,t),()=>ce(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const us={current:void 0};class cs{constructor(t,e={}){this.version="11.3.13",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=rn.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=rn.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 ls);const n=this.events[t].add(e);return"change"===t?()=>{n(),fe.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 us.current&&us.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=rn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Jn(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 hs(t,e){return new cs(t,e)}function ds(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,hs(n))}function ps(t,e){const n=Ke(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ds(t,e,(r=o[e],oe(r)?r[r.length-1]||0:r))}var r}function ms(t){return t.getProps()[w]}class fs extends cs{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=le(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let i=!1;return()=>{if(i)return;i=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(ce(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function gs(t,e){var n;if(!t.applyWillChange)return;let i=t.getValue("willChange");return i||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(i=new fs("auto"),t.addValue("willChange",i)),s=i,Boolean(ot(s)&&s.add)?i.add(e):void 0;var s}function vs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function ys(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),s=l[e];if(void 0===s||c&&vs(c,e))continue;const a={delay:n,elapsed:0,...Qe(r||{},e)};let h=!1;if(window.HandoffAppearAnimations){const n=ms(t);if(n){const t=window.HandoffAppearAnimations(n,e,i,fe);null!==t&&(a.elapsed=t,h=!0)}}i.start(as(e,i,s,t.shouldReduceMotion&&it.has(e)?{type:!1}:a,t,h,gs(t,e)));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{fe.update(()=>{a&&ps(t,a)})}),u}function xs(t,e,n={}){var i;const s=Ke(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(ys(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ps).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(xs(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,s+i,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function Ps(t,e){return t.sortNodePosition(e)}function ws(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>xs(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=xs(t,e,n);else{const s="function"==typeof e?Ke(t,e,n.custom):e;i=Promise.all(ys(t,s,n))}return i.then(()=>{fe.postRender(()=>{t.notify("AnimationComplete",e)})})}const Ss=[...j].reverse(),Ts=j.length;function bs(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>ws(t,e,n)))}(t),n=Cs(),i=!0;const s=e=>(n,i)=>{var s;const o=Ke(t,i,"exit"===e?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const r=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Ts;e++){const d=Ss[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=L(m),g=d===o?p.isActive:null;!1===g&&(h=e);let v=m===a[d]&&m!==r[d]&&f;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||B(m)||"boolean"==typeof m)continue;let y=As(p.prevProp,m)||d===o&&p.isActive&&!v&&f||e>h&&f,x=!1;const P=Array.isArray(m)?m:[m];let w=P.reduce(s(d),{});!1===g&&(w={});const{prevResolvedValues:S={}}=p,T={...S,...w},b=e=>{y=!0,u.has(e)&&(x=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in T){const e=w[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=oe(e)&&oe(n)?!Ye(e,n):e!==n,i?null!=e?b(t):u.add(t):void 0!==e&&u.has(t)?b(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=w,p.isActive&&(c={...c,...w}),i&&t.blockInitialAnimation&&(y=!1),!y||v&&!x||l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=null!=i?i:null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var s;if(n[e].isActive===i)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Cs(),i=!0}}}function As(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ye(e,t)}function Es(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cs(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}let Vs=0;const Ms={animation:{Feature:class extends Be{constructor(t){super(t),t.animationState||(t.animationState=bs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();B(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends Be{constructor(){super(...arguments),this.id=Vs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Rs=(t,e)=>Math.abs(t-e);function Ds(t,e){const n=Rs(t.x,e.x),i=Rs(t.y,e.y);return Math.sqrt(n**2+i**2)}class ks{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=js(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ds(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ve;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ls(e,this.transformPagePoint),fe.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=js("pointercancel"===t.type?this.lastMoveEventInfo:Ls(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Te(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Ls(be(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=ve;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,js(o,this.history)),this.removeListeners=Ve(Ee(this.contextWindow,"pointermove",this.handlePointerMove),Ee(this.contextWindow,"pointerup",this.handlePointerUp),Ee(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ge(this.updatePoint)}}function Ls(t,e){return e?{point:e(t.point)}:t}function Bs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function js({point:t},e){return{point:t,delta:Bs(t,Os(e)),offset:Bs(t,Fs(e)),velocity:Is(e,.1)}}function Fs(t){return t[0]}function Os(t){return t[t.length-1]}function Is(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Os(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Xe(e)));)n--;if(!i)return{x:0,y:0};const o=Ge(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Us(t){return t.max-t.min}function Ws(t,e,n,i=.5){t.origin=i,t.originPoint=Ai(e.min,e.max,t.origin),t.scale=Us(n)/Us(e),t.translate=Ai(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Ns(t,e,n,i){Ws(t.x,e.x,n.x,i?i.originX:void 0),Ws(t.y,e.y,n.y,i?i.originY:void 0)}function zs(t,e,n){t.min=n.min+e.min,t.max=t.min+Us(e)}function $s(t,e,n){t.min=e.min-n.min,t.max=t.min+Us(e)}function Hs(t,e,n){$s(t.x,e.x,n.x),$s(t.y,e.y,n.y)}function Ys(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ks(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Xs=.35;function Gs(t,e,n){return{min:_s(t,e),max:_s(t,n)}}function _s(t,e){return"number"==typeof t?t:t[e]||0}const qs=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Zs(t){return[t("x"),t("y")]}function Js({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Qs(t){return void 0===t||1===t}function to({scale:t,scaleX:e,scaleY:n}){return!Qs(t)||!Qs(e)||!Qs(n)}function eo(t){return to(t)||no(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function no(t){return io(t.x)||io(t.y)}function io(t){return t&&"0%"!==t}function so(t,e,n){return n+e*(t-n)}function oo(t,e,n,i,s){return void 0!==s&&(t=so(t,s,i)),so(t,n,i)+e}function ro(t,e=0,n=1,i,s){t.min=oo(t.min,e,n,i,s),t.max=oo(t.max,e,n,i,s)}function ao(t,{x:e,y:n}){ro(t.x,e.translate,e.scale,e.originPoint),ro(t.y,n.translate,n.scale,n.originPoint)}function lo(t,e){t.min=t.min+e,t.max=t.max+e}function uo(t,e,n,i,s=.5){ro(t,e,n,Ai(t.min,t.max,s),i)}function co(t,e){uo(t.x,e.x,e.scaleX,e.scale,e.originX),uo(t.y,e.y,e.scaleY,e.scale,e.originY)}function ho(t,e){return Js(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const po=({current:t})=>t?t.ownerDocument.defaultView:null,mo=new WeakMap;class fo{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ks(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(be(t,"page").point)},onStart:(t,e)=>{var n;const{drag:i,dragPropagation:s,onDragStart:o}=this.getProps();if(i&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ke(i),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Et.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Us(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&fe.postRender(()=>o(t,e)),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=gs(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Zs(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:po(this.visualElement)})}stop(t,e){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&fe.postRender(()=>o(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!go(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Ai(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Ai(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&C(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ys(t.x,n,s),y:Ys(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Xs){return!1===t?t=0:!0===t&&(t=Xs),{x:Gs(t,"left","right"),y:Gs(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Zs(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!C(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=ho(t,n),{scroll:s}=e;return s&&(lo(i.x,s.offset.x),lo(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ks(t.x,e.x),y:Ks(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Js(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Zs(r=>{if(!go(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(as(t,n,0,e,this.visualElement,!1,gs(this.visualElement,t)))}stopAnimation(){Zs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zs(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Zs(e=>{const{drag:n}=this.getProps();if(!go(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Ai(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!C(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zs(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Us(t),s=Us(e);return s>i?n=bi(e.min,e.max-i,t.min):i>s&&(n=bi(t.min,t.max-s,e.min)),ft(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Zs(e=>{if(!go(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Ai(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;mo.set(this.visualElement,this);const t=Ee(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();C(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),fe.read(e);const s=Se(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Zs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Xs,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function go(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const vo=t=>(e,n)=>{t&&fe.postRender(()=>t(e,n))};const yo=["TopLeft","TopRight","BottomLeft","BottomRight"],xo=yo.length,Po=t=>"string"==typeof t?parseFloat(t):t,wo=t=>"number"==typeof t||Ct.test(t);function So(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const To=Ao(0,.5,gi),bo=Ao(.5,.95,K);function Ao(t,e,n){return i=>i<t?0:i>e?1:n(bi(t,e,i))}function Eo(t,e){t.min=e.min,t.max=e.max}function Co(t,e){Eo(t.x,e.x),Eo(t.y,e.y)}function Vo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Mo(t,e,n,i,s){return t=so(t-=e,1/n,i),void 0!==s&&(t=so(t,1/s,i)),t}function Ro(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(Et.test(e)){e=parseFloat(e);e=Ai(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ai(o.min,o.max,i);t===o&&(a-=e),t.min=Mo(t.min,e,n,a,s),t.max=Mo(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Do=["x","scaleX","originX"],ko=["y","scaleY","originY"];function Lo(t,e,n,i){Ro(t.x,e,Do,n?n.x:void 0,i?i.x:void 0),Ro(t.y,e,ko,n?n.y:void 0,i?i.y:void 0)}function Bo(t){return 0===t.translate&&1===t.scale}function jo(t){return Bo(t.x)&&Bo(t.y)}function Fo(t,e){return t.min===e.min&&t.max===e.max}function Oo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Io(t,e){return Oo(t.x,e.x)&&Oo(t.y,e.y)}function Uo(t){return Us(t.x)/Us(t.y)}function Wo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class No{constructor(){this.members=[]}add(t){ue(this.members,t),t.scheduleRender()}remove(t){if(ce(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const zo=(t,e)=>t.depth-e.depth;class $o{constructor(){this.children=[],this.isDirty=!1}add(t){ue(this.children,t),this.isDirty=!0}remove(t){ce(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zo),this.isDirty=!1,this.children.forEach(t)}}const Ho={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yo(t,e){const n=rn.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(ge(i),t(o-e))};return fe.read(i,!0),()=>ge(i)}function Ko(t,e,n){var i;if("string"==typeof t){let s=document;e&&(G(Boolean(e.current)),s=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const Xo=new WeakMap;function Go(t){return t instanceof SVGElement&&"svg"!==t.tagName}const _o={current:null},qo={current:!1};function Zo(){if(qo.current=!0,v)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_o.current=t.matches;t.addListener(e),e()}else _o.current=!1}const Jo=[...xn,Ln,Un],Qo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tr=F.length;class er{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.applyWillChange=!1,this.resolveKeyframes=(t,e,n,i)=>new this.KeyframeResolver(t,e,n,i,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=En,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,fe.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;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=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=O(e),this.isVariantNode=I(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ot(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Xo.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)),qo.current||Zo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||_o.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xo.delete(this.current),this.projection&&this.projection.unmount(),ge(this.notifyUpdate),ge(this.render),this.valueSubscriptions.forEach(t=>t()),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){const n=it.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&fe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s(),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 z){const e=z[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(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<Qo.length;e++){const n=Qo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ot(s))t.addValue(i,s);else if(ot(o))t.addValue(i,hs(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,hs(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<tr;t++){const n=F[t],i=this.props[n];(L(i)||!1===i)&&(e[n]=i)}return e}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=hs(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=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 s;return null!=i&&("string"==typeof i&&(ln(i)||an(i))?i=parseFloat(i):(s=i,!Jo.find(yn(s))&&Un.test(e)&&(i=Kn(t,e))),this.setBaseTarget(t,ot(i)?i.get():i)),ot(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=ie(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||ot(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new ls),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class nr extends er{constructor(){super(...arguments),this.KeyframeResolver=Gn}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]}}class ir extends nr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=qs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(it.has(e)){const t=Yn(e);return t&&t.default||0}return e=Jt.has(e)?e:P(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return ee(t,e,n)}build(t,e,n){Kt(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){Qt(t,e,0,i)}mount(t){this.isSVGTag=Gt(t.tagName),super.mount(t)}}class sr extends nr{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Zt}readValueFromInstance(t,e){if(it.has(e)){const t=Yn(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(ct(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ho(t,e)}build(t,e,n){Lt(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return te(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ot(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function or(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Go(t)?new ir(e):new sr(e);n.mount(t),Xo.set(t,n)}function rr(t,e,n){const i=ot(t)?t:hs(t);return i.start(as("",i,e,n)),i.animation}function ar(t,e=100){const n=oi({keyframes:[0,e],...t}),i=Math.min($i(n),2e4);return{type:"keyframes",ease:t=>n.next(i*t).value/e,duration:Ge(i)}}function lr(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}const ur=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function cr(t,e){return di(t)?t[ur(0,t.length,e)]:t}function hr(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(ce(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Ai(s,o,i[r]),easing:cr(n,r)})}function dr(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function pr(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function mr(t,e){return e[t]||(e[t]=[]),e[t]}function fr(t){return Array.isArray(t)?t:[t]}function gr(t,e){return t[e]?{...t,...t[e]}:{...t}}const vr=t=>"number"==typeof t,yr=t=>t.every(vr);function xr(t,e,n,i){const s=Ko(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t];Xo.has(i)||or(i);const a=Xo.get(i),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...ys(a,{...e,transition:l},{}))}return new rs(r)}function Pr(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i){const s=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,lr(c,o.at,u,l));continue}let[d,p,m={}]=o;void 0!==m.at&&(c=lr(c,m.at,u,l));let f=0;const g=(t,n,i,o=0,r=0)=>{const a=fr(t),{delay:l=0,times:u=Ni(a),type:d="keyframes",...p}=n;let{ease:m=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(o,r):l,y=a.length;if(y<=2&&"spring"===d){let t=100;if(2===y&&yr(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=Xe(g));const n=ar(e,t);m=n.ease,g=n.duration}null!=g||(g=s);const x=c+v,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Wi(u,w),1===a.length&&a.unshift(null),hr(i,a,m,u,x,P),f=Math.max(v+g,f),h=Math.max(P,h)};if(ot(d)){g(p,m,mr("default",pr(d,r)))}else{const t=Ko(d,i,a),e=t.length;for(let n=0;n<e;n++){p=p,m=m;const i=pr(t[n],r);for(const t in p)g(p[t],gr(m,t),mr(t,i),n,e)}}u=c,c+=f}return r.forEach((t,i)=>{for(const s in t){const r=t[s];r.sort(dr);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:i}=r[t];a.push(n),l.push(bi(0,h,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(i)||o.set(i,{keyframes:{},transition:{}});const c=o.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let s;s=ot(n)?rr(n,t.default,e.default):xr(n,t,e),i.push(s)}),new rs(i)}const wr=t=>function(e,n,i){let s;var o;return o=e,s=Array.isArray(o)&&Array.isArray(o[0])?Pr(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?xr(e,n,i,t):rr(e,n,i),t&&t.animations.push(s),s},Sr=wr(),Tr=new WeakMap;let br;function Ar({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Tr.get(t))||void 0===i||i.forEach(i=>{i({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 Er(t){t.forEach(Ar)}function Cr(t,e){br||"undefined"!=typeof ResizeObserver&&(br=new ResizeObserver(Er));const n=Ko(t);return n.forEach(t=>{let n=Tr.get(t);n||(n=new Set,Tr.set(t,n)),n.add(e),null==br||br.observe(t)}),()=>{n.forEach(t=>{const n=Tr.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==br||br.unobserve(t)})}}const Vr=new Set;let Mr;function Rr(t){return Vr.add(t),Mr||(Mr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Vr.forEach(t=>t(e))},window.addEventListener("resize",Mr)),()=>{Vr.delete(t),!Vr.size&&Mr&&(Mr=void 0)}}const Dr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function kr(t,e,n,i){const s=n[e],{length:o,position:r}=Dr[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=bi(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:Jn(s.current-a,u)}const Lr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Br={start:0,center:.5,end:1};function jr(t,e,n=0){let i=0;if(t in Br&&(t=Br[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Fr=[0,0];function Or(t,e,n,i){let s=Array.isArray(t)?t:Fr,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Br[t]?t:"0"]),o=jr(s[0],n,i),r=jr(s[1],e),o-r}const Ir={x:0,y:0};function Ur(t,e,n){const{offset:i=Lr.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):Ir,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=Or(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Ui(e[o].offset,Ni(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function Wr(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.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,i.target,n),update:e=>{!function(t,e,n){kr(t,"x",e,n),kr(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Ur(t,n,i)},notify:()=>e(n)}}const Nr=new WeakMap,zr=new WeakMap,$r=new WeakMap,Hr=t=>t===document.documentElement?window:t;function Yr(t,{container:e=document.documentElement,...n}={}){let i=$r.get(e);i||(i=new Set,$r.set(e,i));const s=Wr(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(i.add(s),!Nr.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(ve.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{fe.read(t,!1,!0),fe.read(n,!1,!0),fe.update(s,!1,!0)};Nr.set(e,a);const l=Hr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&zr.set(e,(r=a,"function"==typeof(o=e)?Rr(o):Cr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Nr.get(e);return fe.read(a,!1,!0),()=>{var t;ge(a);const n=$r.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=Nr.get(e);Nr.delete(e),i&&(Hr(e).removeEventListener("scroll",i),null===(t=zr.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Kr=new Map;function Xr({source:t=document.documentElement,axis:e="y"}={}){Kr.has(t)||Kr.set(t,{});const n=Kr.get(t);return n[e]||(n[e]=os()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},i=Yr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:i}}({source:t,axis:e})),n[e]}const Gr={some:0,all:1};function _r(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ko(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Gr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function qr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Ui(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}const Zr=fe,Jr=T.reduce((t,e)=>(t[e]=t=>ge(t),t),{}),Qr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ta="undefined"!=typeof window&&void 0!==window.MotionDebug,ea=["","X","Y","Z"],na={visibility:"hidden"};let ia=0;function sa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function oa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=ia++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ta&&(Qr.totalNodes=Qr.resolvedTargetDeltas=Qr.recalculatedProjection=0),this.nodes.forEach(la),this.nodes.forEach(fa),this.nodes.forEach(ga),this.nodes.forEach(ua),ta&&window.MotionDebug.record(Qr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new $o)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ls),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Go(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Yo(i,250),Ho.hasAnimatedSinceResize&&(Ho.hasAnimatedSinceResize=!1,this.nodes.forEach(ma))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Sa,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Io(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Qe(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||ma(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ge(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(va),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.HandoffCancelAllAnimations&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:n}=e.options;return!!n&&(!!ms(n)||!(!e.parent||e.parent.hasCheckedOptimisedAppear)&&t(e.parent))}(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ha);this.isUpdating||this.nodes.forEach(da),this.isUpdating=!1,this.nodes.forEach(pa),this.nodes.forEach(ra),this.nodes.forEach(aa),this.clearAllSnapshots();const t=rn.now();ve.delta=ft(0,1e3/60,t-ve.timestamp),ve.timestamp=t,ve.isProcessing=!0,ye.update.process(ve),ye.preRender.process(ve),ye.render.process(ve),ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,A.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ca),this.sharedNodes.forEach(ya)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!jo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||eo(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Aa((i=n).x),Aa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Ca))){const{scroll:t}=this.root;t&&(lo(n.x,t.offset.x),lo(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Co(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let e=0;e<this.path.length;e++){const i=this.path[e],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Co(n,t),lo(n.x,s.offset.x),lo(n.y,s.offset.y))}return n}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Co(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&co(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),eo(i.latestValues)&&co(n,i.latestValues)}return eo(this.latestValues)&&co(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Co(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!eo(n.latestValues))continue;to(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Co(i,n.measurePageBox()),Lo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return eo(this.latestValues)&&Lo(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=ve.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Hs(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Co(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,zs(r.x,a.x,l.x),zs(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Co(this.target,this.layout.layoutBox),ao(this.target,this.targetDelta)):Co(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Hs(this.relativeTargetOrigin,this.target,t.target),Co(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ta&&Qr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!to(this.parent.latestValues)&&!no(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ve.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Co(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&co(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ao(t,r)),i&&eo(o.latestValues)&&co(t,o.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Vo(this.prevProjectionDelta.x,this.projectionDelta.x),Vo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ns(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&Wo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Wo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ta&&Qr.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(wa));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;xa(o.x,t.x,n),xa(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hs(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Pa(t.x,e.x,n.x,i),Pa(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,Fo(l.x,d.x)&&Fo(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Co(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Ai(0,void 0!==n.opacity?n.opacity:1,To(i)),t.opacityExit=Ai(void 0!==e.opacity?e.opacity:1,0,bo(i))):o&&(t.opacity=Ai(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<xo;s++){const o=`border${yo[s]}Radius`;let r=So(e,o),a=So(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||wo(r)===wo(a)?(t[o]=Math.max(Ai(Po(r),Po(a),i),0),(Et.test(a)||Et.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ai(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ge(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fe.update(()=>{Ho.hasAnimatedSinceResize=!0,this.currentAnimation=rr(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ea(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Us(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Us(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Co(e,n),co(e,s),Ns(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new No);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&sa("z",t,i,this.animationValues);for(let e=0;e<ea.length;e++)sa("rotate"+ea[e],t,i,this.animationValues),sa("skew"+ea[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return na;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=re(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=re(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!eo(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=(null==n?void 0:n.z)||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in tt){if(void 0===r[t])continue;const{correct:e,applyTo:n}=tt[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?re(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function ra(t){t.updateLayout()}function aa(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?Zs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Us(i);i.min=e[t].min,i.max=i.min+s}):Ea(s,n.layoutBox,e)&&Zs(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Us(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ns(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ns(a,t.applyTransform(i,!0),n.measuredBox):Ns(a,e,n.layoutBox);const l=!jo(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Hs(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Hs(a,e,o.layoutBox),Io(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function la(t){ta&&Qr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ua(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ca(t){t.clearSnapshot()}function ha(t){t.clearMeasurements()}function da(t){t.isLayoutDirty=!1}function pa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ma(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fa(t){t.resolveTargetDelta()}function ga(t){t.calcProjection()}function va(t){t.resetSkewAndRotation()}function ya(t){t.removeLeadSnapshot()}function xa(t,e,n){t.translate=Ai(e.translate,0,n),t.scale=Ai(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pa(t,e,n,i){t.min=Ai(e.min,n.min,i),t.max=Ai(e.max,n.max,i)}function wa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Sa={duration:.45,ease:[.4,0,.1,1]},Ta=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ba=Ta("applewebkit/")&&!Ta("chrome/")?Math.round:K;function Aa(t){t.min=ba(t.min),t.max=ba(t.max)}function Ea(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Uo(e),s=Uo(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Ca(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Va=oa({attachResizeListener:(t,e)=>Se(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},Ra=oa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ma.current){const t=new Va({});t.mount(window),t.setOptions({layoutScroll:!0}),Ma.current=t}return Ma.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Da=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ka(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Da);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function La(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ba={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ct.test(t))return t;t=parseFloat(t)}return`${La(t,e.target.x)}% ${La(t,e.target.y)}%`}},ja={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Un.parse(t);if(s.length>5)return i;const o=Un.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=Ai(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function Fa(){const t=e.useContext(g);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);return!n&&i?[!1,()=>i&&i(o)]:[!0]}class Oa extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;et(Ua),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ho.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||fe.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),A.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ia(t){const[n,i]=Fa(),s=e.useContext(H);return d(Oa,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:i})}const Ua={borderRadius:{...Ba,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ba,borderTopRightRadius:Ba,borderBottomLeftRadius:Ba,borderBottomRightRadius:Ba,boxShadow:ja},Wa={pan:{Feature:class extends Be{constructor(){super(...arguments),this.removePointerDownListener=K}onPointerDown(t){this.session=new ks(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:po(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:vo(t),onStart:vo(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&fe.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ee(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Be{constructor(t){super(t),this.removeGroupControls=K,this.removeListeners=K,this.controls=new fo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ra,MeasureLayout:Ia}},Na=(t,n)=>Q(t)?new ir(n):new sr(n,{allowProjection:t!==e.Fragment}),za={layout:{ProjectionNode:Ra,MeasureLayout:Ia}},$a={...Ms,...He,...Wa,...za},Ha=Z((t,e)=>we(t,e,$a,Na));const Ya=Z(we);function Ka(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Xa(){const t=Ka(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>fe.postRender(s),[s]),n]}class Ga extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function _a({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=e.useContext(m);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:l}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const u=document.createElement("style");return a&&(u.nonce=a),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}},[n]),d(Ga,{isPresent:n,childRef:o,sizeRef:r,children:i.cloneElement(t,{ref:o})})}const qa=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l})=>{const u=se(Za),c=e.useId(),h=e.useMemo(()=>({id:c,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?[Math.random()]:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===l&&(t=d(_a,{isPresent:s,children:t})),d(g.Provider,{value:h,children:t})};function Za(){return new Map}function Ja(t){return e.useEffect(()=>()=>t(),[])}const Qa=t=>t.key||"";function tl(t){return"function"==typeof t}const el=e.createContext(null),nl=t=>!0===t,il=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(H),o=e.useContext(el),[r,a]=Xa(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>nl(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:nl(i)&&s.group||ka()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(H.Provider,{value:c,children:t})},sl=e.createContext(null);function ol(t){return t.value}function rl(t,e){return t.layout.min-e.layout.min}function al(t){const n=se(()=>hs(t)),{isStatic:i}=e.useContext(m);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function ll(t,e){const n=al(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>fe.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ge(i)}}),n}function ul(t,e,n,i){if("function"==typeof t)return function(t){us.current=[],t();const e=ll(us.current,t);return us.current=void 0,e}(t);const s="function"==typeof e?e:qr(e,n,i);return Array.isArray(t)?cl(t,s):cl([t],([t])=>s(t))}function cl(t,e){const n=se(()=>[]);return ll(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function hl(t,e=0){return ot(t)?t:al(e)}const dl={Group:e.forwardRef((function({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=se(()=>Ha(n)),u=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[i]:u.push({value:t,layout:e[i]}),u.sort(rl)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Ai(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(c.current=!0,s(i.map(ol).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(sl.Provider,{value:h,children:t})})})),Item:e.forwardRef((function({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=se(()=>Ha(s)),c=e.useContext(sl),h={x:hl(n.x),y:hl(n.y)},p=ul([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:f,updateOrder:g}=c;return d(u,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&g(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>f(i,t),ref:l,ignoreStrict:!0,children:t})}))},pl={renderer:Na,...Ms,...He},ml={...pl,...Wa,...za};function fl(t){return"number"==typeof t?t:parseFloat(t)}function gl(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function vl(t,e){X(Boolean(!e||e.current))}const yl=()=>({scrollX:hs(0),scrollY:hs(0),scrollXProgress:hs(0),scrollYProgress:hs(0)});function xl({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=se(yl);return(i?y:e.useEffect)(()=>(vl(0,n),vl(0,t),Yr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function Pl(t){const n=e.useRef(0),{isStatic:i}=e.useContext(m);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return fe.update(e,!0),()=>ge(e)},[t])}function wl(){!qo.current&&Zo();const[t]=e.useState(_o.current);return t}function Sl(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&ps(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Sl(t,e)})})}function Tl(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(ws(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?Sl(t,e):"string"==typeof e?Sl(t,[e]):ps(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function bl(){const t=se(Tl);return y(t.mount,[]),t}const Al=bl;class El{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Cl=()=>new El;function Vl(t){return null!==t&&"object"==typeof t&&Y in t}function Ml(){return Rl}function Rl(t){Ma.current&&(Ma.current.isUpdating=!1,Ma.current.blockUpdate(),t&&t())}const Dl=(t,e)=>`${t}: ${e}`,kl=new Map;let Ll,Bl,jl;function Fl(t,e,n,i){const s=it.has(e)?"transform":e,o=Dl(t,s),r=kl.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{if(kl.delete(o),i)i.render(()=>i.render(()=>{try{a.cancel()}catch(t){}}));else try{a.cancel()}catch(t){}})(),null):(void 0===Ll&&(Ll=performance.now()),Ll-l||0)}const Ol=()=>({});class Il extends er{constructor(){super(...arguments),this.measureInstanceViewportBox=qs}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Ul=he({scrapeMotionValuesFromProps:Ol,createRenderState:Ol});const Wl=t=>t>.001?1/t:1e5;let Nl=0;t.AcceleratedAnimation=is,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,exitBeforeEnter:o,presenceAffectsLayout:r=!0,mode:a="sync"})=>{const l=e.useContext(H).forceRender||Xa()[0],u=Ka(),c=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let p=c;const m=e.useRef(new Map).current,f=e.useRef(p),g=e.useRef(new Map).current,v=e.useRef(!0);if(y(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=Qa(t);e.set(n,t)})}(c,g),f.current=p}),Ja(()=>{v.current=!0,g.clear(),m.clear()}),v.current)return d(h,{children:p.map(t=>d(qa,{isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:r,mode:a,children:t},Qa(t)))});p=[...p];const x=f.current.map(Qa),P=c.map(Qa),w=x.length;for(let t=0;t<w;t++){const e=x[t];-1!==P.indexOf(e)||m.has(e)||m.set(e,void 0)}return"wait"===a&&m.size&&(p=[]),m.forEach((t,e)=>{if(-1!==P.indexOf(e))return;const i=g.get(e);if(!i)return;const o=x.indexOf(e);let h=t;if(!h){h=d(qa,{isPresent:!1,onExitComplete:()=>{m.delete(e);const t=Array.from(g.keys()).filter(t=>!P.includes(t));if(t.forEach(t=>g.delete(t)),f.current=c.filter(n=>{const i=Qa(n);return i===e||t.includes(i)}),!m.size){if(!1===u.current)return;l(),s&&s()}},custom:n,presenceAffectsLayout:r,mode:a,children:i},Qa(i)),m.set(e,h)}p.splice(o,0,h)}),p=p.map(t=>{const e=t.key;return m.has(e)?t:d(qa,{isPresent:!0,presenceAffectsLayout:r,mode:a,children:t},Qa(t))}),d(h,{children:m.size?p:p.map(t=>e.cloneElement(t))})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(il,{id:se(()=>"asl-"+Nl++),children:t})),t.DeprecatedLayoutGroupContext=el,t.DragControls=El,t.FlatTree=$o,t.LayoutGroup=il,t.LayoutGroupContext=H,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!tl(n)),o=e.useRef(void 0);if(!tl(n)){const{renderer:t,...e}=n;o.current=t,$(e)}return e.useEffect(()=>{tl(n)&&n().then(({renderer:t,...e})=>{$(e),o.current=t,s(!0)})},[]),d(x.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Nt(n),(i={...e.useContext(m),...i}).isStatic=se(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(m.Provider,{value:s,children:t})},t.MotionConfigContext=m,t.MotionContext=f,t.MotionGlobalConfig=S,t.MotionValue=cs,t.PresenceContext=g,t.Reorder=dl,t.SwitchLayoutGroupContext=V,t.VisualElement=er,t.addPointerEvent=Ee,t.addPointerInfo=Ae,t.addScaleCorrector=et,t.animate=Sr,t.animateValue=Gi,t.animateVisualElement=ws,t.animationControls=Tl,t.animations=Ms,t.anticipate=wi,t.backIn=xi,t.backInOut=Pi,t.backOut=yi,t.buildTransform=lt,t.calcLength=Us,t.cancelFrame=ge,t.cancelSync=Jr,t.circIn=fi,t.circInOut=vi,t.circOut=gi,t.clamp=ft,t.color=Ln,t.complex=Un,t.createBox=qs,t.createDomMotionComponent=function(t){return _(we(t,{forwardMotionProps:!1},$a,Na))},t.createMotionComponent=_,t.createScopedAnimate=wr,t.cubicBezier=li,t.delay=Yo,t.disableInstantTransitions=function(){tn.current=!1},t.distance=Rs,t.distance2D=Ds,t.domAnimation=pl,t.domMax=ml,t.easeIn=ui,t.easeInOut=hi,t.easeOut=ci,t.filterProps=zt,t.frame=fe,t.frameData=ve,t.inView=_r,t.interpolate=Ui,t.invariant=G,t.isBrowser=v,t.isDragActive=Le,t.isMotionComponent=Vl,t.isMotionValue=ot,t.isValidMotionProp=Ut,t.m=Ya,t.makeUseVisualState=he,t.mirrorEasing=pi,t.mix=Ii,t.motion=Ha,t.motionValue=hs,t.optimizedAppearDataAttribute=w,t.pipe=Ve,t.progress=bi,t.px=Ct,t.resolveMotionValue=re,t.reverseEasing=mi,t.scroll=function(t,e){const n=Xr(e);return"function"==typeof t?ss(t,n):t.attachTimeline(n)},t.scrollInfo=Yr,t.spring=oi,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=Ti(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Fl;const r=Dl(o,e);jl||(jl=es(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),kl.set(r,{animation:jl,startTime:null}),window.HandoffCancelAllAnimations||(window.HandoffCancelAllAnimations=()=>{kl.forEach(({animation:t})=>{t.cancel()}),kl.clear(),window.HandoffCancelAllAnimations=void 0}));const a=()=>{jl.cancel();const o=es(t,e,n,i);void 0===Bl&&(Bl=performance.now()),o.startTime=Bl,kl.set(r,{animation:o,startTime:Bl}),s&&s(o)};jl.ready?jl.ready.then(a).catch(K):a()},t.steps=ye,t.sync=Zr,t.transform=qr,t.unwrapMotionComponent=function(t){if(Vl(t))return t[Y]},t.useAnimate=function(){const t=se(()=>({current:null,animations:[]})),e=se(()=>wr(t));return Ja(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Al,t.useAnimationControls=bl,t.useAnimationFrame=Pl,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?ur(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Ul({},!1),o=se(()=>new Il({props:{},visualState:s,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{i({...t})}},null)},[i,o]),[n,se(()=>t=>ws(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=al(1),i=al(1);const{visualElement:s}=e.useContext(f);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:ul(n,Wl),scaleY:ul(i,Wl)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return Se(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return se(Cl)},t.useElementScroll=function(t){return xl({container:t})},t.useForceUpdate=Xa,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return _r(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o,s]),r},t.useInstantLayoutTransition=Ml,t.useInstantTransition=function(){const[t,n]=Xa(),i=Ml(),s=e.useRef();return e.useEffect(()=>{fe.postRender(()=>fe.postRender(()=>{n===s.current&&(tn.current=!1)}))},[n]),e=>{i(()=>{tn.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(g))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return ll(e.filter(ot),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=ot(n)?n.get():n)}return i}))},t.useMotionValue=al,t.useMotionValueEvent=gl,t.usePresence=Fa,t.useReducedMotion=wl,t.useReducedMotionConfig=function(){const t=wl(),{reducedMotion:n}=e.useContext(m);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=Ma.current;t&&t.resetTree()},[])},t.useScroll=xl,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(m),s=e.useRef(null),o=al(ot(t)?fl(t.get()):t),r=e.useRef(o.get()),a=e.useRef(()=>{}),l=()=>{const t=s.current;t&&0===t.time&&t.sample(ve.delta),u(),s.current=Gi({keyframes:[o.get(),r.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:a.current})},u=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>i?e(t):(r.current=t,a.current=e,fe.update(l),o.get()),u),[JSON.stringify(n)]),y(()=>{if(ot(t))return t.on("change",t=>o.set(fl(t)))},[o]),o},t.useTime=function(){const t=al(0);return Pl(e=>t.set(e)),t},t.useTransform=ul,t.useUnmountEffect=Ja,t.useVelocity=function(t){const e=al(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&fe.update(n)};return gl(t,"change",()=>{fe.update(n,!1,!0)}),e},t.useViewportScroll=function(){return xl()},t.useWillChange=function(){return se(()=>new fs("auto"))},t.visualElementStore=Xo,t.warning=X,t.wrap=ur}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),f=e.createContext({}),g=e.createContext(null),v="undefined"!=typeof window,y=v?e.useLayoutEffect:e.useEffect,x=e.createContext({strict:!1}),P=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),w="data-"+P("framerAppearId"),S={skipAnimations:!1,useManualTiming:!1};const T=["read","resolveKeyframes","update","preRender","render","postRender"];function b(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=T.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{r=t,i?s=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,s&&(s=!1,l.process(t)))}};return l}(o),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=r,p=()=>{const o=S.useManualTiming?s.timestamp:performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:T.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<T.length;e++)r[T[e]].cancel(t)},state:s,steps:r}}const{schedule:A,cancel:E}=b(queueMicrotask,!1);function C(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const V=e.createContext({});let M=!1;function R(t,n,i,s,o){const{visualElement:r}=e.useContext(f),a=e.useContext(x),l=e.useContext(g),u=e.useContext(m).reducedMotion,c=e.useRef();s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:n,parent:r,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const h=c.current,d=e.useContext(V);!h||h.projection||!o||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){return e?!1!==e.options.allowProjection?e.projection:t(e.parent):void 0}(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&C(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}(c.current,i,o,d),e.useInsertionEffect(()=>{h&&h.update(i,l)});const p=e.useRef(Boolean(i[w]&&!window.HandoffComplete));return y(()=>{h&&(h.updateFeatures(),A.render(h.render),p.current&&h.animationState&&h.animationState.animateChanges())}),e.useEffect(()=>{h&&(!p.current&&h.animationState&&h.animationState.animateChanges(),p.current&&(p.current=!1,M||(M=!0,queueMicrotask(D))))}),h}function D(){window.HandoffComplete=!0}function k(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):C(i)&&(i.current=e))},[n])}function L(t){return"string"==typeof t||Array.isArray(t)}function B(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const j=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],F=["initial",...j];function O(t){return B(t.animate)||F.some(e=>L(t[e]))}function I(t){return Boolean(O(t)||t.variants)}function U(t){const{initial:n,animate:i}=function(t,e){if(O(t)){const{initial:e,animate:n}=t;return{initial:!1===e||L(e)?e:void 0,animate:L(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(f));return e.useMemo(()=>({initial:n,animate:i}),[W(n),W(i)])}function W(t){return Array.isArray(t)?t.join(" "):t}const N={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"]},z={};for(const t in N)z[t]={isEnabled:e=>N[t].some(t=>!!e[t])};function $(t){for(const e in t)z[e]={...z[e],...t[e]}}const H=e.createContext({}),Y=Symbol.for("motionComponentSymbol"),K=t=>t;let X=K,G=K;function _({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){t&&$(t);const r=e.forwardRef((function(t,r){let a;const l={...e.useContext(m),...t,layoutId:q(t)},{isStatic:u}=l,c=U(t),h=s(t,u);if(!u&&v){e.useContext(x).strict;const t=function(t){const{drag:e,layout:n}=z;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);a=t.MeasureLayout,c.visualElement=R(o,h,l,n,t.ProjectionNode)}return p(f.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,k(h,c.visualElement,r),h,u,c.visualElement)]})}));return r[Y]=o,r}function q({layoutId:t}){const n=e.useContext(H).id;return n&&void 0!==t?n+"-"+t:t}function Z(t){function e(e,n={}){return _(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const J=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Q(t){return"string"==typeof t&&!t.includes("-")&&!!(J.indexOf(t)>-1||/[A-Z]/u.test(t))}const tt={};function et(t){Object.assign(tt,t)}const nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(nt);function st(t,{layout:e,layoutId:n}){return it.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!tt[t]||"opacity"===t)}const ot=t=>Boolean(t&&t.getVelocity),rt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},at=nt.length;function lt(t,e,n){let i="";for(let e=0;e<at;e++){const n=nt[e];if(void 0!==t[n]){i+=`${rt[n]||n}(${t[n]}) `}}return i=i.trim(),n?i=n(t,e?"":i):e&&(i="none"),i}const ut=t=>e=>"string"==typeof e&&e.startsWith(t),ct=ut("--"),ht=ut("var(--"),dt=t=>!!ht(t)&&pt.test(t.split("/*")[0].trim()),pt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mt=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ft=(t,e,n)=>n>e?e:n<t?t:n,gt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},vt={...gt,transform:t=>ft(0,1,t)},yt={...gt,default:1},xt=t=>Math.round(1e5*t)/1e5,Pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,St=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Tt(t){return"string"==typeof t}const bt=t=>({test:e=>Tt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),At=bt("deg"),Et=bt("%"),Ct=bt("px"),Vt=bt("vh"),Mt=bt("vw"),Rt={...Et,parse:t=>Et.parse(t)/100,transform:t=>Et.transform(100*t)},Dt={...gt,transform:Math.round},kt={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:At,rotateX:At,rotateY:At,rotateZ:At,scale:yt,scaleX:yt,scaleY:yt,scaleZ:yt,skew:At,skewX:At,skewY:At,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:vt,originX:Rt,originY:Rt,originZ:Ct,zIndex:Dt,backgroundPositionX:Ct,backgroundPositionY:Ct,fillOpacity:vt,strokeOpacity:vt,numOctaves:Dt};function Lt(t,e,n){const{style:i,vars:s,transform:o,transformOrigin:r}=t;let a=!1,l=!1,u=!0;for(const t in e){const n=e[t];if(ct(t)){s[t]=n;continue}const c=kt[t],h=mt(n,c);if(it.has(t)){if(a=!0,o[t]=h,!u)continue;n!==(c.default||0)&&(u=!1)}else t.startsWith("origin")?(l=!0,r[t]=h):i[t]=h}if(e.transform||(a||n?i.transform=lt(t.transform,u,n):i.transform&&(i.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;i.transformOrigin=`${t} ${e} ${n}`}}const Bt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jt(t,e,n){for(const i in e)ot(e[i])||st(i,n)||(t[i]=e[i])}function Ft(t,n){const i={};return jt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Lt(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function Ot(t,e){const n={},i=Ft(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const It=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ut(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||It.has(t)}let Wt=t=>!Ut(t);function Nt(t){t&&(Wt=e=>e.startsWith("on")?!Ut(e):t(e))}try{Nt(require("@emotion/is-prop-valid").default)}catch(t){}function zt(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Wt(s)||!0===n&&Ut(s)||!e&&!Ut(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function $t(t,e,n){return"string"==typeof t?t:Ct.transform(e+n*t)}const Ht={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yt={offset:"strokeDashoffset",array:"strokeDasharray"};function Kt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Lt(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:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${$t(e,t.x,t.width)} ${$t(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ht:Yt;t[o.offset]=Ct.transform(-i);const r=Ct.transform(e),a=Ct.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const Xt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Gt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function _t(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Kt(e,n,Gt(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};jt(e,t.style,t),o.style={...e,...o.style}}return o}function qt(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(Q(n)?_t:Ot)(i,o,r,n),l=zt(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>ot(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}function Zt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Jt=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 Qt(t,e,n,i){Zt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Jt.has(n)?n:P(n),e.attrs[n])}function te(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(ot(s[r])||e.style&&ot(e.style[r])||st(r,t)||void 0!==(null===(i=null==n?void 0:n.getValue(r))||void 0===i?void 0:i.liveStyle))&&(o[r]=s[r]);return n&&s&&"string"==typeof s.willChange&&(n.applyWillChange=!1),o}function ee(t,e,n){const i=te(t,e,n);for(const n in t)if(ot(t[n])||ot(e[n])){i[-1!==nt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function ne(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ie(t,e,n,i){if("function"==typeof e){const[s,o]=ne(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ne(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function se(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const oe=t=>Array.isArray(t);function re(t){const e=ot(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const ae=new Set(["opacity","clipPath","filter","transform"]);function le(t){return it.has(t)?"transform":ae.has(t)?P(t):void 0}function ue(t,e){-1===t.indexOf(e)&&t.push(e)}function ce(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const he=t=>(n,i)=>{const s=e.useContext(f),o=e.useContext(g),r=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:i},s,o,r,a){const l={latestValues:me(s,o,r,!a&&t,e),renderState:n()};return i&&(l.mount=t=>i(s,t,l)),l}(t,n,s,o,i);return i?r():se(r)};function de(t,e){const n=le(e);n&&ue(t,n)}function pe(t,e,n){const i=Array.isArray(e)?e:[e];for(let e=0;e<i.length;e++){const s=ie(t,i[e]);if(s){const{transitionEnd:t,transition:e,...i}=s;n(i,t)}}}function me(t,e,n,i,s){var o;const r={},a=[],l=i&&void 0===(null===(o=t.style)||void 0===o?void 0:o.willChange),u=s(t,{});for(const t in u)r[t]=re(u[t]);let{initial:c,animate:h}=t;const d=O(t),p=I(t);e&&p&&!d&&!1!==t.inherit&&(void 0===c&&(c=e.initial),void 0===h&&(h=e.animate));let m=!!n&&!1===n.initial;m=m||!1===c;const f=m?h:c;return f&&"boolean"!=typeof f&&!B(f)&&pe(t,f,(t,e)=>{for(const e in t){let n=t[e];if(Array.isArray(n)){n=n[m?n.length-1:0]}null!==n&&(r[e]=n)}for(const t in e)r[t]=e[t]}),l&&(h&&!1!==c&&!B(h)&&pe(t,h,t=>{for(const e in t)de(a,e)}),a.length&&(r.willChange=a.join(","))),r}const{schedule:fe,cancel:ge,state:ve,steps:ye}=b("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:K,!0),xe={useVisualState:he({scrapeMotionValuesFromProps:ee,createRenderState:Xt,onMount:(t,e,{renderState:n,latestValues:i})=>{fe.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),fe.render(()=>{Kt(n,i,Gt(e.tagName),t.transformTemplate),Qt(e,n)})}})},Pe={useVisualState:he({applyWillChange:!0,scrapeMotionValuesFromProps:te,createRenderState:Bt})};function we(t,{forwardMotionProps:e=!1},n,i){return{...Q(t)?xe:Pe,preloadedFeatures:n,useRender:qt(e),createVisualElement:i,Component:t}}function Se(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Te=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function be(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Ae=t=>e=>Te(e)&&t(e,be(e));function Ee(t,e,n,i){return Se(t,e,Ae(n),i)}const Ce=(t,e)=>n=>e(t(n)),Ve=(...t)=>t.reduce(Ce);function Me(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Re=Me("dragHorizontal"),De=Me("dragVertical");function ke(t){let e=!1;if("y"===t)e=De();else if("x"===t)e=Re();else{const t=Re(),n=De();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Le(){const t=ke(!0);return!t||(t(),!1)}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}function je(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return Ee(t.current,n,(n,s)=>{if("touch"===n.pointerType||Le())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const r=o[i];r&&fe.postRender(()=>r(n,s))},{passive:!t.getProps()[i]})}const Fe=(t,e)=>!!e&&(t===e||Fe(t,e.parentElement));function Oe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,be(n))}const Ie=new WeakMap,Ue=new WeakMap,We=t=>{const e=Ie.get(t.target);e&&e(t)},Ne=t=>{t.forEach(We)};function ze(t,e,n){const i=function({root:t,...e}){const n=t||document;Ue.has(n)||Ue.set(n,{});const i=Ue.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Ne,{root:t,...e})),i[s]}(e);return Ie.set(t,n),i.observe(t),()=>{Ie.delete(t),i.unobserve(t)}}const $e={some:0,all:1};const He={inView:{Feature:class extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:$e[i]};return ze(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Be{constructor(){super(...arguments),this.removeStartListeners=K,this.removeEndListeners=K,this.removeAccessibleListeners=K,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Ee(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps(),o=s||Fe(this.node.current,t.target)?n:i;o&&fe.update(()=>o(t,e))},{passive:!(n.onTap||n.onPointerUp)}),s=Ee(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Ve(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Se(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Se(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&Oe("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&fe.postRender(()=>n(t,e))})}),Oe("down",(t,e)=>{this.startPress(t,e)})}),e=Se(this.node.current,"blur",()=>{this.isPressing&&Oe("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Ve(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&fe.postRender(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Le()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&fe.postRender(()=>n(t,e))}mount(){const t=this.node.getProps(),e=Ee(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Se(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ve(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Be{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ve(Se(this.node.current,"focus",()=>this.onFocus()),Se(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Be{mount(){this.unmount=Ve(je(this.node,!0),je(this.node,!1))}unmount(){}}}};function Ye(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Ke(t,e,n){const i=t.getProps();return ie(i,e,void 0!==n?n:i.custom,t)}const Xe=t=>1e3*t,Ge=t=>t/1e3,_e={type:"spring",stiffness:500,damping:25,restSpeed:10},qe={type:"keyframes",duration:.8},Ze={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Je=(t,{keyframes:e})=>e.length>2?qe:it.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:_e:Ze;function Qe(t,e){return t[e]||t.default||t}const tn={current:!1},en=t=>null!==t;function nn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(en),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}let sn;function on(){sn=void 0}const rn={now:()=>(void 0===sn&&rn.set(ve.isProcessing||S.useManualTiming?ve.timestamp:performance.now()),sn),set:t=>{sn=t,queueMicrotask(on)}},an=t=>/^0[^.\s]+$/u.test(t);const ln=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cn(t,e,n=1){const[i,s]=function(t){const e=un.exec(t);if(!e)return[,];const[,n,i,s]=e;return["--"+(null!=n?n:i),s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ln(t)?parseFloat(t):t}return dt(s)?cn(s,e,n+1):s}const hn=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dn=t=>t===gt||t===Ct,pn=(t,e)=>parseFloat(t.split(", ")[e]),mn=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return pn(s[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?pn(e[1],t):0}},fn=new Set(["x","y","z"]),gn=nt.filter(t=>!fn.has(t));const vn={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:mn(4,13),y:mn(5,14)};vn.translateX=vn.x,vn.translateY=vn.y;const yn=t=>e=>e.test(t),xn=[gt,Ct,Et,At,Mt,Vt,{test:t=>"auto"===t,parse:t=>t}],Pn=t=>xn.find(yn(t)),wn=new Set;let Sn=!1,Tn=!1;function bn(){if(Tn){const t=Array.from(wn).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 gn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.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 i;null===(i=t.getValue(e))||void 0===i||i.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Tn=!1,Sn=!1,wn.forEach(t=>t.complete()),wn.clear()}function An(){wn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Tn=!0)})}class En{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(wn.add(this),Sn||(Sn=!0,fe.read(An),fe.resolveKeyframes(bn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),wn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,wn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cn=(t,e)=>n=>Boolean(Tt(n)&&St.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vn=(t,e,n)=>i=>{if(!Tt(i))return i;const[s,o,r,a]=i.match(Pt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Mn={...gt,transform:t=>Math.round((t=>ft(0,255,t))(t))},Rn={test:Cn("rgb","red"),parse:Vn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Mn.transform(t)+", "+Mn.transform(e)+", "+Mn.transform(n)+", "+xt(vt.transform(i))+")"};const Dn={test:Cn("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Rn.transform},kn={test:Cn("hsl","hue"),parse:Vn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Et.transform(xt(e))+", "+Et.transform(xt(n))+", "+xt(vt.transform(i))+")"},Ln={test:t=>Rn.test(t)||Dn.test(t)||kn.test(t),parse:t=>Rn.test(t)?Rn.parse(t):kn.test(t)?kn.parse(t):Dn.parse(t),transform:t=>Tt(t)?t:t.hasOwnProperty("red")?Rn.transform(t):kn.transform(t)};const Bn=/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 jn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Bn,t=>(Ln.test(t)?(i.color.push(o),s.push("color"),n.push(Ln.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Fn(t){return jn(t).values}function On(t){const{split:e,types:n}=jn(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+="number"===e?xt(t[o]):"color"===e?Ln.transform(t[o]):t[o]}return s}}const In=t=>"number"==typeof t?0:t;const Un={test:function(t){var e,n;return isNaN(t)&&Tt(t)&&((null===(e=t.match(Pt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(wt))||void 0===n?void 0:n.length)||0)>0},parse:Fn,createTransformer:On,getAnimatableNone:function(t){const e=Fn(t);return On(t)(e.map(In))}},Wn=new Set(["brightness","contrast","saturate","opacity"]);function Nn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Pt)||[];if(!i)return t;const s=n.replace(i,"");let o=Wn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const zn=/\b([a-z-]*)\(.*?\)/gu,$n={...Un,getAnimatableNone:t=>{const e=t.match(zn);return e?e.map(Nn).join(" "):t}},Hn={...kt,color:Ln,backgroundColor:Ln,outlineColor:Ln,fill:Ln,stroke:Ln,borderColor:Ln,borderTopColor:Ln,borderRightColor:Ln,borderBottomColor:Ln,borderLeftColor:Ln,filter:$n,WebkitFilter:$n},Yn=t=>Hn[t];function Kn(t,e){let n=Yn(t);return n!==$n&&(n=Un),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Xn=new Set(["auto","none","0"]);class Gn extends En{constructor(t,e,n,i){super(t,e,n,i,null==i?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),dt(i))){const s=cn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!hn.has(n)||2!==t.length)return;const[i,s]=t,o=Pn(i),r=Pn(s);if(o!==r)if(dn(o)&&dn(r))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(i=t[e])?0===i:null===i||"none"===i||"0"===i||an(i))&&n.push(e);var i;n.length&&function(t,e,n){let i=0,s=void 0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Xn.has(e)&&jn(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Kn(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=vn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function _n(t){let e;return()=>(void 0===e&&(e=t()),e)}const qn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Un.test(t)&&"0"!==t||t.startsWith("url(")));class Zn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(An(),bn()),this._resolved}onKeyframesResolved(t,e){this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=qn(s,e),a=qn(o,e);return!(!r||!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&&i)}(t,n,i,s)){if(tn.current||!o)return null==a||a(nn(t,this.options,e)),null==r||r(),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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Jn(t,e){return e?t*(1e3/e):0}function Qn(t,e,n){const i=Math.max(e-5,0);return Jn(n-t(i),e-i)}function ti({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o,r=1-e;r=ft(.05,1,r),t=ft(.01,10,Ge(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/ei(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=ei(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=Xe(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function ei(t,e){return t*Math.sqrt(1-e*e)}const ni=["duration","bounce"],ii=["stiffness","damping","mass"];function si(t,e){return e.some(e=>void 0!==t[e])}function oi({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!si(t,ii)&&si(t,ni)){const n=ti(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Ge(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,g=Ge(Math.sqrt(a/u)),v=Math.abs(f)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),m<1){const t=ei(g,m);y=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)y=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);y=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=y(t);if(d)r.done=t>=c;else{let s=p;0!==t&&(s=m<1?Qn(y,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function ri({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,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 m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const v=t=>-m*Math.exp(-t/i),y=t=>g+v(t),x=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=oi({keyframes:[d.value,p(d.value)],velocity:Qn(y,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),S(t)),void 0!==P&&t>=P?w.next(t-P):(!e&&x(t),d)}}}const ai=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function li(t,e,n,i){if(t===e&&n===i)return K;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=ai(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:ai(s(t),e,i)}const ui=li(.42,0,1,1),ci=li(0,0,.58,1),hi=li(.42,0,.58,1),di=t=>Array.isArray(t)&&"number"!=typeof t[0],pi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,mi=t=>e=>1-t(1-e),fi=t=>1-Math.sin(Math.acos(t)),gi=mi(fi),vi=pi(fi),yi=li(.33,1.53,.69,.99),xi=mi(yi),Pi=pi(xi),wi=t=>(t*=2)<1?.5*xi(t):.5*(2-Math.pow(2,-10*(t-1))),Si={linear:K,easeIn:ui,easeInOut:hi,easeOut:ci,circIn:fi,circInOut:vi,circOut:gi,backIn:xi,backInOut:Pi,backOut:yi,anticipate:wi},Ti=t=>{if(Array.isArray(t)){G(4===t.length);const[e,n,i,s]=t;return li(e,n,i,s)}return"string"==typeof t?Si[t]:t},bi=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Ai=(t,e,n)=>t+(e-t)*n;function Ei(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 Ci(t,e){return n=>n>0?e:t}const Vi=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Mi=[Dn,Rn,kn];function Ri(t){const e=(n=t,Mi.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===kn&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Ei(a,i,t+1/3),o=Ei(a,i,t),r=Ei(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Di=(t,e)=>{const n=Ri(t),i=Ri(e);if(!n||!i)return Ci(t,e);const s={...n};return t=>(s.red=Vi(n.red,i.red,t),s.green=Vi(n.green,i.green,t),s.blue=Vi(n.blue,i.blue,t),s.alpha=Ai(n.alpha,i.alpha,t),Rn.transform(s))},ki=new Set(["none","hidden"]);function Li(t,e){return n=>Ai(t,e,n)}function Bi(t){return"number"==typeof t?Li:"string"==typeof t?dt(t)?Ci:Ln.test(t)?Di:Oi:Array.isArray(t)?ji:"object"==typeof t?Ln.test(t)?Di:Fi:Ci}function ji(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Bi(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Fi(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Bi(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Oi=(t,e)=>{const n=Un.createTransformer(e),i=jn(t),s=jn(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?ki.has(t)&&!s.values.length||ki.has(e)&&!i.values.length?function(t,e){return ki.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ve(ji(function(t,e){var n;const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,s[r]++}return i}(i,s),s.values),n):Ci(t,e)};function Ii(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ai(t,e,n);return Bi(t)(t,e)}function Ui(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(G(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const i=[],s=n||Ii,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||K:e;o=Ve(t,o)}i.push(o)}return i}(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=bi(t[n],t[n+1],e);return r[n](i)};return n?e=>l(ft(t[0],t[o-1],e)):l}function Wi(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=bi(0,e,i);t.push(Ai(n,1,s))}}function Ni(t){const e=[0];return Wi(e,t.length-1),e}function zi({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=di(i)?i.map(Ti):Ti(i),o={done:!1,value:e[0]},r=Ui(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ni(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||hi).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function $i(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}const Hi=t=>{const e=({timestamp:e})=>t(e);return{start:()=>fe.update(e,!0),stop:()=>ge(e),now:()=>ve.isProcessing?ve.timestamp:rn.now()}},Yi={decay:ri,inertia:ri,tween:zi,keyframes:zi,spring:oi},Ki=t=>t/100;class Xi extends Zn{constructor({KeyframeResolver:t=En,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",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:n,motionValue:i,keyframes:s}=this.options,o=(t,e)=>this.onKeyframesResolved(t,e);n&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(s,o,n,i):this.resolver=new t(s,o,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=Yi[e]||zi;let a,l;r!==zi&&"number"!=typeof t[0]&&(a=Ve(Ki,Ii(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===s&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=$i(u));const{calculatedDuration:c}=u,h=c+i;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}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:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=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,x=s;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,m&&(n-=m/c)):"mirror"===p&&(x=o)),y=ft(0,1,n)*c}const P=v?{done:!1,value:a[0]}:x.next(y);r&&(P.value=r(P.value));let{done:w}=P;v||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&void 0!==i&&(P.value=nn(a,this.options,i)),f&&f(P.value),S&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Ge(t.calculatedDuration):0}get time(){return Ge(this.currentTime)}set time(t){t=Xe(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=Ge(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Hi,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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)}}function Gi(t){return new Xi(t)}const _i=t=>Array.isArray(t)&&"number"==typeof t[0];function qi(t){return Boolean(!t||"string"==typeof t&&t in Ji||_i(t)||Array.isArray(t)&&t.every(qi))}const Zi=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Ji={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zi([0,.65,.55,1]),circOut:Zi([.55,0,1,.45]),backIn:Zi([.31,.01,.66,-.59]),backOut:Zi([.33,1.53,.69,.99])};function Qi(t){return ts(t)||Ji.easeOut}function ts(t){return t?_i(t)?Zi(t):Array.isArray(t)?t.map(Qi):Ji[t]:void 0}function es(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ts(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const ns=_n(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class is extends Zn{constructor(t){super(t);const{name:e,motionValue:n,keyframes:i}=this.options;this.resolver=new Gn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:s,ease:o,type:r,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!qi(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,...l}=this.options,u=function(t,e){const n=new Xi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,l);1===(t=u.keyframes).length&&(t[1]=t[0]),i=u.duration,s=u.times,o=u.ease,r="keyframes"}var u;const c=es(a.owner.current,l,t,{...this.options,duration:i,times:s,ease:o});return c.startTime=rn.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(nn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:s,type:r,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Ge(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Ge(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Xe(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}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return K;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return K}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;const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,...l}=this.options,u=new Xi({...l,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),c=Xe(this.time);t.setWithVelocity(u.sample(c-10).value,u.sample(c).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:i,repeatType:s,damping:o,type:r}=t;return ns()&&n&&ae.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}function ss(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return fe.update(i,!0),()=>ge(i)}const os=_n(()=>void 0!==window.ScrollTimeline);class rs{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!os()||!e.attachTimeline)return e.pause(),ss(t=>{e.time=e.duration*t},t);e.attachTimeline(t)});return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const as=(t,e,n,i={},s,o,r)=>a=>{const l=Qe(i,t)||{},u=l.delay||i.delay||0;let{elapsed:c=0}=i;c-=Xe(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),r&&r()},onStop:r,name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(h={...h,...Je(t,h)}),h.duration&&(h.duration=Xe(h.duration)),h.repeatDelay&&(h.repeatDelay=Xe(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),(tn.current||S.skipAnimations)&&(d=!0,h.duration=0,h.delay=0),d&&!o&&void 0!==e.get()){const t=nn(h.keyframes,l);if(void 0!==t)return fe.update(()=>{h.onUpdate(t),h.onComplete()}),new rs([])}return!o&&is.supports(h)?new is(h):new Xi(h)};class ls{constructor(){this.subscriptions=[]}add(t){return ue(this.subscriptions,t),()=>ce(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const us={current:void 0};class cs{constructor(t,e={}){this.version="11.3.14",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=rn.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=rn.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 ls);const n=this.events[t].add(e);return"change"===t?()=>{n(),fe.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 us.current&&us.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=rn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Jn(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 hs(t,e){return new cs(t,e)}function ds(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,hs(n))}function ps(t,e){const n=Ke(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ds(t,e,(r=o[e],oe(r)?r[r.length-1]||0:r))}var r}function ms(t){return t.getProps()[w]}class fs extends cs{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=le(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let i=!1;return()=>{if(i)return;i=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(ce(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function gs(t,e){var n;if(!t.applyWillChange)return;let i=t.getValue("willChange");return i||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(i=new fs("auto"),t.addValue("willChange",i)),s=i,Boolean(ot(s)&&s.add)?i.add(e):void 0;var s}function vs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function ys(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),s=l[e];if(void 0===s||c&&vs(c,e))continue;const a={delay:n,elapsed:0,...Qe(r||{},e)};let h=!1;if(window.HandoffAppearAnimations){const n=ms(t);if(n){const t=window.HandoffAppearAnimations(n,e,i,fe);null!==t&&(a.elapsed=t,h=!0)}}i.start(as(e,i,s,t.shouldReduceMotion&&it.has(e)?{type:!1}:a,t,h,gs(t,e)));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{fe.update(()=>{a&&ps(t,a)})}),u}function xs(t,e,n={}){var i;const s=Ke(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(ys(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ps).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(xs(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,s+i,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function Ps(t,e){return t.sortNodePosition(e)}function ws(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>xs(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=xs(t,e,n);else{const s="function"==typeof e?Ke(t,e,n.custom):e;i=Promise.all(ys(t,s,n))}return i.then(()=>{fe.postRender(()=>{t.notify("AnimationComplete",e)})})}const Ss=[...j].reverse(),Ts=j.length;function bs(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>ws(t,e,n)))}(t),n=Cs(),i=!0;const s=e=>(n,i)=>{var s;const o=Ke(t,i,"exit"===e?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const r=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Ts;e++){const d=Ss[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=L(m),g=d===o?p.isActive:null;!1===g&&(h=e);let v=m===a[d]&&m!==r[d]&&f;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||B(m)||"boolean"==typeof m)continue;let y=As(p.prevProp,m)||d===o&&p.isActive&&!v&&f||e>h&&f,x=!1;const P=Array.isArray(m)?m:[m];let w=P.reduce(s(d),{});!1===g&&(w={});const{prevResolvedValues:S={}}=p,T={...S,...w},b=e=>{y=!0,u.has(e)&&(x=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in T){const e=w[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=oe(e)&&oe(n)?!Ye(e,n):e!==n,i?null!=e?b(t):u.add(t):void 0!==e&&u.has(t)?b(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=w,p.isActive&&(c={...c,...w}),i&&t.blockInitialAnimation&&(y=!1),!y||v&&!x||l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=null!=i?i:null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var s;if(n[e].isActive===i)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Cs(),i=!0}}}function As(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ye(e,t)}function Es(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cs(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}let Vs=0;const Ms={animation:{Feature:class extends Be{constructor(t){super(t),t.animationState||(t.animationState=bs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();B(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends Be{constructor(){super(...arguments),this.id=Vs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Rs=(t,e)=>Math.abs(t-e);function Ds(t,e){const n=Rs(t.x,e.x),i=Rs(t.y,e.y);return Math.sqrt(n**2+i**2)}class ks{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=js(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ds(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ve;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ls(e,this.transformPagePoint),fe.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=js("pointercancel"===t.type?this.lastMoveEventInfo:Ls(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Te(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Ls(be(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=ve;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,js(o,this.history)),this.removeListeners=Ve(Ee(this.contextWindow,"pointermove",this.handlePointerMove),Ee(this.contextWindow,"pointerup",this.handlePointerUp),Ee(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ge(this.updatePoint)}}function Ls(t,e){return e?{point:e(t.point)}:t}function Bs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function js({point:t},e){return{point:t,delta:Bs(t,Os(e)),offset:Bs(t,Fs(e)),velocity:Is(e,.1)}}function Fs(t){return t[0]}function Os(t){return t[t.length-1]}function Is(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Os(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Xe(e)));)n--;if(!i)return{x:0,y:0};const o=Ge(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Us(t){return t.max-t.min}function Ws(t,e,n,i=.5){t.origin=i,t.originPoint=Ai(e.min,e.max,t.origin),t.scale=Us(n)/Us(e),t.translate=Ai(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Ns(t,e,n,i){Ws(t.x,e.x,n.x,i?i.originX:void 0),Ws(t.y,e.y,n.y,i?i.originY:void 0)}function zs(t,e,n){t.min=n.min+e.min,t.max=t.min+Us(e)}function $s(t,e,n){t.min=e.min-n.min,t.max=t.min+Us(e)}function Hs(t,e,n){$s(t.x,e.x,n.x),$s(t.y,e.y,n.y)}function Ys(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ks(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Xs=.35;function Gs(t,e,n){return{min:_s(t,e),max:_s(t,n)}}function _s(t,e){return"number"==typeof t?t:t[e]||0}const qs=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Zs(t){return[t("x"),t("y")]}function Js({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Qs(t){return void 0===t||1===t}function to({scale:t,scaleX:e,scaleY:n}){return!Qs(t)||!Qs(e)||!Qs(n)}function eo(t){return to(t)||no(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function no(t){return io(t.x)||io(t.y)}function io(t){return t&&"0%"!==t}function so(t,e,n){return n+e*(t-n)}function oo(t,e,n,i,s){return void 0!==s&&(t=so(t,s,i)),so(t,n,i)+e}function ro(t,e=0,n=1,i,s){t.min=oo(t.min,e,n,i,s),t.max=oo(t.max,e,n,i,s)}function ao(t,{x:e,y:n}){ro(t.x,e.translate,e.scale,e.originPoint),ro(t.y,n.translate,n.scale,n.originPoint)}function lo(t,e){t.min=t.min+e,t.max=t.max+e}function uo(t,e,n,i,s=.5){ro(t,e,n,Ai(t.min,t.max,s),i)}function co(t,e){uo(t.x,e.x,e.scaleX,e.scale,e.originX),uo(t.y,e.y,e.scaleY,e.scale,e.originY)}function ho(t,e){return Js(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const po=({current:t})=>t?t.ownerDocument.defaultView:null,mo=new WeakMap;class fo{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ks(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(be(t,"page").point)},onStart:(t,e)=>{var n;const{drag:i,dragPropagation:s,onDragStart:o}=this.getProps();if(i&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ke(i),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Et.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Us(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&fe.postRender(()=>o(t,e)),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=gs(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Zs(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:po(this.visualElement)})}stop(t,e){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&fe.postRender(()=>o(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!go(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Ai(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Ai(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&C(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ys(t.x,n,s),y:Ys(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Xs){return!1===t?t=0:!0===t&&(t=Xs),{x:Gs(t,"left","right"),y:Gs(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Zs(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!C(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=ho(t,n),{scroll:s}=e;return s&&(lo(i.x,s.offset.x),lo(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ks(t.x,e.x),y:Ks(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Js(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Zs(r=>{if(!go(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(as(t,n,0,e,this.visualElement,!1,gs(this.visualElement,t)))}stopAnimation(){Zs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zs(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Zs(e=>{const{drag:n}=this.getProps();if(!go(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Ai(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!C(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zs(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Us(t),s=Us(e);return s>i?n=bi(e.min,e.max-i,t.min):i>s&&(n=bi(t.min,t.max-s,e.min)),ft(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Zs(e=>{if(!go(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Ai(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;mo.set(this.visualElement,this);const t=Ee(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();C(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),fe.read(e);const s=Se(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Zs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Xs,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function go(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const vo=t=>(e,n)=>{t&&fe.postRender(()=>t(e,n))};const yo=["TopLeft","TopRight","BottomLeft","BottomRight"],xo=yo.length,Po=t=>"string"==typeof t?parseFloat(t):t,wo=t=>"number"==typeof t||Ct.test(t);function So(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const To=Ao(0,.5,gi),bo=Ao(.5,.95,K);function Ao(t,e,n){return i=>i<t?0:i>e?1:n(bi(t,e,i))}function Eo(t,e){t.min=e.min,t.max=e.max}function Co(t,e){Eo(t.x,e.x),Eo(t.y,e.y)}function Vo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Mo(t,e,n,i,s){return t=so(t-=e,1/n,i),void 0!==s&&(t=so(t,1/s,i)),t}function Ro(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(Et.test(e)){e=parseFloat(e);e=Ai(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ai(o.min,o.max,i);t===o&&(a-=e),t.min=Mo(t.min,e,n,a,s),t.max=Mo(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Do=["x","scaleX","originX"],ko=["y","scaleY","originY"];function Lo(t,e,n,i){Ro(t.x,e,Do,n?n.x:void 0,i?i.x:void 0),Ro(t.y,e,ko,n?n.y:void 0,i?i.y:void 0)}function Bo(t){return 0===t.translate&&1===t.scale}function jo(t){return Bo(t.x)&&Bo(t.y)}function Fo(t,e){return t.min===e.min&&t.max===e.max}function Oo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Io(t,e){return Oo(t.x,e.x)&&Oo(t.y,e.y)}function Uo(t){return Us(t.x)/Us(t.y)}function Wo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class No{constructor(){this.members=[]}add(t){ue(this.members,t),t.scheduleRender()}remove(t){if(ce(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const zo=(t,e)=>t.depth-e.depth;class $o{constructor(){this.children=[],this.isDirty=!1}add(t){ue(this.children,t),this.isDirty=!0}remove(t){ce(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zo),this.isDirty=!1,this.children.forEach(t)}}const Ho={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yo(t,e){const n=rn.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(ge(i),t(o-e))};return fe.read(i,!0),()=>ge(i)}function Ko(t,e,n){var i;if("string"==typeof t){let s=document;e&&(G(Boolean(e.current)),s=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const Xo=new WeakMap;function Go(t){return t instanceof SVGElement&&"svg"!==t.tagName}const _o={current:null},qo={current:!1};function Zo(){if(qo.current=!0,v)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_o.current=t.matches;t.addListener(e),e()}else _o.current=!1}const Jo=[...xn,Ln,Un],Qo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tr=F.length;class er{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.applyWillChange=!1,this.resolveKeyframes=(t,e,n,i)=>new this.KeyframeResolver(t,e,n,i,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=En,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,fe.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;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=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=O(e),this.isVariantNode=I(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ot(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Xo.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)),qo.current||Zo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||_o.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xo.delete(this.current),this.projection&&this.projection.unmount(),ge(this.notifyUpdate),ge(this.render),this.valueSubscriptions.forEach(t=>t()),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){const n=it.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&fe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s(),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 z){const e=z[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(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<Qo.length;e++){const n=Qo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ot(s))t.addValue(i,s);else if(ot(o))t.addValue(i,hs(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,hs(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<tr;t++){const n=F[t],i=this.props[n];(L(i)||!1===i)&&(e[n]=i)}return e}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=hs(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=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 s;return null!=i&&("string"==typeof i&&(ln(i)||an(i))?i=parseFloat(i):(s=i,!Jo.find(yn(s))&&Un.test(e)&&(i=Kn(t,e))),this.setBaseTarget(t,ot(i)?i.get():i)),ot(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=ie(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||ot(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new ls),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class nr extends er{constructor(){super(...arguments),this.KeyframeResolver=Gn}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]}}class ir extends nr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=qs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(it.has(e)){const t=Yn(e);return t&&t.default||0}return e=Jt.has(e)?e:P(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return ee(t,e,n)}build(t,e,n){Kt(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){Qt(t,e,0,i)}mount(t){this.isSVGTag=Gt(t.tagName),super.mount(t)}}class sr extends nr{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Zt}readValueFromInstance(t,e){if(it.has(e)){const t=Yn(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(ct(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ho(t,e)}build(t,e,n){Lt(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return te(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ot(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function or(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Go(t)?new ir(e):new sr(e);n.mount(t),Xo.set(t,n)}function rr(t,e,n){const i=ot(t)?t:hs(t);return i.start(as("",i,e,n)),i.animation}function ar(t,e=100){const n=oi({keyframes:[0,e],...t}),i=Math.min($i(n),2e4);return{type:"keyframes",ease:t=>n.next(i*t).value/e,duration:Ge(i)}}function lr(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}const ur=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function cr(t,e){return di(t)?t[ur(0,t.length,e)]:t}function hr(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(ce(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Ai(s,o,i[r]),easing:cr(n,r)})}function dr(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function pr(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function mr(t,e){return e[t]||(e[t]=[]),e[t]}function fr(t){return Array.isArray(t)?t:[t]}function gr(t,e){return t[e]?{...t,...t[e]}:{...t}}const vr=t=>"number"==typeof t,yr=t=>t.every(vr);function xr(t,e,n,i){const s=Ko(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t];Xo.has(i)||or(i);const a=Xo.get(i),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...ys(a,{...e,transition:l},{}))}return new rs(r)}function Pr(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i){const s=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,lr(c,o.at,u,l));continue}let[d,p,m={}]=o;void 0!==m.at&&(c=lr(c,m.at,u,l));let f=0;const g=(t,n,i,o=0,r=0)=>{const a=fr(t),{delay:l=0,times:u=Ni(a),type:d="keyframes",...p}=n;let{ease:m=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(o,r):l,y=a.length;if(y<=2&&"spring"===d){let t=100;if(2===y&&yr(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=Xe(g));const n=ar(e,t);m=n.ease,g=n.duration}null!=g||(g=s);const x=c+v,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Wi(u,w),1===a.length&&a.unshift(null),hr(i,a,m,u,x,P),f=Math.max(v+g,f),h=Math.max(P,h)};if(ot(d)){g(p,m,mr("default",pr(d,r)))}else{const t=Ko(d,i,a),e=t.length;for(let n=0;n<e;n++){p=p,m=m;const i=pr(t[n],r);for(const t in p)g(p[t],gr(m,t),mr(t,i),n,e)}}u=c,c+=f}return r.forEach((t,i)=>{for(const s in t){const r=t[s];r.sort(dr);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:i}=r[t];a.push(n),l.push(bi(0,h,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(i)||o.set(i,{keyframes:{},transition:{}});const c=o.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let s;s=ot(n)?rr(n,t.default,e.default):xr(n,t,e),i.push(s)}),new rs(i)}const wr=t=>function(e,n,i){let s;var o;return o=e,s=Array.isArray(o)&&Array.isArray(o[0])?Pr(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?xr(e,n,i,t):rr(e,n,i),t&&t.animations.push(s),s},Sr=wr(),Tr=new WeakMap;let br;function Ar({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Tr.get(t))||void 0===i||i.forEach(i=>{i({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 Er(t){t.forEach(Ar)}function Cr(t,e){br||"undefined"!=typeof ResizeObserver&&(br=new ResizeObserver(Er));const n=Ko(t);return n.forEach(t=>{let n=Tr.get(t);n||(n=new Set,Tr.set(t,n)),n.add(e),null==br||br.observe(t)}),()=>{n.forEach(t=>{const n=Tr.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==br||br.unobserve(t)})}}const Vr=new Set;let Mr;function Rr(t){return Vr.add(t),Mr||(Mr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Vr.forEach(t=>t(e))},window.addEventListener("resize",Mr)),()=>{Vr.delete(t),!Vr.size&&Mr&&(Mr=void 0)}}const Dr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function kr(t,e,n,i){const s=n[e],{length:o,position:r}=Dr[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=bi(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:Jn(s.current-a,u)}const Lr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Br={start:0,center:.5,end:1};function jr(t,e,n=0){let i=0;if(t in Br&&(t=Br[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Fr=[0,0];function Or(t,e,n,i){let s=Array.isArray(t)?t:Fr,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Br[t]?t:"0"]),o=jr(s[0],n,i),r=jr(s[1],e),o-r}const Ir={x:0,y:0};function Ur(t,e,n){const{offset:i=Lr.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):Ir,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=Or(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Ui(e[o].offset,Ni(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function Wr(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.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,i.target,n),update:e=>{!function(t,e,n){kr(t,"x",e,n),kr(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Ur(t,n,i)},notify:()=>e(n)}}const Nr=new WeakMap,zr=new WeakMap,$r=new WeakMap,Hr=t=>t===document.documentElement?window:t;function Yr(t,{container:e=document.documentElement,...n}={}){let i=$r.get(e);i||(i=new Set,$r.set(e,i));const s=Wr(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(i.add(s),!Nr.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(ve.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{fe.read(t,!1,!0),fe.read(n,!1,!0),fe.update(s,!1,!0)};Nr.set(e,a);const l=Hr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&zr.set(e,(r=a,"function"==typeof(o=e)?Rr(o):Cr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Nr.get(e);return fe.read(a,!1,!0),()=>{var t;ge(a);const n=$r.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=Nr.get(e);Nr.delete(e),i&&(Hr(e).removeEventListener("scroll",i),null===(t=zr.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Kr=new Map;function Xr({source:t=document.documentElement,axis:e="y"}={}){Kr.has(t)||Kr.set(t,{});const n=Kr.get(t);return n[e]||(n[e]=os()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},i=Yr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:i}}({source:t,axis:e})),n[e]}const Gr={some:0,all:1};function _r(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ko(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Gr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function qr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Ui(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}const Zr=fe,Jr=T.reduce((t,e)=>(t[e]=t=>ge(t),t),{}),Qr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ta="undefined"!=typeof window&&void 0!==window.MotionDebug,ea=["","X","Y","Z"],na={visibility:"hidden"};let ia=0;function sa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function oa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=ia++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ta&&(Qr.totalNodes=Qr.resolvedTargetDeltas=Qr.recalculatedProjection=0),this.nodes.forEach(la),this.nodes.forEach(fa),this.nodes.forEach(ga),this.nodes.forEach(ua),ta&&window.MotionDebug.record(Qr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new $o)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ls),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Go(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Yo(i,250),Ho.hasAnimatedSinceResize&&(Ho.hasAnimatedSinceResize=!1,this.nodes.forEach(ma))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Sa,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Io(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Qe(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||ma(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ge(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(va),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.HandoffCancelAllAnimations&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:n}=e.options;return!!n&&(!!ms(n)||!(!e.parent||e.parent.hasCheckedOptimisedAppear)&&t(e.parent))}(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ha);this.isUpdating||this.nodes.forEach(da),this.isUpdating=!1,this.nodes.forEach(pa),this.nodes.forEach(ra),this.nodes.forEach(aa),this.clearAllSnapshots();const t=rn.now();ve.delta=ft(0,1e3/60,t-ve.timestamp),ve.timestamp=t,ve.isProcessing=!0,ye.update.process(ve),ye.preRender.process(ve),ye.render.process(ve),ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,A.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ca),this.sharedNodes.forEach(ya)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!jo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||eo(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Aa((i=n).x),Aa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Ca))){const{scroll:t}=this.root;t&&(lo(n.x,t.offset.x),lo(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Co(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let e=0;e<this.path.length;e++){const i=this.path[e],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Co(n,t),lo(n.x,s.offset.x),lo(n.y,s.offset.y))}return n}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Co(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&co(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),eo(i.latestValues)&&co(n,i.latestValues)}return eo(this.latestValues)&&co(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Co(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!eo(n.latestValues))continue;to(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Co(i,n.measurePageBox()),Lo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return eo(this.latestValues)&&Lo(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=ve.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Hs(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Co(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,zs(r.x,a.x,l.x),zs(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Co(this.target,this.layout.layoutBox),ao(this.target,this.targetDelta)):Co(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Hs(this.relativeTargetOrigin,this.target,t.target),Co(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ta&&Qr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!to(this.parent.latestValues)&&!no(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ve.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Co(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&co(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ao(t,r)),i&&eo(o.latestValues)&&co(t,o.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Vo(this.prevProjectionDelta.x,this.projectionDelta.x),Vo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ns(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&Wo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Wo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ta&&Qr.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(wa));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;xa(o.x,t.x,n),xa(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hs(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Pa(t.x,e.x,n.x,i),Pa(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,Fo(l.x,d.x)&&Fo(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Co(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Ai(0,void 0!==n.opacity?n.opacity:1,To(i)),t.opacityExit=Ai(void 0!==e.opacity?e.opacity:1,0,bo(i))):o&&(t.opacity=Ai(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<xo;s++){const o=`border${yo[s]}Radius`;let r=So(e,o),a=So(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||wo(r)===wo(a)?(t[o]=Math.max(Ai(Po(r),Po(a),i),0),(Et.test(a)||Et.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ai(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ge(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fe.update(()=>{Ho.hasAnimatedSinceResize=!0,this.currentAnimation=rr(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ea(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Us(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Us(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Co(e,n),co(e,s),Ns(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new No);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&sa("z",t,i,this.animationValues);for(let e=0;e<ea.length;e++)sa("rotate"+ea[e],t,i,this.animationValues),sa("skew"+ea[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return na;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=re(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=re(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!eo(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=(null==n?void 0:n.z)||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in tt){if(void 0===r[t])continue;const{correct:e,applyTo:n}=tt[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?re(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function ra(t){t.updateLayout()}function aa(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?Zs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Us(i);i.min=e[t].min,i.max=i.min+s}):Ea(s,n.layoutBox,e)&&Zs(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Us(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ns(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ns(a,t.applyTransform(i,!0),n.measuredBox):Ns(a,e,n.layoutBox);const l=!jo(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Hs(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Hs(a,e,o.layoutBox),Io(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function la(t){ta&&Qr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ua(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ca(t){t.clearSnapshot()}function ha(t){t.clearMeasurements()}function da(t){t.isLayoutDirty=!1}function pa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ma(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fa(t){t.resolveTargetDelta()}function ga(t){t.calcProjection()}function va(t){t.resetSkewAndRotation()}function ya(t){t.removeLeadSnapshot()}function xa(t,e,n){t.translate=Ai(e.translate,0,n),t.scale=Ai(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pa(t,e,n,i){t.min=Ai(e.min,n.min,i),t.max=Ai(e.max,n.max,i)}function wa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Sa={duration:.45,ease:[.4,0,.1,1]},Ta=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ba=Ta("applewebkit/")&&!Ta("chrome/")?Math.round:K;function Aa(t){t.min=ba(t.min),t.max=ba(t.max)}function Ea(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Uo(e),s=Uo(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Ca(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Va=oa({attachResizeListener:(t,e)=>Se(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},Ra=oa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ma.current){const t=new Va({});t.mount(window),t.setOptions({layoutScroll:!0}),Ma.current=t}return Ma.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Da=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ka(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Da);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function La(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ba={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ct.test(t))return t;t=parseFloat(t)}return`${La(t,e.target.x)}% ${La(t,e.target.y)}%`}},ja={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Un.parse(t);if(s.length>5)return i;const o=Un.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=Ai(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function Fa(){const t=e.useContext(g);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);const r=e.useCallback(()=>i&&i(o),[o,i]);return!n&&i?[!1,r]:[!0]}class Oa extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;et(Ua),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ho.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||fe.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),A.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ia(t){const[n,i]=Fa(),s=e.useContext(H);return d(Oa,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:i})}const Ua={borderRadius:{...Ba,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ba,borderTopRightRadius:Ba,borderBottomLeftRadius:Ba,borderBottomRightRadius:Ba,boxShadow:ja},Wa={pan:{Feature:class extends Be{constructor(){super(...arguments),this.removePointerDownListener=K}onPointerDown(t){this.session=new ks(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:po(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:vo(t),onStart:vo(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&fe.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ee(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Be{constructor(t){super(t),this.removeGroupControls=K,this.removeListeners=K,this.controls=new fo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ra,MeasureLayout:Ia}},Na=(t,n)=>Q(t)?new ir(n):new sr(n,{allowProjection:t!==e.Fragment}),za={layout:{ProjectionNode:Ra,MeasureLayout:Ia}},$a={...Ms,...He,...Wa,...za},Ha=Z((t,e)=>we(t,e,$a,Na));const Ya=Z(we);function Ka(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Xa(){const t=Ka(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>fe.postRender(s),[s]),n]}class Ga extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function _a({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=e.useContext(m);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:l}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const u=document.createElement("style");return a&&(u.nonce=a),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}},[n]),d(Ga,{isPresent:n,childRef:o,sizeRef:r,children:i.cloneElement(t,{ref:o})})}const qa=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l})=>{const u=se(Za),c=e.useId(),h=e.useMemo(()=>({id:c,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?[Math.random()]:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===l&&(t=d(_a,{isPresent:s,children:t})),d(g.Provider,{value:h,children:t})};function Za(){return new Map}function Ja(t){return e.useEffect(()=>()=>t(),[])}const Qa=t=>t.key||"";function tl(t){return"function"==typeof t}const el=e.createContext(null),nl=t=>!0===t,il=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(H),o=e.useContext(el),[r,a]=Xa(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>nl(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:nl(i)&&s.group||ka()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(H.Provider,{value:c,children:t})},sl=e.createContext(null);function ol(t){return t.value}function rl(t,e){return t.layout.min-e.layout.min}function al(t){const n=se(()=>hs(t)),{isStatic:i}=e.useContext(m);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function ll(t,e){const n=al(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>fe.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ge(i)}}),n}function ul(t,e,n,i){if("function"==typeof t)return function(t){us.current=[],t();const e=ll(us.current,t);return us.current=void 0,e}(t);const s="function"==typeof e?e:qr(e,n,i);return Array.isArray(t)?cl(t,s):cl([t],([t])=>s(t))}function cl(t,e){const n=se(()=>[]);return ll(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function hl(t,e=0){return ot(t)?t:al(e)}const dl={Group:e.forwardRef((function({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=se(()=>Ha(n)),u=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[i]:u.push({value:t,layout:e[i]}),u.sort(rl)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Ai(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(c.current=!0,s(i.map(ol).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(sl.Provider,{value:h,children:t})})})),Item:e.forwardRef((function({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=se(()=>Ha(s)),c=e.useContext(sl),h={x:hl(n.x),y:hl(n.y)},p=ul([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:f,updateOrder:g}=c;return d(u,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&g(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>f(i,t),ref:l,ignoreStrict:!0,children:t})}))},pl={renderer:Na,...Ms,...He},ml={...pl,...Wa,...za};function fl(t){return"number"==typeof t?t:parseFloat(t)}function gl(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function vl(t,e){X(Boolean(!e||e.current))}const yl=()=>({scrollX:hs(0),scrollY:hs(0),scrollXProgress:hs(0),scrollYProgress:hs(0)});function xl({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=se(yl);return(i?y:e.useEffect)(()=>(vl(0,n),vl(0,t),Yr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function Pl(t){const n=e.useRef(0),{isStatic:i}=e.useContext(m);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return fe.update(e,!0),()=>ge(e)},[t])}function wl(){!qo.current&&Zo();const[t]=e.useState(_o.current);return t}function Sl(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&ps(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Sl(t,e)})})}function Tl(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(ws(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?Sl(t,e):"string"==typeof e?Sl(t,[e]):ps(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function bl(){const t=se(Tl);return y(t.mount,[]),t}const Al=bl;class El{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Cl=()=>new El;function Vl(t){return null!==t&&"object"==typeof t&&Y in t}function Ml(){return Rl}function Rl(t){Ma.current&&(Ma.current.isUpdating=!1,Ma.current.blockUpdate(),t&&t())}const Dl=(t,e)=>`${t}: ${e}`,kl=new Map;let Ll,Bl,jl;function Fl(t,e,n,i){const s=it.has(e)?"transform":e,o=Dl(t,s),r=kl.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{if(kl.delete(o),i)i.render(()=>i.render(()=>{try{a.cancel()}catch(t){}}));else try{a.cancel()}catch(t){}})(),null):(void 0===Ll&&(Ll=performance.now()),Ll-l||0)}const Ol=()=>({});class Il extends er{constructor(){super(...arguments),this.measureInstanceViewportBox=qs}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Ul=he({scrapeMotionValuesFromProps:Ol,createRenderState:Ol});const Wl=t=>t>.001?1/t:1e5;let Nl=0;t.AcceleratedAnimation=is,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,exitBeforeEnter:o,presenceAffectsLayout:r=!0,mode:a="sync"})=>{const l=e.useContext(H).forceRender||Xa()[0],u=Ka(),c=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let p=c;const m=e.useRef(new Map).current,f=e.useRef(p),g=e.useRef(new Map).current,v=e.useRef(!0);if(y(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=Qa(t);e.set(n,t)})}(c,g),f.current=p}),Ja(()=>{v.current=!0,g.clear(),m.clear()}),v.current)return d(h,{children:p.map(t=>d(qa,{isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:r,mode:a,children:t},Qa(t)))});p=[...p];const x=f.current.map(Qa),P=c.map(Qa),w=x.length;for(let t=0;t<w;t++){const e=x[t];-1!==P.indexOf(e)||m.has(e)||m.set(e,void 0)}return"wait"===a&&m.size&&(p=[]),m.forEach((t,e)=>{if(-1!==P.indexOf(e))return;const i=g.get(e);if(!i)return;const o=x.indexOf(e);let h=t;if(!h){h=d(qa,{isPresent:!1,onExitComplete:()=>{m.delete(e);const t=Array.from(g.keys()).filter(t=>!P.includes(t));if(t.forEach(t=>g.delete(t)),f.current=c.filter(n=>{const i=Qa(n);return i===e||t.includes(i)}),!m.size){if(!1===u.current)return;l(),s&&s()}},custom:n,presenceAffectsLayout:r,mode:a,children:i},Qa(i)),m.set(e,h)}p.splice(o,0,h)}),p=p.map(t=>{const e=t.key;return m.has(e)?t:d(qa,{isPresent:!0,presenceAffectsLayout:r,mode:a,children:t},Qa(t))}),d(h,{children:m.size?p:p.map(t=>e.cloneElement(t))})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(il,{id:se(()=>"asl-"+Nl++),children:t})),t.DeprecatedLayoutGroupContext=el,t.DragControls=El,t.FlatTree=$o,t.LayoutGroup=il,t.LayoutGroupContext=H,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!tl(n)),o=e.useRef(void 0);if(!tl(n)){const{renderer:t,...e}=n;o.current=t,$(e)}return e.useEffect(()=>{tl(n)&&n().then(({renderer:t,...e})=>{$(e),o.current=t,s(!0)})},[]),d(x.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Nt(n),(i={...e.useContext(m),...i}).isStatic=se(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(m.Provider,{value:s,children:t})},t.MotionConfigContext=m,t.MotionContext=f,t.MotionGlobalConfig=S,t.MotionValue=cs,t.PresenceContext=g,t.Reorder=dl,t.SwitchLayoutGroupContext=V,t.VisualElement=er,t.addPointerEvent=Ee,t.addPointerInfo=Ae,t.addScaleCorrector=et,t.animate=Sr,t.animateValue=Gi,t.animateVisualElement=ws,t.animationControls=Tl,t.animations=Ms,t.anticipate=wi,t.backIn=xi,t.backInOut=Pi,t.backOut=yi,t.buildTransform=lt,t.calcLength=Us,t.cancelFrame=ge,t.cancelSync=Jr,t.circIn=fi,t.circInOut=vi,t.circOut=gi,t.clamp=ft,t.color=Ln,t.complex=Un,t.createBox=qs,t.createDomMotionComponent=function(t){return _(we(t,{forwardMotionProps:!1},$a,Na))},t.createMotionComponent=_,t.createScopedAnimate=wr,t.cubicBezier=li,t.delay=Yo,t.disableInstantTransitions=function(){tn.current=!1},t.distance=Rs,t.distance2D=Ds,t.domAnimation=pl,t.domMax=ml,t.easeIn=ui,t.easeInOut=hi,t.easeOut=ci,t.filterProps=zt,t.frame=fe,t.frameData=ve,t.inView=_r,t.interpolate=Ui,t.invariant=G,t.isBrowser=v,t.isDragActive=Le,t.isMotionComponent=Vl,t.isMotionValue=ot,t.isValidMotionProp=Ut,t.m=Ya,t.makeUseVisualState=he,t.mirrorEasing=pi,t.mix=Ii,t.motion=Ha,t.motionValue=hs,t.optimizedAppearDataAttribute=w,t.pipe=Ve,t.progress=bi,t.px=Ct,t.resolveMotionValue=re,t.reverseEasing=mi,t.scroll=function(t,e){const n=Xr(e);return"function"==typeof t?ss(t,n):t.attachTimeline(n)},t.scrollInfo=Yr,t.spring=oi,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=Ti(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Fl;const r=Dl(o,e);jl||(jl=es(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),kl.set(r,{animation:jl,startTime:null}),window.HandoffCancelAllAnimations||(window.HandoffCancelAllAnimations=()=>{kl.forEach(({animation:t})=>{t.cancel()}),kl.clear(),window.HandoffCancelAllAnimations=void 0}));const a=()=>{jl.cancel();const o=es(t,e,n,i);void 0===Bl&&(Bl=performance.now()),o.startTime=Bl,kl.set(r,{animation:o,startTime:Bl}),s&&s(o)};jl.ready?jl.ready.then(a).catch(K):a()},t.steps=ye,t.sync=Zr,t.transform=qr,t.unwrapMotionComponent=function(t){if(Vl(t))return t[Y]},t.useAnimate=function(){const t=se(()=>({current:null,animations:[]})),e=se(()=>wr(t));return Ja(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Al,t.useAnimationControls=bl,t.useAnimationFrame=Pl,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?ur(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Ul({},!1),o=se(()=>new Il({props:{},visualState:s,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{i({...t})}},null)},[i,o]),[n,se(()=>t=>ws(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=al(1),i=al(1);const{visualElement:s}=e.useContext(f);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:ul(n,Wl),scaleY:ul(i,Wl)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return Se(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return se(Cl)},t.useElementScroll=function(t){return xl({container:t})},t.useForceUpdate=Xa,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return _r(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o,s]),r},t.useInstantLayoutTransition=Ml,t.useInstantTransition=function(){const[t,n]=Xa(),i=Ml(),s=e.useRef();return e.useEffect(()=>{fe.postRender(()=>fe.postRender(()=>{n===s.current&&(tn.current=!1)}))},[n]),e=>{i(()=>{tn.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(g))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return ll(e.filter(ot),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=ot(n)?n.get():n)}return i}))},t.useMotionValue=al,t.useMotionValueEvent=gl,t.usePresence=Fa,t.useReducedMotion=wl,t.useReducedMotionConfig=function(){const t=wl(),{reducedMotion:n}=e.useContext(m);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=Ma.current;t&&t.resetTree()},[])},t.useScroll=xl,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(m),s=e.useRef(null),o=al(ot(t)?fl(t.get()):t),r=e.useRef(o.get()),a=e.useRef(()=>{}),l=()=>{const t=s.current;t&&0===t.time&&t.sample(ve.delta),u(),s.current=Gi({keyframes:[o.get(),r.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:a.current})},u=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>i?e(t):(r.current=t,a.current=e,fe.update(l),o.get()),u),[JSON.stringify(n)]),y(()=>{if(ot(t))return t.on("change",t=>o.set(fl(t)))},[o]),o},t.useTime=function(){const t=al(0);return Pl(e=>t.set(e)),t},t.useTransform=ul,t.useUnmountEffect=Ja,t.useVelocity=function(t){const e=al(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&fe.update(n)};return gl(t,"change",()=>{fe.update(n,!1,!0)}),e},t.useViewportScroll=function(){return xl()},t.useWillChange=function(){return se(()=>new fs("auto"))},t.visualElementStore=Xo,t.warning=X,t.wrap=ur}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "11.3.13",
3
+ "version": "11.3.14",
4
4
  "description": "A simple and powerful JavaScript animation library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -104,5 +104,5 @@
104
104
  "maxSize": "18 kB"
105
105
  }
106
106
  ],
107
- "gitHead": "06963ba6877a180612642b0a8e16a30237c030e4"
107
+ "gitHead": "a4720e5943e1b4759820ffa774dac0ffec55038e"
108
108
  }