import{r as e,t}from"./rolldown-runtime.BB3S47xo.mjs";import{A as n,B as r,D as i,E as a,F as o,H as s,I as c,L as l,M as u,N as d,P as f,R as p,T as m,V as h,_ as g,b as _,c as v,d as y,f as b,j as x,l as S,o as C,s as ee,u as te,w}from"./react.UZZKdtaS.mjs";var ne,T,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,ke,Ae=t((()=>{ne=Object.create,T=Object.defineProperty,re=Object.getOwnPropertyDescriptor,ie=Object.getOwnPropertyNames,ae=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty,se=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),ce=e=>{throw TypeError(e)},le=(e,t,n)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ue=(e,t)=>T(e,`name`,{value:t,configurable:!0}),de=(t=>e===void 0?typeof Proxy<`u`?new Proxy(t,{get:(t,n)=>(e===void 0?t:e)[n]}):t:e)(function(t){if(e!==void 0)return e.apply(this,arguments);throw Error(`Dynamic require of "`+t+`" is not supported`)}),fe=(e,t)=>function(){return t||(0,e[ie(e)[0]])((t={exports:{}}).exports,t),t.exports},pe=(e,t)=>{for(var n in t)T(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of ie(t))!oe.call(e,i)&&i!==n&&T(e,i,{get:()=>t[i],enumerable:!(r=re(t,i))||r.enumerable});return e},he=(e,t,n)=>(n=e==null?{}:ne(ae(e)),me(t||!e||!e.__esModule?T(n,`default`,{value:e,enumerable:!0}):n,e)),ge=e=>[,,,ne(e?.[se(`metadata`)]??null)],_e=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],ve=e=>e!==void 0&&typeof e!=`function`?ce(`Function expected`):e,ye=(e,t,n,r,i)=>({kind:_e[e],name:t,metadata:r,addInitializer:e=>n._?ce(`Already initialized`):i.push(ve(e||null))}),be=(e,t)=>le(t,se(`metadata`),e[3]),xe=(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=_e[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&re(d<4?i:{get[n](){return Ee(this,a)},set[n](e){return Oe(this,a,e)}},n));d?p&&d<4&&ue(a,(d>2?`set `:d>1?`get `:``)+n):ue(i,n);for(var y=r.length-1;y>=0;y--)l=ye(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Te(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?Ee:ke)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>Oe(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?ve(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?ce(`Object expected`):(ve(o=s.get)&&(v.get=o),ve(o=s.set)&&(v.set=o),ve(o=s.init)&&g.unshift(o));return d||be(e,i),v&&T(i,n,v),p?d^4?a:v:i},Ce=(e,t,n)=>le(e,typeof t==`symbol`?t:t+``,n),we=(e,t,n)=>t.has(e)||ce(`Cannot `+n),Te=(e,t)=>Object(t)===t?e.has(t):ce(`Cannot use the "in" operator on this value`),Ee=(e,t,n)=>(we(e,t,`read from private field`),n?n.call(e):t.get(e)),De=(e,t,n)=>t.has(e)?ce(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Oe=(e,t,n,r)=>(we(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ke=(e,t,n)=>(we(e,t,`access private method`),n)}));function je(e,t){e.indexOf(t)===-1&&e.push(t)}function Me(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Ne([...e],t,n){let r=t<0?e.length+t:t;if(r>=0&&r(t===void 0&&(t=e()),t)}function Ie(e,t){return t?1e3/t*e:0}function Le(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Gs(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Ks&&++sLe(t,0,1,e,n);return e=>e===0||e===1?e:Gs(i(e),t,r)}function ze(e,t){return oc(e)?e[Ws(0,e.length,t)]:e}function Be(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.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&R.value&&R.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}function Ve(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=dc.reduce((e,n)=>(e[n]=Be(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=P.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,fc),1)),i.timestamp=o,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:dc.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 Ke(e){return isNaN(e)&&typeof e==`string`&&(e.match(Tc)?.length||0)+(e.match(Rc)?.length||0)>0}function qe(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Wc,e=>(K.test(e)?(r.color.push(a),i.push(Bc),n.push(K.parse(e))):e.startsWith(Hc)?(r.var.push(a),i.push(Vc),n.push(e)):(r.number.push(a),i.push(zc),n.push(parseFloat(e))),++a,Uc)).split(Uc),indexes:r,types:i}}function Je(e){return qe(e).values}function Ye({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;aKc(e,t.split[n])))}function Qe(e,t,n){return n<0&&(n+=1),n>1&&--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 $e({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=Qe(s,r,e+1/3),a=Qe(s,r,e),o=Qe(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function et(e,t){return n=>n>0?t:e}function tt(e){let t=Yc(e);if(Ls(!!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===Lc&&(n=$e(n)),n}function nt(e,t){return Zc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rt(e,t){return n=>J(e,t,n)}function it(e){return typeof e==`number`?rt:typeof e==`string`?yc(e)?et:K.test(e)?Xc:Qc:Array.isArray(e)?at:typeof e==`object`?K.test(e)?Xc:ot:et}function at(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>it(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}function st(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i=el?1/0:t}function ut(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(lt(r),el);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:L(i)}}function dt(e,t){return e*Math.sqrt(1-t*t)}function ft(e,t,n){let r=n;for(let n=1;n{let r=t*o,i=r*e,a=r-n,s=dt(t,o),c=Math.exp(-i);return nl-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)+nl>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-nl+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ft(i,a,s);if(e=I(e),isNaN(c))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}function mt(e,t){return t.some(t=>e[t]!==void 0)}function ht(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!mt(e,il)&&mt(e,rl))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*M(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Y.mass,stiffness:i,damping:a}}else{let n=pt({...e,velocity:0});t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function gt(e=Y.visualDuration,t=Y.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}=ht({...n,velocity:-L(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=L(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Y.restSpeed.granular:Y.restSpeed.default,i||=v?Y.restDelta.granular:Y.restDelta.default;let y,b,x,S,C,ee;if(h<1)x=dt(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,ee=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+ee*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}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 t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let te={calculatedDuration:p&&d||null,velocity:e=>I(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=I(t*(C*n+ee*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=I(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(lt(te),el),t=$c(t=>te.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return te}function _t(e,t,n){let r=Math.max(t-al,0);return Ie(n-e(r),t-r)}function vt({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,C=e=>{p(f.value)&&(x=e,S=gt({keyframes:[f.value,m(f.value)],velocity:_t(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function yt(e,t,n){let r=[],i=n||P.mix||ct,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=yt(t,r,i),c=s.length,l=n=>{if(o&&n1)for(;rl(M(e[0],e[a-1],t)):l}function xt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Hs(0,t,r);e.push(J(n,1,i))}}function St(e){let t=[0];return xt(t,e.length-1),t}function Ct(e,t){return e.map(e=>e*t)}function wt(e,t){return e.map(()=>t||ac).splice(0,e.length-1)}function Tt({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=oc(r)?r.map(uc):uc(r),a={done:!1,value:t[0]},o=bt(Ct(n&&n.length===t.length?n:St(t),e),t,{ease:Array.isArray(i)?i:wt(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}function Et(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(ol),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}function Dt(e){typeof e.type==`string`&&(e.type=cl[e.type])}function Ot(e){return new dl(e)}function kt(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 Pt(){if(kl){let e=Array.from(Dl).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Nt(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&&s.scrollTo(0,e.suspendedScrollY)})}kl=!1,Ol=!1,Dl.forEach(e=>e.complete(Al)),Dl.clear()}function Ft(){Dl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kl=!0)})}function It(){Al=!0,Ft(),Pt(),Al=!1}function Lt(e,t,n){Ml(t)?e.style.setProperty(t,n):e.style[t]=n}function Rt(e,t){let n=Fe(e);return()=>Nl[t]??n()}function zt(e,t){if(e)return typeof e==`function`?Il()?$c(e,t):`ease-out`:sc(e)?Ll(e):Array.isArray(e)?e.map(e=>zt(e,t)||Rl.easeOut):Rl[e]}function Bt(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=zt(s,i);Array.isArray(d)&&(u.easing=d),R.value&&hc.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 R.value&&p.finished.finally(()=>{hc.waapi--}),p}function Vt(e){return typeof e==`function`&&`applyToOptions`in e}function Ht({type:e,...t}){return Vt(e)&&Il()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}function Ut(e){return e in Bl}function Wt(e){typeof e.ease==`string`&&Ut(e.ease)&&(e.ease=Bl[e.ease])}function Gt(e){e.duration=0,e.type=`keyframes`}function Kt(e){for(let t=0;tn&&(n=i)}return n}function Zt(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=Ql.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function $t(e,t,n=1){N(n<=$l,`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=s.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Rs(e)?parseFloat(e):e}return yc(i)?$t(i,t,n+1):i}function en(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function tn(e,t){let n=e?.[t]??e?.default??e;return n===e?n:en(n,e)}function nn(e){for(let t in e)if(!au.has(t))return!0;return!1}function rn(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function an(e,t,n,r){if(typeof t==`function`){let[i,a]=rn(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]=rn(r);t=t(n===void 0?e.custom:n,i,a)}return t}function on(e,t,n){let r=e.getProps();return an(r,t,n===void 0?r.custom:n,e)}function E(e,t){return new du(e,t)}function sn(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,E(n))}function cn(e){return fu(e)?e[e.length-1]||0:e}function ln(e,t){let{transitionEnd:n={},transition:r={},...i}=on(e,t)||{};for(let t in i={...i,...n},i)sn(e,t,cn(i[t]))}function un(e){return!!(X(e)&&e.add)}function dn(e,t){let n=e.getValue(`willChange`);if(un(n))return n.add(t);if(!n&&P.WillChange){let n=new P.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function fn(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function pn(e){return e.props[mu]}function mn({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hn(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...c}=t,l=e.getDefaultTransition();a=a?en(a,l):l;let u=a?.reduceMotion;r&&(a=r);let d=[],f=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||f&&mn(f,t))continue;let o={delay:n,...tn(a||{},t)},l=r.get();if(l!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!o.velocity){z.update(()=>r.set(i));continue}let p=!1;if(s.MotionHandoffAnimation){let n=pn(e);if(n){let e=s.MotionHandoffAnimation(n,t,z);e!==null&&(o.startTime=e,p=!0)}}dn(e,t);let m=u??e.shouldReduceMotion;r.start(ou(t,r,i,m&&su.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>z.update(()=>{o&&ln(e,o)});d.length?Promise.all(d).then(t):t()}return d}function gn(e,t,n={}){let r=on(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(hn(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return _n(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 _n(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(gn(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Zt(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function vn(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>gn(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=gn(e,t,n);else{let i=typeof t==`function`?on(e,t,n.custom):t;r=Promise.all(hn(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function yn(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Tc)||[];if(!r)return e;let i=n.replace(r,``),a=xu.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}function bn(e,t){let n=Eu(e);return Du.has(n)||(n=q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function xn(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||zs(e)}function Sn(e,t,n){let r=0,i;for(;re!=null)}function wn(e){return Pe(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Tn(){return Z.x||Z.y}function En(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 Dn(e,t){let n=Cn(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function On(e){return!(e.pointerType===`touch`||Tn())}function kn(e,t,n={}){let[r,i,a]=Dn(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,d)},c=e=>{a&&=(a(e),void 0),o()},l=e=>{n=!1,s.removeEventListener(`pointerup`,l),s.removeEventListener(`pointercancel`,l),r&&(r=!1,c(e))},u=()=>{n=!0,s.addEventListener(`pointerup`,l,i),s.addEventListener(`pointercancel`,l,i)},d=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}c(e)}};e.addEventListener(`pointerenter`,n=>{if(!On(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,d,i))},i),e.addEventListener(`pointerdown`,u,i)}),a}function An(e){return Fu.has(e.tagName)||e.isContentEditable===!0}function jn(e){return Iu.has(e.tagName)||e.isContentEditable===!0}function Mn(e){return t=>{t.key===`Enter`&&e(t)}}function Nn(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}function Pn(e){return Pu(e)&&!Tn()}function Fn(e,t,n={}){let[r,i,a]=Dn(e,n),o=e=>{let r=e.currentTarget;if(!Pn(e)||zu.has(e))return;Lu.add(r),n.stopPropagation&&zu.add(e);let a=t(r,e),o=(e,t)=>{s.removeEventListener(`pointerup`,c),s.removeEventListener(`pointercancel`,l),Lu.has(r)&&Lu.delete(r),Pn(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{o(e,r===s||r===document||n.useGlobalTarget||Nu(r,e.target))},l=e=>{o(e,!1)};s.addEventListener(`pointerup`,c,i),s.addEventListener(`pointercancel`,l,i)};return r.forEach(e=>{(n.useGlobalTarget?s:e).addEventListener(`pointerdown`,o,i),wn(e)&&(e.addEventListener(`focus`,e=>Ru(e,i)),!An(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function In(e){return Pe(e)&&`ownerSVGElement`in e}function Ln({target:e,borderBoxSize:t}){Bu.get(e)?.forEach(n=>{n(e,{get width(){return Uu(e,t)},get height(){return Wu(e,t)}})})}function Rn(e){e.forEach(Ln)}function zn(){typeof ResizeObserver>`u`||(Vu=new ResizeObserver(Rn))}function Bn(e,t){Vu||zn();let n=Cn(e);return n.forEach(e=>{let n=Bu.get(e);n||(n=new Set,Bu.set(e,n)),n.add(t),Vu?.observe(e)}),()=>{n.forEach(e=>{let n=Bu.get(e);n?.delete(t),n?.size||Vu?.unobserve(e)})}}function Vn(){Ku=()=>{let e={get width(){return s.innerWidth},get height(){return s.innerHeight}};Gu.forEach(t=>t(e))},s.addEventListener(`resize`,Ku)}function Hn(e){return Gu.add(e),Ku||Vn(),()=>{Gu.delete(e),!Gu.size&&typeof Ku==`function`&&(s.removeEventListener(`resize`,Ku),Ku=void 0)}}function Un(e,t){return typeof e==`function`?Hn(e):Bn(e,t)}function Wn(e,t){let n,r=()=>{let{currentTime:r}=t,i=(r===null?0:r.value)/100;n!==i&&e(i),n=i};return z.preUpdate(r,!0),()=>B(r)}function Gn(e){return In(e)&&e.tagName===`svg`}function Kn(e,t){if(e===`first`)return 0;{let n=t-1;return e===`last`?n:n/2}}function qn(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(i,a)=>{let o=typeof n==`number`?n:Kn(n,a),s=e*Math.abs(o-i);if(r){let t=a*e;s=uc(r)(s/t)*t}return t+s}}function Jn(...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=bt(i,a,o);return t?s(r):s}function Yn(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),e.animation=void 0},l=()=>{let t=Zn(e.get()),r=Zn(a);if(t===r){c();return}let s=i?i.getGeneratorVelocity():e.getVelocity();c(),i=new dl({keyframes:[t,r],velocity:s,type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:o})},u=()=>{l(),e.animation=i??void 0,e.events.animationStart?.notify(),i?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{a=e,o=e=>t(Xn(e,s)),z.postRender(u)},c),X(t)){let r=n.skipInitialAnimation===!0,i=t.on(`change`,t=>{r?(r=!1,e.jump(Xn(t,s),!1)):e.set(Xn(t,s))}),a=e.on(`destroy`,i);return()=>{i(),a()}}return c}function Xn(e,t){return t?e+t:e}function Zn(e){return typeof e==`number`?e:parseFloat(e)}function Qn(e,t,n){let r=()=>t.set(n()),i=()=>z.preRender(r,!1,!0),a=e.map(e=>e.on(`change`,i));t.on(`destroy`,()=>{a.forEach(e=>e()),B(r)})}function $n(e){let t=[];uu.current=t;let n=e();uu.current=void 0;let r=E(n);return Qn(t,r,e),r}function er(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function tr(e){return typeof e==`string`||Array.isArray(e)}function nr(e){return er(e.animate)||ed.some(t=>tr(e[t]))}function rr(e){return!!(nr(e)||e.variants)}function ir(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 ar(){if(nd.current=!0,rd)if(s.matchMedia){let e=s.matchMedia(`(prefers-reduced-motion)`),t=()=>td.current=e.matches;e.addEventListener(`change`,t),t()}else td.current=!1}function or(e){ad=e}function sr(){return ad}function cr({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function lr({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ur(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 dr(e){return e===void 0||e===1}function fr({scale:e,scaleX:t,scaleY:n}){return!dr(e)||!dr(t)||!dr(n)}function pr(e){return fr(e)||mr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mr(e){return hr(e.x)||hr(e.y)}function hr(e){return e&&e!==`0%`}function gr(e,t,n){return n+t*(e-n)}function _r(e,t,n,r,i){return i!==void 0&&(e=gr(e,i,r)),gr(e,n,r)+t}function vr(e,t=0,n=1,r,i){e.min=_r(e.min,t,n,r,i),e.max=_r(e.max,t,n,r,i)}function yr(e,{x:t,y:n}){vr(e.x,t.translate,t.scale,t.originPoint),vr(e.y,n.translate,n.scale,n.originPoint)}function br(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sld&&(t.x=1),t.yld&&(t.y=1)}function D(e,t){e.min+=t,e.max+=t}function xr(e,t,n,r,i=.5){vr(e,t,n,J(e.min,e.max,i),r)}function Sr(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Cr(e,t,n){let r=n??e;xr(e.x,Sr(t.x,r.x),t.scaleX,t.scale,t.originX),xr(e.y,Sr(t.y,r.y),t.scaleY,t.scale,t.originY)}function wr(e,t){return cr(ur(e.getBoundingClientRect(),t))}function Tr(e,t,n){let r=wr(e,n),{scroll:i}=t;return i&&(D(r.x,i.offset.x),D(r.y,i.offset.y)),r}function Er(e,t,n){let r=``,i=!0;for(let a=0;aPromise.all(t.map(({animation:t,options:n})=>vn(e,t,n)))}function Hr(e){let t=Vr(e),n=Gr(),r=!0,i=!1,a=t=>(n,r)=>{let i=on(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 o(n){t=n(e)}function s(o){let{props:s}=e,c=zr(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;tf&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:ee={}}=m,te={...ee,...C},w=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in te){let t=C[e],n=ee[e];if(d.hasOwnProperty(e))continue;let r=!1;r=fu(t)&&fu(n)?!Br(t,n):t!==n,r?t==null?u.add(e):w(e):t!==void 0&&u.has(e)?w(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let ne=v&&y;b&&(!ne||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!ne&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=on(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Zt(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=on(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(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=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Gr(),i=!0}}}function Ur(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Br(t,e):!1}function Wr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Gr(){return{animate:Wr(!0),whileInView:Wr(),whileHover:Wr(),whileTap:Wr(),whileDrag:Wr(),whileFocus:Wr(),exit:Wr()}}function Kr(e,t){e.min=t.min,e.max=t.max}function O(e,t){Kr(e.x,t.x),Kr(e.y,t.y)}function qr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function k(e){return e.max-e.min}function Jr(e,t,n){return Math.abs(e-t)<=n}function Yr(e,t,n,r=.5){e.origin=r,e.originPoint=J(t.min,t.max,e.origin),e.scale=k(n)/k(t),e.translate=J(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Od&&e.scale<=kd||isNaN(e.scale))&&(e.scale=1),(e.translate>=jd&&e.translate<=Md||isNaN(e.translate))&&(e.translate=0)}function Xr(e,t,n,r){Yr(e.x,t.x,n.x,r?r.originX:void 0),Yr(e.y,t.y,n.y,r?r.originY:void 0)}function Zr(e,t,n,r=0){e.min=(r?J(n.min,n.max,r):n.min)+t.min,e.max=e.min+k(t)}function Qr(e,t,n,r){Zr(e.x,t.x,n.x,r?.x),Zr(e.y,t.y,n.y,r?.y)}function $r(e,t,n,r=0){let i=r?J(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+k(t)}function ei(e,t,n,r){$r(e.x,t.x,n.x,r?.x),$r(e.y,t.y,n.y,r?.y)}function ti(e,t,n,r,i){return e-=t,e=gr(e,1/n,r),i!==void 0&&(e=gr(e,1/i,r)),e}function ni(e,t=0,n=1,r=.5,i,a=e,o=e){if(W.test(t)&&(t=parseFloat(t),t=J(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=J(a.min,a.max,r);e===a&&(s-=t),e.min=ti(e.min,t,n,s,i),e.max=ti(e.max,t,n,s,i)}function ri(e,t,[n,r,i],a,o){ni(e,t[n],t[r],t[i],t.scale,a,o)}function ii(e,t,n,r){ri(e.x,t,Nd,n?n.x:void 0,r?r.x:void 0),ri(e.y,t,Pd,n?n.y:void 0,r?r.y:void 0)}function ai(e){return e.translate===0&&e.scale===1}function oi(e){return ai(e.x)&&ai(e.y)}function si(e,t){return e.min===t.min&&e.max===t.max}function ci(e,t){return si(e.x,t.x)&&si(e.y,t.y)}function li(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ui(e,t){return li(e.x,t.x)&&li(e.y,t.y)}function di(e){return k(e.x)/k(e.y)}function fi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function A(e){return[e(`x`),e(`y`)]}function pi(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 mi(e,t,n,r,i,a){i?(e.opacity=J(0,n.opacity??1,zd(r)),e.opacityExit=J(t.opacity??1,0,Bd(r))):a&&(e.opacity=J(t.opacity??1,n.opacity??1,r));for(let i=0;irt?1:n(Hs(e,t,r))}function _i(e,t,n){let r=X(e)?e:E(e);return r.start(ou(``,r,t,n)),r.animation}function vi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function yi(e,t){let n=H.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(B(r),e(a-t))};return z.setup(r,!0),()=>B(r)}function bi(e){return X(e)?e.get():e}function xi(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Si(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=pn(t);if(s.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;s.MotionCancelOptimisedAnimation(n,`transform`,z,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Si(r)}function Ci({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Jd++,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,R.value&&(Gd.nodes=Gd.calculatedTargetDeltas=Gd.calculatedProjections=0),this.nodes.forEach(Ei),this.nodes.forEach(Fi),this.nodes.forEach(Ii),this.nodes.forEach(Di),R.addProjectionMetrics&&R.addProjectionMetrics(Gd)},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;z.read(()=>{r=s.innerWidth}),e(t,()=>{let e=s.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=yi(i,250),Wd.hasAnimatedSinceResize&&(Wd.hasAnimatedSinceResize=!1,this.nodes.forEach(Pi)))})}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()||Yd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!ui(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={...tn(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||Pi(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(),B(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(Li),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(s.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Si(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&&!k(this.snapshot.measuredBox.x)&&!k(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;zi(a.x,e.x,n),zi(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ei(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Vi(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ci(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Q(),O(d,this.relativeTarget)),s&&(this.animationValues=i,mi(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&&=(B(this.pendingAnimation),void 0),this.pendingAnimation=z.update(()=>{Wd.hasAnimatedSinceResize=!0,hc.layout++,this.motionValue||=E(0),this.motionValue.jump(0,!1),this.currentAnimation=_i(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{hc.layout--},onComplete:()=>{hc.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(qd),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&&Gi(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Q();let t=k(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=k(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}O(t,n),Cr(t,i),Xr(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ud),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&&xi(`z`,e,r,this.animationValues);for(let t=0;te.currentAnimation?.stop()),this.root.nodes.forEach(ki),this.root.sharedNodes.clear()}}}function wi(e){e.updateLayout()}function Ti(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;if(i===`size`)A(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=k(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Kr(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Gi(i,t.layoutBox,n)&&A(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=k(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=Xu();Xr(o,n,t.layoutBox);let s=Xu();a?Xr(s,e.applyTransform(r,!0),t.measuredBox):Xr(s,n,t.layoutBox);let c=!oi(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=e.options.layoutAnchor||void 0,s=Q();ei(s,t.layoutBox,i.layoutBox,o);let c=Q();ei(c,n,a.layoutBox,o),ui(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,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 Ei(e){R.value&&Gd.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 Di(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Oi(e){e.clearSnapshot()}function ki(e){e.clearMeasurements()}function Ai(e){e.isLayoutDirty=!0,e.updateLayout()}function ji(e){e.isLayoutDirty=!1}function Mi(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Ni(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Pi(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fi(e){e.resolveTargetDelta()}function Ii(e){e.calcProjection()}function Li(e){e.resetSkewAndRotation()}function Ri(e){e.removeLeadSnapshot()}function zi(e,t,n){e.translate=J(t.translate,0,n),e.scale=J(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bi(e,t,n,r){e.min=J(t.min,n.min,r),e.max=J(t.max,n.max,r)}function Vi(e,t,n,r){Bi(e.x,t.x,n.x,r),Bi(e.y,t.y,n.y,r)}function Hi(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}function Ui(e){e.min=Zd(e.min),e.max=Zd(e.max)}function Wi(e){Ui(e.x),Ui(e.y)}function Gi(e,t,n){return e===`position`||e===`preserve-aspect`&&!Jr(di(t),di(n),.2)}function Ki(e){return e!==e.root&&e.scroll?.wasRoot}function qi(){let e=new Set,t=new WeakMap,n=()=>e.forEach($d);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 Ji(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Yi(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ji(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t{let{width:e,height:n,top:u,left:f,right:p,bottom:m}=l.current;if(t||o===!1||!c.current||!e||!n)return;let h=r===`left`?`left: ${f}`:`right: ${p}`,g=i===`bottom`?`bottom: ${m}`:`top: ${u}`;c.current.dataset.motionPopId=s;let _=document.createElement(`style`);d&&(_.nonce=d);let v=a??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(` [data-motion-pop-id="${s}"] { position: absolute !important; width: ${e}px !important; height: ${n}px !important; ${h}px !important; ${g}px !important; } `),()=>{c.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),v(nf,{isPresent:t,childRef:c,sizeRef:l,pop:o,children:o===!1?e:x(e,{ref:f})})}function j(e){let t=n(null);return t.current===null&&(t.current=e()),t.current}function Qi(){return new Map}function $i(e=!0){let t=u(Is);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=_();o(()=>{if(e)return i(a)},[e]);let s=f(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}function ea(e){let t=[];return i.forEach(e,e=>{b(e)&&t.push(e)}),t}function ta(){let e=n(!1);return Fs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function na(){let e=ta(),[t,n]=l(0),r=f(()=>{e.current&&n(t+1)},[t]);return[f(()=>z.postRender(r),[r]),t]}function ra(){if(pf)return;let e={};for(let t in ff)e[t]={isEnabled:e=>ff[t].some(t=>!!e[t])};or(e),pf=!0}function ia(){return ra(),sr()}function aa(e){let t=ia();for(let n in e)t[n]={...t[n],...e[n]};or(t)}function oa(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||mf.has(e)}function sa(e){typeof e==`function`&&(hf=t=>t.startsWith(`on`)?!oa(t):e(t))}function ca(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||X(e[i])||(hf(i)||n===!0&&oa(i)||!t&&!oa(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function la({children:e,isValidProp:t,...n}){t&&sa(t);let r=u($);n={...r,...n},n.transition=en(n.transition,r.transition),n.isStatic=j(()=>n.isStatic);let i=d(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return v($.Provider,{value:i,children:e})}function ua({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:da(n,r,i,e),renderState:t()}}function da(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=bi(a[e]);let{initial:o,animate:s}=e,c=nr(e),l=rr(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`&&!er(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n({initial:t,animate:n}),[ma(t),ma(n)])}function ma(e){return Array.isArray(e)?e.join(` `):e}function ha(e,t,n){for(let r in t)!X(t[r])&&!jr(r,n)&&(e[r]=t[r])}function ga({transformTemplate:e},t){return d(()=>{let n=yf();return Dr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _a(e,t){let n=e.style||{},r={};return ha(r,n,e),Object.assign(r,ga(e,t)),r}function va(e,t){let n={},r=_a(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 ya(e,t,n,r){let i=d(()=>{let n=bf();return Ir(n,t,Sd(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ha(t,e.style,e),i.style={...t,...i.style}}return i}function ba(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(xf.indexOf(e)>-1||/[A-Z]/u.test(e))}function xa(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??ba(e)?ya:va)(t,r,i,e),l=ca(t,typeof e==`string`,a),u=e===c?{}:{...l,...s,ref:n},{children:f}=t,p=d(()=>X(f)?f.get():f,[f]);return te(e,{...u,children:p})}function Sa(e,t,r){let i=n(r);m(()=>{i.current=r});let a=n(null);return f(n=>{n&&e.onMount?.(n);let r=i.current;if(typeof r==`function`)if(n){let e=r(n);typeof e==`function`&&(a.current=e)}else a.current?(a.current(),a.current=null):r(n);else r&&(r.current=n);t&&(n?t.mount(n):t.unmount())},[t])}function Ca(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function wa(e,t,r,i,a,c){let{visualElement:l}=u(gf),d=u(df),f=u(Is),p=u($),h=p.reducedMotion,g=p.skipAnimations,_=n(null),v=n(!1);i||=d.renderer,!_.current&&i&&(_.current=i(e,{visualState:t,parent:l,props:r,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h,skipAnimations:g,isSVG:c}),v.current&&_.current&&(_.current.manuallyAnimateOnMount=!0));let y=_.current,b=u(vf);y&&!y.projection&&a&&(y.type===`html`||y.type===`svg`)&&Ta(_.current,r,a,b);let x=n(!1);m(()=>{y&&x.current&&y.update(r,f)});let S=r[mu],C=n(!!S&&s!==void 0&&!s.MotionHandoffIsComplete?.(S)&&s.MotionHasOptimisedAnimation?.(S));return Fs(()=>{v.current=!0,y&&(x.current=!0,s.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),C.current&&y.animationState&&y.animationState.animateChanges())}),o(()=>{y&&(!C.current&&y.animationState&&y.animationState.animateChanges(),C.current&&=(queueMicrotask(()=>{s.MotionHandoffMarkAsComplete?.(S)}),!1),y.enteringChildren=void 0)}),y}function Ta(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Ea(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ca(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Ea(e){if(e)return e.options.allowProjection===!1?Ea(e.parent):e.projection}function Da(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&aa(r);let a=n?n===`svg`:ba(e),o=a?Cf:Sf;function c(n,c){let l,d={...u($),...n,layoutId:Oa(n)},{isStatic:f}=d,p=pa(n),m=o(n,f);if(!f&&s!==void 0){ka(d,r);let t=Aa(d);l=t.MeasureLayout,p.visualElement=wa(e,m,d,i,t.ProjectionNode,a)}return S(gf.Provider,{value:p,children:[l&&p.visualElement?v(l,{visualElement:p.visualElement,...d}):null,xa(e,n,Sa(m,p.visualElement,c),m,f,t,a)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=g(c);return l[wf]=e,l}function Oa({layoutId:e}){let t=u(Ns).id;return t&&e!==void 0?t+`-`+e:e}function ka(e,t){u(df).strict}function Aa(e){let{drag:t,layout:n}=ia();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ja(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 Ma(e){return{point:{x:e.pageX,y:e.pageY}}}function Na(e,t,n,r){return vi(e,t,kf(n),r)}function Pa(e,t){let n=Af(e.x,t.x),r=Af(e.y,t.y);return Math.sqrt(n**2+r**2)}function Fa(e,t){return t?{point:t(e.point)}:e}function Ia(e,t){return{x:e.x-t.x,y:e.y-t.y}}function La({point:e},t){return{point:e,delta:Ia(e,za(t)),offset:Ia(e,Ra(t)),velocity:Ba(t,.1)}}function Ra(e){return e[0]}function za(e){return e[e.length-1]}function Ba(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=za(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>I(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>I(t)*2&&(r=e[1]);let a=L(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 Va(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?J(n,e,r.max):Math.min(e,n)),e}function Ha(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 Ua(e,{top:t,left:n,bottom:r,right:i}){return{x:Ha(e.x,n,i),y:Ha(e.y,t,r)}}function Wa(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Hs(t.min,t.max-r,e.min):r>i&&(n=Hs(e.min,e.max-i,t.min)),M(0,1,n)}function qa(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 Ja(e=Ff){return e===!1?e=0:e===!0&&(e=Ff),{x:Ya(e,`left`,`right`),y:Ya(e,`top`,`bottom`)}}function Ya(e,t,n){return{min:Xa(e,t),max:Xa(e,n)}}function Xa(e,t){return typeof e==`number`?e:e[t]||0}function Za(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Qa(e,t,n){let r=Un(e,Za(n)),i=Un(t,Za(n));return()=>{r(),i()}}function $a(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function eo(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function to(e){let[t,n]=$i(),r=u(Ns);return v(Hf,{...e,layoutGroup:r,switchLayoutGroup:u(vf),isPresent:t,safeToRemove:n})}function no(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&z.postRender(()=>i(t,Ma(t)))}function ro(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&&z.postRender(()=>i(t,Ma(t)))}function io({root:e,...t}){let n=e||document;Jf.has(n)||Jf.set(n,{});let r=Jf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Xf,{root:e,...t})),r[i]}function ao(e,t,n){let r=io(t);return qf.set(e,n),r.observe(e),()=>{qf.delete(e),r.unobserve(e)}}function oo({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}function so(e){return o(()=>()=>e(),[])}function co(e,t,n,r){let i=n[t],{length:a,position:o}=op[t],s=i.current,c=n.time;i.current=Math.abs(e[`scroll${o}`]),i.scrollLength=e[`scroll${a}`]-e[`client${a}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Hs(0,i.scrollLength,i.current);let l=r-c;i.velocity=l>rp?0:Ie(i.current-s,l)}function lo(e,t,n){co(e,`x`,t,n),co(e,`y`,t,n),t.time=n}function uo(e,t){let n={x:0,y:0},r=e;for(;r&&r!==t;)if(wn(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName===`svg`){let e=r.getBoundingClientRect();r=r.parentElement;let t=r.getBoundingClientRect();n.x+=e.left-t.left,n.y+=e.top-t.top}else if(r instanceof SVGGraphicsElement){let{x:e,y:t}=r.getBBox();n.x+=e,n.y+=t;let i=null,a=r.parentNode;for(;!i;)a.tagName===`svg`&&(i=a),a=r.parentNode;r=i}else break;return n}function fo(e,t,n=0){let r=0;if(e in sp&&(e=sp[e]),typeof e==`string`){let t=parseFloat(e);e.endsWith(`px`)?r=t:e.endsWith(`%`)?e=t/100:e.endsWith(`vw`)?r=t/100*document.documentElement.clientWidth:e.endsWith(`vh`)?r=t/100*document.documentElement.clientHeight:e=t}return typeof e==`number`&&(r=t*e),n+r}function po(e,t,n,r){let i=Array.isArray(e)?e:cp,a=0,o=0;return typeof e==`number`?i=[e,e]:typeof e==`string`&&(e=e.trim(),i=e.includes(` `)?e.split(` `):[e,sp[e]?e:`0`]),a=fo(i[0],n,r),o=fo(i[1],t),a-o}function mo(e){return`getBBox`in e&&e.tagName!==`svg`?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function ho(e,t,n){let{offset:r=lp.All}=n,{target:i=e,axis:a=`y`}=n,o=a===`y`?`height`:`width`,s=i===e?up:uo(i,e),c=i===e?{width:e.scrollWidth,height:e.scrollHeight}:mo(i),l={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let u=!t[a].interpolate,d=r.length;for(let e=0;e{go(e,r.target,n),lo(e,n,t),(r.offset||r.target)&&ho(e,n,r)},notify:()=>t(n)}}function vo(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return F;let i=pp.get(t);i||(i=new Set,pp.set(t,i));let a=_o(t,e,ap(),r);if(i.add(a),!dp.has(t)){let e=()=>{for(let e of i)e.measure(V.timestamp);z.preUpdate(n)},n=()=>{for(let e of i)e.notify()},r=()=>z.read(e);dp.set(t,r);let a=gp(t);s.addEventListener(`resize`,r),t!==document.documentElement&&fp.set(t,Un(t,r)),a.addEventListener(`scroll`,r),r()}if(n&&!hp.has(t)){let e=dp.get(t),n={width:t.scrollWidth,height:t.scrollHeight};mp.set(t,n);let r=z.read(()=>{let r=t.scrollWidth,i=t.scrollHeight;(n.width!==r||n.height!==i)&&(e(),n.width=r,n.height=i)},!0);hp.set(t,r)}let o=dp.get(t);return z.read(o,!1,!0),()=>{B(o);let e=pp.get(t);if(!e||(e.delete(a),e.size))return;let n=dp.get(t);dp.delete(t),n&&(gp(t).removeEventListener(`scroll`,n),fp.get(t)?.(),s.removeEventListener(`resize`,n));let r=hp.get(t);r&&(B(r),hp.delete(t)),mp.delete(t)}}function yo(e){return s===void 0?!1:e?Fl():Pl()}function bo(e){let t=e.trim().split(/\s+/);if(t.length!==2)return;let n=vp[t[0]],r=vp[t[1]];if(!(n===void 0||r===void 0))return[n,r]}function xo(e){if(e.length!==2)return;let t=[];for(let n of e)if(Array.isArray(n))t.push(n);else if(typeof n==`string`){let e=bo(n);if(!e)return;t.push(e)}else return;return t}function So(e,t){let n=xo(e);if(!n)return!1;for(let e=0;e<2;e++){let r=n[e],i=t[e];if(r[0]!==i[0]||r[1]!==i[1])return!1}return!0}function Co(e){if(!e)return{rangeStart:`contain 0%`,rangeEnd:`contain 100%`};for(let[t,n]of _p)if(So(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}function wo(e){let t={value:0};return{currentTime:t,cancel:vo(n=>{t.value=n[e.axis].progress*100},e)}}function To({source:e,container:t,...n}){let{axis:r}=n;e&&(t=e);let i=yp.get(t);i||(i=new Map,yp.set(t,i));let a=n.target??`self`,o=i.get(a);o||(o={},i.set(a,o));let s=r+(n.offset??[]).join(`,`);return o[s]||(n.target&&yo(n.target)?Co(n.offset)?o[s]=new ViewTimeline({subject:n.target,axis:r}):o[s]=wo({container:t,...n}):yo()?o[s]=new ScrollTimeline({source:t,axis:r}):o[s]=wo({container:t,...n})),o[s]}function Eo(e,t){let n=To(t),r=t.target?Co(t.offset):void 0,i=t.target?yo(t.target)&&!!r:yo();return e.attachTimeline({timeline:i?n:void 0,...r&&i&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:e=>(e.pause(),Wn(t=>{e.time=e.iterationDuration*t},n))})}function Do(e){return e.length===2}function Oo(e,t){return Do(e)?vo(n=>{e(n[t.axis].progress,n)},t):Wn(e,To(t))}function ko(e,{axis:t=`y`,container:n=document.scrollingElement,...r}={}){if(!n)return F;let i={axis:t,container:n,...r};return typeof e==`function`?Oo(e,i):Eo(e,i)}function Ao(e,t,n,r){return{factory:i=>ko(i,{...t,axis:e,container:n?.current||void 0,target:r?.current||void 0}),times:[0,1],keyframes:[0,1],ease:e=>e,duration:1}}function jo(e,t){return s===void 0?!1:e?Fl()&&!!Co(t):Pl()}function Mo({container:e,target:t,...r}={}){let i=j(bp);jo(t,r.offset)&&(i.scrollXProgress.accelerate=Ao(`x`,r,e,t),i.scrollYProgress.accelerate=Ao(`y`,r,e,t));let a=n(null),s=n(!1),c=f(()=>(a.current=ko((e,{x:t,y:n})=>{i.scrollX.set(t.current),i.scrollXProgress.set(t.progress),i.scrollY.set(n.current),i.scrollYProgress.set(n.progress)},{...r,container:e?.current||void 0,target:t?.current||void 0}),()=>{a.current?.()}),[e,t,JSON.stringify(r.offset)]);return Fs(()=>{if(s.current=!1,xp(e)||xp(t)){s.current=!0;return}else return c()},[c]),o(()=>{if(s.current)return N(!xp(e),`Container ref is defined but not hydrated`,`use-scroll-ref`),N(!xp(t),`Target ref is defined but not hydrated`,`use-scroll-ref`),c()},[c]),i}function No(e){let t=j(()=>E(e)),{isStatic:n}=u($);if(n){let[,n]=l(e);o(()=>t.on(`change`,n),[])}return t}function Po(e,t){let n=No(t()),r=()=>n.set(t());return r(),Fs(()=>{let t=()=>z.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),B(r)}}),n}function Fo(e){uu.current=[],e();let t=Po(uu.current,e);return uu.current=void 0,t}function Io(e,t,n,r){if(typeof e==`function`)return Fo(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Ro(e,t,n,r);let i=typeof t==`function`?t:Jn(t,n,r),a=Array.isArray(e)?Lo(e,i):Lo([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function Lo(e,t){let n=j(()=>[]);return Po(e,()=>{n.length=0;let r=e.length;for(let t=0;tObject.keys(n)),a=j(()=>({}));for(let o of i)a[o]=Io(e,t,n[o],r);return a}function zo(e,t={}){let{isStatic:n}=u($),r=()=>X(e)?e.get():e;if(n)return Io(r);let i=No(r());return m(()=>Yn(i,e,t),[i,JSON.stringify(t)]),i}function Bo(e,t={}){return zo(e,{type:`spring`,...t})}function Vo(){!nd.current&&ar();let[e]=l(td.current);return e}function Ho(){let e=Vo(),{reducedMotion:t}=u($);return t===`never`?!1:t===`always`?!0:e}function Uo(e){e.values.forEach(e=>e.stop())}function Wo(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&ln(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{Wo(e,t)})})}function Go(e,t){if(Array.isArray(t))return Wo(e,t);if(typeof t==`string`)return Wo(e,[t]);ln(e,t)}function Ko(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){N(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(vn(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return N(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{Go(e,n)})},stop(){t.forEach(e=>{Uo(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function qo(e){return typeof e==`object`&&!Array.isArray(e)}function Jo(e,t,n,r){return e==null?[]:typeof e==`string`&&qo(t)?Cn(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Yo(e,t,n){return e*(t+1)}function Xo(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 Zo(e,t,n){for(let r=0;rt&&i.at{let c=is(e),{delay:l=0,times:u=St(c),type:p=t.type||`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,C=Vt(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Ep(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=I(b));let r=ut(n,e,C);y=r.ease,b=r.duration}b??=a;let ee=d+x;u.length===1&&u[0]===0&&(u[1]=1);let te=u.length-c.length;if(te>0&&xt(u,te),c.length===1&&c.unshift(null),m){N(m{for(let i in e){let a=e[i];a.sort(es);let s=[],c=[],l=[];for(let e=0;e{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=E(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:gt}).forEach(({keyframes:e,transition:t},n)=>{r.push(...ls(n,e,t))}),r}function ds(e){return Array.isArray(e)&&e.some(Array.isArray)}function fs(e={}){let{scope:t,reduceMotion:n}=e;function r(e,r,i){let a=[],o;if(ds(e)){let{onComplete:i,...s}=r||{};typeof i==`function`&&(o=i),a=us(e,n===void 0?s:{reduceMotion:n,...s},t)}else{let{onComplete:s,...c}=i||{};typeof s==`function`&&(o=s),a=ls(e,r,n===void 0?c:{reduceMotion:n,...c},t)}let s=new Zl(a);return o&&s.finished.then(o),t&&(t.animations.push(s),s.finished.then(()=>{Me(t.animations,s)})),s}return r}function ps(){let e=j(()=>({current:null,animations:[]})),t=Ho()??void 0,n=d(()=>fs({scope:e,reduceMotion:t}),[e,t]);return so(()=>{e.animations.forEach(e=>e.stop()),e.animations.length=0}),[e,n]}function ms(){let e=j(Ko);return Fs(e.mount,[]),e}function hs(e){return typeof e==`object`&&!!e&&wf in e}function gs(e){if(hs(e))return e[wf]}function _s(){return vs}function vs(e){ef.current&&(ef.current.isUpdating=!1,ef.current.blockUpdate(),e&&e())}function ys(){return f(()=>{let e=ef.current;e&&e.resetTree()},[])}function bs(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=Cn(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:kp[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}function xs(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[s,c]=l(a);return o(()=>{if(!e.current||i&&s)return;let a=()=>(c(!0),i?void 0:()=>c(!1)),o={root:t&&t.current||void 0,margin:n,amount:r};return bs(e.current,a,o)},[t,e,n,i,r]),s}function Ss(){let[e,t]=na(),r=_s(),i=n(-1);return o(()=>{z.postRender(()=>z.postRender(()=>{t===i.current&&(P.instantAnimations=!1)}))},[t]),n=>{r(()=>{P.instantAnimations=!0,e(),n(),i.current=t+1})}}function Cs(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=J(c.min,c.max,.5);return a===1&&s.layout.max+n>l||a===-1&&s.layout.min+ntp[t]),u=[],d=n(!1),f=n(null);N(!!a,`Reorder.Group must be provided a values prop`,`reorder-values`);let p={axis:r,groupRef:f,registerItem:(e,t)=>{let n=u.findIndex(t=>e===t.value);n===-1?u.push({value:e,layout:t[r]}):u[n].layout=t[r],u.sort(Ts)},updateOrder:(e,t,n)=>{if(d.current)return;let r=Cs(u,e,t,n);if(u!==r){d.current=!0;let e=[...a];for(let t=0;t{d.current=!1});let m=e=>{f.current=e,typeof c==`function`?c(e):c&&(c.current=e)},h={overflowAnchor:`none`,...s.style};return v(l,{...s,style:h,ref:m,ignoreStrict:!0,children:v(Mp.Provider,{value:p,children:e})})}function Ts(e,t){return e.layout.min-t.layout.min}function Es(){if(zp){let e=Os(zp,`y`);e&&(Rp.delete(e),Lp.delete(e));let t=Os(zp,`x`);t&&t!==e&&(Rp.delete(t),Lp.delete(t)),zp=null}}function Ds(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY,i=e===document.body||e===document.documentElement;return Ip.has(r)||i}function Os(e,t){let n=e?.parentElement;for(;n;){if(Ds(n,t))return n;n=n.parentElement}return null}function ks(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?Math.max(0,r.left):Math.max(0,r.top),a=n===`x`?Math.min(s.innerWidth,r.right):Math.min(s.innerHeight,r.bottom),o=e-i,c=a-e;if(o0))return;Rp.set(i,o);let e=n===`x`?i.scrollWidth-(l?s.innerWidth:i.clientWidth):i.scrollHeight-(l?s.innerHeight:i.clientHeight);Lp.set(i,e)}if(a>0){let e=Lp.get(i);if((n===`x`?l?s.scrollX:i.scrollLeft:l?s.scrollY:i.scrollTop)>=e)return}n===`x`?l?s.scrollBy({left:a}):i.scrollLeft+=a:l?s.scrollBy({top:a}):i.scrollTop+=a}function js(e,t=0){return X(e)?e:No(t)}function Ms({children:e,style:t={},value:n,as:r=`li`,onDrag:i,onDragEnd:a,layout:o=!0,...s},c){let l=j(()=>tp[r]),d=u(Mp),f={x:js(t.x),y:js(t.y)},p=Io([f.x,f.y],([e,t])=>e||t?1:`unset`);N(!!d,`Reorder.Item must be a child of Reorder.Group`,`reorder-item-child`);let{axis:m,registerItem:h,updateOrder:g,groupRef:_}=d;return v(l,{drag:m,...s,dragSnapToOrigin:!0,style:{...t,x:f.x,y:f.y,zIndex:p},layout:o,onDrag:(e,t)=>{let{velocity:r,point:a}=t;g(n,f[m].get(),r[m]),As(_.current,a[m],m,r[m]),i&&i(e,t)},onDragEnd:(e,t)=>{Es(),a&&a(e,t)},onLayoutMeasure:e=>{h(n,e)},ref:c,ignoreStrict:!0,children:e})}var Ns,Ps,Fs,Is,M,Ls,N,P,Rs,zs,F,Bs,Vs,Hs,Us,I,L,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc,uc,R,dc,fc,z,B,V,pc,mc,H,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,U,W,G,Pc,Fc,Ic,Lc,K,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,q,J,qc,Jc,Yc,Xc,Zc,Qc,$c,el,Y,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,X,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Z,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,Q,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,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp=t((()=>{r(),Ae(),a(),C(),Ns=p({}),Ps=s!==void 0,Fs=Ps?w:o,Is=p(null),M=(e,t,n)=>n>t?t:n{},N=()=>{},P={},Rs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),zs=e=>/^0[^.\s]+$/u.test(e),F=e=>e,Bs=(e,t)=>n=>t(e(n)),Vs=(...e)=>e.reduce(Bs),Hs=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Us=class{constructor(){this.subscriptions=[]}add(e){return je(this.subscriptions,e),()=>Me(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,L=e=>e/1e3,Ws=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},Gs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ks=1e-7,qs=12,Js=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ys=e=>t=>1-e(1-t),Xs=Re(.33,1.53,.69,.99),Zs=Ys(Xs),Qs=Js(Zs),$s=e=>e>=1?1:(e*=2)<1?.5*Zs(e):.5*(2-2**(-10*(e-1))),ec=e=>1-Math.sin(Math.acos(e)),tc=Ys(ec),nc=Js(ec),rc=Re(.42,0,1,1),ic=Re(0,0,.58,1),ac=Re(.42,0,.58,1),oc=e=>Array.isArray(e)&&typeof e[0]!=`number`,sc=e=>Array.isArray(e)&&typeof e[0]==`number`,cc={linear:F,easeIn:rc,easeInOut:ac,easeOut:ic,circIn:ec,circInOut:nc,circOut:tc,backIn:Zs,backInOut:Qs,backOut:Xs,anticipate:$s},lc=e=>typeof e==`string`,uc=e=>{if(sc(e)){N(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Re(t,n,r,i)}else if(lc(e))return N(cc[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),cc[e];return e},R={value:null,addProjectionMetrics:null},dc=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],fc=40,{schedule:z,cancel:B,state:V,steps:pc}=Ve(typeof requestAnimationFrame<`u`?requestAnimationFrame:F,!0),H={now:()=>(mc===void 0&&H.set(V.isProcessing||P.useManualTiming?V.timestamp:performance.now()),mc),set:e=>{mc=e,queueMicrotask(He)}},hc={layout:0,mainThread:0,waapi:0},gc=e=>t=>typeof t==`string`&&t.startsWith(e),_c=gc(`--`),vc=gc(`var(--`),yc=e=>vc(e)?bc.test(e.split(`/*`)[0].trim()):!1,bc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xc={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Sc={...xc,transform:e=>M(0,1,e)},Cc={...xc,default:1},wc=e=>Math.round(e*1e5)/1e5,Tc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Ec=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dc=(e,t)=>n=>!!(typeof n==`string`&&Ec.test(n)&&n.startsWith(e)||t&&!We(n)&&Object.prototype.hasOwnProperty.call(n,t)),Oc=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Tc);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},kc=e=>M(0,255,e),Ac={...xc,transform:e=>Math.round(kc(e))},jc={test:Dc(`rgb`,`red`),parse:Oc(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ac.transform(e)+`, `+Ac.transform(t)+`, `+Ac.transform(n)+`, `+wc(Sc.transform(r))+`)`},Mc={test:Dc(`#`),parse:Ge,transform:jc.transform},Nc=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),U=Nc(`deg`),W=Nc(`%`),G=Nc(`px`),Pc=Nc(`vh`),Fc=Nc(`vw`),Ic=(()=>({...W,parse:e=>W.parse(e)/100,transform:e=>W.transform(e*100)}))(),Lc={test:Dc(`hsl`,`hue`),parse:Oc(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+W.transform(wc(t))+`, `+W.transform(wc(n))+`, `+wc(Sc.transform(r))+`)`},K={test:e=>jc.test(e)||Mc.test(e)||Lc.test(e),parse:e=>jc.test(e)?jc.parse(e):Lc.test(e)?Lc.parse(e):Mc.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?jc.transform(e):Lc.transform(e),getAnimatableNone:e=>{let t=K.parse(e);return t.alpha=0,K.transform(t)}},Rc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,zc=`number`,Bc=`color`,Vc=`var`,Hc=`var(`,Uc="${}",Wc=/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,Gc=e=>typeof e==`number`?0:K.test(e)?K.getAnimatableNone(e):e,Kc=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Gc(e),q={test:Ke,parse:Je,createTransformer:Xe,getAnimatableNone:Ze},J=(e,t,n)=>e+(t-e)*n,qc=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Jc=[Mc,jc,Lc],Yc=e=>Jc.find(t=>t.test(e)),Xc=(e,t)=>{let n=tt(e),r=tt(t);if(!n||!r)return et(e,t);let i={...n};return e=>(i.red=qc(n.red,r.red,e),i.green=qc(n.green,r.green,e),i.blue=qc(n.blue,r.blue,e),i.alpha=J(n.alpha,r.alpha,e),jc.transform(i))},Zc=new Set([`none`,`hidden`]),Qc=(e,t)=>{let n=q.createTransformer(t),r=qe(e),i=qe(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?Zc.has(e)&&!i.values.length||Zc.has(t)&&!r.values.length?nt(e,t):Vs(at(st(r,i),i.values),n):(Ls(!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`),et(e,t))},$c=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t{let t=ut(e,100,gt);return e.ease=t.ease,e.duration=I(t.duration),e.type=`keyframes`,e},al=5,ol=e=>e!==null,sl=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>z.update(t,e),stop:()=>B(t),now:()=>V.isProcessing?V.timestamp:H.now()}},cl={decay:vt,inertia:vt,tween:Tt,keyframes:Tt,spring:gt},ll=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)}},ul=e=>e/100,dl=class extends ll{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==H.now()&&this.tick(H.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},hc.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Dt(e);let{type:t=Tt,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Tt;s!==Tt&&typeof o[0]!=`number`&&(this.mixKeyframes=Vs(ul,ct(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=lt(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=M(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=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!==vt&&(b.value=Et(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 L(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+L(e)}get time(){return L(this.currentTime)}set time(e){e=I(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?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return _t(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(H.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=L(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=sl,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(H.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,hc.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)}},fl=e=>e*180/Math.PI,pl=e=>hl(fl(Math.atan2(e[1],e[0]))),ml={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:pl,rotateZ:pl,skewX:e=>fl(Math.atan(e[1])),skewY:e=>fl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},hl=e=>(e%=360,e<0&&(e+=360),e),gl=pl,_l=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_l,scaleY:vl,scale:e=>(_l(e)+vl(e))/2,rotateX:e=>hl(fl(Math.atan2(e[6],e[5]))),rotateY:e=>hl(fl(Math.atan2(-e[2],e[0]))),rotateZ:gl,rotate:gl,skewX:e=>fl(Math.atan(e[4])),skewY:e=>fl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2},bl=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return jt(n,t)},xl=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Sl=(()=>new Set(xl))(),Cl=e=>e===xc||e===G,wl=new Set([`x`,`y`,`z`]),Tl=xl.filter(e=>!wl.has(e)),El={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-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})=>jt(t,`x`),y:(e,{transform:t})=>jt(t,`y`)},El.translateX=El.x,El.translateY=El.y,Dl=new Set,Ol=!1,kl=!1,Al=!1,jl=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?(Dl.add(this),Ol||(Ol=!0,z.read(Ft),z.resolveKeyframes(Pt))):(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])}kt(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Dl.delete(this)}cancel(){this.state===`scheduled`&&(Dl.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Ml=e=>e.startsWith(`--`),Nl={},Pl=Rt(()=>s.ScrollTimeline!==void 0,`scrollTimeline`),Fl=Rt(()=>s.ViewTimeline!==void 0,`viewTimeline`),Il=Rt(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ll=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Rl={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ll([0,.65,.55,1]),circOut:Ll([.55,0,1,.45]),backIn:Ll([.31,.01,.66,-.59]),backOut:Ll([.33,1.53,.69,.99])},zl=class extends ll{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,N(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=Ht(e);this.animation=Bt(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Et(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Lt(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(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return L(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+L(e)}get time(){return L(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=I(e),t&&this.animation.pause()}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,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Pl()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),F):r(this)}},Bl={anticipate:$s,backInOut:Qs,circInOut:nc},Vl=10,Hl=class extends zl{constructor(e){Wt(e),Dt(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(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 dl({...a,autoplay:!1}),s=Math.max(Vl,H.now()-this.startTime),c=M(0,Vl,s-Vl),l=o.sample(s).value,{name:u}=this.options;i&&u&&Lt(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Ul=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Wl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,Gl=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Kl=Fe(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),ql=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(q.test(e)||e===`0`)&&!e.startsWith(`url(`)),Jl=40,Yl=class extends ll{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=H.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||jl)(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=H.now();let u=!0;Yt(e,i,a,o)||(u=!1,(P.instantAnimations||!s)&&l?.(Et(e,n,t)),e[0]=e[e.length-1],Gt(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Jl?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&qt(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Hl({...d,element:p})}catch{m=new dl(d)}else m=new dl(d);m.finished.then(()=>{this.notifyFinished()}).catch(F),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}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(),It()),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()}},Xl=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 Xt(this.animations,`duration`)}get iterationDuration(){return Xt(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`)}},Zl=class extends Xl{then(e,t){return this.finished.finally(e).then(()=>{})}},Ql=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,$l=4,eu={type:`spring`,stiffness:500,damping:25,restSpeed:10},tu=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nu={type:`keyframes`,duration:.8},ru={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},iu=(e,{keyframes:t})=>t.length>2?nu:Sl.has(e)?e.startsWith(`scale`)?tu(t[1]):eu:ru,au=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]),ou=(e,t,n,r={},i,a)=>o=>{let s=tn(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=I(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};nn(s)||Object.assign(u,iu(e,u)),u.duration&&=I(u.duration),u.repeatDelay&&=I(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Gt(u),u.delay===0&&(d=!0)),(P.instantAnimations||P.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Gt(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Et(u.keyframes,s);if(e!==void 0){z.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new dl(u):new Yl(u)},su=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...xl]),cu=30,lu=e=>!isNaN(parseFloat(e)),uu={current:void 0},du=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=H.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=H.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=lu(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 Us);let n=this.events[e].add(t);return e===`change`?()=>{n(),z.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 uu.current&&uu.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=H.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>cu)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,cu);return Ie(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()}},fu=e=>Array.isArray(e),X=e=>!!(e&&e.getVelocity),pu=`framerAppearId`,mu=`data-`+fn(pu),hu=e=>t=>t.test(e),gu=[xc,G,W,U,Fc,Pc,{test:e=>e===`auto`,parse:e=>e}],_u=e=>gu.find(hu(e)),vu={rotate:U,rotateX:U,rotateY:U,rotateZ:U,scale:Cc,scaleX:Cc,scaleY:Cc,scaleZ:Cc,skew:U,skewX:U,skewY:U,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Sc,originX:Ic,originY:Ic,originZ:G},yu={...xc,transform:Math.round},bu={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,inset:G,insetBlock:G,insetBlockStart:G,insetBlockEnd:G,insetInline:G,insetInlineStart:G,insetInlineEnd:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,paddingBlock:G,paddingBlockStart:G,paddingBlockEnd:G,paddingInline:G,paddingInlineStart:G,paddingInlineEnd:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,marginBlock:G,marginBlockStart:G,marginBlockEnd:G,marginInline:G,marginInlineStart:G,marginInlineEnd:G,fontSize:G,backgroundPositionX:G,backgroundPositionY:G,...vu,zIndex:yu,fillOpacity:Sc,strokeOpacity:Sc,numOctaves:yu},xu=new Set([`brightness`,`contrast`,`saturate`,`opacity`]),Su=/\b([a-z-]*)\(.*?\)/gu,Cu={...q,getAnimatableNone:e=>{let t=e.match(Su);return t?t.map(yn).join(` `):e}},wu={...q,getAnimatableNone:e=>{let t=q.parse(e);return q.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Tu={...bu,color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,filter:Cu,WebkitFilter:Cu,mask:wu,WebkitMask:wu},Eu=e=>Tu[e],Du=new Set([Cu,wu]),Ou=new Set([`auto`,`none`,`0`]),ku=class extends jl{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()}},Au=(e,t)=>t&&typeof e==`number`?t.transform(e):e,{schedule:ju,cancel:Mu}=Ve(queueMicrotask,!1),Z={x:!1,y:!1},Nu=(e,t)=>t?e===t?!0:Nu(e,t.parentElement):!1,Pu=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Fu=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]),Iu=new Set([`INPUT`,`SELECT`,`TEXTAREA`]),Lu=new WeakSet,Ru=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Mn(()=>{if(Lu.has(n))return;Nn(n,`down`);let e=Mn(()=>{Nn(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Nn(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)},zu=new WeakSet,Bu=new WeakMap,Hu=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:In(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Uu=Hu(`inline`,`width`,`offsetWidth`),Wu=Hu(`block`,`height`,`offsetHeight`),Gu=new Set,qu=[...gu,K,q],Ju=e=>qu.find(hu(e)),Yu=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xu=()=>({x:Yu(),y:Yu()}),Zu=()=>({min:0,max:0}),Q=()=>({x:Zu(),y:Zu()}),Qu=new WeakMap,$u=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ed=[`initial`,...$u],td={current:null},nd={current:!1},rd=s!==void 0,id=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ad={},od=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=jl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=H.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(nd.current||ar(),this.shouldReduceMotion=td.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),B(this.notifyUpdate),B(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){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Ul.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new zl({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:I(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Sl.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&z.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;s!==void 0&&s.MotionCheckAppearSync&&(i=s.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 ad){let t=ad[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`&&(Rs(n)||zs(n))?n=parseFloat(n):!Ju(n)&&q.test(t)&&(n=bn(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=an(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 Us),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ju.render(this.render)}},sd=class extends od{constructor(){super(...arguments),this.KeyframeResolver=ku}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}`)}))}},cd=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},ld=.999999999999,ud=1.0000000000001,dd={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},fd=xl.length,pd={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(G.test(e))e=parseFloat(e);else return e;return`${kr(e,t.target.x)}% ${kr(e,t.target.y)}%`}},md={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=q.parse(e);if(i.length>5)return r;let a=q.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=J(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},hd={borderRadius:{...pd,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:pd,borderTopRightRadius:pd,borderBottomLeftRadius:pd,borderBottomRightRadius:pd,boxShadow:md},gd=class extends sd{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Or}readValueFromInstance(e,t){if(Sl.has(t))return this.projection?.isProjecting?At(t):bl(e,t);{let n=Nr(e),r=(_c(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return wr(e,t)}build(e,t,n){Dr(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Mr(e,t,n)}},_d=class extends od{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Pr(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}},vd={offset:`stroke-dashoffset`,array:`stroke-dasharray`},yd={offset:`strokeDashoffset`,array:`strokeDasharray`},bd=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`],xd=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`]),Sd=e=>typeof e==`string`&&e.toLowerCase()===`svg`,Cd=class extends sd{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Sl.has(t)){let e=Eu(t);return e&&e.default||0}return t=xd.has(t)?t:fn(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Rr(e,t,n)}build(e,t,n){Ir(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Lr(e,t,n,r)}mount(e){this.isSVGTag=Sd(e.tagName),super.mount(e)}},wd=ed.length,Td=[...$u].reverse(),Ed=$u.length,Dd=1e-4,Od=1-Dd,kd=1+Dd,Ad=.01,jd=0-Ad,Md=0+Ad,Nd=[`x`,`scaleX`,`originX`],Pd=[`y`,`scaleY`,`originY`],Fd=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Id=Fd.length,Ld=e=>typeof e==`string`?parseFloat(e):e,Rd=e=>typeof e==`number`||G.test(e),zd=gi(0,.5,tc),Bd=gi(.5,.95,F),Vd=(e,t)=>e.depth-t.depth,Hd=class{constructor(){this.children=[],this.isDirty=!1}add(e){je(this.children,e),this.isDirty=!0}remove(e){Me(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Vd),this.isDirty=!1,this.children.forEach(e)}},Ud=class{constructor(){this.members=[]}add(e){je(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Me(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Me(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){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Wd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Gd={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Kd=[``,`X`,`Y`,`Z`],qd=1e3,Jd=0,Yd={duration:.45,ease:[.4,0,.1,1]},Xd=e=>h!==void 0&&h.userAgent&&h.userAgent.toLowerCase().includes(e),Zd=Xd(`applewebkit/`)&&!Xd(`chrome/`)?Math.round:F,Qd=Ci({attachResizeListener:(e,t)=>vi(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),$d=e=>!e.isLayoutDirty&&e.willUpdate(!1),ef={current:void 0},tf=Ci({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ef.current){let e=new Qd({});e.mount(s),e.setOptions({layoutScroll:!0}),ef.current=e}return ef.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>s.getComputedStyle(e).position===`fixed`}),dc.reduce((e,t)=>(e[t]=e=>B(e),e),{}),$=p({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),nf=class extends y{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(wn(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=wn(e)&&e.offsetWidth||0,r=wn(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}},rf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:s,anchorX:c,anchorY:l,root:u})=>{let f=j(Qi),p=_(),m=!0,h=d(()=>(m=!1,{id:p,initial:t,isPresent:n,custom:i,onExitComplete:e=>{f.set(e,!0);for(let e of f.values())if(!e)return;r&&r()},register:e=>(f.set(e,!1),()=>f.delete(e))}),[n,f,r]);return a&&m&&(h={...h}),d(()=>{f.forEach((e,t)=>f.set(t,!1))},[n]),o(()=>{!n&&!f.size&&r&&r()},[n]),e=v(Zi,{pop:s===`popLayout`,isPresent:n,anchorX:c,anchorY:l,root:u,children:e}),v(Is.Provider,{value:h,children:e})},af=e=>e.key||``,of=({children:e,custom:t,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o=`sync`,propagate:s=!1,anchorX:c=`left`,anchorY:f=`top`,root:p})=>{let[m,h]=$i(s),g=d(()=>ea(e),[e]),_=s&&!m?[]:g.map(af),y=n(!0),b=n(g),x=j(()=>new Map),S=n(new Set),[C,te]=l(g),[w,ne]=l(g);Fs(()=>{y.current=!1,b.current=g;for(let e=0;e{let n=af(e),l=s&&!m?!1:g===w||_.includes(n);return v(rf,{isPresent:l,initial:!y.current||r?void 0:!1,custom:t,presenceAffectsLayout:a,mode:o,root:p,onExitComplete:l?void 0:()=>{if(S.current.has(n))return;if(x.has(n))S.current.add(n),x.set(n,!0);else return;let e=!0;x.forEach(t=>{t||(e=!1)}),e&&(re?.(),ne(b.current),s&&h?.(),i&&i())},anchorX:c,anchorY:f,children:e},n)})})},sf=p(null),cf=e=>e===!0,lf=e=>cf(e===!0)||e===`id`,uf=({children:e,id:t,inherit:r=!0})=>{let i=u(Ns),a=u(sf),[o,s]=na(),c=n(null),l=i.id||a;c.current===null&&(lf(r)&&l&&(t=t?l+`-`+t:l),c.current={id:t,group:cf(r)&&i.group||qi()});let f=d(()=>({...c.current,forceRender:o}),[s]);return v(Ns.Provider,{value:f,children:e})},df=p({strict:!1}),ff={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`]},pf=!1,mf=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.propagate.ignoreStrict.viewport`.split(`.`)),hf=e=>!oa(e);try{sa(de(`@emotion/is-prop-valid`).default)}catch{}gf=p({}),_f=e=>(t,n)=>{let r=u(gf),i=u(Is),a=()=>ua(e,t,r,i);return n?a():j(a)},vf=p({}),yf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),bf=()=>({...yf(),attrs:{}}),xf=[`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`],Sf=_f({scrapeMotionValuesFromProps:Mr,createRenderState:yf}),Cf=_f({scrapeMotionValuesFromProps:Rr,createRenderState:bf}),wf=Symbol.for(`motionComponentSymbol`),Tf=class extends cd{constructor(e){super(e),e.animationState||=Hr(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();er(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?.()}},Ef=0,Df=class extends cd{constructor(){super(...arguments),this.id=Ef++,this.isExitComplete=!1}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;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=on(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},Of={animation:{Feature:Tf},exit:{Feature:Df}},kf=e=>t=>Pu(t)&&e(t,Ma(t)),Af=(e,t)=>Math.abs(e-t),jf=(e,t)=>t.isSVG??ba(e)?new Cd(t):new gd(t,{allowProjection:e!==c}),Mf=({current:e})=>e?e.ownerDocument.defaultView:null,Nf=new Set([`auto`,`scroll`]),Pf=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=s,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=s,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(s)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Fa(this.lastRawMoveEventInfo,this.transformPagePoint));let e=La(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Pa(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=V;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.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Fa(t,this.transformPagePoint),z.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=La(e.type===`pointercancel`?this.lastMoveEventInfo:Fa(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Pu(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||s;let c=Fa(Ma(e),this.transformPagePoint),{point:l}=c,{timestamp:u}=V;this.history=[{...l,timestamp:u}];let{onSessionStart:d}=t;d&&d(e,La(c,this.history)),this.removeListeners=Vs(Na(this.contextWindow,`pointermove`,this.handlePointerMove),Na(this.contextWindow,`pointerup`,this.handlePointerUp),Na(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Nf.has(e.overflowX)||Nf.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(s,{x:s.scrollX,y:s.scrollY}),s.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),s.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{s.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),s.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===s,r=n?{x:s.scrollX,y:s.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),z.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),B(this.updatePoint)}},Ff=.35,If=new WeakMap,Lf=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.snapToCursor(Ma(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=En(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),A(e=>{let t=this.getAxisMotionValue(e).get()||0;if(W.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=k(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&z.update(()=>i(e,t),!1,!0),dn(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=eo(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&&z.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Pf(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Mf(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&&z.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!$a(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Va(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&&Ca(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Ua(n.layoutBox,e):this.constraints=!1,this.elastic=Ja(t),r!==this.constraints&&!Ca(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&A(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=qa(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ca(e))return!1;let n=e.current;N(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=Tr(n,r.root,this.visualElement.getTransformPagePoint()),a=Ga(r.layout.layoutBox,i);if(t){let e=t(lr(a));this.hasMutatedConstraints=!!e,e&&(a=cr(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=A(o=>{if(!$a(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(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 dn(this.visualElement,e),n.start(ou(e,n,0,t,this.visualElement,!1))}stopAnimation(){A(e=>this.getAxisMotionValue(e).stop())}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){A(t=>{let{drag:n}=this.getProps();if(!$a(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]-J(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ca(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};A(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Ka({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.constraints=!1,this.resolveConstraints(),A(t=>{if(!$a(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(J(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;If.set(this.visualElement,this);let e=this.visualElement.current,t=Na(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&jn(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Ca(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Qa(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),z.read(r);let o=vi(s,`resize`,()=>this.scalePositionWithinConstraints()),c=i.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(A(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),a(),c&&c(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Ff,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}},Rf=class extends cd{constructor(e){super(e),this.removeGroupControls=F,this.removeListeners=F,this.controls=new Lf(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||F}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(),this.controls.isDragging||this.controls.endPanSession()}},zf=e=>(t,n)=>{e&&z.update(()=>e(t,n),!1,!0)},Bf=class extends cd{constructor(){super(...arguments),this.removePointerDownListener=F}onPointerDown(e){this.session=new Pf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Mf(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:zf(e),onStart:zf(t),onMove:zf(n),onEnd:(e,t)=>{delete this.session,r&&z.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Na(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Vf=!1,Hf=class extends y{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),Vf&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Vf=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||z.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),ju.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Vf=!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}},Uf={pan:{Feature:Bf},drag:{Feature:Rf,ProjectionNode:tf,MeasureLayout:to}},Wf=class extends cd{mount(){let{current:e}=this.node;e&&(this.unmount=kn(e,(e,t)=>(no(this.node,t,`Start`),e=>no(this.node,e,`End`))))}unmount(){}},Gf=class extends cd{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=Vs(vi(this.node.current,`focus`,()=>this.onFocus()),vi(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},Kf=class extends cd{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Fn(e,(e,t)=>(ro(this.node,t,`Start`),(e,{success:t})=>ro(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},qf=new WeakMap,Jf=new WeakMap,Yf=e=>{let t=qf.get(e.target);t&&t(e)},Xf=e=>{e.forEach(Yf)},Zf={some:0,all:1},Qf=class extends cd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:Zf[r]};this.stopObserver=ao(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(oo(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}},$f={inView:{Feature:Qf},tap:{Feature:Kf},focus:{Feature:Gf},hover:{Feature:Wf}},ep={layout:{ProjectionNode:tf,MeasureLayout:to}},tp=ja({...Of,...$f,...Uf,...ep},jf),np={renderer:jf,...Of,...$f},{...np,...Uf,...ep},{...Of},rp=50,ip=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ap=()=>({time:0,x:ip(),y:ip()}),op={x:{length:`Width`,position:`Left`},y:{length:`Height`,position:`Top`}},sp={start:0,center:.5,end:1},cp=[0,0],lp={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},up={x:0,y:0},dp=new WeakMap,fp=new WeakMap,pp=new WeakMap,mp=new WeakMap,hp=new WeakMap,gp=e=>e===document.scrollingElement?s:e,_p=[[lp.Enter,`entry`],[lp.Exit,`exit`],[lp.Any,`cover`],[lp.All,`contain`]],vp={start:0,end:1},yp=new Map,bp=()=>({scrollX:E(0),scrollY:E(0),scrollXProgress:E(0),scrollYProgress:E(0)}),xp=e=>e?!e.current:!1,Sp=class extends du{constructor(){super(...arguments),this.isEnabled=!1}add(e){(Sl.has(e)||Ul.has(e))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?`transform`:`auto`)}},Cp=`easeInOut`,wp=20,Tp=e=>typeof e==`number`,Ep=e=>e.every(Tp),Dp=fs(),Op=ms,kp={some:0,all:1},Ap=()=>({}),_f({scrapeMotionValuesFromProps:Ap,createRenderState:Ap}),jp={},pe(jp,{Group:()=>Np,Item:()=>Bp}),Mp=p(null),Np=g(ws),Pp=50,Fp=25,Ip=new Set([`auto`,`scroll`]),Lp=new WeakMap,Rp=new WeakMap,zp=null,Bp=g(Ms)})),Hp=t((()=>{Vp()}));export{Oe as $,Jn as A,Ho as B,tp as C,ko as D,bi as E,xs as F,Qu as G,Mo as H,_s as I,be as J,fe as K,Ss as L,gs as M,ps as N,gt as O,Op as P,ke as Q,No as R,oa as S,mu as T,Bo as U,ys as V,Io as W,De as X,ge as Y,Ee as Z,bs as _,$ as a,hs as b,Is as c,Ar as d,Ce as et,Dp as f,z as g,M as h,la as i,$n as j,qn as k,vf as l,B as m,of as n,he as nt,P as o,Ot as p,Se as q,uf as r,Ae as rt,du as s,Hp as t,xe as tt,Sp as u,Vp as v,E as w,X as x,bt as y,$i as z}; //# sourceMappingURL=motion.B1SDLVbr.mjs.map