import{t as e}from"./rolldown-runtime.D3cOTcPh.mjs";import{A as t,C as n,D as r,E as i,F as a,I as o,M as s,N as c,O as l,P as u,S as d,T as f,_ as p,b as m,c as h,d as g,f as _,h as v,j as y,k as b,l as x,o as S,s as ee,u as te,x as C}from"./react.DZp06Dwx.mjs";var w,T,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe=e((()=>{w=Object.create,T=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,re=Object.getOwnPropertyNames,ie=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty,oe=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),se=e=>{throw TypeError(e)},ce=(e,t,n)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,le=(e,t)=>T(e,`name`,{value:t,configurable:!0}),ue=(e,t)=>function(){return t||(0,e[re(e)[0]])((t={exports:{}}).exports,t),t.exports},de=(e,t)=>{for(var n in t)T(e,n,{get:t[n],enumerable:!0})},fe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of re(t))!ae.call(e,i)&&i!==n&&T(e,i,{get:()=>t[i],enumerable:!(r=ne(t,i))||r.enumerable});return e},pe=(e,t,n)=>(n=e==null?{}:w(ie(e)),fe(t||!e||!e.__esModule?T(n,`default`,{value:e,enumerable:!0}):n,e)),me=e=>[,,,w(e?.[oe(`metadata`)]??null)],he=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],ge=e=>e!==void 0&&typeof e!=`function`?se(`Function expected`):e,_e=(e,t,n,r,i)=>({kind:he[e],name:t,metadata:r,addInitializer:e=>n._?se(`Already initialized`):i.push(ge(e||null))}),ve=(e,t)=>ce(t,oe(`metadata`),e[3]),ye=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=he[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&ne(d<4?i:{get[n](){return we(this,a)},set[n](e){return Ee(this,a,e)}},n));d?p&&d<4&&le(a,(d>2?`set `:d>1?`get `:``)+n):le(i,n);for(var y=r.length-1;y>=0;y--)l=_e(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Ce(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?we:De)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>Ee(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?ge(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?se(`Object expected`):(ge(o=s.get)&&(v.get=o),ge(o=s.set)&&(v.set=o),ge(o=s.init)&&g.unshift(o));return d||ve(e,i),v&&T(i,n,v),p?d^4?a:v:i},xe=(e,t,n)=>ce(e,typeof t==`symbol`?t:t+``,n),Se=(e,t,n)=>t.has(e)||se(`Cannot `+n),Ce=(e,t)=>Object(t)===t?e.has(t):se(`Cannot use the "in" operator on this value`),we=(e,t,n)=>(Se(e,t,`read from private field`),n?n.call(e):t.get(e)),Te=(e,t,n)=>t.has(e)?se(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Ee=(e,t,n,r)=>(Se(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),De=(e,t,n)=>(Se(e,t,`access private method`),n)}));function ke(e,t){e.indexOf(t)===-1&&e.push(t)}function Ae(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function je([...e],t,n){let r=t<0?e.length+t:t;if(r>=0&&r(t===void 0&&(t=e()),t)}function Pe(e,t){return t?1e3/t*e:0}function Fe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ns(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>rs&&++sFe(t,0,1,e,n);return e=>e===0||e===1?e:ns(i(e),t,r)}function Le(e,t){return _s(e)?e[ts(0,e.length,t)]:e}function Re(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&L.value&&L.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}function ze(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ss.reduce((e,n)=>(e[n]=Re(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=N.useManualTiming?i.timestamp:performance.now();n=!1,N.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,Cs),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ss.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}function We(e){return isNaN(e)&&typeof e==`string`&&(e.match(Is)?.length||0)+(e.match(Ys)?.length||0)>0}function Ge(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(tc,e=>(G.test(e)?(r.color.push(a),i.push(Zs),n.push(G.parse(e))):e.startsWith($s)?(r.var.push(a),i.push(Qs),n.push(e)):(r.number.push(a),i.push(Xs),n.push(parseFloat(e))),++a,ec)).split(ec),indexes:r,types:i}}function Ke(e){return Ge(e).values}function qe(e){let{split:t,types:n}=Ge(e),r=t.length;return e=>{let i=``;for(let a=0;a1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Ye(s,r,e+1/3),a=Ye(s,r,e),o=Ye(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Ze(e,t){return n=>n>0?t:e}function Qe(e){let t=ac(e);if(Jo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===Js&&(n=Xe(n)),n}function $e(e,t){return sc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function et(e,t){return n=>q(e,t,n)}function tt(e){return typeof e==`number`?et:typeof e==`string`?As(e)?Ze:G.test(e)?oc:cc:Array.isArray(e)?nt:typeof e==`object`?G.test(e)?oc:rt:Ze}function nt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>tt(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}function it(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i=uc?1/0:t}function st(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(ot(r),uc);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:I(i)}}function ct(e,t,n){let r=Math.max(t-dc,0);return Pe(n-e(r),t-r)}function lt({duration:e=J.duration,bounce:t=J.bounce,velocity:n=J.velocity,mass:r=J.mass}){let i,a;Jo(e<=F(J.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=j(J.minDamping,J.maxDamping,o),e=j(J.minDuration,J.maxDuration,I(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=dt(t,o),c=Math.exp(-i);return fc-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=dt(t**2,o);return(-i(t)+fc>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-fc+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ut(i,a,s);if(e=F(e),isNaN(c))return{stiffness:J.stiffness,damping:J.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}function ut(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function pt(e){let t={velocity:J.velocity,stiffness:J.stiffness,damping:J.damping,mass:J.mass,isResolvedFromDuration:!1,...e};if(!ft(e,hc)&&ft(e,mc))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*j(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:J.mass,stiffness:i,damping:a}}else{let n=lt(e);t={...t,...n,mass:J.mass},t.isResolvedFromDuration=!0}return t}function mt(e=J.visualDuration,t=J.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=pt({...n,velocity:-I(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=I(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?J.restSpeed.granular:J.restSpeed.default,i||=v?J.restDelta.granular:J.restDelta.default;let y;if(h<1){let e=dt(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?F(m):ct(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(ot(b),uc),t=lc(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}function ht({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&ec,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,ee=e=>{p(f.value)&&(x=e,S=mt({keyframes:[f.value,m(f.value)],velocity:ct(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return ee(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),ee(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function gt(e,t,n){let r=[],i=n||N.mix||at,a=e.length-1;for(let n=0;nt[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=gt(t,r,i),c=s.length,l=n=>{if(o&&n1)for(;rl(j(e[0],e[a-1],t)):l}function vt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=$o(0,t,r);e.push(q(n,1,i))}}function yt(e){let t=[0];return vt(t,e.length-1),t}function bt(e,t){return e.map(e=>e*t)}function xt(e,t){return e.map(()=>t||gs).splice(0,e.length-1)}function St({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=_s(r)?r.map(xs):xs(r),a={done:!1,value:t[0]},o=_t(bt(n&&n.length===t.length?n:yt(t),e),t,{ease:Array.isArray(i)?i:xt(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}function Ct(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(_c),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}function wt(e){typeof e.type==`string`&&(e.type=vc[e.type])}function Tt(e){for(let t=1;t{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}function At(){if(Rc){let e=Array.from(Ic).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=kt(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&o.scrollTo(0,e.suspendedScrollY)})}Rc=!1,Lc=!1,Ic.forEach(e=>e.complete(zc)),Ic.clear()}function jt(){Ic.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rc=!0)})}function Mt(){zc=!0,jt(),At(),zc=!1}function Nt(e,t,n){Vc(t)?e.style.setProperty(t,n):e.style[t]=n}function Pt(e,t){let n=Ne(e);return()=>Uc[t]??n()}function Ft(e,t){if(e)return typeof e==`function`?Wc()?lc(e,t):`ease-out`:vs(e)?Gc(e):Array.isArray(e)?e.map(e=>Ft(e,t)||Kc.easeOut):Kc[e]}function It(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Ft(s,i);Array.isArray(d)&&(u.easing=d),L.value&&Es.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return L.value&&p.finished.finally(()=>{Es.waapi--}),p}function Lt(e){return typeof e==`function`&&`applyToOptions`in e}function Rt({type:e,...t}){return Lt(e)&&Wc()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}function zt(e){return e in Jc}function Bt(e){typeof e.ease==`string`&&zt(e.ease)&&(e.ease=Jc[e.ease])}function Vt(e){e.duration=0,e.type=`keyframes`}function Ht(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return Qc()&&n&&Zc.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}function Ut(e){let t=e[0];if(e.length===1)return!0;for(let n=0;nn&&(n=i)}return n}function Kt(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function qt(e){let t=il.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Jt(e,t,n=1){M(n<=al,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=qt(e);if(!r)return;let a=o.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Yo(e)?parseFloat(e):e}return As(i)?Jt(i,t,n+1):i}function Yt(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(dl),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}function Xt(e,t){return e?.[t]??e?.default??e}function Zt({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function Qt(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function $t(e,t,n,r){if(typeof t==`function`){let[i,a]=Qt(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Qt(r);t=t(n===void 0?e.custom:n,i,a)}return t}function en(e,t,n){let r=e.getProps();return $t(r,t,n===void 0?r.custom:n,e)}function E(e,t){return new _l(e,t)}function tn(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,E(n))}function nn(e){return vl(e)?e[e.length-1]||0:e}function rn(e,t){let{transitionEnd:n={},transition:r={},...i}=en(e,t)||{};for(let t in i={...i,...n},i)tn(e,t,nn(i[t]))}function an(e){return!!(X(e)&&e.add)}function on(e,t){let n=e.getValue(`willChange`);if(an(n))return n.add(t);if(!n&&N.WillChange){let n=new N.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function sn(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function cn(e){return e.props[bl]}function ln({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function un(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...c}=t;r&&(a=r);let l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(let t in c){let r=e.getValue(t,e.latestValues[t]??null),i=c[t];if(i===void 0||u&&ln(u,t))continue;let s={delay:n,...Xt(a||{},t)},d=r.get();if(d!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===d&&!s.velocity)continue;let f=!1;if(o.MotionHandoffAnimation){let n=cn(e);if(n){let e=o.MotionHandoffAnimation(n,t,R);e!==null&&(s.startTime=e,f=!0)}}on(e,t),r.start(fl(t,r,i,e.shouldReduceMotion&&pl.has(t)?{type:!1}:s,e,f));let p=r.animation;p&&l.push(p)}return s&&Promise.all(l).then(()=>{R.update(()=>{s&&rn(e,s)})}),l}function dn(e,t,n={}){let r=en(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(un(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return fn(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function fn(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(dn(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Kt(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function pn(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>dn(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=dn(e,t,n);else{let i=typeof t==`function`?en(e,t,n.custom):t;r=Promise.all(un(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function mn(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Is)||[];if(!r)return e;let i=n.replace(r,``),a=Dl.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}function hn(e,t){let n=jl(e);return n!==kl&&(n=K),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function gn(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Xo(e)}function _n(e,t,n){let r=0,i;for(;re!=null)}function yn(e){return Me(e)&&`offsetHeight`in e}function bn(){return Z.x||Z.y}function xn(e){return e===`x`||e===`y`?Z[e]?null:(Z[e]=!0,()=>{Z[e]=!1}):Z.x||Z.y?null:(Z.x=Z.y=!0,()=>{Z.x=Z.y=!1})}function Sn(e,t){let n=vn(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Cn(e){return!(e.pointerType===`touch`||bn())}function wn(e,t,n={}){let[r,i,a]=Sn(e,n),o=e=>{if(!Cn(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{Cn(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}function Tn(e){return Bl.has(e.tagName)||e.isContentEditable===!0}function En(e){return t=>{t.key===`Enter`&&e(t)}}function Dn(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}function On(e){return zl(e)&&!bn()}function kn(e,t,n={}){let[r,i,a]=Sn(e,n),s=e=>{let r=e.currentTarget;if(!On(e))return;Vl.add(r);let a=t(r,e),s=(e,t)=>{o.removeEventListener(`pointerup`,c),o.removeEventListener(`pointercancel`,l),Vl.has(r)&&Vl.delete(r),On(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===o||r===document||n.useGlobalTarget||Rl(r,e.target))},l=e=>{s(e,!1)};o.addEventListener(`pointerup`,c,i),o.addEventListener(`pointercancel`,l,i)};return r.forEach(e=>{(n.useGlobalTarget?o:e).addEventListener(`pointerdown`,s,i),yn(e)&&(e.addEventListener(`focus`,e=>Hl(e,i)),!Tn(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function An(e){return Me(e)&&`ownerSVGElement`in e}function jn(e){return An(e)&&e.tagName===`svg`}function Mn(e,t){if(e===`first`)return 0;{let n=t-1;return e===`last`?n:n/2}}function Nn(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(i,a)=>{let o=typeof n==`number`?n:Mn(n,a),s=e*Math.abs(o-i);if(r){let t=a*e;s=xs(r)(s/t)*t}return t+s}}function Pn(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=_t(i,a,o);return t?s(r):s}function Fn(e,t,n){let r=()=>t.set(n()),i=()=>R.preRender(r,!1,!0),a=e.map(e=>e.on(`change`,i));t.on(`destroy`,()=>{a.forEach(e=>e()),z(r)})}function In(e){let t=[];gl.current=t;let n=e();gl.current=void 0;let r=E(n);return Fn(t,r,e),r}function Ln(e,t,n){let r=e.get(),i=null,a=r,o,s=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,c=()=>{i&&=(i.stop(),null)},l=()=>{c(),i=new xc({keyframes:[zn(e.get()),zn(a)],velocity:e.getVelocity(),type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:o})};if(e.attach((t,n)=>{a=t,o=e=>n(Rn(e,s)),R.postRender(()=>{l(),e.events.animationStart?.notify(),i?.then(()=>{e.events.animationComplete?.notify()})})},c),X(t)){let n=t.on(`change`,t=>e.set(Rn(t,s))),r=e.on(`destroy`,n);return()=>{n(),r()}}return c}function Rn(e,t){return t?e+t:e}function zn(e){return typeof e==`number`?e:parseFloat(e)}function Bn(){if(Yl.current=!0,Xl)if(o.matchMedia){let e=o.matchMedia(`(prefers-reduced-motion)`),t=()=>Jl.current=e.matches;e.addEventListener(`change`,t),t()}else Jl.current=!1}function Vn(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Hn(e){return typeof e==`string`||Array.isArray(e)}function Un(e){return Vn(e.animate)||$l.some(t=>Hn(e[t]))}function Wn(e){return!!(Un(e)||e.variants)}function Gn(e,t,n){for(let r in t){let i=t[r],a=n[r];if(X(i))e.addValue(r,i);else if(X(a))e.addValue(r,E(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,E(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}function Kn(e){tu=e}function qn(){return tu}function Jn({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yn({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xn(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zn(e){return e===void 0||e===1}function Qn({scale:e,scaleX:t,scaleY:n}){return!Zn(e)||!Zn(t)||!Zn(n)}function $n(e){return Qn(e)||er(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function er(e){return tr(e.x)||tr(e.y)}function tr(e){return e&&e!==`0%`}function nr(e,t,n){return n+t*(e-n)}function rr(e,t,n,r,i){return i!==void 0&&(e=nr(e,i,r)),nr(e,n,r)+t}function ir(e,t=0,n=1,r,i){e.min=rr(e.min,t,n,r,i),e.max=rr(e.max,t,n,r,i)}function ar(e,{x:t,y:n}){ir(e.x,t.translate,t.scale,t.originPoint),ir(e.y,n.translate,n.scale,n.originPoint)}function or(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sau&&(t.x=1),t.yau&&(t.y=1)}function sr(e,t){e.min+=t,e.max+=t}function cr(e,t,n,r,i=.5){ir(e,t,n,q(e.min,e.max,i),r)}function lr(e,t){cr(e.x,t.x,t.scaleX,t.scale,t.originX),cr(e.y,t.y,t.scaleY,t.scale,t.originY)}function ur(e,t){return Jn(Xn(e.getBoundingClientRect(),t))}function dr(e,t,n){let r=ur(e,n),{scroll:i}=t;return i&&(sr(r.x,i.offset.x),sr(r.y,i.offset.y)),r}function fr(e,t,n){let r=``,i=!0;for(let a=0;aPromise.all(t.map(({animation:t,options:n})=>pn(e,t,n)))}function Or(e){let t=Dr(e),n=jr(),r=!0,i=t=>(n,r)=>{let i=en(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=Tr(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;td&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:ee={}}=p,te={...ee,...S},C=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in te){let t=S[e],n=ee[e];if(u.hasOwnProperty(e))continue;let r=!1;r=vl(t)&&vl(n)?!Er(t,n):t!==n,r?t==null?l.add(e):C(e):t!==void 0&&l.has(e)?C(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let w=_&&v;y&&(!w||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!w&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=en(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Kt(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=en(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=jr()}}}function kr(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Er(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jr(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}function Mr(e,t){e.min=t.min,e.max=t.max}function D(e,t){Mr(e.x,t.x),Mr(e.y,t.y)}function Nr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function O(e){return e.max-e.min}function Pr(e,t,n){return Math.abs(e-t)<=n}function Fr(e,t,n,r=.5){e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=O(n)/O(t),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=wu&&e.scale<=Tu||isNaN(e.scale))&&(e.scale=1),(e.translate>=Du&&e.translate<=Ou||isNaN(e.translate))&&(e.translate=0)}function Ir(e,t,n,r){Fr(e.x,t.x,n.x,r?r.originX:void 0),Fr(e.y,t.y,n.y,r?r.originY:void 0)}function Lr(e,t,n){e.min=n.min+t.min,e.max=e.min+O(t)}function Rr(e,t,n){Lr(e.x,t.x,n.x),Lr(e.y,t.y,n.y)}function zr(e,t,n){e.min=t.min-n.min,e.max=e.min+O(t)}function Br(e,t,n){zr(e.x,t.x,n.x),zr(e.y,t.y,n.y)}function Vr(e,t,n,r,i){return e-=t,e=nr(e,1/n,r),i!==void 0&&(e=nr(e,1/i,r)),e}function Hr(e,t=0,n=1,r=.5,i,a=e,o=e){if(U.test(t)&&(t=parseFloat(t),t=q(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=q(a.min,a.max,r);e===a&&(s-=t),e.min=Vr(e.min,t,n,s,i),e.max=Vr(e.max,t,n,s,i)}function Ur(e,t,[n,r,i],a,o){Hr(e,t[n],t[r],t[i],t.scale,a,o)}function Wr(e,t,n,r){Ur(e.x,t,ku,n?n.x:void 0,r?r.x:void 0),Ur(e.y,t,Au,n?n.y:void 0,r?r.y:void 0)}function Gr(e){return e.translate===0&&e.scale===1}function Kr(e){return Gr(e.x)&&Gr(e.y)}function qr(e,t){return e.min===t.min&&e.max===t.max}function Jr(e,t){return qr(e.x,t.x)&&qr(e.y,t.y)}function Yr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xr(e,t){return Yr(e.x,t.x)&&Yr(e.y,t.y)}function Zr(e){return O(e.x)/O(e.y)}function Qr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function k(e){return[e(`x`),e(`y`)]}function $r(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function ei(e,t,n,r,i,a){i?(e.opacity=q(0,n.opacity??1,Fu(r)),e.opacityExit=q(t.opacity??1,0,Iu(r))):a&&(e.opacity=q(t.opacity??1,n.opacity??1,r));for(let i=0;irt?1:n($o(e,t,r))}function ri(e,t,n){let r=X(e)?e:E(e);return r.start(fl(``,r,t,n)),r.animation}function ii(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ai(e,t){let n=V.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(z(r),e(a-t))};return R.setup(r,!0),()=>z(r)}function oi(e){return X(e)?e.get():e}function si(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ci(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=cn(t);if(o.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;o.MotionCancelOptimisedAnimation(n,`transform`,R,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ci(r)}function li({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Wu++,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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,L.value&&(Vu.nodes=Vu.calculatedTargetDeltas=Vu.calculatedProjections=0),this.nodes.forEach(fi),this.nodes.forEach(yi),this.nodes.forEach(bi),this.nodes.forEach(pi),L.addProjectionMetrics&&L.addProjectionMetrics(Vu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,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 e=0;ethis.root.updateBlockedByResize=!1;R.read(()=>{r=o.innerWidth}),e(t,()=>{let e=o.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ai(i,250),Bu.hasAnimatedSinceResize&&(Bu.hasAnimatedSinceResize=!1,this.nodes.forEach(vi)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Gu,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Xr(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Xt(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||vi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(xi),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(o.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ci(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e{let n=t/1e3;Ci(a.x,e.x,n),Ci(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Br(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ti(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Jr(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Q(),D(d,this.relativeTarget)),s&&(this.animationValues=i,ei(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(z(this.pendingAnimation),void 0),this.pendingAnimation=R.update(()=>{Bu.hasAnimatedSinceResize=!0,Es.layout++,this.motionValue||=E(0),this.currentAnimation=ri(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Es.layout--},onComplete:()=>{Es.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Uu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&ki(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Q();let t=O(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=O(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}D(t,n),lr(t,i),Ir(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new zu),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&si(`z`,e,r,this.animationValues);for(let t=0;te.currentAnimation?.stop()),this.root.nodes.forEach(hi),this.root.sharedNodes.clear()}}}function ui(e){e.updateLayout()}function di(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?k(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=O(r);r.min=n[e].min,r.max=r.min+i}):ki(i,t.layoutBox,n)&&k(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=O(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Kl();Ir(o,n,t.layoutBox);let s=Kl();a?Ir(s,e.applyTransform(r,!0),t.measuredBox):Ir(s,n,t.layoutBox);let c=!Kr(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Q();Br(o,t.layoutBox,i.layoutBox);let s=Q();Br(s,n,a.layoutBox),Xr(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function fi(e){L.value&&Vu.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function pi(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mi(e){e.clearSnapshot()}function hi(e){e.clearMeasurements()}function gi(e){e.isLayoutDirty=!1}function _i(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function vi(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yi(e){e.resolveTargetDelta()}function bi(e){e.calcProjection()}function xi(e){e.resetSkewAndRotation()}function Si(e){e.removeLeadSnapshot()}function Ci(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function wi(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function Ti(e,t,n,r){wi(e.x,t.x,n.x,r),wi(e.y,t.y,n.y,r)}function Ei(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}function Di(e){e.min=qu(e.min),e.max=qu(e.max)}function Oi(e){Di(e.x),Di(e.y)}function ki(e,t,n){return e===`position`||e===`preserve-aspect`&&!Pr(Zr(t),Zr(n),.2)}function Ai(e){return e!==e.root&&e.scroll?.wasRoot}function ji(){let e=new Set,t=new WeakMap,n=()=>e.forEach(Yu);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}function Mi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ni(...e){return t=>{let n=!1,r=e.map(e=>{let r=Mi(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t{let{width:e,height:r,top:i,left:u,right:d}=c.current;if(t||!s.current||!e||!r)return;let f=n===`left`?`left: ${u}`:`right: ${d}`;s.current.dataset.motionPopId=o;let p=document.createElement(`style`);l&&(p.nonce=l);let m=a??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(` [data-motion-pop-id="${o}"] { position: absolute !important; width: ${e}px !important; height: ${r}px !important; ${f}px !important; top: ${i}px !important; } `),()=>{m.contains(p)&&m.removeChild(p)}},[t]),h(Qu,{isPresent:t,childRef:s,sizeRef:c,children:i(e,{ref:u})})}function A(e){let t=f(null);return t.current===null&&(t.current=e()),t.current}function Ii(){return new Map}function Li(e=!0){let n=r(qo);if(n===null)return[!0,null];let{isPresent:i,onExitComplete:a,register:o}=n,s=p();t(()=>{if(e)return o(s)},[e]);let c=b(()=>e&&a&&a(s),[s,a,e]);return!i&&a?[!1,c]:[!0]}function Ri(e){let t=[];return n.forEach(e,e=>{_(e)&&t.push(e)}),t}function zi(){let e=f(!1);return Ko(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Bi(){let e=zi(),[t,n]=s(0),r=b(()=>{e.current&&n(t+1)},[t]);return[b(()=>R.postRender(r),[r]),t]}function Vi(){if(cd)return;let e={};for(let t in sd)e[t]={isEnabled:e=>sd[t].some(t=>!!e[t])};Kn(e),cd=!0}function Hi(){return Vi(),qn()}function Ui(e){let t=Hi();for(let n in e)t[n]={...t[n],...e[n]};Kn(t)}function Wi(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||ld.has(e)}function Gi(e){typeof e==`function`&&(ud=t=>t.startsWith(`on`)?!Wi(t):e(t))}function Ki(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(ud(i)||n===!0&&Wi(i)||!t&&!Wi(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function qi({children:e,isValidProp:t,...n}){t&&Gi(t),n={...r($),...n},n.isStatic=A(()=>n.isStatic);let i=l(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return h($.Provider,{value:i,children:e})}function Ji({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Yi(n,r,i,e),renderState:t()}}function Yi(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=oi(a[e]);let{initial:o,animate:s}=e,c=Un(e),l=Wn(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Vn(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n({initial:t,animate:n}),[Qi(t),Qi(n)])}function Qi(e){return Array.isArray(e)?e.join(` `):e}function $i(e,t,n){for(let r in t)!X(t[r])&&!_r(r,n)&&(e[r]=t[r])}function ea({transformTemplate:e},t){return l(()=>{let n=md();return pr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ta(e,t){let n=e.style||{},r={};return $i(r,n,e),Object.assign(r,ea(e,t)),r}function na(e,t){let n={},r=ta(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function ra(e,t,n,r){let i=l(()=>{let n=hd();return Sr(n,t,vu(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};$i(t,e.style,e),i.style={...t,...i.style}}return i}function ia(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(gd.indexOf(e)>-1||/[A-Z]/u.test(e))}function aa(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??ia(e)?ra:na)(t,r,i,e),c=Ki(t,typeof e==`string`,a),u=e===y?{}:{...c,...s,ref:n},{children:d}=t,f=l(()=>X(d)?d.get():d,[d]);return te(e,{...u,children:f})}function oa(e,t,n){let r=f(n);C(()=>{r.current=n});let i=f(null);return b(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}function sa(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function ca(e,n,i,a,s,c){let{visualElement:l}=r(dd),u=r(od),d=r(qo),p=r($).reducedMotion,m=f(null);a||=u.renderer,!m.current&&a&&(m.current=a(e,{visualState:n,parent:l,props:i,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:p,isSVG:c}));let h=m.current,g=r(pd);h&&!h.projection&&s&&(h.type===`html`||h.type===`svg`)&&la(m.current,i,s,g);let _=f(!1);C(()=>{h&&_.current&&h.update(i,d)});let v=i[bl],y=f(!!v&&!o.MotionHandoffIsComplete?.(v)&&o.MotionHasOptimisedAnimation?.(v));return Ko(()=>{h&&(_.current=!0,o.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),t(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{o.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function la(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:ua(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&sa(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function ua(e){if(e)return e.options.allowProjection===!1?ua(e.parent):e.projection}function da(e,{forwardMotionProps:t=!1,type:n}={},i,a){i&&Ui(i);let o=n?n===`svg`:ia(e),s=o?vd:_d;function c(n,c){let l,u={...r($),...n,layoutId:fa(n)},{isStatic:d}=u,f=Zi(n),p=s(n,d);if(!d&&Go){pa(u,i);let t=ma(u);l=t.MeasureLayout,f.visualElement=ca(e,p,u,a,t.ProjectionNode,o)}return x(dd.Provider,{value:f,children:[l&&f.visualElement?h(l,{visualElement:f.visualElement,...u}):null,aa(e,n,oa(p,f.visualElement,c),p,d,t,o)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=v(c);return l[yd]=e,l}function fa({layoutId:e}){let t=r(Wo).id;return t&&e!==void 0?t+`-`+e:e}function pa(e,t){r(od).strict}function ma(e){let{drag:t,layout:n}=Hi();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ha(e,t){if(typeof Proxy>`u`)return da;let n=new Map,r=(n,r)=>da(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,da(a,void 0,e,t)),n.get(a))})}function ga(e){return{point:{x:e.pageX,y:e.pageY}}}function _a(e,t,n,r){return ii(e,t,wd(n),r)}function va(e,t){let n=Td(e.x,t.x),r=Td(e.y,t.y);return Math.sqrt(n**2+r**2)}function ya(e,t){return t?{point:t(e.point)}:e}function ba(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xa({point:e},t){return{point:e,delta:ba(e,Ca(t)),offset:ba(e,Sa(t)),velocity:wa(t,.1)}}function Sa(e){return e[0]}function Ca(e){return e[e.length-1]}function wa(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Ca(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>F(t)));)n--;if(!r)return{x:0,y:0};let a=I(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ta(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?q(n,e,r.max):Math.min(e,n)),e}function Ea(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Da(e,{top:t,left:n,bottom:r,right:i}){return{x:Ea(e.x,n,i),y:Ea(e.y,t,r)}}function Oa(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=$o(t.min,t.max-r,e.min):r>i&&(n=$o(e.min,e.max-i,t.min)),j(0,1,n)}function ja(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}function Ma(e=Ad){return e===!1?e=0:e===!0&&(e=Ad),{x:Na(e,`left`,`right`),y:Na(e,`top`,`bottom`)}}function Na(e,t,n){return{min:Pa(e,t),max:Pa(e,n)}}function Pa(e,t){return typeof e==`number`?e:e[t]||0}function Fa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ia(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function La(e){let[t,n]=Li(),i=r(Wo);return h(Ld,{...e,layoutGroup:i,switchLayoutGroup:r(pd),isPresent:t,safeToRemove:n})}function Ra(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&R.postRender(()=>i(t,ga(t)))}function za(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&R.postRender(()=>i(t,ga(t)))}function Ba({root:e,...t}){let n=e||document;Ud.has(n)||Ud.set(n,{});let r=Ud.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Gd,{root:e,...t})),r[i]}function Va(e,t,n){let r=Ba(t);return Hd.set(e,n),r.observe(e),()=>{Hd.delete(e),r.unobserve(e)}}function Ha({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}function Ua(e){let n=A(()=>E(e)),{isStatic:i}=r($);if(i){let[,r]=s(e);t(()=>n.on(`change`,r),[])}return n}function Wa(e,t){let n=Ua(t()),r=()=>n.set(t());return r(),Ko(()=>{let t=()=>R.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),z(r)}}),n}function Ga(e){gl.current=[],e();let t=Wa(gl.current,e);return gl.current=void 0,t}function Ka(e,t,n,r){if(typeof e==`function`)return Ga(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Ja(e,t,n,r);let i=typeof t==`function`?t:Pn(t,n,r);return Array.isArray(e)?qa(e,i):qa([e],([e])=>i(e))}function qa(e,t){let n=A(()=>[]);return Wa(e,()=>{n.length=0;let r=e.length;for(let t=0;tObject.keys(n)),a=A(()=>({}));for(let o of i)a[o]=Ka(e,t,n[o],r);return a}function Ya(e,t={}){let{isStatic:n}=r($),i=()=>X(e)?e.get():e;if(n)return Ka(i);let a=Ua(i());return C(()=>Ln(a,e,t),[a,JSON.stringify(t)]),a}function Xa(){!Yl.current&&Bn();let[e]=s(Jl.current);return e}function Za(){let e=Xa(),{reducedMotion:t}=r($);return t===`never`?!1:t===`always`?!0:e}function Qa(e){e.values.forEach(e=>e.stop())}function $a(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&rn(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{$a(e,t)})})}function eo(e,t){if(Array.isArray(t))return $a(e,t);if(typeof t==`string`)return $a(e,[t]);rn(e,t)}function to(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){M(e,`controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.`);let i=[];return t.forEach(e=>{i.push(pn(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return M(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{eo(e,n)})},stop(){t.forEach(e=>{Qa(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function no(e){return typeof e==`object`&&!Array.isArray(e)}function ro(e,t,n,r){return e==null?[]:typeof e==`string`&&no(t)?vn(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function io(e,t,n){return e*(t+1)}function ao(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function oo(e,t,n){for(let r=0;rt&&i.at{let c=mo(e),{delay:l=0,times:u=yt(c),type:p=`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,ee=Lt(p)?p:i?.[p||`keyframes`];if(S<=2&&ee){let e=100;if(S===2&&nf(c)){let t=c[1]-c[0];e=Math.abs(t)}let t={...v};b!==void 0&&(t.duration=F(b));let n=st(t,e,ee);y=n.ease,b=n.duration}b??=a;let te=d+x;u.length===1&&u[0]===0&&(u[1]=1);let C=u.length-c.length;if(C>0&&vt(u,C),c.length===1&&c.unshift(null),m){M(m{for(let i in e){let a=e[i];a.sort(lo);let s=[],c=[],l=[];for(let e=0;e{r.push(...yo(n,e,t))}),r}function xo(e){return Array.isArray(e)&&e.some(Array.isArray)}function So(e){function t(t,n,r){let i=[],a;if(xo(t))i=bo(t,n,e);else{let{onComplete:o,...s}=r||{};typeof o==`function`&&(a=o),i=yo(t,n,s,e)}let o=new rl(i);return a&&o.finished.then(a),e&&(e.animations.push(o),o.finished.then(()=>{Ae(e.animations,o)})),o}return t}function Co(){let e=A(to);return Ko(e.mount,[]),e}function wo(e){return typeof e==`object`&&!!e&&yd in e}function To(e){if(wo(e))return e[yd]}function Eo(){return Do}function Do(e){Xu.current&&(Xu.current.isUpdating=!1,Xu.current.blockUpdate(),e&&e())}function Oo(){return b(()=>{let e=Xu.current;e&&e.resetTree()},[])}function ko(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=vn(e),o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n)if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:of[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}function Ao(){let[e,n]=Bi(),r=Eo(),i=f(-1);return t(()=>{R.postRender(()=>R.postRender(()=>{n===i.current&&(N.instantAnimations=!1)}))},[n]),t=>{r(()=>{N.instantAnimations=!0,e(),t(),i.current=n+1})}}function jo(e,t,n,r){if(!r)return e;let i=e.findIndex(e=>e.value===t);if(i===-1)return e;let a=r>0?1:-1,o=e[i+a];if(!o)return e;let s=e[i],c=o.layout,l=q(c.min,c.max,.5);return a===1&&s.layout.max+n>l||a===-1&&s.layout.min+nXd[n]),l=[],u=f(!1),d=f(null);M(!!a,`Reorder.Group must be provided a values prop`,`reorder-values`);let p={axis:r,groupRef:d,registerItem:(e,t)=>{let n=l.findIndex(t=>e===t.value);n===-1?l.push({value:e,layout:t[r]}):l[n].layout=t[r],l.sort(Po)},updateOrder:(e,t,n)=>{if(u.current)return;let r=jo(l,e,t,n);l!==r&&(u.current=!0,i(r.map(No).filter(e=>a.indexOf(e)!==-1)))}};t(()=>{u.current=!1});let m=e=>{d.current=e,typeof s==`function`?s(e):s&&(s.current=e)},g={overflowAnchor:`none`,...o.style};return h(c,{...o,style:g,ref:m,ignoreStrict:!0,children:h(lf.Provider,{value:p,children:e})})}function No(e){return e.value}function Po(e,t){return e.layout.min-t.layout.min}function Fo(){if(gf){let e=Lo(gf,`y`);e&&(hf.delete(e),mf.delete(e));let t=Lo(gf,`x`);t&&t!==e&&(hf.delete(t),mf.delete(t)),gf=null}}function Io(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY;return pf.has(r)}function Lo(e,t){let n=e?.parentElement;for(;n;){if(Io(n,t))return n;n=n.parentElement}return null}function Ro(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?r.left:r.top,a=n===`x`?r.right:r.bottom,o=e-i,s=a-e;if(o0))return;hf.set(i,s);let e=n===`x`?i.scrollWidth-i.clientWidth:i.scrollHeight-i.clientHeight;mf.set(i,e)}if(a>0){let e=mf.get(i);if((n===`x`?i.scrollLeft:i.scrollTop)>=e)return}n===`x`?i.scrollLeft+=a:i.scrollTop+=a}function Bo(e,t=0){return X(e)?e:Ua(t)}function Vo({children:e,style:t={},value:n,as:i=`li`,onDrag:a,onDragEnd:o,layout:s=!0,...c},l){let u=A(()=>Xd[i]),d=r(lf),f={x:Bo(t.x),y:Bo(t.y)},p=Ka([f.x,f.y],([e,t])=>e||t?1:`unset`);M(!!d,`Reorder.Item must be a child of Reorder.Group`,`reorder-item-child`);let{axis:m,registerItem:g,updateOrder:_,groupRef:v}=d;return h(u,{drag:m,...c,dragSnapToOrigin:!0,style:{...t,x:f.x,y:f.y,zIndex:p},layout:s,onDrag:(e,t)=>{let{velocity:r,point:i}=t;_(n,f[m].get(),r[m]),zo(v.current,i[m],m,r[m]),a&&a(e,t)},onDragEnd:(e,t)=>{Fo(),o&&o(e,t)},onLayoutMeasure:e=>{g(n,e)},ref:l,ignoreStrict:!0,children:e})}var Ho,Uo,Wo,Go,Ko,qo,j,Jo,M,N,Yo,Xo,P,Zo,Qo,$o,es,F,I,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,L,Ss,Cs,R,z,B,ws,Ts,V,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,H,U,W,Gs,Ks,qs,Js,G,Ys,Xs,Zs,Qs,$s,ec,tc,nc,K,q,rc,ic,ac,oc,sc,cc,lc,uc,dc,J,fc,pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Y,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,X,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Z,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Q,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,$,Qu,$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd,Bd,Vd,Hd,Ud,Wd,Gd,Kd,qd,Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf=e((()=>{u(),Oe(),d(),S(),Ho=ue({"../../../node_modules/@emotion/memoize/dist/memoize.browser.cjs.js"(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e){var t={};return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}e.default=t}}),Uo=ue({"../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.cjs.js"(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e){return e&&typeof e==`object`&&`default`in e?e.default:e}var n=t(Ho()),r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;e.default=n(function(e){return r.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})}}),Wo=c({}),Go=o!==void 0,Ko=Go?m:t,qo=c(null),j=(e,t,n)=>n>t?t:n{},M=()=>{},N={},Yo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Xo=e=>/^0[^.\s]+$/u.test(e),P=e=>e,Zo=(e,t)=>n=>t(e(n)),Qo=(...e)=>e.reduce(Zo),$o=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},es=class{constructor(){this.subscriptions=[]}add(e){return ke(this.subscriptions,e),()=>Ae(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;ie*1e3,I=e=>e/1e3,ts=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ns=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rs=1e-7,is=12,as=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,os=e=>t=>1-e(1-t),ss=Ie(.33,1.53,.69,.99),cs=os(ss),ls=as(cs),us=e=>(e*=2)<1?.5*cs(e):.5*(2-2**(-10*(e-1))),ds=e=>1-Math.sin(Math.acos(e)),fs=os(ds),ps=as(ds),ms=Ie(.42,0,1,1),hs=Ie(0,0,.58,1),gs=Ie(.42,0,.58,1),_s=e=>Array.isArray(e)&&typeof e[0]!=`number`,vs=e=>Array.isArray(e)&&typeof e[0]==`number`,ys={linear:P,easeIn:ms,easeInOut:gs,easeOut:hs,circIn:ds,circInOut:ps,circOut:fs,backIn:cs,backInOut:ls,backOut:ss,anticipate:us},bs=e=>typeof e==`string`,xs=e=>{if(vs(e)){M(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Ie(t,n,r,i)}else if(bs(e))return M(ys[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),ys[e];return e},L={value:null,addProjectionMetrics:null},Ss=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Cs=40,{schedule:R,cancel:z,state:B,steps:ws}=ze(typeof requestAnimationFrame<`u`?requestAnimationFrame:P,!0),V={now:()=>(Ts===void 0&&V.set(B.isProcessing||N.useManualTiming?B.timestamp:performance.now()),Ts),set:e=>{Ts=e,queueMicrotask(Be)}},Es={layout:0,mainThread:0,waapi:0},Ds=e=>t=>typeof t==`string`&&t.startsWith(e),Os=Ds(`--`),ks=Ds(`var(--`),As=e=>ks(e)?js.test(e.split(`/*`)[0].trim()):!1,js=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ms={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ns={...Ms,transform:e=>j(0,1,e)},Ps={...Ms,default:1},Fs=e=>Math.round(e*1e5)/1e5,Is=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Ls=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rs=(e,t)=>n=>!!(typeof n==`string`&&Ls.test(n)&&n.startsWith(e)||t&&!He(n)&&Object.prototype.hasOwnProperty.call(n,t)),zs=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Is);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Bs=e=>j(0,255,e),Vs={...Ms,transform:e=>Math.round(Bs(e))},Hs={test:Rs(`rgb`,`red`),parse:zs(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Vs.transform(e)+`, `+Vs.transform(t)+`, `+Vs.transform(n)+`, `+Fs(Ns.transform(r))+`)`},Us={test:Rs(`#`),parse:Ue,transform:Hs.transform},Ws=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),H=Ws(`deg`),U=Ws(`%`),W=Ws(`px`),Gs=Ws(`vh`),Ks=Ws(`vw`),qs=(()=>({...U,parse:e=>U.parse(e)/100,transform:e=>U.transform(e*100)}))(),Js={test:Rs(`hsl`,`hue`),parse:zs(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+U.transform(Fs(t))+`, `+U.transform(Fs(n))+`, `+Fs(Ns.transform(r))+`)`},G={test:e=>Hs.test(e)||Us.test(e)||Js.test(e),parse:e=>Hs.test(e)?Hs.parse(e):Js.test(e)?Js.parse(e):Us.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Hs.transform(e):Js.transform(e),getAnimatableNone:e=>{let t=G.parse(e);return t.alpha=0,G.transform(t)}},Ys=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Xs=`number`,Zs=`color`,Qs=`var`,$s=`var(`,ec="${}",tc=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu,nc=e=>typeof e==`number`?0:G.test(e)?G.getAnimatableNone(e):e,K={test:We,parse:Ke,createTransformer:qe,getAnimatableNone:Je},q=(e,t,n)=>e+(t-e)*n,rc=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ic=[Us,Hs,Js],ac=e=>ic.find(t=>t.test(e)),oc=(e,t)=>{let n=Qe(e),r=Qe(t);if(!n||!r)return Ze(e,t);let i={...n};return e=>(i.red=rc(n.red,r.red,e),i.green=rc(n.green,r.green,e),i.blue=rc(n.blue,r.blue,e),i.alpha=q(n.alpha,r.alpha,e),Hs.transform(i))},sc=new Set([`none`,`hidden`]),cc=(e,t)=>{let n=K.createTransformer(t),r=Ge(e),i=Ge(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?sc.has(e)&&!i.values.length||sc.has(t)&&!r.values.length?$e(e,t):Qo(nt(it(r,i),i.values),n):(Jo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Ze(e,t))},lc=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t{let t=st(e,100,mt);return e.ease=t.ease,e.duration=F(t.duration),e.type=`keyframes`,e},gc=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>R.update(t,e),stop:()=>z(t),now:()=>B.isProcessing?B.timestamp:V.now()}},_c=e=>e!==null,vc={decay:ht,inertia:ht,tween:St,keyframes:St,spring:mt},yc=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},bc=e=>e/100,xc=class extends yc{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==V.now()&&this.tick(V.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Es.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;wt(e);let{type:t=St,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||St;s!==St&&typeof o[0]!=`number`&&(this.mixKeyframes=Qo(bc,at(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=ot(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=j(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==ht&&(b.value=Ct(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return I(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+I(e)}get time(){return I(this.currentTime)}set time(e){e=F(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(V.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=I(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=gc,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(V.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&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,Es.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Sc=e=>e*180/Math.PI,Cc=e=>Tc(Sc(Math.atan2(e[1],e[0]))),wc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Cc,rotateZ:Cc,skewX:e=>Sc(Math.atan(e[1])),skewY:e=>Sc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Tc=e=>(e%=360,e<0&&(e+=360),e),Ec=Cc,Dc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Oc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),kc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Dc,scaleY:Oc,scale:e=>(Dc(e)+Oc(e))/2,rotateX:e=>Tc(Sc(Math.atan2(e[6],e[5]))),rotateY:e=>Tc(Sc(Math.atan2(-e[2],e[0]))),rotateZ:Ec,rotate:Ec,skewX:e=>Sc(Math.atan(e[4])),skewY:e=>Sc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2},Ac=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Dt(n,t)},jc=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Mc=(()=>new Set(jc))(),Nc=e=>e===Ms||e===W,Pc=new Set([`x`,`y`,`z`]),Fc=jc.filter(e=>!Pc.has(e)),Y={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Dt(t,`x`),y:(e,{transform:t})=>Dt(t,`y`)},Y.translateX=Y.x,Y.translateY=Y.y,Ic=new Set,Lc=!1,Rc=!1,zc=!1,Bc=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Ic.add(this),Lc||(Lc=!0,R.read(jt),R.resolveKeyframes(At))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Tt(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ic.delete(this)}cancel(){this.state===`scheduled`&&(Ic.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Vc=e=>e.startsWith(`--`),Hc=Ne(()=>o.ScrollTimeline!==void 0),Uc={},Wc=Pt(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Gc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kc={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Gc([0,.65,.55,1]),circOut:Gc([.55,0,1,.45]),backIn:Gc([.31,.01,.66,-.59]),backOut:Gc([.33,1.53,.69,.99])},qc=class extends yc{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,M(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=Rt(e);this.animation=It(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Ct(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):Nt(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return I(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+I(e)}get time(){return I(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=F(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Hc()?(this.animation.timeline=e,P):t(this)}},Jc={anticipate:us,backInOut:ls,circInOut:ps},Yc=10,Xc=class extends qc{constructor(e){Bt(e),wt(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new xc({...a,autoplay:!1}),s=Math.max(Yc,V.now()-this.startTime),c=j(0,Yc,s-Yc);t.setWithVelocity(o.sample(Math.max(0,s-c)).value,o.sample(s).value,c),o.stop()}},Zc=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Qc=Ne(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),$c=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(K.test(e)||e===`0`)&&!e.startsWith(`url(`)),el=40,tl=class extends yc{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=V.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Bc)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=V.now(),Wt(e,i,a,o)||((N.instantAnimations||!s)&&l?.(Ct(e,n,t)),e[0]=e[e.length-1],Vt(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>el?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&Ht(u),f=u.motionValue?.owner?.current,p=d?new Xc({...u,element:f}):new xc(u);p.finished.then(()=>{this.notifyFinished()}).catch(P),this.pendingTimeline&&=(this.stopTimeline=p.attachTimeline(this.pendingTimeline),void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Mt()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},nl=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;nt.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return Gt(this.animations,`duration`)}get iterationDuration(){return Gt(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},rl=class extends nl{then(e,t){return this.finished.finally(e).then(()=>{})}},il=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,al=4,ol={type:`spring`,stiffness:500,damping:25,restSpeed:10},sl=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),cl={type:`keyframes`,duration:.8},ll={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ul=(e,{keyframes:t})=>t.length>2?cl:Mc.has(e)?e.startsWith(`scale`)?sl(t[1]):ol:ll,dl=e=>e!==null,fl=(e,t,n,r={},i,a)=>o=>{let s=Xt(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=F(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Zt(s)||Object.assign(u,ul(e,u)),u.duration&&=F(u.duration),u.repeatDelay&&=F(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Vt(u),u.delay===0&&(d=!0)),(N.instantAnimations||N.skipAnimations)&&(d=!0,Vt(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Yt(u.keyframes,s);if(e!==void 0){R.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new xc(u):new tl(u)},pl=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...jc]),ml=30,hl=e=>!isNaN(parseFloat(e)),gl={current:void 0},_l=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=V.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=V.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=hl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new es);let n=this.events[e].add(t);return e===`change`?()=>{n(),R.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return gl.current&&gl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=V.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ml)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ml);return Pe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}},vl=e=>Array.isArray(e),X=e=>!!(e&&e.getVelocity),yl=`framerAppearId`,bl=`data-`+sn(yl),xl=e=>t=>t.test(e),Sl=[Ms,W,U,H,Ks,Gs,{test:e=>e===`auto`,parse:e=>e}],Cl=e=>Sl.find(xl(e)),wl={rotate:H,rotateX:H,rotateY:H,rotateZ:H,scale:Ps,scaleX:Ps,scaleY:Ps,scaleZ:Ps,skew:H,skewX:H,skewY:H,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Ns,originX:qs,originY:qs,originZ:W},Tl={...Ms,transform:Math.round},El={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,backgroundPositionX:W,backgroundPositionY:W,...wl,zIndex:Tl,fillOpacity:Ns,strokeOpacity:Ns,numOctaves:Tl},Dl=new Set([`brightness`,`contrast`,`saturate`,`opacity`]),Ol=/\b([a-z-]*)\(.*?\)/gu,kl={...K,getAnimatableNone:e=>{let t=e.match(Ol);return t?t.map(mn).join(` `):e}},Al={...El,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:kl,WebkitFilter:kl},jl=e=>Al[e],Ml=new Set([`auto`,`none`,`0`]),Nl=class extends Bc{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},Pl=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Fl=(e,t)=>t&&typeof e==`number`?t.transform(e):e,W.transform,{schedule:Il,cancel:Ll}=ze(queueMicrotask,!1),Z={x:!1,y:!1},Rl=(e,t)=>t?e===t?!0:Rl(e,t.parentElement):!1,zl=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Bl=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]),Vl=new WeakSet,Hl=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=En(()=>{if(Vl.has(n))return;Dn(n,`down`);let e=En(()=>{Dn(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Dn(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)},Ul=[...Sl,G,K],Wl=e=>Ul.find(xl(e)),Gl=()=>({translate:0,scale:1,origin:0,originPoint:0}),Kl=()=>({x:Gl(),y:Gl()}),ql=()=>({min:0,max:0}),Q=()=>({x:ql(),y:ql()}),Jl={current:null},Yl={current:!1},Xl=o!==void 0,Zl=new WeakMap,Ql=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],$l=[`initial`,...Ql],eu=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],tu={},nu=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Bc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=V.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Yl.current||Bn(),this.shouldReduceMotion=Jl.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),z(this.notifyUpdate),z(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=Mc.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&R.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;o!==void 0&&o.MotionCheckAppearSync&&(i=o.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in tu){let t=tu[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Q()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=E(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Yo(n)||Xo(n))?n=parseFloat(n):!Wl(n)&&K.test(t)&&(n=hn(e,t)),this.setBaseTarget(e,X(n)?n.get():n)),X(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=$t(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!X(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new es),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Il.render(this.render)}},ru=class extends nu{constructor(){super(...arguments),this.KeyframeResolver=Nl}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;X(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},iu=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},au=.999999999999,ou=1.0000000000001,su={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},cu=jc.length,lu={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(W.test(e))e=parseFloat(e);else return e;return`${hr(e,t.target.x)}% ${hr(e,t.target.y)}%`}},uu={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=K.parse(e);if(i.length>5)return r;let a=K.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=q(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},du={borderRadius:{...lu,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:lu,borderTopRightRadius:lu,borderBottomLeftRadius:lu,borderBottomRightRadius:lu,boxShadow:uu},fu=class extends ru{constructor(){super(...arguments),this.type=`html`,this.renderInstance=mr}readValueFromInstance(e,t){if(Mc.has(t))return this.projection?.isProjecting?Et(t):Ac(e,t);{let n=yr(e),r=(Os(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ur(e,t)}build(e,t,n){pr(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return vr(e,t,n)}},pu=class extends nu{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(br(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Q()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},mu={offset:`stroke-dashoffset`,array:`stroke-dasharray`},hu={offset:`strokeDashoffset`,array:`strokeDasharray`},gu=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`],_u=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`]),vu=e=>typeof e==`string`&&e.toLowerCase()===`svg`,yu=class extends ru{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Mc.has(t)){let e=jl(t);return e&&e.default||0}return t=_u.has(t)?t:sn(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return wr(e,t,n)}build(e,t,n){Sr(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Cr(e,t,n,r)}mount(e){this.isSVGTag=vu(e.tagName),super.mount(e)}},bu=$l.length,xu=[...Ql].reverse(),Su=Ql.length,Cu=1e-4,wu=1-Cu,Tu=1+Cu,Eu=.01,Du=0-Eu,Ou=0+Eu,ku=[`x`,`scaleX`,`originX`],Au=[`y`,`scaleY`,`originY`],ju=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Mu=ju.length,Nu=e=>typeof e==`string`?parseFloat(e):e,Pu=e=>typeof e==`number`||W.test(e),Fu=ni(0,.5,fs),Iu=ni(.5,.95,P),Lu=(e,t)=>e.depth-t.depth,Ru=class{constructor(){this.children=[],this.isDirty=!1}add(e){ke(this.children,e),this.isDirty=!0}remove(e){Ae(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Lu),this.isDirty=!1,this.children.forEach(e)}},zu=class{constructor(){this.members=[]}add(e){ke(this.members,e),e.scheduleRender()}remove(e){if(Ae(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}},Bu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Vu={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Hu=[``,`X`,`Y`,`Z`],Uu=1e3,Wu=0,Gu={duration:.45,ease:[.4,0,.1,1]},Ku=e=>a!==void 0&&a.userAgent&&a.userAgent.toLowerCase().includes(e),qu=Ku(`applewebkit/`)&&!Ku(`chrome/`)?Math.round:P,Ju=li({attachResizeListener:(e,t)=>ii(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Yu=e=>!e.isLayoutDirty&&e.willUpdate(!1),Xu={current:void 0},Zu=li({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xu.current){let e=new Ju({});e.mount(o),e.setOptions({layoutScroll:!0}),Xu.current=e}return Xu.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>o.getComputedStyle(e).position===`fixed`}),Ss.reduce((e,t)=>(e[t]=e=>z(e),e),{}),$=c({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),Qu=class extends g{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=yn(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}},$u=({children:e,initial:n,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s,anchorX:c,root:u})=>{let d=A(Ii),f=p(),m=!0,g=l(()=>(m=!1,{id:f,initial:n,isPresent:r,custom:a,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;i&&i()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[r,d,i]);return o&&m&&(g={...g}),l(()=>{d.forEach((e,t)=>d.set(t,!1))},[r]),t(()=>{!r&&!d.size&&i&&i()},[r]),s===`popLayout`&&(e=h(Fi,{isPresent:r,anchorX:c,root:u,children:e})),h(qo.Provider,{value:g,children:e})},ed=e=>e.key||``,td=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o=`sync`,propagate:c=!1,anchorX:u=`left`,root:d})=>{let[p,m]=Li(c),g=l(()=>Ri(e),[e]),_=c&&!p?[]:g.map(ed),v=f(!0),y=f(g),b=A(()=>new Map),x=f(new Set),[S,te]=s(g),[C,w]=s(g);Ko(()=>{v.current=!1,y.current=g;for(let e=0;e{let r=ed(e),s=c&&!p?!1:g===C||_.includes(r);return h($u,{isPresent:s,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:o,root:d,onExitComplete:s?void 0:()=>{if(x.current.has(r))return;if(x.current.add(r),b.has(r))b.set(r,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(ne?.(),w(y.current),c&&m?.(),i&&i())},anchorX:u,children:e},r)})})},nd=c(null),rd=e=>e===!0,id=e=>rd(e===!0)||e===`id`,ad=({children:e,id:t,inherit:n=!0})=>{let i=r(Wo),a=r(nd),[o,s]=Bi(),c=f(null),u=i.id||a;c.current===null&&(id(n)&&u&&(t=t?u+`-`+t:u),c.current={id:t,group:rd(n)&&i.group||ji()});let d=l(()=>({...c.current,forceRender:o}),[s]);return h(Wo.Provider,{value:d,children:e})},od=c({strict:!1}),sd={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`]},cd=!1,ld=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`)),ud=e=>!Wi(e);try{Gi(Uo().default)}catch{}dd=c({}),fd=e=>(t,n)=>{let i=r(dd),a=r(qo),o=()=>Ji(e,t,i,a);return n?o():A(o)},pd=c({}),md=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),hd=()=>({...md(),attrs:{}}),gd=[`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`],_d=fd({scrapeMotionValuesFromProps:vr,createRenderState:md}),vd=fd({scrapeMotionValuesFromProps:wr,createRenderState:hd}),yd=Symbol.for(`motionComponentSymbol`),bd=class extends iu{constructor(e){super(e),e.animationState||=Or(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Vn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},xd=0,Sd=class extends iu{constructor(){super(...arguments),this.id=xd++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},Cd={animation:{Feature:bd},exit:{Feature:Sd}},wd=e=>t=>zl(t)&&e(t,ga(t)),Td=(e,t)=>Math.abs(e-t),Ed=(e,t)=>t.isSVG??ia(e)?new yu(t):new fu(t,{allowProjection:e!==y}),Dd=({current:e})=>e?e.ownerDocument.defaultView:null,Od=new Set([`auto`,`scroll`]),kd=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=o,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=o,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(o)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=xa(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=va(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=B;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=ya(t,this.transformPagePoint),R.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=xa(e.type===`pointercancel`?this.lastMoveEventInfo:ya(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!zl(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||o;let c=ya(ga(e),this.transformPagePoint),{point:l}=c,{timestamp:u}=B;this.history=[{...l,timestamp:u}];let{onSessionStart:d}=t;d&&d(e,xa(c,this.history)),this.removeListeners=Qo(_a(this.contextWindow,`pointermove`,this.handlePointerMove),_a(this.contextWindow,`pointerup`,this.handlePointerUp),_a(this.contextWindow,`pointercancel`,this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Od.has(e.overflowX)||Od.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(o,{x:o.scrollX,y:o.scrollY}),o.addEventListener(`scroll`,this.onElementScroll,{capture:!0,passive:!0}),o.addEventListener(`scroll`,this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{o.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),o.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===o,r=n?{x:o.scrollX,y:o.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),R.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),z(this.updatePoint)}},Ad=.35,jd=new WeakMap,Md=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t?(this.stopAnimation(),this.snapToCursor(ga(e).point)):this.pauseAnimation()},a=(e,t)=>{this.stopAnimation();let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=xn(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),k(e=>{let t=this.getAxisMotionValue(e).get()||0;if(U.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=O(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&R.postRender(()=>i(e,t)),on(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Ia(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>k(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new kd(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Dd(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&R.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Fa(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Ta(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&sa(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Da(n.layoutBox,e):this.constraints=!1,this.elastic=Ma(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&k(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ja(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!sa(e))return!1;let n=e.current;M(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=dr(n,r.root,this.visualElement.getTransformPagePoint()),a=ka(r.layout.layoutBox,i);if(t){let e=t(Yn(a));this.hasMutatedConstraints=!!e,e&&(a=Jn(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=k(o=>{if(!Fa(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return on(this.visualElement,e),n.start(fl(e,n,0,t,this.visualElement,!1))}stopAnimation(){k(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){k(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){k(t=>{let{drag:n}=this.getProps();if(!Fa(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-q(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!sa(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};k(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Aa({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),k(t=>{if(!Fa(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(q(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;jd.set(this.visualElement,this);let e=this.visualElement.current,t=_a(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Tn(i);n&&r&&!a&&this.start(t)}),n=()=>{let{dragConstraints:e}=this.getProps();sa(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),R.read(n);let a=ii(o,`resize`,()=>this.scalePositionWithinConstraints()),s=r.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(k(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),t(),i(),s&&s()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Ad,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}},Nd=class extends iu{constructor(e){super(e),this.removeGroupControls=P,this.removeListeners=P,this.controls=new Md(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||P}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}},Pd=e=>(t,n)=>{e&&R.postRender(()=>e(t,n))},Fd=class extends iu{constructor(){super(...arguments),this.removePointerDownListener=P}onPointerDown(e){this.session=new kd(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Dd(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Pd(e),onStart:Pd(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&R.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=_a(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Id=!1,Ld=class extends g{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Id&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Bu.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,Id=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||R.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Il.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Id=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}},Rd={pan:{Feature:Fd},drag:{Feature:Nd,ProjectionNode:Zu,MeasureLayout:La}},zd=class extends iu{mount(){let{current:e}=this.node;e&&(this.unmount=wn(e,(e,t)=>(Ra(this.node,t,`Start`),e=>Ra(this.node,e,`End`))))}unmount(){}},Bd=class extends iu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=Qo(ii(this.node.current,`focus`,()=>this.onFocus()),ii(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},Vd=class extends iu{mount(){let{current:e}=this.node;e&&(this.unmount=kn(e,(e,t)=>(za(this.node,t,`Start`),(e,{success:t})=>za(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},Hd=new WeakMap,Ud=new WeakMap,Wd=e=>{let t=Hd.get(e.target);t&&t(e)},Gd=e=>{e.forEach(Wd)},Kd={some:0,all:1},qd=class extends iu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Kd[r]};return Va(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ha(e,t))&&this.startObserver()}unmount(){}},Jd={inView:{Feature:qd},tap:{Feature:Vd},focus:{Feature:Bd},hover:{Feature:zd}},Yd={layout:{ProjectionNode:Zu,MeasureLayout:La}},Xd=ha({...Cd,...Jd,...Rd,...Yd},Ed),Zd={renderer:Ed,...Cd,...Jd},{...Zd,...Rd,...Yd},{...Cd},Qd=class extends _l{constructor(){super(...arguments),this.isEnabled=!1}add(e){(Mc.has(e)||Pl.has(e))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?`transform`:`auto`)}},$d=`easeInOut`,ef=20,tf=e=>typeof e==`number`,nf=e=>e.every(tf),rf=So(),af=Co,of={some:0,all:1},sf=()=>({}),fd({scrapeMotionValuesFromProps:sf,createRenderState:sf}),cf={},de(cf,{Group:()=>uf,Item:()=>_f}),lf=c(null),uf=v(Mo),df=50,ff=25,pf=new Set([`auto`,`scroll`]),mf=new WeakMap,hf=new WeakMap,gf=null,_f=v(Vo)})),yf=e((()=>{vf()}));export{Ao as A,me as B,oi as C,To as D,In as E,Ka as F,xe as G,we as H,Zl as I,Oe as J,ye as K,ue as L,Za as M,Oo as N,af as O,Ya as P,be as R,E as S,Nn as T,De as U,Te as V,Ee as W,_t as _,$ as a,Wi as b,qo as c,gr as d,rf as f,vf as g,ko as h,qi as i,Ua as j,Eo as k,pd as l,R as m,td as n,N as o,z as p,pe as q,ad as r,_l as s,yf as t,Qd as u,wo as v,mt as w,Xd as x,X as y,ve as z}; //# sourceMappingURL=motion.DVUmXK3P.mjs.map