PageSourceSearch

https://jointheo.xyz/framerusercontent.com/sites/2WURhIx6N89Irgw5WI8l2I/motion.BKeMsTmi.mjs

js jointheo.xyz collected 2026-10-04 05:44:29 UTC 137,630 bytes, 10 lines download raw bytes

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

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.