import{jsxs as t,jsx as e}from"react/jsx-runtime";import{createContext as n,useContext as i,useMemo as s,Fragment as o,createElement as r,useRef as a,useInsertionEffect as l,useCallback as h,useLayoutEffect as c,useEffect as u,forwardRef as d,useState as p,useId as m,Component as f}from"react";function y(t,e){-1===t.indexOf(e)&&t.push(e)}function g(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const v=(t,e,n)=>n>e?e:n/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),T=t=>"object"==typeof t&&null!==t,S=t=>/^0[^.\s]+$/u.test(t);function b(t){let e;return()=>(void 0===e&&(e=t()),e)}const P=t=>t,A=(...t)=>t.reduce((t,e)=>n=>e(t(n))),E=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class M{constructor(){this.subscriptions=[]}add(t){return y(this.subscriptions,t),()=>this.remove(t)}remove(t){g(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;s1e3*t,k=t=>t/1e3,D=(t,e)=>e?t*(1e3/e):0,C=(t,e,n)=>t*(3*(1-t)*((1-t)*e+t*n)+t*t);function R(t,e,n,i){return t===e&&n===i?P:s=>{let o=0,r=1,a=s;for(let e=0;;e++){a>=o&&a<=r||(a=(o+r)/2);const i=C(a,t,n)-s;if(i*i<1e-28||40===e)break;i>0?r=a:o=a,a-=1e-7*i/(C(a+1e-7,t,n)-s-i)}return C(a,e,i)}}const L=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,B=t=>e=>1-t(1-e),j=R(.33,1.53,.69,.99),F=B(j),I=L(F),O=t=>t>=1?1:(t*=2)<1?.5*F(t):.5*(2-Math.pow(2,-10*(t-1))),U=t=>1-Math.sin(Math.acos(t)),W=B(U),N=L(U),$=R(.42,0,1,1),z=R(0,0,.58,1),Y=R(.42,0,.58,1),X=t=>Array.isArray(t)&&"number"==typeof t[0],K={linear:P,easeIn:$,easeInOut:Y,easeOut:z,circIn:U,circInOut:N,circOut:W,backIn:F,backInOut:I,backOut:j,anticipate:O},H=t=>{if(X(t)){t.length;const[e,n,i,s]=t;return R(e,n,i,s)}return"string"==typeof t?K[t]:t},_=n({}),G=n({strict:!1}),Z=n({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),q=n({}),J={delta:0,timestamp:0,isProcessing:!1};let Q;function tt(){Q=void 0}const et={now:()=>(void 0===Q&&et.set(J.isProcessing||x.useManualTiming?J.timestamp:performance.now()),Q),set:t=>{Q=t,queueMicrotask(tt)}},nt=t=>Math.round(1e5*t)/1e5,it=t=>e=>"string"==typeof e&&e.startsWith(t),st=it("--"),ot=it("var(--"),rt=t=>!!ot(t)&&at.test(t.split("/*")[0].trim()),at=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function lt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const ht={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ct={...ht,transform:t=>v(0,1,t)},ut={...ht,default:1},dt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const pt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>n=>Boolean("string"==typeof n&&pt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ft=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(dt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},yt={...ht,transform:t=>Math.round((t=>v(0,255,t))(t))},gt={test:mt("rgb","red"),parse:ft("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+yt.transform(t)+", "+yt.transform(e)+", "+yt.transform(n)+", "+nt(ct.transform(i))+")"};const vt={test:mt("#"),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:gt.transform},xt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),wt=xt("deg"),Tt=xt("%"),St=xt("px"),bt=xt("vh"),Pt=xt("vw"),At=(()=>({...Tt,parse:t=>Tt.parse(t)/100,transform:t=>Tt.transform(100*t)}))(),Et={test:mt("hsl","hue"),parse:ft("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Tt.transform(nt(e))+", "+Tt.transform(nt(n))+", "+nt(ct.transform(i))+")"},Mt={test:t=>gt.test(t)||vt.test(t)||Et.test(t),parse:t=>gt.test(t)?gt.parse(t):Et.test(t)?Et.parse(t):vt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?gt.transform(t):Et.transform(t),getAnimatableNone:t=>{const e=Mt.parse(t);return e.alpha=0,Mt.transform(e)}},Vt=new RegExp(dt.source),kt=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const Dt="number",Ct="color",Rt=/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+)(?![a-z]*\()/giu;function Lt(t){const e=t.toString();return Vt.test(e)||kt.test(e)}function Bt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Rt,t=>(Mt.test(t)?(i.color.push(o),s.push(Ct),n.push(Mt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Dt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function jt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:Mt.test(n)?Mt.getAnimatableNone(n):n;var n};const It={test:function(t){return isNaN(t)&&"string"==typeof t&&(Vt.test(t)||kt.test(t))},parse:function(t){return Bt(t).values},createTransformer:function(t){return jt(Bt(t))},getAnimatableNone:function(t){const e=Bt(t);return jt(e)(e.values.map((t,n)=>Ft(t,e.split[n])))}};function Ot(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ut(t,e){return n=>n>0?e:t}const Wt=(t,e,n)=>t+(e-t)*n,Nt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},$t=[vt,gt,Et];function zt(t){const e=(n=t,$t.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===Et&&(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=Ot(a,i,t+1/3),o=Ot(a,i,t),r=Ot(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 Yt=(t,e)=>{const n=zt(t),i=zt(e);if(!n||!i)return Ut(t,e);const s={...n};return t=>(s.red=Nt(n.red,i.red,t),s.green=Nt(n.green,i.green,t),s.blue=Nt(n.blue,i.blue,t),s.alpha=Wt(n.alpha,i.alpha,t),gt.transform(s))},Xt=new Set(["none","hidden"]);function Kt(t,e){return n=>Wt(t,e,n)}function Ht(t){return"number"==typeof t?Kt:"string"==typeof t?rt(t)?Ut:Mt.test(t)?Yt:Zt:Array.isArray(t)?_t:"object"==typeof t?Mt.test(t)?Yt:Gt:Ut}function _t(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ht(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const Zt=(t,e)=>{const n=It.createTransformer(e),i=Bt(t),s=Bt(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?Xt.has(t)&&!s.values.length||Xt.has(e)&&!i.values.length?function(t,e){return Xt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):A(_t(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;snt(Wt(o,r,t))+s}(t,e);if(n)return n}return Ht(t)(t,e)}const Qt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function te(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,s=!0;const o=()=>i=!0,r=Qt.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new Set;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(n.add(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(o),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:c,update:u,preRender:d,render:p,postRender:m}=r,f=()=>{const o=x.useManualTiming,r=o?n.timestamp:performance.now();i=!1,o||(n.delta=s?1e3/60:Math.max(Math.min(r-n.timestamp,40),1)),n.timestamp=r,n.isProcessing=!0,a.process(n),l.process(n),h.process(n),c.process(n),u.process(n),d.process(n),p.process(n),m.process(n),n.isProcessing=!1,i&&e&&(s=!1,t(f))};return{schedule:Qt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(i||(i=!0,s=!0,n.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>ee.update(e,t),stop:()=>ne(e),now:()=>J.isProcessing?J.timestamp:et.now()}},oe=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e=n?1/0:s}const le=100,he=10,ce=1,ue=800,de=.3,pe=.3,me={granular:.01,default:2},fe={granular:.005,default:.5},ye=.01,ge=10,ve=.05,xe=t=>t<0?1/Math.max(1+t,ve):Math.max(1-t,ve);function we(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return be(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function Te(t,e){return t*Math.sqrt(1-e*e)}const Se=12;function be(t,e,n){let i=n;for(let n=1;n(e?t>=0:t>0)&&t<1/0;function Ee(t,e){if(Ae(t,e))return t}function Me(t){const e=Ee(t.stiffness),n=Ee(t.damping,!0),i=Ee(t.mass),s={...t,stiffness:e??le,damping:n??he,mass:i??ce,isResolvedFromDuration:!1,isTimeDefined:void 0===(e??n??i)&&(void 0!==t.duration||void 0!==t.bounce)};if(s.isTimeDefined){if(t.visualDuration){const e=xe(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*we(e,2*Math.PI/1.2);s.stiffness=n*n,s.damping=2*e*Math.sqrt(s.stiffness)}else Object.assign(s,function({duration:t=ue,bounce:e=de}){let n,i;const s=xe(e);t=v(ye,ge,k(t)),s<1?(n=e=>{const n=e*s,i=n*t,o=Te(e,s),r=Math.exp(-i);return Pe-n/o*r},i=e=>{const i=e*s*t,o=s*s*e*e*t,r=Math.exp(-i),a=Te(e*e,s);return(-n(e)+Pe>0?-1:1)*-o*r/a}):(n=e=>Math.exp(-e*t)*(e*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*-e));const o=be(n,i,5/t),r=o*we(s,o*t),a=r*r;return{stiffness:a,damping:2*s*Math.sqrt(a),duration:V(t)}}(s)),s.isResolvedFromDuration=!0;Ae(s.stiffness)&&Ae(s.damping,!0)||(s.stiffness=le,s.damping=he)}return s}function Ve(t=pe,e=de){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:r,damping:a,mass:l,duration:h,isResolvedFromDuration:c,isTimeDefined:u}=Me({...n}),d=t=>u?0:-k(t),p=a/(2*Math.sqrt(r*l)),m=k(Math.sqrt(r/l)),f=p*m,y={target:s,delta:s-i,velocity:d(n.velocity||0)||0,restSpeed:0,restDelta:0},g=()=>{const t=Math.abs(y.delta)<5;y.restSpeed=n.restSpeed||(t?me.granular:me.default),y.restDelta=n.restDelta||(t?fe.granular:fe.default)};let v,x,w;if(g(),p<1){const t=Te(m,p),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};w=()=>{e.A=(y.velocity+f*y.delta)/t,e.sinC=f*e.A+y.delta*t,e.cosC=f*y.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-f*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};v=t=>(n(t),y.target-e.env*(e.A*e.sin+y.delta*e.cos)),x=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===p){v=t=>y.target-Math.exp(-m*t)*(y.delta+(y.velocity+m*y.delta)*t);const t={C:0};w=()=>{t.C=y.velocity+m*y.delta},x=e=>Math.exp(-m*e)*(m*t.C*e-y.velocity)}else{const t=m*Math.sqrt(p*p-1),e=f-t,n=f+t,i=u?1/0:300/t,s=(t,e)=>Math.exp(e>i?-t*i-f*(e-i):-t*e),o={S:0,F:0};w=()=>{const e=(y.velocity+f*y.delta)/t;o.S=(y.delta+e)/2,o.F=(y.delta-e)/2},v=t=>y.target-o.S*s(e,t)-o.F*s(n,t),x=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}w();const T=c&&h||null,S={calculatedDuration:T,retarget:(t,e)=>{y.target=t[t.length-1],y.delta=y.target-t[0],y.velocity=d(e),n.restSpeed&&n.restDelta||g(),S.calculatedDuration=T,o.done=!1,w()},velocity:t=>V(x(t)),next:t=>{const e=v(t);if(c)o.done=t>=h;else{const n=V(x(t));o.done=Math.abs(n)<=y.restSpeed&&Math.abs(y.target-e)<=y.restDelta}return o.value=o.done?y.target:e,o},toString:()=>{const t=Math.min(ae(S),re),e=oe(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function ke({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:h=.5,restSpeed:c}){const u=t[0],d={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>{const e=g(t);d.done=Math.abs(e)<=h,d.value=d.done?y:y+e};let x,w;const T=t=>{var e;((e=d.value)l)&&(x=t,w=Ve({keyframes:[d.value,p(d.value)],velocity:-g(t)/i*1e3,damping:s,stiffness:o,restDelta:h,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function De(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(e.length,1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||x.mix||Jt,o=t.length-1;for(let n=0;n{if(r&&n1)for(;ih(v(t[0],t[o-1],e)):h}function Ce(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=E(0,e,i);t.push(Wt(n,1,s))}}(e,t.length-1),e}function Re({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(H):H(i)||Y,o={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(s)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,i]=e,r=n===i?void 0:(x.mix||Jt)(n,i);return{calculatedDuration:t,next:e=>(o.value=r?r(s(t>0?v(0,1,e/t):1)):i,o.done=e>=t,o)}}const r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ce(e),t),a=De(r,e,{ease:Array.isArray(s)?s:(l=e,h=s,l.map(()=>h||Y).splice(0,l.length-1))});var l,h;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}Ve.applyToOptions=t=>{const e=function(t,e=100,n){const{keyframes:i,velocity:s}=t,o=i&&i[i.length-1]-i[0],r=n({...t,velocity:s&&o?s*e/o:s,keyframes:[0,e]}),a=Math.min(ae(r),re);return{type:"keyframes",ease:t=>r.next(a*t).value/e,duration:k(a)}}(t,100,Ve);return t.ease=e.ease,t.duration=V(e.duration),t.type="keyframes",t};function Le(t,e,n=0){return e<=0?n:t.velocity?t.velocity(e):function(t,e,n){const i=Math.max(e-5,0);return D(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const Be=t=>null!==t;function je(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Be),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Fe={decay:ke,inertia:ke,tween:Re,keyframes:Re,spring:Ve};function Ie(t){"string"==typeof t.type&&(t.type=Fe[t.type])}const Oe=(t,e)=>e-t>40&&!x.useManualTiming?e:t;function Ue(t,e){return{kind:t,animation:e,timestamp:et.now(),frameTimestamp:J.timestamp,frameIsProcessing:J.isProcessing}}function We(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Ue("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Ne{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const $e=t=>t/100,ze=t=>Math.round(1e4*t)/1e4;class Ye extends Ne{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==et.now()&&this.tick(et.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),We(this,this.options)}initAnimation(){const{options:t}=this;Ie(t);const{type:e=Re,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Re;a!==Re&&"number"!=typeof r[0]&&(this.mixKeyframes=A($e,Jt(r[0],r[1])),r=[0,100]);const l=a(r===t.keyframes?t:{...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=ae(l));const{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:h}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Oe(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const c=this.currentTime-o*(this.playbackSpeed>=0?1:-1),u=this.playbackSpeed>=0?c<0:c>i;this.currentTime=Math.max(c,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,u);let{done:p}=d;u||null===s||(p=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==ke&&(d.value=je(r,this.options,h,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??ze((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==ke?je(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,e){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r}=this,{keyframes:a,repeat:l,repeatType:h,repeatDelay:c}=this.options;let u,d=t,p=n;if(l){const e=Math.min(t,i)/r;let n=Math.floor(e),s=e%1;!s&&e>=1&&(s=1),1===s&&n--,n=Math.min(n,l+1);Boolean(n%2)&&("reverse"===h?(s=1-s,c&&(s-=c/r)):"mirror"===h&&(p=o)),d=v(0,1,s)*r}return e?(this.delayState.value=a[0],u=this.delayState):u=p.next(d),s&&!e&&(u.value=s(u.value)),u}then(t,e){return this.finished.then(t,e)}get duration(){return k(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+k(t)}get time(){return k(this.currentTime)}set time(t){t=V(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Le(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(et.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=k(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=se,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=n)),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(et.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Xe=new Set(["brightness","contrast","saturate","opacity"]);function Ke(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(dt)||[];if(!i)return t;const s=n.replace(i,"");let o=Xe.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const He=/\b([a-z-]*)\(.*?\)/gu,_e={...It,getAnimatableNone:t=>{const e=t.match(He);return e?e.map(Ke).join(" "):t}},Ge={...It,getAnimatableNone:t=>{const e=It.parse(t);return It.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Ze={...ht,transform:Math.round},qe={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,top:St,right:St,bottom:St,left:St,inset:St,insetBlock:St,insetBlockStart:St,insetBlockEnd:St,insetInline:St,insetInlineStart:St,insetInlineEnd:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,paddingBlock:St,paddingBlockStart:St,paddingBlockEnd:St,paddingInline:St,paddingInlineStart:St,paddingInlineEnd:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,marginBlock:St,marginBlockStart:St,marginBlockEnd:St,marginInline:St,marginInlineStart:St,marginInlineEnd:St,fontSize:St,backgroundPositionX:St,backgroundPositionY:St,...{rotate:wt,pathRotation:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:ut,scaleX:ut,scaleY:ut,scaleZ:ut,skew:wt,skewX:wt,skewY:wt,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:ct,originX:At,originY:At,originZ:St},zIndex:Ze,fillOpacity:ct,strokeOpacity:ct,numOctaves:Ze},Je={...qe,color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:_e,WebkitFilter:_e,mask:Ge,WebkitMask:Ge},Qe=t=>Je[t],tn=new Set([_e,Ge]);function en(t,e){let n=Qe(t);return tn.has(n)||(n=It),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const nn=t=>180*t/Math.PI,sn=t=>{const e=nn(Math.atan2(t[1],t[0]));return rn(e)},on={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:sn,rotateZ:sn,skewX:t=>nn(Math.atan(t[1])),skewY:t=>nn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},rn=t=>((t%=360)<0&&(t+=360),t),an=t=>Math.hypot(t[0],t[1]),ln=t=>Math.hypot(t[4],t[5]),hn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:an,scaleY:ln,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(an(t)+ln(t))/2,rotateX:t=>rn(nn(Math.atan2(t[6],t[5]))),rotateY:t=>rn(nn(Math.atan2(-t[2],t[0]))),rotateZ:sn,rotate:sn,skewX:t=>nn(Math.atan(t[4])),skewY:t=>nn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function cn(t){return t.includes("scale")?1:0}function un(t,e){if(!t||"none"===t)return cn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=hn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=on,s=e}if(!s)return cn(e);const o=i[e],r=s[1].split(",").map(dn);return"function"==typeof o?o(r):r[o]}function dn(t){return parseFloat(t.trim())}const pn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mn=(()=>new Set([...pn,"pathRotation"]))(),fn=t=>t===ht||t===St,yn=new Set(["x","y","z"]),gn=pn.filter(t=>!yn.has(t));const vn=new Set(["bottom","right"]);function xn(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],h=l-a;return"border-box"===o?h:h-parseFloat(i)-parseFloat(s)}const wn={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>xn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>xn(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:({transform:t})=>un(t,"x"),y:({transform:t})=>un(t,"y")};wn.translateX=wn.x,wn.translateY=wn.y;const Tn=new Set;let Sn=!1,bn=!1,Pn=!1;function An(){if(bn){const t=[],e=new Set,n=new Set;Tn.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),vn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return gn.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}bn=!1,Sn=!1,Tn.forEach(t=>t.complete(Pn)),Tn.clear()}function En(){Tn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(bn=!0)})}class Mn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Tn.add(this),Sn||(Sn=!0,ee.read(En),ee.resolveKeyframes(An))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(w(t)||S(t))return parseFloat(t);if(!It.test(t)&&It.test(n))return en(e,n)}return t??void 0}(n.readValue(e,o),e,o);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;et.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}const kn={};function Dn(t,e){const n=b(t);return()=>kn[e]??n()}const Cn=Dn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Rn=Dn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ln=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Bn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ln([0,.65,.55,1]),circOut:Ln([.55,0,1,.45]),backIn:Ln([.31,.01,.66,-.59]),backOut:Ln([.33,1.53,.69,.99])};function jn(t,e){return t?"function"==typeof t?Rn()?oe(t,e):"ease-out":X(t)?Ln(t):Array.isArray(t)?t.map(t=>jn(t,e)||Bn.easeOut):Bn[t]:void 0}function Fn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},h=void 0){const c={[e]:n};l&&(c.offset=l);const u=jn(a,s);Array.isArray(u)&&(c.easing=u);const d={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return h&&(d.pseudoElement=h),t.animate(c,d)}function In(t){return"function"==typeof t&&"applyToOptions"in t}class On extends Ne{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,t.type;const l=function({type:t,...e}){return In(t)&&Rn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Fn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=je(i,this.options,r,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Vn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},We(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return k(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+k(t)}get time(){return k(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=V(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Cn()?(this.animation.timeline=t,e?.(this.animation),P):n(this)}}const Un={anticipate:O,backInOut:I,circInOut:N};function Wn(t){"string"==typeof t.ease&&t.ease in Un&&(t.ease=Un[t.ease])}class Nn extends On{constructor(t){Wn(t),Ie(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(et.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Ye({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:e,element:n,name:i}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const{speed:s}=this,o=this.elapsed(),r="running"===this.state&&s?v(0,10,o):0,a=this.sample(o);n&&i&&Vn(n,i,a),e.setWithVelocity(this.sample(o-r*Math.sign(s)),a,r/Math.abs(s||1))}}const $n=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!It.test(t)&&"0"!==t||t.startsWith("url(")));function zn(t){t.duration=0,t.type="keyframes"}const Yn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Xn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Kn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Hn=b(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _n(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Yn.has(n)&&!Kn.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:h,transformTemplate:c}=e.owner.getProps();return Hn()&&(Yn.has(n)||Kn.has(n)&&function(t){for(let e=0;ee&&"number"==typeof t?e.transform(t):t,Zn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qn=pn.length;function Jn(t,e,n){let i="",s=!0;for(let o=0;ot-e,ni=(t,e,n)=>{const i=[];for(let s=0;s<=n;s++)i.push(Wt(t,e,s/n));return i},ii=t=>t.motionValue.owner,si=t=>Qn.get(t),oi=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class ri extends Ye{constructor(t){const e=ii(t).current,{driver:n=se}=t;let i;const s=function(t){const e=ii(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(oi(e,"transform")||"none")||oi(e,"pathRotation")||e.projection?.isProjecting())}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=si(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=si(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return si(ii(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(et.now()):void 0}tween(){const{keyframes:t,type:e,ease:n,times:i,repeat:s,delay:o=0}=this.options,r=X(n)?Ln(n):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(n)&&Bn[n];if(r&&!s&&!i&&2===t.length&&e===Re&&null===this.holdTime){const t=this.startTime+o/this.speed;return[t,t+this.resolvedDuration/this.speed,r]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:h,times:c,keyframes:u,type:d}=o,p=(d||Re)===Re?c||Ce(u):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&h&&"loop"!==h?1-r:r)*(s-l)/i;a>t&&a{for(const e of n)if(e.name===t)return!0},m=(e,n)=>{const r={};for(const a of void 0===e?pn:o){const o=i.get(a),l=void 0===e?oi(t,a):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):s[a];void 0!==l&&(r[a]=l)}return r},f=(t,e)=>{let n="";const i=m(t,e);for(const t in i)n+=(Zn[t]||t)+"("+Gn(i[t],qe[t])+") ";return n||"none"},y=(t=m())=>{e.style.transform=Jn(t,{})},g=(t=!0)=>{t&&y(),a.forEach(({animation:t})=>t.cancel()),a=[]},v=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=et.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,a.some(t=>t.end===1/0)&&(t.cancel(),a=a.filter(t=>t!==i)),k.schedule(!1)}),t.oncancel=()=>a.includes(i)&&k.demote(),a.push(i)},x=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},w=(t,e,n,i)=>{const s=Math.min(200,Math.max(2,Math.ceil((n-e)/10)));if(4*i.length>s)return;const o=ni(e,n,s).concat(i).sort(ei),r=t=>E(e,n,t);let a,l;for(const e of t){const t=o.map(t=>e.numberAt(t)),[n]=t,i=t.map(t=>t-n),s=i[i.length-1],r=i.some(t=>Math.abs(t)*ti>Math.abs(s))?0:s,h=i.map(t=>r?t/r:t);if(r)if(a){if(h.some((t,e)=>!(Math.abs(t-a[e])<=ti)))return}else a=h,l=t=>(e.numberAt(t)-n)/r;else if(h.some(t=>!(Math.abs(t)<=ti)))return}if(!a||a.every((t,e)=>Math.abs(t-r(o[e]))<=ti))return"linear";const h=[],c=(t,e=l(t))=>h.push(ze(e)+" "+ze(100*r(t))+"%");return a.forEach((t,e)=>{e&&Math.abs(t-a[e-1])>.2&&x(l,o[e-1],o[e]).forEach(t=>c(t)),c(o[e],t)}),"linear("+h+")"},T=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...x(t=>i.numberAt(t),e,n));s.push(n)}},a=ni(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(ei))t>l&&r(l,t,0),l=t;return s.sort(ei)},S=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},b=(t,n,i,s={fill:"both"},o,r)=>{const a=t.flatMap(t=>t.boundaries(n,i)),l=r||w(t,n,i,a),h=l?[n,i]:T(t,n,i,a),c=h.map(t=>f(t,o));let u={transform:c};return l||(u.offset=h.map(t=>E(n,i,t))),c.every(t=>t===c[0])&&(y(m(n,o)),u=null),e.animate(u,{...s,duration:i-n,easing:l||"linear"})},P=l=>{let h=l,c=0,u=0;const d=[],p=[],m=new Set;i.clear(),r=new Map;for(const t of n){i.set(t.name,t);const[e,n]=t.timing(),s=e===1/0;if(r.set(t,[t.at(l),t.speed,s]),s)t.sync();else{if(t.speed<0)return;if(n){if(c){const t=(e-u)/n;if(Math.abs(n-c)>1||Math.abs(t-Math.round(t))*c>1)return}else c=n,u=e;p.push(t)}else m.add(e);d.push(t),h=Math.max(h,e)}}s={},o=pn.filter(e=>{if(i.has(e))return!0;const n=s[e]=oi(t,e);return void 0!==n&&parseFloat(n)!==(e.startsWith("scale")?1:0)}),g(!1);const f=!c&&S(d);try{if(f&&f[1]>l){const[t,e,n]=f;v(b(d,t,e,void 0,void 0,n),t-l,e-t)}else h>l&&(v(b(d,l,h),0,h-l),m.forEach(t=>t{let e,i=0;for(const s of n){const n=r.get(s);if(!n)return!1;const[o,a,l]=n,h=s.at(t),c=s.timing()[0]===1/0;if(l){if(c&&h===o)continue;return!1}const u=(h-o)/a,d=c?0:s.speed/a;if(void 0===e)e=u,i=d;else if(Math.abs(u-e)>1||d!==i)return!1}if(void 0===e)return!0;if(!a.length)return!1;for(const{offset:t,end:n,isDone:i}of a){const s=e-t;if(n<1/0&&(i?s=n))return!1}for(const{animation:n,offset:s,isDone:o}of a){if(o)continue;const r=e-s;i?(n.playbackRate=i,n.startTime=t-r/i):(n.pause(),n.currentTime=r)}return!0},M=()=>!n.size&&(c=!0,Qn.delete(e),k.isJS||g(),!0),V=()=>{const e=et.now();if(k.isJS||(k.isFinishing=!0,n.forEach(n=>{const[i,o]=n.timing();"running"===n.state&&n.speed>0&&!o&&i<=e+1&&(n.complete(),s[n.name]=oi(t,n.name),r.has(n)||(l=!0))}),k.isFinishing=!1),h=!1,c)return;if(n.forEach(({state:t},e)=>{"idle"!==t&&"finished"!==t||n.delete(e)}),M())return;for(const t of n)if(!t.canAccelerate)return k.demote(!0);k.isJS&&(k.isJS=!1,l=!0,n.forEach(t=>t.js?.stop()));const i=l,o=u;if(l=u=!1,i||!A(e)){if(o){if(e-d<100)return k.demote();d=e}if(!P(e))return k.demote()}},k={tracks:n,isJS:!1,isFinishing:!1,schedule(t,e){c||(l||(l=t),u||(u=!!e),h||(h=!0,J.isProcessing?ee.render(V,!1,!0):queueMicrotask(V)))},release(t){const{state:e}=t;"idle"!==e&&"finished"!==e||n.delete(t),M()||k.schedule(!0)},check(){if(!k.isJS)for(const e in s)if(oi(t,e)!==s[e]&&!p(e))return k.schedule(!0,!0)},demote(t){k.isJS||c||(n.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),k.isJS=!0,r=new Map,g(),n.forEach(t=>"running"===t.state&&t.js?.start()))}};return Qn.set(e,k),k}(ii(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(et.now())}get time(){return this.isAccelerated()?k(v(0,this.totalDuration,this.at(et.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class ai extends Ne{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=et.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,o=t;o.autoplay??(o.autoplay=!0),o.delay??(o.delay=0),o.type??(o.type="keyframes"),o.repeat??(o.repeat=0),o.repeatDelay??(o.repeatDelay=0),o.repeatType??(o.repeatType="loop");const r=s?.KeyframeResolver||Mn;this.keyframeResolver=new r(e,(t,e,n)=>this.onKeyframesResolved(t,e,o,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:h}=n;this.resolvedAt=et.now();let c=!0;(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=$n(s,e),a=$n(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n{u?.(),this.notifyFinished()};const d=c&&!l&&_n(n),p=!d&&(({name:t,motionValue:e})=>t&&pn.includes(t)&&e?.owner?.current instanceof HTMLElement&&Hn()&&Rn())(n);let m;if(i&&(d||p||this.resolvedAt!==this.createdAt)&&(n.startTime??(n.startTime=Oe(this.createdAt,this.resolvedAt))),d){n.element=n.motionValue?.owner?.current;try{m=new Nn(n)}catch{m=new Ye(n)}}else m=p?new ri(n):new Ye(n);this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pn=!0,En(),An(),Pn=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function li(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}class hi{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=et.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=et.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){var n;return"change"===t?this.onChangeSubscribe(e):((n=this.events)[t]||(n[t]=new M)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new M,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){ee.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=et.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return D(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&this.clearAnimation(),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ci(t,e){return new hi(t,e)}function ui(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function di(t,e){const n=t?.[e]??t?.default??t;return n!==t?ui(n,t):n}const pi={type:"spring",stiffness:500,damping:25,restSpeed:10},mi={type:"keyframes",duration:.8},fi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yi=(t,{keyframes:e})=>e.length>2?mi:mn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:pi:fi,gi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const vi=(t,e,n,i={},s,o)=>r=>{const a=di(i,t)||{},l=a.delay||i.delay||0;let{elapsed:h=0}=i;h-=V(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s,hasOnUpdate:!!a.onUpdate};(function(t){for(const e in t)if(!gi.has(e))return!0;return!1})(a)||Object.assign(c,yi(t,c)),c.duration&&(c.duration=V(c.duration)),c.repeatDelay&&(c.repeatDelay=V(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let u=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(zn(c),0===c.delay&&(u=!0)),(x.instantAnimations||x.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(u=!0,zn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,u&&!o&&void 0!==e.get()){const t=je(c.keyframes,a);if(void 0!==t)return void ee.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new Ye(c):new ai(c)},xi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wi(t,e,n=1){const[i,s]=function(t){const e=xi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return w(t)?parseFloat(t):t}return rt(s)?wi(s,e,n+1):s}function Ti(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function Si(t,e,n){return Ti(t.getProps(),e,n,t)}const bi=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Pi=new Set(["width","height","top","left","right","bottom",...pn]);function Ai(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ci(n))}function Ei(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}const Mi=t=>Boolean(t&&t.getVelocity);function Vi(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Mi(i)&&i.add))return n.add(e);if(!n&&x.WillChange){const n=new x.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function ki(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Di="data-"+ki("framerAppearId");function Ci(t){return t.props[Di]}const Ri="undefined"!=typeof window;function Li({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function Bi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?ui(o,l):l;const h=o?.reduceMotion,c=o?.skipAnimations;i&&(o=i);const u=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,u):p.animateVisualElement?.(t,a,o,n,u));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&Li(d,e))continue;const r={delay:n,...di(o||{},e)};c&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){ee.update(()=>i.set(s));continue}let p=!1;if(Ri&&window.MotionHandoffAnimation){const n=Ci(t);if(n){const t=window.MotionHandoffAnimation(n,e,ee);null!==t&&(r.startTime=t,p=!0)}}Vi(t,e);const m=h??t.shouldReduceMotion;i.start(vi(e,i,s,m&&Pi.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&u.push(f)}if(r){const e=()=>ee.update(()=>{r&&function(t,e){const n=Si(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)Ai(t,e,Ei(o[e]))}(t,r)});u.length?Promise.all(u).then(e):e()}return u}function ji(t,e,n={}){const i=Si(t,e,bi(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?Bi(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,h=[];return o?.forEach(t=>{t.notify("AnimationStart",e),h.push(ji(t,e,{...n,delay:i+("function"==typeof r?0:r)+li(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(h)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}const Fi=[ht,St,Tt,wt,Pt,bt,{test:t=>"auto"===t,parse:t=>t}],Ii=t=>Fi.find((t=>e=>e.test(t))(t));function Oi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||S(t))}const Ui=new Set(["auto","none","0"]);class Wi extends Mn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;et.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t||!t.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ni=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function $i(t){return T(t)&&"ownerSVGElement"in t}function zi(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(t=>null!=t)}function Yi(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(mn.has(t))r=!0;else if(st(t))s[t]=n;else{const e=Gn(n,qe[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Jn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Xi={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ki={offset:"strokeDashoffset",array:"strokeDasharray"};const Hi=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _i(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,h,c){if(Yi(t,a,h),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:d}=t;for(const t of Hi)void 0!==u[t]&&(d[t]=u[t],delete u[t]);(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Xi:Ki;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}(u,s,o,r,!1)}function Gi({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Zi(t){return void 0===t||1===t}function qi({scale:t,scaleX:e,scaleY:n}){return!Zi(t)||!Zi(e)||!Zi(n)}function Ji(t){return qi(t)||Qi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function Qi(t){return ts(t.x)||ts(t.y)}function ts(t){return t&&"0%"!==t}function es(t,e,n){return n+e*(t-n)}function ns(t,e,n,i,s){return void 0!==s&&(t=es(t,s,i)),es(t,n,i)+e}function is(t,e=0,n=1,i,s){t.min=ns(t.min,e,n,i,s),t.max=ns(t.max,e,n,i,s)}function ss(t,{x:e,y:n}){is(t.x,e.translate,e.scale,e.originPoint),is(t.y,n.translate,n.scale,n.originPoint)}const os=.999999999999,rs=1.0000000000001;function as(t,e){t.min+=e,t.max+=e}function ls(t,e,n,i,s=.5){is(t,e,n,Wt(t.min,t.max,s),i)}function hs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function cs(t,e,n){const i=n??t;ls(t.x,hs(e.x,i.x),e.scaleX,e.scale,e.originX),ls(t.y,hs(e.y,i.y),e.scaleY,e.scale,e.originY)}function us(t,e){return Gi(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{schedule:ds}=te(queueMicrotask,!1),ps={x:!1,y:!1};function ms(){return ps.x||ps.y}function fs(t,e){const n=zi(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function ys(t,e,n={}){const[i,s,o]=fs(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ms())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o}const gs=(t,e)=>!!e&&(t===e||gs(t,e.parentElement)),vs=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,xs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const ws=new Set(["INPUT","SELECT","TEXTAREA"]);const Ts=new WeakSet;function Ss(t){return e=>{"Enter"===e.key&&t(e)}}function bs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ps(t){return vs(t)&&!ms()}const As=new WeakSet;function Es(t,e,n={}){const[i,s,o]=fs(t,n),r=t=>{const i=t.currentTarget;if(!Ps(t))return;if(As.has(t))return;Ts.add(i),n.stopPropagation&&As.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",h,r),Ts.has(i)&&Ts.delete(i),Ps(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||gs(i,t.target))},h=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",h,r)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),T(e=t)&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ss(()=>{if(Ts.has(n))return;bs(n,"down");const t=Ss(()=>{bs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>bs(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),function(t){return xs.has(t.tagName)||!0===t.isContentEditable}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}const Ms=new WeakMap;let Vs;const ks=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:$i(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ds=ks("inline","width","offsetWidth"),Cs=ks("block","height","offsetHeight");function Rs({target:t,borderBoxSize:e}){Ms.get(t)?.forEach(n=>{n(t,{get width(){return Ds(t,e)},get height(){return Cs(t,e)}})})}function Ls(t){t.forEach(Rs)}function Bs(t,e){Vs||"undefined"!=typeof ResizeObserver&&(Vs=new ResizeObserver(Ls));const n=zi(t);return n.forEach(t=>{let n=Ms.get(t);n||(n=new Set,Ms.set(t,n)),n.add(e),Vs?.observe(t)}),()=>{n.forEach(t=>{const n=Ms.get(t);n?.delete(e),n?.size||Vs?.unobserve(t)})}}const js=new Set;let Fs;function Is(t){return js.add(t),Fs||(Fs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};js.forEach(e=>e(t))},window.addEventListener("resize",Fs)),()=>{js.delete(t),js.size||"function"!=typeof Fs||(window.removeEventListener("resize",Fs),Fs=void 0)}}function Os(t,e){return"function"==typeof t?Is(t):Bs(t,e)}const Us=t=>"number"==typeof t?t:parseFloat(t),Ws=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Ns=new WeakMap;function $s(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function zs(t){return"string"==typeof t||Array.isArray(t)}const Ys=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xs=["initial",...Ys];function Ks(t){if($s(t.animate))return!0;for(let e=0;ethis.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=et.now();this.renderScheduledAte.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Gs.current||function(){if(Gs.current=!0,Zs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_s.current=t.matches;t.addEventListener("change",e),e()}else _s.current=!1}(),this.shouldReduceMotion=_s.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ne(this.notifyUpdate),ne(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Yn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new On({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:V(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=mn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&ee.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Qn.get(this.current)?.check()),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Js){const e=Js[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){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&Qn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e{this.current&&(this.current.textContent=`${t}`)}))}}class no{constructor(t){this.isMounted=!1,this.node=t}update(){}}function io(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}const so={};function oo(t,{layout:e,layoutId:n}){return mn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!so[t]||"opacity"===t)}function ro(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Mi(i[e])||s&&Mi(s[e])||oo(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ao extends eo{constructor(){super(...arguments),this.type="html",this.renderInstance=io}mount(t){Boolean(t.style),super.mount(t)}readValueFromInstance(t,e){if(mn.has(e))return this.projection?.isProjecting?cn(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return un(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(st(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return us(t,e)}build(t,e,n){Yi(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ro(t,e,n)}}const lo=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"]),ho=t=>"string"==typeof t&&"svg"===t.toLowerCase();function co(t,e,n){const i=ro(t,e,n);for(const n in t)if("children"!==n&&(Mi(t[n])||Mi(e[n]))){i[-1!==pn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class uo extends eo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ws}getBaseTargetFromProps(t,e){return mn.has(e)?super.getBaseTargetFromProps(t,e)??cn(e):t[e]}getDefaultValue(t){return mn.has(t)?this.latestValues[t]??cn(t):void 0}readValueFromInstance(t,e){if(mn.has(e)){const t=Qe(e);return t&&t.default||0}if(Hi.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=lo.has(e)?e:ki(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return co(t,e,n)}build(t,e,n){_i(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){io(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(lo.has(n)?n:ki(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=ho(t.tagName),super.mount(t)}}function po(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;iPromise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){return t.notify("AnimationStart",e),(Array.isArray(e)?Promise.all(e.map(e=>ji(t,e,n))):"string"==typeof e?ji(t,e,n):Promise.all(Bi(t,Si(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}(t,e,n))),n=yo(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,h=i||s,c=[],u=new Set;let d={},p=1/0,m=t;do{m=!1!==m.props.inherit&&m.parent}while(m&&!m.isControllingVariants);if(mo.forEach((e,i)=>{const s=n[e],f=r[e],y=m&&m.props[e],g=void 0!==f?f:zs(y)||!1===y?y:void 0,v=zs(g),x=e===o?s.isActive:null;!1===x&&(p=i);const w=v&&void 0===f&&!(h&&l);if(s.protectedKeys={...d},!s.isActive&&null===x||!g&&!s.prevProp||$s(g)||"boolean"==typeof g)return;if("exit"===e&&s.isActive&&!0!==x)return void(d={...d,...s.prevResolvedValues});const T=function(t,e){if("string"==typeof e)return e!==t;if(Array.isArray(e))return!po(e,t);return!1}(s.prevProp,g);let S=T||v&&(x&&!w||i>p),b=!1;const P=Array.isArray(g)?g:[g];let A={};if(!1!==x)for(const n of P){const{transition:i,transitionEnd:s,...o}=Si(t,n,bi(t,e))||{};A={...A,...o,...s}}const{prevResolvedValues:E}=s;for(const e in{...E,...A}){if(e in d)continue;const n=A[e],i=E[e],o=Array.isArray(n)&&Array.isArray(i)?!po(n,i)||T:n!==i;if(o&&null==n)u.add(e);else if(o||void 0!==n&&u.has(e)){S=!0,u.delete(e)&&(b=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0}if(s.prevProp=g,s.prevResolvedValues=A,s.isActive&&(d={...d,...A}),S&&(!w||!T||b))for(const n of P){const i={type:e};if("string"==typeof n&&h&&l&&a?.enteringChildren){const e=Si(a,n)?.transition?.delayChildren;i.delay=li(a.enteringChildren,t,e)}c.push({animation:n,options:i})}}),u.size){const{initial:e}=r,n={},i="boolean"!=typeof e&&Si(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom);i&&i.transition&&(n.transition=i.transition),u.forEach(s=>{const o=t.getValue(s);o&&(o.liveStyle=!0);const a=i&&!Array.isArray(e)?i[s]:void 0,l=t.getBaseTargetFromProps(r,s);n[s]=(void 0!==a?a:void 0===l||Mi(l)?void 0===t.initialValues[s]?t.baseTarget[s]:void 0:l)??null}),c.push({animation:n})}const f=h&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!f&&c.length?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=yo(),s=!0}}}function yo(){const t={};for(const e of Ys)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return t}function go(t,e){t.min=e.min,t.max=e.max}function vo(t,e){go(t.x,e.x),go(t.y,e.y)}function xo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function wo(t){return t.max-t.min}function To(t,e,n,i=.5){t.origin=i,t.originPoint=Wt(e.min,e.max,t.origin),t.scale=wo(n)/wo(e),t.translate=Wt(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 So(t,e,n,i){To(t.x,e.x,n.x,i?i.originX:void 0),To(t.y,e.y,n.y,i?i.originY:void 0)}function bo(t,e,n,i=0){const s=i?Wt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+wo(e)}function Po(t,e,n,i=0){const s=i?Wt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+wo(e)}function Ao(t,e,n,i){Po(t.x,e.x,n.x,i?.x),Po(t.y,e.y,n.y,i?.y)}function Eo(t,e,n,i,s){return t=es(t-=e,1/n,i),void 0!==s&&(t=es(t,1/s,i)),t}function Mo(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Tt.test(e)&&(e=parseFloat(e),e=Wt(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Wt(o.min,o.max,i);t===o&&(a-=e),t.min=Eo(t.min,e,n,a,s),t.max=Eo(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Vo=["x","scaleX","originX"],ko=["y","scaleY","originY"];function Do(t,e,n,i){Mo(t.x,e,Vo,n?n.x:void 0,i?i.x:void 0),Mo(t.y,e,ko,n?n.y:void 0,i?i.y:void 0)}function Co(t){return 0===t.translate&&1===t.scale}function Ro(t){return Co(t.x)&&Co(t.y)}function Lo(t,e){return t.min===e.min&&t.max===e.max}function Bo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function jo(t,e){return Bo(t.x,e.x)&&Bo(t.y,e.y)}function Fo(t){return wo(t.x)/wo(t.y)}function Io(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Oo(t){return[t("x"),t("y")]}function Uo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Wo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!St.test(t))return t;t=parseFloat(t)}return`${Uo(t,e.target.x)}% ${Uo(t,e.target.y)}%`}},No={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=It.parse(t);if(s.length>5)return i;const o=It.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 h=Wt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=h),"number"==typeof s[3+r]&&(s[3+r]/=h),o(s)}};const $o=Ni.length,zo=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"],Yo=zo.length,Xo=t=>"number"==typeof t||St.test(t);function Ko(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Ho=Go(0,.5,W),_o=Go(.5,.95,P);function Go(t,e,n){return i=>ie?1:n(E(t,e,i))}function Zo(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const qo=(t,e)=>t.depth-e.depth;class Jo{constructor(){this.children=[],this.isDirty=!1}add(t){y(this.children,t),this.isDirty=!0}remove(t){g(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qo),this.isDirty=!1,this.children.forEach(t)}}function Qo(t){return Mi(t)?t.get():t}class tr{constructor(){this.members=[]}add(t){y(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1!==i.isConnected||n.snapshot||(g(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(g(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){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const er={borderRadius:{...Wo,applyTo:[...Ni]},borderTopLeftRadius:Wo,borderTopRightRadius:Wo,borderBottomLeftRadius:Wo,borderBottomRightRadius:Wo,boxShadow:No},nr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(so,{...er,...so});const ir=["","X","Y","Z"];let sr=0;function or(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const rr=({instance:t})=>t&&Qn.get(t)?.demote();function ar(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ci(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ee,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ar(i)}function lr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=sr++,this.animationId=0,this.animationCommitId=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,this.nodes.forEach(ur),this.nodes.forEach(Tr),this.nodes.forEach(Sr),this.nodes.forEach(dr)},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;tthis.root.updateBlockedByResize=!1;ee.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=et.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(ne(i),t(o-e))};return ee.setup(i,!0),()=>ne(i)}(s,250),nr.hasAnimatedSinceResize&&(nr.hasAnimatedSinceResize=!1,this.nodes.forEach(wr)))})}i&&this.root.registerSharedNode(i,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||Mr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!jo(this.targetLayout,s),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...di(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h,e.path)}else e||wr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s}))}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,this.eventHandlers.clear(),this.hasLayoutListener=!1,ne(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(br),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.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ar(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;rr(this),this.isLayoutDirty=!0;for(let t=0;tt.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ee.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ee.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||wo(this.snapshot.measuredBox.x)||wo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}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;tos&&(e.x=1),e.yos&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(xo(this.prevProjectionDelta.x,this.projectionDelta.x),xo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),So(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Io(this.projectionDelta.x,this.prevProjectionDelta.x)&&Io(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.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,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={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 a={x:{min:0,max:0},y:{min:0,max:0}},l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),c=!h||h.members.length<=1,u=Boolean(l&&!c&&!0===this.options.crossfade&&!this.path.some(Er));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var h,m,f,y,g,v;i?(r.x.translate=i.x,r.x.scale=Wt(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Wt(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(Pr(r.x,t.x,n),Pr(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ao(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),f=this.relativeTarget,y=this.relativeTargetOrigin,g=a,v=n,Ar(f.x,y.x,g.x,v),Ar(f.y,y.y,g.y,v),d&&(h=this.relativeTarget,m=d,Lo(h.x,m.x)&&Lo(h.y,m.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),vo(d,this.relativeTarget)),l&&(this.animationValues=o,function(t,e,n,i,s,o){s?(t.opacity=Wt(0,n.opacity??1,Ho(i)),t.opacityExit=Wt(e.opacity??1,0,_o(i))):o&&(t.opacity=Wt(e.opacity??1,n.opacity??1,i));for(let s=0;s<$o;s++){const o=Ni[s];let r=Ko(e,o),a=Ko(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||Xo(r)===Xo(a)?(t[o]=Math.max(Wt(Us(r),Us(a),i),0),(Tt.test(a)||Tt.test(r))&&(t[o]+="%")):t[o]=a)}for(let s=0;s{nr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ci(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,n){const i=Mi(t)?t:ci(t);return i.start(vi("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Ue("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),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(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&Cr(this.options.animationType,this.layout.layoutBox,n.layoutBox)){s=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=wo(this.layout.layoutBox.x);s.x.min=t.target.x.min,s.x.max=s.x.min+e;const n=wo(this.layout.layoutBox.y);s.y.min=t.target.y.min,s.y.max=s.y.min+n}vo(e,s),cs(e,i),So(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new tr);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(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.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&&or("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(mr),this.root.sharedNodes.clear()}}}function hr(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;Oo(t=>as(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function cr(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)Oo(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=wo(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";go(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Cr(s,e.layoutBox,n)&&Oo(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=wo(n[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}};So(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?So(a,t.applyTransform(i,!0),e.measuredBox):So(a,n,e.layoutBox);const l=!Ro(r);let h=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};Ao(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};Ao(l,n,o.layoutBox,r),jo(a,l)||(h=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ur(t){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 dr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function pr(t){t.clearSnapshot()}function mr(t){t.clearMeasurements()}function fr(t){t.isLayoutDirty=!0,t.updateLayout()}function yr(t){t.isLayoutDirty=!1}function gr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function vr(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function xr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function wr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Tr(t){t.resolveTargetDelta()}function Sr(t){t.calcProjection()}function br(t){t.resetSkewAndRotation()}function Pr(t,e,n){t.translate=Wt(e.translate,0,n),t.scale=Wt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ar(t,e,n,i){t.min=Wt(e.min,n.min,i),t.max=Wt(e.max,n.max,i)}function Er(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Mr={duration:.45,ease:[.4,0,.1,1]},Vr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),kr=Vr("applewebkit/")&&!Vr("chrome/")?Math.round:P;function Dr(t){t.min=kr(t.min),t.max=kr(t.max)}function Cr(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Fo(e),s=Fo(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Rr(t){return t!==t.root&&t.scroll?.wasRoot}const Lr=lr({attachResizeListener:(t,e)=>Zo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Br={current:void 0},jr=lr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Br.current){const t=new Lr({});t.mount(window),t.setOptions({layoutScroll:!0}),Br.current=t}return Br.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Fr(t){const{initial:e,animate:n}=function(t,e){if(Ks(t)){const{initial:e,animate:n}=t;return{initial:!1===e||zs(e)?e:void 0,animate:zs(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,i(q));return s(()=>({initial:e,animate:n}),[Ir(e),Ir(n)])}function Ir(t){return Array.isArray(t)?t.join(" "):t}const Or=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ur(t,e,n){for(const i in e)Mi(e[i])||oo(i,n)||(t[i]=e[i])}function Wr(t,e){const n={};return Ur(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return s(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Yi(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Nr(t,e){const n={},i=Wr(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 $r=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function zr(t,e,n,i){const o=s(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return _i(n,e,ho(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Ur(e,t.style,t),o.style={...e,...o.style}}return o}const Yr=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Xr(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Yr.has(t)}function Kr(t,e){return t.startsWith("on")?!Xr(t):e?.(t)??!Xr(t)}const Hr=["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 _r(t){return"string"==typeof t&&!t.includes("-")&&!!(Hr.indexOf(t)>-1||/[A-Z]/u.test(t))}function Gr(t,e,n,{latestValues:i},a,l=!1,h,c){const u=(h??_r(t)?zr:Nr)(e,i,a,t),d=function(t,e,n,i){const s={};for(const o in t)"values"===o&&"object"==typeof t.values||Mi(t[o])||(Kr(o,i)||!0===n&&Xr(o)||!e&&!Xr(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}(e,"string"==typeof t,l,c),p=t!==o?{...d,...u,ref:n}:{},{children:m}=e,f=s(()=>Mi(m)?m.get():m,[m]);return r(t,{...p,children:f})}const Zr=n(null);function qr(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Qo(o[t]);let{initial:r,animate:a}=t;const l=Ks(t),h=Hs(t);e&&h&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const u=c?a:r;if(u&&"boolean"!=typeof u&&!$s(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n(e,n)=>{const s=i(q),o=i(Zr),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:qr(n,i,s,t),renderState:e()}}(t,e,s,o);return n?r():function(t){const e=a(null);return null===e.current&&(e.current=t()),e.current}(r)},Qr=Jr({scrapeMotionValuesFromProps:ro,createRenderState:Or}),ta=Jr({scrapeMotionValuesFromProps:co,createRenderState:$r}),ea={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"]};let na=!1;function ia(){return function(){if(na)return;const t={};for(const e in ea)t[e]={isEnabled:t=>ea[e].some(e=>!!t[e])};Qs(t),na=!0}(),Js}function sa(t){const e=ia();for(const n in t)e[n]={...e[n],...t[n]};Qs(e)}const oa=Symbol.for("motionComponentSymbol");function ra(t,e,n){const i=a(n);l(()=>{i.current=n});const s=a(null);return h(n=>{n&&t.onMount?.(n),e&&(n?e.mount(n):e.unmount());const o=i.current;if("function"==typeof o)if(n){const t=o(n);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):o(n);else o&&(o.current=n)},[e])}const aa=n({});function la(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const ha="undefined"!=typeof window?c:u;function ca(t,e,n,s,o,r){const{visualElement:h}=i(q),c=i(G),d=i(Zr),p=i(Z),m=p.reducedMotion,f=p.skipAnimations,y=a(null),g=a(!1);s=s||c.renderer,!y.current&&s&&(y.current=s(t,{visualState:e,parent:h,props:n,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m,skipAnimations:f,isSVG:r}),g.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const v=y.current,x=i(aa);!v||v.projection||!o||"html"!==v.type&&"svg"!==v.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutAnchor:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ua(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&la(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:h,layoutAnchor:c})}(y.current,n,o,x);const w=a(!1);l(()=>{v&&w.current&&v.update(n,d)});const T=n[Di],S=a(Boolean(T)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return ha(()=>{g.current&&v&&(v.animationState?.animateChanges(),v.enteringChildren=void 0)},[]),ha(()=>{g.current=!0,v&&(w.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),u(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),S.current=!1),v.enteringChildren=void 0)}),v}function ua(t){if(t)return!1!==t.options.allowProjection?t.projection:ua(t.parent)}function da(n,{forwardMotionProps:s=!1,type:o}={},r,a){const l=o?"svg"===o:_r(n),h=l?ta:Qr;function c(o,r){let c;const u={...i(Z),...o,layoutId:pa(o)},{isStatic:d,isValidProp:p}=u,m=Fr(o),f=h(o,d);if(!d&&"undefined"!=typeof window){i(G).strict;const t=function(t){const e=ia(),{drag:n,layout:i}=e;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(u);c=t.MeasureLayout,m.visualElement=ca(n,f,u,a,t.ProjectionNode,l)}return t(q.Provider,{value:m,children:[c&&m.visualElement?e(c,{visualElement:m.visualElement,...u}):null,Gr(n,o,ra(f,m.visualElement,r),f,d,s,l,p)]})}c.displayName=`motion.${"string"==typeof n?n:`create(${n.displayName??n.name??""})`}`;const u=d(c);return u[oa]=n,u}function pa({layoutId:t}){const e=i(_).id;return e&&void 0!==t?e+"-"+t:t}function ma(t,e){return da(t,e)}const fa=ma("div");function ya({children:t,features:n,strict:i=!1}){const[,s]=p(!ga(n)),o=a(void 0);if(!ga(n)){const{renderer:t,...e}=n;o.current=t,sa(e)}return u(()=>{ga(n)&&n().then(({renderer:t,...e})=>{sa(e),o.current=t,s(!0)})},[]),e(G.Provider,{value:{renderer:o.current,strict:i},children:t})}function ga(t){return"function"==typeof t}function va(t){return{point:{x:t.pageX,y:t.pageY}}}function xa(t,e,n,i){return Zo(t,e,(t=>e=>vs(e)&&t(e,va(e)))(n),i)}const wa=({current:t})=>t?t.ownerDocument.defaultView:null,Ta=(t,e)=>Math.abs(t-e);const Sa=new Set(["auto","scroll"]);class ba{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Pa(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Ea(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Ta(t.x,e.x),i=Ta(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:et.now()});const{onStart:s,onMove:o}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Pa(e,this.transformPagePoint),this.hasPendingMove=!0,ee.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ea("pointercancel"===t.type?this.lastMoveEventInfo:Pa(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!vs(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Pa(va(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=J;this.history=[{...l,timestamp:h}];const{onSessionStart:c}=e;c&&c(t,Ea(a,this.history));const u={passive:!0,capture:!0};this.removeListeners=A(xa(this.contextWindow,"pointermove",this.handlePointerMove,u),xa(this.contextWindow,"pointerup",this.handlePointerUp,u),xa(this.contextWindow,"pointercancel",this.handlePointerUp,u)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Sa.has(t.overflowX)||Sa.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),ee.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ne(this.updatePoint)}}function Pa(t,e){return e?{point:e(t.point)}:t}function Aa(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ea({point:t},e){return{point:t,delta:Aa(t,Va(e)),offset:Aa(t,Ma(e)),velocity:ka(e,.1)}}function Ma(t){return t[0]}function Va(t){return t[t.length-1]}function ka(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Va(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>V(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*V(e)&&(i=t[1]);const o=k(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 Da(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 Ca(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?ps[o]?null:(ps[o]=!0,()=>{ps[o]=!1}):ps.x||ps.y?null:(ps.x=ps.y=!0,()=>{ps.x=ps.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Oo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(rt(e)&&(e=wi(e,this.visualElement.current)||0),St.test(e))e=parseFloat(e);else if(Tt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=wo(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&ee.update(()=>s(t,e),!1,!0),Vi(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)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&&ee.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:wa(this.visualElement),element:this.visualElement.current})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&ee.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Oa(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&&tn&&(t=i?Wt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&la(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Da(t.x,n,s),y:Da(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=Ra){return!1===t?t=0:!0===t&&(t=Ra),{x:La(t,"left","right"),y:La(t,"top","bottom")}}(e),i!==this.constraints&&!la(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Oo(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}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!la(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=function(t,e,n){const i=us(t,n),{scroll:s}=e;return s&&(as(i.x,s.offset.x),as(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ca(t.x,e.x),y:Ca(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=Gi(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Oo(r=>{if(!Oa(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const h=i?200:1e6,c=i?40:1e7,u={type:"inertia",velocity:n?t[r]:0,bounceStiffness:h,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,u)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Vi(this.visualElement,t),n.start(vi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Oo(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();Oo(t=>{if(!Oa(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-Wt(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!la(e)||!n||!this.constraints)return;this.stopAnimation();const i=this.constraints,s={x:0,y:0};Oo(t=>{const e=this.getAxisMotionValue(t).get();s[t]=function(t,e){let n=.5;const i=wo(t),s=wo(e);return s>i?n=E(e.min,e.max-i,t.min):i>s&&(n=E(t.min,t.max-s,e.min)),v(0,1,n)}({min:e,max:e},i[t])});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Oo(e=>{const n=this.getAxisMotionValue(e);if(!Oa(e,t,null)||!n.get())return;const{min:i,max:o}=this.constraints[e];n.set(Wt(i,o,s[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ja.set(this.visualElement,this);const t=this.visualElement.current,e=xa(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&function(t){return ws.has(t.tagName)||!0===t.isContentEditable}(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();la(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=Os(t,Ia(n)),s=Os(e,Ia(n));return()=>{i(),s()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ee.read(i);const r=Zo(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Oo(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),e(),o(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Ra,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Ia(t){let e=!0;return()=>{e?e=!1:t()}}function Oa(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ua=t=>(e,n)=>{t&&ee.update(()=>t(e,n),!1,!0)};let Wa=!1;const Na=({layout:t,layoutDependency:e})=>({layout:t,layoutDependency:e,animationType:"string"==typeof t?t:"both"});class $a extends f{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),Wa&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,...Na(this.props),onExitComplete:()=>this.safeToRemove()})),nr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layout:e,layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r?(r.isPresent=o,t.layoutDependency===n&&t.layout===e||r.setOptions({...r.options,...Na(this.props)}),Wa=!0,s||t.layoutDependency!==n||void 0===n||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||ee.postRender(()=>{const t=r.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=e,n.root.didUpdate(),ds.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;Wa=!0,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 za(t){const[n,s]=function(t=!0){const e=i(Zr);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=e,r=m();u(()=>{if(t)return o(r)},[t]);const a=h(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,a]:[!0]}(),o=i(_);return e($a,{...t,layoutGroup:o,switchLayoutGroup:i(aa),isPresent:n,safeToRemove:s})}const Ya={pan:{Feature:class extends no{constructor(){super(...arguments),this.removePointerDownListener=P}onPointerDown(t){this.session=new ba(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wa(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ua(t),onStart:Ua(e),onMove:Ua(n),onEnd:(t,e)=>{delete this.session,i&&ee.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=xa(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 no{constructor(t){super(t),this.removeGroupControls=P,this.removeListeners=P,this.controls=new Fa(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||P}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:jr,MeasureLayout:za}},Xa={layout:{ProjectionNode:jr,MeasureLayout:za}};let Ka=0;const Ha={animation:{Feature:class extends no{constructor(t){super(t),t.animationState||(t.animationState=fo(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$s(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(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends no{constructor(){super(...arguments),this.id=Ka++}update(){const{presenceContext:t,prevPresenceContext:e,animationState:n}=this.node;if(!t||!n)return;const{isPresent:i,onExitComplete:s}=t,o=e?.isPresent;if(i===o)return;if(i&&!1===o){if(!0===this.exit){const{initial:t}=this.node.getProps();if(t&&!Array.isArray(t)){const{transition:e,transitionEnd:n,...i}=Si(this.node,t)||{};for(const t in i)this.node.getValue(t)?.jump(i[t])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive("exit",!1);return void(this.exit=void 0)}const r=this.exit=n.setActive("exit",!i);s&&!i&&r.then(()=>{this.exit===r&&(this.exit=!0,s(this.id))})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id,this.node))}unmount(){}}}};function _a(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&ee.postRender(()=>s(e,va(e)))}function Ga(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&ee.postRender(()=>s(e,va(e)))}const Za=new WeakMap,qa=new WeakMap,Ja=t=>{const e=Za.get(t.target);e&&e(t)},Qa=t=>{t.forEach(Ja)};function tl(t,e,n){const i=function({root:t,...e}){const n=t||document;qa.has(n)||qa.set(n,{});const i=qa.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Qa,{root:t,...e})),i[s]}(e);return Za.set(t,n),i.observe(t),()=>{Za.delete(t),i.unobserve(t)}}const el={some:0,all:1};const nl={renderer:(t,e)=>e.isSVG??_r(t)?new uo(e):new ao(e,{allowProjection:t!==o}),...Ha,...{inView:{Feature:class extends no{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:el[i]};this.stopObserver=tl(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(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends no{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=Es(t,(t,e)=>(Ga(this.node,e,"Start"),(t,{success:e})=>Ga(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends no{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=A(Zo(this.node.current,"focus",()=>this.onFocus()),Zo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends no{mount(){const{current:t}=this.node;t&&(this.unmount=ys(t,(t,e)=>(_a(this.node,e,"Start"),t=>_a(this.node,t,"End"))))}unmount(){}}}}},il={...nl,...Ya,...Xa};export{ya as LazyMotion,fa as MotionDiv,il as domMax}; //# sourceMappingURL=size-rollup-m-dom-max.js.map