PageSourceSearch

https://laakeakatemia.fi/assets/Footer-DeMqvN6D.js

js laakeakatemia.fi collected 2026-10-09 22:02:54 UTC 126,642 bytes, 1 lines download raw bytes

1import{r as b,j as V,L as Co}from"./index-8da7yDjg.js";const Us=b.createContext({});function Mo(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const Do=typeof window<"u",Eo=Do?b.useLayoutEffect:b.useEffect,Je=b.createContext(null);function Qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Zt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const tt=(t,e,n)=>n>e?e:n<t?t:n;let tn=()=>{};const it={},Ws=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ks=t=>typeof t=="object"&&t!==null,Hs=t=>/^0[^.\s]+$/u.test(t);function Gs(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,jt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Rt=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class en{constructor(){this.subscriptions=[]}add(e){return Qe(this.subscriptions,e),()=>Zt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const K=t=>t*1e3,G=t=>t/1e3,zs=(t,e)=>e?t*(1e3/e):0,$s=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ro=1e-7,ko=12;function Lo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=$s(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ro&&++a<ko);return o}function Ft(t,e,n,s){if(t===e&&n===s)return z;const i=r=>Lo(r,0,1,t,n);return r=>r===0||r===1?r:$s(i(r),e,s)}const _s=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Xs=t=>e=>1-t(1-e),Ys=Ft(.33,1.53,.69,.99),nn=Xs(Ys),qs=_s(nn),Zs=t=>t>=1?1:(t*=2)<1?.5*nn(t):.5*(2-Math.pow(2,-10*(t-1))),sn=t=>1-Math.sin(Math.acos(t)),Js=Xs(sn),Qs=_s(sn),Bo=Ft(.42,0,1,1),jo=Ft(0,0,.58,1),ti=Ft(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",ei=t=>Array.isArray(t)&&typeof t[0]=="number",Io={linear:z,easeIn:Bo,easeInOut:ti,easeOut:jo,circIn:sn,circInOut:Qs,circOut:Js,backIn:nn,backInOut:qs,backOut:Ys,anticipate:Zs},Oo=t=>typeof t=="string",An=t=>{if(ei(t)){tn(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(Oo(t))return Io[t];return t},Nt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function No(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(l){o.has(l)&&(u.schedule(l),t()),l(a)}const u={schedule:(l,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&o.add(l),m.add(l),l},cancel:l=>{s.delete(l),o.delete(l)},process:l=>{if(a=l,i){r=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(c),n.clear(),i=!1,r&&(r=!1,u.process(l))}};return u}const Uo=40;function ni(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Nt.reduce((x,w)=>(x[w]=No(r),x),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:h,preRender:f,render:d,postRender:m}=o,p=()=>{const x=it.useManualTiming,w=x?i.timestamp:performance.now();
vendor: 38,686 bytes, line 1
1n=!1,x||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,Uo),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),c.process(i),u.process(i),l.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},g=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:Nt.reduce((x,w)=>{const A=o[w];return x[w]=(E,C=!1,S=!1)=>(n||g(),A.schedule(E,C,S)),x},{}),cancel:x=>{for(let w=0;w<Nt.length;w++)o[Nt[w]].cancel(x)},state:i,steps:o}}const{schedule:D,cancel:ot,state:I,steps:he}=ni(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Ht;function Wo(){Ht=void 0}const N={now:()=>(Ht===void 0&&N.set(I.isProcessing||it.useManualTiming?I.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(Wo)}},si=t=>e=>typeof e=="string"&&e.startsWith(t),ii=si("--"),Ko=si("var(--"),on=t=>Ko(t)?Ho.test(t.split("/*")[0].trim()):!1,Ho=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Vn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const bt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...bt,transform:t=>tt(0,1,t)},Ut={...bt,default:1},Ct=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Go(t){return t==null}const zo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&zo.test(n)&&n.startsWith(t)||e&&!Go(n)&&Object.prototype.hasOwnProperty.call(n,e)),oi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$o=t=>tt(0,255,t),fe={...bt,transform:t=>Math.round($o(t))},ht={test:an("rgb","red"),parse:oi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Ct(kt.transform(s))+")"};function _o(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ce={test:an("#"),parse:_o,transform:ht.transform},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),nt=It("deg"),Q=It("%"),T=It("px"),Xo=It("vh"),Yo=It("vw"),Cn={...Q,parse:t=>Q.parse(t)/100,transform:t=>Q.transform(t*100)},yt={test:an("hsl","hue"),parse:oi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Q.transform(Ct(e))+", "+Q.transform(Ct(n))+", "+Ct(kt.transform(s))+")"},L={test:t=>ht.test(t)||Ce.test(t)||yt.test(t),parse:t=>ht.test(t)?ht.parse(t):yt.test(t)?yt.parse(t):Ce.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):yt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Zo(t){return isNaN(t)&&typeof t=="string"&&(t.match(rn)?.length||0)+(t.match(qo)?.length||0)>0}const ri="number",ai="color",Jo="var",Qo="var(",Mn="${}",tr=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Tt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(tr,c=>(L.test(c)?(s.color.push(r),i.push(ai),n.push(L.parse(c))):c.startsWith(Qo)?(s.var.push(r),i.push(Jo),n.push(c)):(s.number.push(r),i.push(ri),n.push(parseFloat(c))),++r,Mn)).split(Mn);return{values:n,split:a,indexes:s,types:i}}function er(t){return Tt(t).values}function li({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===ri?i+=Ct(s[r]):o===ai?i+=L.transform(s[r]):i+=s[r]}return i}}function nr(t){return li(Tt(t))}const sr=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,ir=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:sr(t);function or(t){const e=Tt(t);return li(e)(e.values.map((s,i)=>ir(s,e.split[i])))}const X={test:Zo,parse:er,createTransformer:nr,getAnimatableNone:or};function de(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function rr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=de(c,a,t+1/3),r=de(c,a,t),o=de(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Jt(t,e){return n=>n>0?e:t}const M=(t,e,n)=>t+(e-t)*n,me=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ar=[Ce,ht,yt],lr=t=>ar.find(e=>e.test(t));function Dn(t){const e=lr(t);if(!e)return!1;let n=e.parse(t);return e===yt&&(n=rr(n)),n}const En=(t,e)=>{const n=Dn(t),s=Dn(e);if(!n||!s)return Jt(t,e);const i={...n};return r=>(i.red=me(n.red,s.red,r),i.green=me(n.green,s.green,r),i.blue=me(n.blue,s.blue,r),i.alpha=M(n.alpha,s.alpha,r),ht.transform(i))},Me=new Set(["none","hidden"]);function cr(t,e){return Me.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ur(t,e){return n=>M(t,e,n)}function ln(t){return typeof t=="number"?ur:typeof t=="string"?on(t)?Jt:L.test(t)?En:dr:Array.isArray(t)?ci:typeof t=="object"?L.test(t)?En:hr:Jt}function ci(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function hr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function fr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const dr=(t,e)=>{const n=X.createTransformer(e),s=Tt(t),i=Tt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Me.has(t)&&!i.values.length||Me.has(e)&&!s.values.length?cr(t,e):jt(ci(fr(s,i),i.values),n):Jt(t,e)};function ui(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):ln(t)(t,e)}const mr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>D.update(e,n),stop:()=>ot(e),now:()=>I.isProcessing?I.timestamp:N.now()}},hi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Qt=2e4;function cn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Qt;)e+=n,s=t.next(e);return e>=Qt?1/0:e}function pr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(cn(s),Qt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:G(i)}}const R={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};function De(t,e){return t*Math.sqrt(1-e*e)}const gr=12;function yr(t,e,n){let s=n;for(let i=1;i<gr;i++)s=s-t(s)/e(s);return s}const pe=.001;function vr({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,r,o=1-e;o=tt(R.minDamping,R.maxDamping,o),t=tt(R.minDuration,R.maxDuration,G(t)),o<1?(i=u=>{const l=u*o,h=l*t,f=l-n,d=De(u,o),m=Math.exp(-h);return pe-f/d*m},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=De(Math.pow(u,2),o);return(-i(u)+pe>0?-1:1)*((f-d)*m)/p}):(i=u=>{const l=Math.exp(-u*t),h=(u-n)*t+1;return-pe+l*h},r=u=>{const l=Math.exp(-u*t),h=(n-u)*(t*t);return l*h});const a=5/t,c=yr(i,r,a);if(t=K(t),isNaN(c))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const xr=["duration","bounce"],Tr=["stiffness","damping","mass"];function Rn(t,e){return e.some(n=>t[n]!==void 0)}function wr(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Rn(t,Tr)&&Rn(t,xr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*tt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:r}}else{const n=vr({...t,velocity:0});e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function te(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:u,mass:l,duration:h,velocity:f,isResolvedFromDuration:d}=wr({...n,velocity:-G(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(c*l)),g=o-r,y=G(Math.sqrt(c/l)),v=Math.abs(g)<5;s||(s=v?R.restSpeed.granular:R.restSpeed.default),i||(i=v?R.restDelta.granular:R.restDelta.default);let x,w,A,E,C,S;if(p<1)A=De(y,p),E=(m+p*y*g)/A,x=P=>{const k=Math.exp(-p*y*P);return o-k*(E*Math.sin(A*P)+g*Math.cos(A*P))},C=p*y*E+g*A,S=p*y*g-E*A,w=P=>Math.exp(-p*y*P)*(C*Math.sin(A*P)+S*Math.cos(A*P));else if(p===1){x=k=>o-Math.exp(-y*k)*(g+(m+y*g)*k);const P=m+y*g;w=k=>Math.exp(-y*k)*(y*P*k-m)}else{const P=y*Math.sqrt(p*p-1);x=Y=>{const et=Math.exp(-p*y*Y),q=Math.min(P*Y,300);return o-et*((m+p*y*g)*Math.sinh(q)+P*g*Math.cosh(q))/P};const k=(m+p*y*g)/P,W=p*y*k-g*P,at=p*y*g-k*P;w=Y=>{const et=Math.exp(-p*y*Y),q=Math.min(P*Y,300);return et*(W*Math.sinh(q)+at*Math.cosh(q))}}const j={calculatedDuration:d&&h||null,velocity:P=>K(w(P)),next:P=>{if(!d&&p<1){const W=Math.exp(-p*y*P),at=Math.sin(A*P),Y=Math.cos(A*P),et=o-W*(E*at+g*Y),q=K(W*(C*at+S*Y));return a.done=Math.abs(q)<=s&&Math.abs(o-et)<=i,a.value=a.done?o:et,a}const k=x(P);if(d)a.done=P>=h;else{const W=K(w(P));a.done=Math.abs(W)<=s&&Math.abs(o-k)<=i}return a.value=a.done?o:k,a},toString:()=>{const P=Math.min(cn(j),Qt),k=hi(W=>j.next(P*W).value,P,30);return P+"ms "+k},toTransition:()=>{}};return j}te.applyToOptions=t=>{const e=pr(t,100,te);return t.ease=e.ease,t.duration=K(e.duration),t.type="keyframes",t};const br=5;function fi(t,e,n){const s=Math.max(e-br,0);return zs(n-t(s),e-s)}function Ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:l}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||c!==void 0&&S>c,m=S=>a===void 0?c:c===void 0||Math.abs(a-S)<Math.abs(c-S)?a:c;let p=n*e;const g=h+p,y=o===void 0?g:o(g);y!==g&&(p=y-h);const v=S=>-p*Math.exp(-S/s),x=S=>y+v(S),w=S=>{const j=v(S),P=x(S);f.done=Math.abs(j)<=u,f.value=f.done?y:P};let A,E;const C=S=>{d(f.value)&&(A=S,E=te({keyframes:[f.value,m(f.value)],velocity:fi(x,S,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:l}))};return C(0),{calculatedDuration:null,next:S=>{let j=!1;return!E&&A===void 0&&(j=!0,w(S),C(S)),A!==void 0&&S>=A?E.next(S-A):(!j&&w(S),f)}}}function Pr(t,e,n){const s=[],i=n||it.mix||ui,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||z:e;a=jt(c,a)}s.push(a)}return s}function Sr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(tn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Pr(e,s,i),c=a.length,u=l=>{if(o&&l<t[0])return e[0];let h=0;if(c>1)for(;h<t.length-2&&!(l<t[h+1]);h++);const f=Rt(t[h],t[h+1],l);return a[h](f)};return n?l=>u(tt(t[0],t[r-1],l)):u}function Ar(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Rt(0,e,s);t.push(M(n,1,i))}}function Vr(t){const e=[0];return Ar(e,t.length-1),e}function Cr(t,e){return t.map(n=>n*e)}function Mr(t,e){return t.map(()=>e||ti).splice(0,t.length-1)}function Mt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(An):An(s),r={done:!1,value:e[0]},o=Cr(n&&n.length===e.length?n:Vr(e),t),a=Sr(o,e,{ease:Array.isArray(i)?i:Mr(e,i)});return{calculatedDuration:t,next:c=>(r.value=a(c),r.done=c>=t,r)}}const Dr=t=>t!==null;function ae(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Dr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Er={decay:Ee,inertia:Ee,tween:Mt,keyframes:Mt,spring:te};function di(t){typeof t.type=="string"&&(t.type=Er[t.type])}class un{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Rr=t=>t/100;class ee extends un{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;di(e);const{type:n=Mt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const c=n||Mt;c!==Mt&&typeof a[0]!="number"&&(this.mixKeyframes=jt(Rr,ui(a[0],a[1])),a=[0,100]);const u=c({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=cn(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:l,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,w=s;if(h){const S=Math.min(this.currentTime,i)/a;let j=Math.floor(S),P=S%1;!P&&S>=1&&(P=1),P===1&&j--,j=Math.min(j,h+1),j%2&&(f==="reverse"?(P=1-P,d&&(P-=d/a)):f==="mirror"&&(w=o)),x=tt(0,1,P)*a}let A;v?(this.delayState.value=l[0],A=this.delayState):A=w.next(x),r&&!v&&(A.value=r(A.value));let{done:E}=A;!v&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&m!==Ee&&(A.value=ae(l,this.options,g,this.speed)),p&&p(A.value),C&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return G(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+G(e)}get time(){return G(this.currentTime)}set time(e){e=K(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return fi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=G(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=mr,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(N.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}stopDriver(){this.driver&&(this.driver.stop(),this.driver=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)}}function kr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ft=t=>t*180/Math.PI,Re=t=>{const e=ft(Math.atan2(t[1],t[0]));return ke(e)},Lr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Re,rotateZ:Re,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ke=t=>(t=t%360,t<0&&(t+=360),t),kn=Re,Ln=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Bn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Br={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ln,scaleY:Bn,scale:t=>(Ln(t)+Bn(t))/2,rotateX:t=>ke(ft(Math.atan2(t[6],t[5]))),rotateY:t=>ke(ft(Math.atan2(-t[2],t[0]))),rotateZ:kn,rotate:kn,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Le(t){return t.includes("scale")?1:0}function Be(t,e){if(!t||t==="none")return Le(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Br,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Lr,i=a}if(!i)return Le(e);const r=s[e],o=i[1].split(",").map(Fr);return typeof r=="function"?r(o):o[r]}const jr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Be(n,e)};function Fr(t){return parseFloat(t.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],St=new Set([...Pt,"pathRotation"]),jn=t=>t===bt||t===T,Ir=new Set(["x","y","z"]),Or=Pt.filter(t=>!Ir.has(t));function Nr(t){const e=[];return Or.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const st={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Be(e,"x"),y:(t,{transform:e})=>Be(e,"y")};st.translateX=st.x;st.translateY=st.y;const dt=new Set;let je=!1,Fe=!1,Ie=!1;function mi(){if(Fe){const t=Array.from(dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Nr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Fe=!1,je=!1,dt.forEach(t=>t.complete(Ie)),dt.clear()}function pi(){dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Fe=!0)})}function Ur(){Ie=!0,pi(),mi(),Ie=!1}class hn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dt.add(this),je||(je=!0,D.read(pi),D.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}kr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dt.delete(this)}cancel(){this.state==="scheduled"&&(dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Wr=t=>t.startsWith("--");function gi(t,e,n){Wr(e)?t.style.setProperty(e,n):t.style[e]=n}const Kr={};function yi(t,e){const n=Gs(t);return()=>Kr[e]??n()}const Hr=yi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),vi=yi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Fn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vt([0,.65,.55,1]),circOut:Vt([.55,0,1,.45]),backIn:Vt([.31,.01,.66,-.59]),backOut:Vt([.33,1.53,.69,.99])};function xi(t,e){if(t)return typeof t=="function"?vi()?hi(t,e):"ease-out":ei(t)?Vt(t):Array.isArray(t)?t.map(n=>xi(n,e)||Fn.easeOut):Fn[t]}function Gr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){const l={[e]:n};c&&(l.offset=c);const h=xi(a,i);Array.isArray(h)&&(l.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(l,f)}function Ti(t){return typeof t=="function"&&"applyToOptions"in t}function zr({type:t,...e}){return Ti(t)&&vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class wi extends un{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,tn(typeof e.type!="string");const u=zr(e);this.animation=Gr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=ae(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),gi(n,s,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return G(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+G(e)}get time(){return G(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=K(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const bi={anticipate:Zs,backInOut:qs,circInOut:Qs};function $r(t){return t in bi}function _r(t){typeof t.ease=="string"&&$r(t.ease)&&(t.ease=bi[t.ease])}const ge=10;class Xr extends wi{constructor(e){_r(e),di(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ee({...o,autoplay:!1}),c=Math.max(ge,N.now()-this.startTime),u=tt(0,ge,c-ge),l=a.sample(c).value,{name:h}=this.options;r&&h&&gi(r,h,l),n.setWithVelocity(a.sample(Math.max(0,c-u)).value,l,u),a.stop()}}const In=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(X.test(t)||t==="0")&&!t.startsWith("url("));function Yr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function qr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=In(i,e),a=In(r,e);return!o||!a?!1:Yr(t)||(n==="spring"||Ti(n))&&s}function Oe(t){t.duration=0,t.type="keyframes"}const Pi=new Set(["opacity","clipPath","filter","transform"]),Zr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Jr(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Zr.test(t[e]))return!0;return!1}const Qr=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ta=Gs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ea(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return ta()&&n&&(Pi.has(n)||Qr.has(n)&&Jr(a))&&(n!=="transform"||!l)&&!u&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const na=40;class sa extends un{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:l,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=N.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:u,element:l,...h},d=l?.KeyframeResolver||hn;this.keyframeResolver=new d(a,(m,p,g)=>this.onKeyframesResolved(m,p,f,!g),c,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:l}=s;this.resolvedAt=N.now();let h=!0;qr(e,r,o,a)||(h=!1,(it.instantAnimations||!c)&&l?.(ae(e,s,n)),e[0]=e[e.length-1],Oe(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>na?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=h&&!u&&ea(d),p=d.motionValue?.owner?.current;let g;if(m)try{g=new Xr({...d,element:p})}catch{g=new ee(d)}else g=new ee(d);g.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ur()),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()}}function Si(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,l)=>u.sortNodePosition(l)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const On=30,ia=t=>!isNaN(parseFloat(t));class oa{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ia(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new en);const s=this.events[e].add(n);return e==="change"?()=>{s(),D.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>On)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,On);return zs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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()}}function wt(t,e){return new oa(t,e)}function Ai(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function fn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Ai(n,t):n}const ra={type:"spring",stiffness:500,damping:25,restSpeed:10},aa=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),la={type:"keyframes",duration:.8},ca={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ua=(t,{keyframes:e})=>e.length>2?la:St.has(t)?t.startsWith("scale")?aa(e[1]):ra:ca,ha=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function fa(t){for(const e in t)if(!ha.has(e))return!0;return!1}const dn=(t,e,n,s={},i,r)=>o=>{const a=fn(s,t)||{},c=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-K(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};fa(a)||Object.assign(l,ua(t,l)),l.duration&&(l.duration=K(l.duration)),l.repeatDelay&&(l.repeatDelay=K(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let h=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Oe(l),l.delay===0&&(h=!0)),(it.instantAnimations||it.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Oe(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=ae(l.keyframes,a);if(f!==void 0){D.update(()=>{l.onUpdate(f),l.onComplete()});return}}return a.isSync?new ee(l):new sa(l)},da=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ma(t){const e=da.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Vi(t,e,n=1){const[s,i]=ma(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ws(o)?parseFloat(o):o}return on(i)?Vi(i,e,n+1):i}function Nn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function mn(t,e,n,s){if(typeof e=="function"){const[i,r]=Nn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Nn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function mt(t,e,n){const s=t.getProps();return mn(s,e,n!==void 0?n:s.custom,t)}const Ci=new Set(["width","height","top","left","right","bottom",...Pt]),Ne=t=>Array.isArray(t);function pa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wt(n))}function ga(t){return Ne(t)?t[t.length-1]||0:t}function ya(t,e){const n=mt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ga(r[o]);pa(t,o,a)}}const O=t=>!!(t&&t.getVelocity);function va(t){return!!(O(t)&&t.add)}function Ue(t,e){const n=t.getValue("willChange");if(va(n))return n.add(e);if(!n&&it.WillChange){const s=new it.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function pn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const xa="framerAppearId",Mi="data-"+pn(xa);function Di(t){return t.props[Mi]}function Ta({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ei(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const c=t.getDefaultTransition();r=r?Ai(r,c):c;const u=r?.reduceMotion,l=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],d=r?.path;d&&d.animateVisualElement(t,a,r,n,h);for(const m in a){const p=t.getValue(m,t.latestValues[m]??null),g=a[m];if(g===void 0||f&&Ta(f,m))continue;const y={delay:n,...fn(r||{},m)};l&&(y.skipAnimations=!0);const v=p.get();if(v!==void 0&&!p.isAnimating()&&!Array.isArray(g)&&g===v&&!y.velocity){D.update(()=>p.set(g));continue}let x=!1;if(window.MotionHandoffAnimation){const E=Di(t);if(E){const C=window.MotionHandoffAnimation(E,m,D);C!==null&&(y.startTime=C,x=!0)}}Ue(t,m);const w=u??t.shouldReduceMotion;p.start(dn(m,p,g,w&&Ci.has(m)?{type:!1}:y,t,x));const A=p.animation;A&&h.push(A)}if(o){const m=()=>D.update(()=>{o&&ya(t,o)});h.length?Promise.all(h).then(m):m()}return h}function We(t,e,n={}){const s=mt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ei(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:h}=i;return wa(t,e,c,u,l,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function wa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(We(c,e,{...o,delay:n+(typeof s=="function"?0:s)+Si(t.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function ba(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>We(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=We(t,e,n);else{const i=typeof e=="function"?mt(t,e,n.custom):e;s=Promise.all(Ei(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Pa={test:t=>t==="auto",parse:t=>t},Ri=t=>e=>e.test(t),ki=[bt,T,Q,nt,Yo,Xo,Pa],Un=t=>ki.find(Ri(t));function Sa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Hs(t):!0}const Aa=new Set(["brightness","contrast","saturate","opacity"]);function Va(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=Aa.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ca=/\b([a-z-]*)\(.*?\)/gu,Ke={...X,getAnimatableNone:t=>{const e=t.match(Ca);return e?e.map(Va).join(" "):t}},He={...X,getAnimatableNone:t=>{const e=X.parse(t);return X.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Wn={...bt,transform:Math.round},Ma={rotate:nt,pathRotation:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:Ut,scaleX:Ut,scaleY:Ut,scaleZ:Ut,skew:nt,skewX:nt,skewY:nt,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:kt,originX:Cn,originY:Cn,originZ:T},ne={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...Ma,zIndex:Wn,fillOpacity:kt,strokeOpacity:kt,numOctaves:Wn},Da={...ne,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:Ke,WebkitFilter:Ke,mask:He,WebkitMask:He},Li=t=>Da[t],Ea=new Set([Ke,He]);function Bi(t,e){let n=Li(t);return Ea.has(n)||(n=X),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 1,699 bytes, line 1
1const Ra=new Set(["auto","none","0"]);function ka(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ra.has(r)&&Tt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Bi(n,i)}class La extends hn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let h=e[l];if(typeof h=="string"&&(h=h.trim(),on(h))){const f=Vi(h,n.current);f!==void 0&&(e[l]=f),l===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Ci.has(s)||e.length!==2)return;const[i,r]=e,o=Un(i),a=Un(r),c=Vn(i),u=Vn(r);if(c!==u&&st[s]){this.needsMeasurement=!0;return}if(o!==a)if(jn(o)&&jn(a))for(let l=0;l<e.length;l++){const h=e[l];typeof h=="string"&&(e[l]=parseFloat(h))}else st[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Sa(e[i]))&&s.push(i);s.length&&ka(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=st[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=st[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
vendor: 77,676 bytes, line 1
1h(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function ji(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Ge=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ba(t){return Ks(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:gn}=ni(queueMicrotask,!1),_={x:!1,y:!1};function Fi(){return _.x||_.y}function ja(t){return t==="x"||t==="y"?_[t]?null:(_[t]=!0,()=>{_[t]=!1}):_.x||_.y?null:(_.x=_.y=!0,()=>{_.x=_.y=!1})}function Ii(t,e){const n=ji(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Fa(t){return!(t.pointerType==="touch"||Fi())}function Ia(t,e,n={}){const[s,i,r]=Ii(t,n);return s.forEach(o=>{let a=!1,c=!1,u;const l=()=>{o.removeEventListener("pointerleave",m)},h=g=>{u&&(u(g),u=void 0),l()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=g=>{if(g.pointerType!=="touch"){if(a){c=!0;return}h(g)}},p=g=>{if(!Fa(g))return;c=!1;const y=e(o,g);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",p,i),o.addEventListener("pointerdown",d,i)}),r}const Oi=(t,e)=>e?t===e?!0:Oi(t,e.parentElement):!1,yn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Oa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Na(t){return Oa.has(t.tagName)||t.isContentEditable===!0}const Ua=new Set(["INPUT","SELECT","TEXTAREA"]);function Wa(t){return Ua.has(t.tagName)||t.isContentEditable===!0}const Gt=new WeakSet;function Kn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ka=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Kn(()=>{if(Gt.has(n))return;ye(n,"down");const i=Kn(()=>{ye(n,"up")}),r=()=>ye(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Hn(t){return yn(t)&&!Fi()}const Gn=new WeakSet;function Ha(t,e,n={}){const[s,i,r]=Ii(t,n),o=a=>{const c=a.currentTarget;if(!Hn(a)||Gn.has(a))return;Gt.add(c),n.stopPropagation&&Gn.add(a);const u=e(c,a),l=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Gt.has(c)&&Gt.delete(c),Hn(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{l(d,c===window||c===document||n.useGlobalTarget||Oi(c,d.target))},f=d=>{l(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Ba(a)&&(a.addEventListener("focus",u=>Ka(u,i)),!Na(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function vn(t){return Ks(t)&&"ownerSVGElement"in t}const zt=new WeakMap;let $t;const Ni=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:vn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ga=Ni("inline","width","offsetWidth"),za=Ni("block","height","offsetHeight");function $a({target:t,borderBoxSize:e}){zt.get(t)?.forEach(n=>{n(t,{get width(){return Ga(t,e)},get height(){return za(t,e)}})})}function _a(t){t.forEach($a)}function Xa(){typeof ResizeObserver>"u"||($t=new ResizeObserver(_a))}function Ya(t,e){$t||Xa();const n=ji(t);return n.forEach(s=>{let i=zt.get(s);i||(i=new Set,zt.set(s,i)),i.add(e),$t?.observe(s)}),()=>{n.forEach(s=>{const i=zt.get(s);i?.delete(e),i?.size||$t?.unobserve(s)})}}const _t=new Set;let vt;function qa(){vt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};_t.forEach(e=>e(t))},window.addEventListener("resize",vt)}function Za(t){return _t.add(t),vt||qa(),()=>{_t.delete(t),!_t.size&&typeof vt=="function"&&(window.removeEventListener("resize",vt),vt=void 0)}}function zn(t,e){return typeof t=="function"?Za(t):Ya(t,e)}function Ja(t){return vn(t)&&t.tagName==="svg"}const Qa=[...ki,L,X],tl=t=>Qa.find(Ri(t)),$n=()=>({translate:0,scale:1,origin:0,originPoint:0}),xt=()=>({x:$n(),y:$n()}),_n=()=>({min:0,max:0}),B=()=>({x:_n(),y:_n()}),el=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Lt(t){return typeof t=="string"||Array.isArray(t)}const xn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tn=["initial",...xn];function ce(t){return le(t.animate)||Tn.some(e=>Lt(t[e]))}function Ui(t){return!!(ce(t)||t.variants)}function nl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(O(i))t.addValue(s,i);else if(O(r))t.addValue(s,wt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,wt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ze={current:null},Wi={current:!1},sl=typeof window<"u";function il(){if(Wi.current=!0,!!sl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ze.current=t.matches;t.addEventListener("change",e),e()}else ze.current=!1}const Xn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let se={};function Ki(t){se=t}function ol(){return se}class rl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=hn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=N.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,D.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=ce(n),this.isVariantNode=Ui(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];u[d]!==void 0&&O(m)&&m.set(u[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,el.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.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Wi.current||il(),this.shouldReduceMotion=ze.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ot(this.notifyUpdate),ot(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Pi.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:u,duration:l}=n.accelerate,h=new wi({element:this.current,name:e,keyframes:a,times:c,ease:u,duration:K(l)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=St.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&D.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}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 se){const n=se[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):B()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Xn.length;s++){const i=Xn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=nl(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=wt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ws(s)||Hs(s))?s=parseFloat(s):!tl(s)&&X.test(n)&&(s=Bi(e,n)),this.setBaseTarget(e,O(s)?s.get():s)),O(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=mn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!O(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new en),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){gn.render(this.render)}}class Hi extends rl{constructor(){super(...arguments),this.KeyframeResolver=La}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;O(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class rt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Gi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function al({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ll(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ve(t){return t===void 0||t===1}function $e({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ut(t){return $e(t)||zi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function zi(t){return Yn(t.x)||Yn(t.y)}function Yn(t){return t&&t!=="0%"}function ie(t,e,n){const s=t-n,i=e*s;return n+i}function qn(t,e,n,s,i){return i!==void 0&&(t=ie(t,i,s)),ie(t,n,s)+e}function _e(t,e=0,n=1,s,i){t.min=qn(t.min,e,n,s,i),t.max=qn(t.max,e,n,s,i)}function $i(t,{x:e,y:n}){_e(t.x,e.translate,e.scale,e.originPoint),_e(t.y,n.translate,n.scale,n.originPoint)}const Zn=.999999999999,Jn=1.0000000000001;function cl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(J(t.x,-r.scroll.offset.x),J(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,$i(t,o)),s&&ut(r.latestValues)&&Xt(t,r.latestValues,r.layout?.layoutBox))}e.x<Jn&&e.x>Zn&&(e.x=1),e.y<Jn&&e.y>Zn&&(e.y=1)}function J(t,e){t.min+=e,t.max+=e}function Qn(t,e,n,s,i=.5){const r=M(t.min,t.max,i);_e(t,e,n,r,s)}function ts(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Xt(t,e,n){const s=n??t;Qn(t.x,ts(e.x,s.x),e.scaleX,e.scale,e.originX),Qn(t.y,ts(e.y,s.y),e.scaleY,e.scale,e.originY)}function _i(t,e){return Gi(ll(t.getBoundingClientRect(),e))}function ul(t,e,n){const s=_i(t,n),{scroll:i}=e;return i&&(J(s.x,i.offset.x),J(s.y,i.offset.y)),s}const hl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fl=Pt.length;function dl(t,e,n){let s="",i=!0;for(let o=0;o<fl;o++){const a=Pt[o],c=t[a];if(c===void 0)continue;let u=!0;if(typeof c=="number")u=c===(a.startsWith("scale")?1:0);else{const l=parseFloat(c);u=a.startsWith("scale")?l===1:l===0}if(!u||n){const l=Ge(c,ne[a]);if(!u){i=!1;const h=hl[a]||a;s+=`${h}(${l}) `}n&&(e[a]=l)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${Ge(r,ne.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function wn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const c in e){const u=e[c];if(St.has(c)){o=!0;continue}else if(ii(c)){i[c]=u;continue}else{const l=Ge(u,ne[c]);c.startsWith("origin")?(a=!0,r[c]=l):s[c]=l}}if(e.transform||(o||n?s.transform=dl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=r;s.transformOrigin=`${c} ${u} ${l}`}}function Xi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function es(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const At={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=es(t,e.target.x),s=es(t,e.target.y);return`${n}% ${s}%`}},ml={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=X.parse(t);if(i.length>5)return s;const r=X.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=c;const u=M(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},Xe={borderRadius:{...At,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:At,borderTopRightRadius:At,borderBottomLeftRadius:At,borderBottomRightRadius:At,boxShadow:ml};function Yi(t,{layout:e,layoutId:n}){return St.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Xe[t]||t==="opacity")}function bn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(O(s[o])||i&&O(i[o])||Yi(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function pl(t){return window.getComputedStyle(t)}class gl extends Hi{constructor(){super(...arguments),this.type="html",this.renderInstance=Xi}readValueFromInstance(e,n){if(St.has(n))return this.projection?.isProjecting?Le(n):jr(e,n);{const s=pl(e),i=(ii(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return _i(e,n)}build(e,n,s){wn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return bn(e,n,s)}}const yl={offset:"stroke-dashoffset",array:"stroke-dasharray"},vl={offset:"strokeDashoffset",array:"strokeDasharray"};function xl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?yl:vl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Tl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,u,l){if(wn(t,a,u),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=l?.transformBox??"fill-box",delete h.transformBox);for(const d of Tl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&xl(h,i,r,o,!1)}const Zi=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"]),Ji=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wl(t,e,n,s){Xi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Zi.has(i)?i:pn(i),e.attrs[i])}function Qi(t,e,n){const s=bn(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const r=Pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class bl extends Hi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=B}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(St.has(n)){const s=Li(n);return s&&s.default||0}return n=Zi.has(n)?n:pn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Qi(e,n,s)}build(e,n,s){qi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){wl(e,n,s,i)}mount(e){this.isSVGTag=Ji(e.tagName),super.mount(e)}}const Pl=Tn.length;function to(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?to(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Pl;n++){const s=Tn[n],i=t.props[s];(Lt(i)||i===!1)&&(e[s]=i)}return e}function eo(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Sl=[...xn].reverse(),Al=xn.length;function Vl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ba(t,n,s)))}function Cl(t){let e=Vl(t),n=ns(),s=!0,i=!1;const r=u=>(l,h)=>{const f=mt(t,h,u==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;l={...l,...p,...m}}return l};function o(u){e=u(t)}function a(u){const{props:l}=t,h=to(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let y=0;y<Al;y++){const v=Sl[y],x=n[v],w=l[v]!==void 0?l[v]:h[v],A=Lt(w),E=v===u?x.isActive:null;E===!1&&(p=y);let C=w===h[v]&&w!==l[v]&&A;if(C&&(s||i)&&t.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...m},!x.isActive&&E===null||!w&&!x.prevProp||le(w)||typeof w=="boolean")continue;if(v==="exit"&&x.isActive&&E!==!0){x.prevResolvedValues&&(m={...m,...x.prevResolvedValues});continue}const S=Ml(x.prevProp,w);let j=S||v===u&&x.isActive&&!C&&A||y>p&&A,P=!1;const k=Array.isArray(w)?w:[w];let W=k.reduce(r(v),{});E===!1&&(W={});const{prevResolvedValues:at={}}=x,Y={...at,...W},et=F=>{j=!0,d.has(F)&&(P=!0,d.delete(F)),x.needsAnimating[F]=!0;const H=t.getValue(F);H&&(H.liveStyle=!1)};for(const F in Y){const H=W[F],lt=at[F];if(m.hasOwnProperty(F))continue;let pt=!1;Ne(H)&&Ne(lt)?pt=!eo(H,lt)||S:pt=H!==lt,pt?H!=null?et(F):d.add(F):H!==void 0&&d.has(F)?et(F):x.protectedKeys[F]=!0}x.prevProp=w,x.prevResolvedValues=W,x.isActive&&(m={...m,...W}),(s||i)&&t.blockInitialAnimation&&(j=!1);const q=C&&S;j&&(!q||P)&&f.push(...k.map(F=>{const H={type:v};if(typeof F=="string"&&(s||i)&&!q&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,pt=mt(lt,F);if(lt.enteringChildren&&pt){const{delayChildren:Vo}=pt.transition||{};H.delay=Si(lt.enteringChildren,t,Vo)}}return{animation:F,options:H}}))}if(d.size){const y={};if(typeof l.initial!="boolean"){const v=mt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);v&&v.transition&&(y.transition=v.transition)}d.forEach(v=>{const x=t.getBaseTarget(v),w=t.getValue(v);w&&(w.liveStyle=!0),y[v]=x??null}),f.push({animation:y})}let g=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function c(u,l){if(n[u].isActive===l)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(u,l)),n[u].isActive=l;const h=a(u);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ns(),i=!0}}}function Ml(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!eo(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ns(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}function Ye(t,e){t.min=e.min,t.max=e.max}function $(t,e){Ye(t.x,e.x),Ye(t.y,e.y)}function ss(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const no=1e-4,Dl=1-no,El=1+no,so=.01,Rl=0-so,kl=0+so;function U(t){return t.max-t.min}function Ll(t,e,n){return Math.abs(t-e)<=n}function is(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=U(n)/U(e),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Dl&&t.scale<=El||isNaN(t.scale))&&(t.scale=1),(t.translate>=Rl&&t.translate<=kl||isNaN(t.translate))&&(t.translate=0)}function Dt(t,e,n,s){is(t.x,e.x,n.x,s?s.originX:void 0),is(t.y,e.y,n.y,s?s.originY:void 0)}function os(t,e,n,s=0){const i=s?M(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+U(e)}function Bl(t,e,n,s){os(t.x,e.x,n.x,s?.x),os(t.y,e.y,n.y,s?.y)}function rs(t,e,n,s=0){const i=s?M(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+U(e)}function oe(t,e,n,s){rs(t.x,e.x,n.x,s?.x),rs(t.y,e.y,n.y,s?.y)}function as(t,e,n,s,i){return t-=e,t=ie(t,1/n,s),i!==void 0&&(t=ie(t,1/i,s)),t}function jl(t,e=0,n=1,s=.5,i,r=t,o=t){if(Q.test(e)&&(e=parseFloat(e),e=M(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=M(r.min,r.max,s);t===r&&(a-=e),t.min=as(t.min,e,n,a,i),t.max=as(t.max,e,n,a,i)}function ls(t,e,[n,s,i],r,o){jl(t,e[n],e[s],e[i],e.scale,r,o)}const Fl=["x","scaleX","originX"],Il=["y","scaleY","originY"];function cs(t,e,n,s){ls(t.x,e,Fl,n?n.x:void 0,s?s.x:void 0),ls(t.y,e,Il,n?n.y:void 0,s?s.y:void 0)}function us(t){return t.translate===0&&t.scale===1}function io(t){return us(t.x)&&us(t.y)}function hs(t,e){return t.min===e.min&&t.max===e.max}function Ol(t,e){return hs(t.x,e.x)&&hs(t.y,e.y)}function fs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function oo(t,e){return fs(t.x,e.x)&&fs(t.y,e.y)}function ds(t){return U(t.x)/U(t.y)}function ms(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Z(t){return[t("x"),t("y")]}function Nl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:l,pathRotation:h,rotateX:f,rotateY:d,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),l&&(s+=`rotate(${l}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const ro=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Ul=ro.length,ps=t=>typeof t=="string"?parseFloat(t):t,gs=t=>typeof t=="number"||T.test(t);function Wl(t,e,n,s,i,r){i?(t.opacity=M(0,n.opacity??1,Kl(s)),t.opacityExit=M(e.opacity??1,0,Hl(s))):r&&(t.opacity=M(e.opacity??1,n.opacity??1,s));for(let o=0;o<Ul;o++){const a=ro[o];let c=ys(e,a),u=ys(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||gs(c)===gs(u)?(t[a]=Math.max(M(ps(c),ps(u),s),0),(Q.test(u)||Q.test(c))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=M(e.rotate||0,n.rotate||0,s))}function ys(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Kl=ao(0,.5,Js),Hl=ao(.5,.95,z);function ao(t,e,n){return s=>s<t?0:s>e?1:n(Rt(t,e,s))}function Gl(t,e,n){const s=O(t)?t:wt(t);return s.start(dn("",s,e,n)),s.animation}function Bt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const zl=(t,e)=>t.depth-e.depth;class $l{constructor(){this.children=[],this.isDirty=!1}add(e){Qe(this.children,e),this.isDirty=!0}remove(e){Zt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(zl),this.isDirty=!1,this.children.forEach(e)}}function _l(t,e){const n=N.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(ot(s),t(r-e))};return D.setup(s,!0),()=>ot(s)}function Yt(t){return O(t)?t.get():t}class Xl{constructor(){this.members=[]}add(e){Qe(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Zt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Zt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const qt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Yl=1e3;let ql=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Di(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",D,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&lo(s)}function co({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=ql++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ql),this.nodes.forEach(oc),this.nodes.forEach(rc),this.nodes.forEach(tc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new $l)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new en),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=vn(o)&&!Ja(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let l,h=0;const f=()=>this.root.updateBlockedByResize=!1;D.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,l&&l(),l=_l(f,250),qt.hasAnimatedSinceResize&&(qt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ts)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||hc,{onLayoutAnimationStart:p,onLayoutAnimationComplete:g}=u.getProps(),y=!this.targetLayout||!oo(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...fn(m,"layout"),onPlay:p,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(l,v,x.path)}else h||Ts(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ot(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(ac),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&lo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const h=this.path[l];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(nc),this.nodes.forEach(vs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sc),this.nodes.forEach(ic),this.nodes.forEach(Zl),this.nodes.forEach(Jl)):this.nodes.forEach(xs),this.clearAllSnapshots();const a=N.now();I.delta=tt(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,he.update.process(I),he.preRender.process(I),he.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ec),this.sharedNodes.forEach(lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,D.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){D.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=B()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!io(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ut(this.latestValues)||l)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),fc(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return B();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dc))){const{scroll:u}=this.root;u&&(J(a.x,u.offset.x),J(a.y,u.offset.y))}return a}removeElementScroll(o){const a=B();if($(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:l,options:h}=u;u!==this.root&&l&&h.layoutScroll&&(l.wasRoot&&$(a,o),J(a.x,l.offset.x),J(a.y,l.offset.y))}return a}applyTransform(o,a=!1,c){const u=c||B();$(u,o);for(let l=0;l<this.path.length;l++){const h=this.path[l];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(J(u.x,-h.scroll.offset.x),J(u.y,-h.scroll.offset.y)),ut(h.latestValues)&&Xt(u,h.latestValues,h.layout?.layoutBox)}return ut(this.latestValues)&&Xt(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(o){const a=B();$(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!ut(u.latestValues))continue;let l;u.instance&&($e(u.latestValues)&&u.updateSnapshot(),l=B(),$(l,u.measurePageBox())),cs(a,u.latestValues,u.snapshot?.layoutBox,l)}return ut(this.latestValues)&&cs(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:h}=this.options;if(!this.layout||!(l||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):$(this.target,this.layout.layoutBox),$i(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||$e(this.parent.latestValues)||zi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),oe(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),$(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===I.timestamp&&(c=!1),c)return;const{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;$(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;cl(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=B());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ss(this.prevProjectionDelta.x,this.projectionDelta.x),ss(this.prevProjectionDelta.y,this.projectionDelta.y)),Dt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!ms(this.projectionDelta.x,this.prevProjectionDelta.x)||!ms(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xt(),this.projectionDelta=xt(),this.projectionDeltaWithTransform=xt()}setAnimationOrigin(o,a=!1,c){const u=this.snapshot,l=u?u.latestValues:{},h={...this.latestValues},f=xt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=B(),m=u?u.source:void 0,p=this.layout?this.layout.source:void 0,g=m!==p,y=this.getStack(),v=!y||y.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(uc));this.animationProgress=0;let w;const A=c?.interpolateProjection(o);this.mixTargetDelta=E=>{const C=E/1e3,S=A?.(C);S?(f.x.translate=S.x,f.x.scale=M(o.x.scale,1,C),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=S.y,f.y.scale=M(o.y.scale,1,C),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(ws(f.x,o.x,C),ws(f.y,o.y,C)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oe(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),cc(this.relativeTarget,this.relativeTargetOrigin,d,C),w&&Ol(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=B()),$(w,this.relativeTarget)),g&&(this.animationValues=h,Wl(h,l,this.latestValues,C,x,v)),S&&S.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=S.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=D.update(()=>{qt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Gl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&uo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||B();const h=U(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=U(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}$(a,c),Xt(a,l),Dt(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Xl),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Te("z",o,u,this.animationValues);for(let l=0;l<xe.length;l++)Te(`rotate${xe[l]}`,o,u,this.animationValues),Te(`skew${xe[l]}`,o,u,this.animationValues);o.render();for(const l in u)o.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Yt(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Yt(a?.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Nl(this.projectionDeltaWithTransform,this.treeScale,l);c&&(h=c(l,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const m in Xe){if(l[m]===void 0)continue;const{correct:p,applyTo:g,isCSSVariable:y}=Xe[m],v=h==="none"?l[m]:p(l[m],u);if(g){const x=g.length;for(let w=0;w<x;w++)o[g[w]]=v}else y?this.options.visualElement.renderState.vars[m]=v:o[m]=v}this.options.layoutId&&(o.pointerEvents=u===this?Yt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(vs),this.root.sharedNodes.clear()}}}function Zl(t){t.updateLayout()}function Jl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")Z(l=>{const h=r?e.measuredBox[l]:e.layoutBox[l],f=U(h);h.min=n[l].min,h.max=h.min+f});else if(i==="x"||i==="y"){const l=i==="x"?"y":"x";Ye(r?e.measuredBox[l]:e.layoutBox[l],n[l])}else uo(i,e.layoutBox,n)&&Z(l=>{const h=r?e.measuredBox[l]:e.layoutBox[l],f=U(n[l]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[l].max=t.relativeTarget[l].min+f)});const o=xt();Dt(o,n,e.layoutBox);const a=xt();r?Dt(a,t.applyTransform(s,!0),e.measuredBox):Dt(a,n,e.layoutBox);const c=!io(o);let u=!1;if(!t.resumeFrom){const l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:h,layout:f}=l;if(h&&f){const d=t.options.layoutAnchor||void 0,m=B();oe(m,e.layoutBox,h.layoutBox,d);const p=B();oe(p,n,f.layoutBox,d),oo(m,p)||(u=!0),l.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=l)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Ql(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function tc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ec(t){t.clearSnapshot()}function vs(t){t.clearMeasurements()}function nc(t){t.isLayoutDirty=!0,t.updateLayout()}function xs(t){t.isLayoutDirty=!1}function sc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ic(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ts(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oc(t){t.resolveTargetDelta()}function rc(t){t.calcProjection()}function ac(t){t.resetSkewAndRotation()}function lc(t){t.removeLeadSnapshot()}function ws(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function bs(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function cc(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function uc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hc={duration:.45,ease:[.4,0,.1,1]},Ps=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ss=Ps("applewebkit/")&&!Ps("chrome/")?Math.round:z;function As(t){t.min=Ss(t.min),t.max=Ss(t.max)}function fc(t){As(t.x),As(t.y)}function uo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ll(ds(e),ds(n),.2)}function dc(t){return t!==t.root&&t.scroll?.wasRoot}const mc=co({attachResizeListener:(t,e)=>Bt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),we={current:void 0},ho=co({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new mc({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),fo=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function pc(t=!0){const e=b.useContext(Je);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=b.useId();b.useEffect(()=>{if(t)return i(r)},[t]);const o=b.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const mo=b.createContext({strict:!1}),Vs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Cs=!1;function gc(){if(Cs)return;const t={};for(const e in Vs)t[e]={isEnabled:n=>Vs[e].some(s=>!!n[s])};Ki(t),Cs=!0}function po(){return gc(),ol()}function yc(t){const e=po();for(const n in t)e[n]={...e[n],...t[n]};Ki(e)}const vc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function re(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||vc.has(t)}let go=t=>!re(t);function xc(t){typeof t=="function"&&(go=e=>e.startsWith("on")?!re(e):t(e))}try{xc(require("@emotion/is-prop-valid").default)}catch{}function Tc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||O(t[i])||(go(i)||n===!0&&re(i)||!e&&!re(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ue=b.createContext({});function wc(t,e){if(ce(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function bc(t){const{initial:e,animate:n}=wc(t,b.useContext(ue));return b.useMemo(()=>({initial:e,animate:n}),[Ms(e),Ms(n)])}function Ms(t){return Array.isArray(t)?t.join(" "):t}const Pn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yo(t,e,n){for(const s in e)!O(e[s])&&!Yi(s,n)&&(t[s]=e[s])}function Pc({transformTemplate:t},e){return b.useMemo(()=>{const n=Pn();return wn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Sc(t,e){const n=t.style||{},s={};return yo(s,n,t),Object.assign(s,Pc(t,e)),s}function Ac(t,e){const n={},s=Sc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const vo=()=>({...Pn(),attrs:{}});function Vc(t,e,n,s){const i=b.useMemo(()=>{const r=vo();return qi(r,e,Ji(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};yo(r,t.style,t),i.style={...r,...i.style}}return i}const Cc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Sn(t){return typeof t!="string"||t.includes("-")?!1:!!(Cc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Mc(t,e,n,{latestValues:s},i,r=!1,o){const c=(o??Sn(t)?Vc:Ac)(e,s,i,t),u=Tc(e,typeof t=="string",r),l=t!==b.Fragment?{...u,...c,ref:n}:{},{children:h}=e,f=b.useMemo(()=>O(h)?h.get():h,[h]);return b.createElement(t,{...l,children:f})}function Dc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ec(n,s,i,t),renderState:e()}}function Ec(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Yt(r[f]);let{initial:o,animate:a}=t;const c=ce(t),u=Ui(t);e&&u&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||o===!1;const h=l?a:o;if(h&&typeof h!="boolean"&&!le(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=mn(t,f[d]);if(m){const{transitionEnd:p,transition:g,...y}=m;for(const v in y){let x=y[v];if(Array.isArray(x)){const w=l?x.length-1:0;x=x[w]}x!==null&&(i[v]=x)}for(const v in p)i[v]=p[v]}}}return i}const xo=t=>(e,n)=>{const s=b.useContext(ue),i=b.useContext(Je),r=()=>Dc(t,e,s,i);return n?r():Mo(r)},Rc=xo({scrapeMotionValuesFromProps:bn,createRenderState:Pn}),kc=xo({scrapeMotionValuesFromProps:Qi,createRenderState:vo}),Lc=Symbol.for("motionComponentSymbol");function Bc(t,e,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const i=b.useRef(null);return b.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const To=b.createContext({});function gt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function jc(t,e,n,s,i,r){const{visualElement:o}=b.useContext(ue),a=b.useContext(mo),c=b.useContext(Je),u=b.useContext(fo),l=u.reducedMotion,h=u.skipAnimations,f=b.useRef(null),d=b.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,p=b.useContext(To);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Fc(f.current,n,i,p);const g=b.useRef(!1);b.useInsertionEffect(()=>{m&&g.current&&m.update(n,c)});const y=n[Mi],v=b.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Eo(()=>{d.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),b.useEffect(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),m.enteringChildren=void 0)}),m}function Fc(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:l,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:wo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&gt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:c,layoutRoot:u,layoutAnchor:l})}function wo(t){if(t)return t.options.allowProjection!==!1?t.projection:wo(t.parent)}function be(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&yc(s);const r=n?n==="svg":Sn(t),o=r?kc:Rc;function a(u,l){let h;const f={...b.useContext(fo),...u,layoutId:Ic(u)},{isStatic:d}=f,m=bc(u),p=o(u,d);if(!d&&typeof window<"u"){Oc();const g=Nc(f);h=g.MeasureLayout,m.visualElement=jc(t,p,f,i,g.ProjectionNode,r)}return V.jsxs(ue.Provider,{value:m,children:[h&&m.visualElement?V.jsx(h,{visualElement:m.visualElement,...f}):null,Mc(t,u,Bc(p,m.visualElement,l),p,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=b.forwardRef(a);return c[Lc]=t,c}function Ic({layoutId:t}){const e=b.useContext(Us).id;return e&&t!==void 0?e+"-"+t:t}function Oc(t,e){b.useContext(mo).strict}function Nc(t){const e=po(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Uc(t,e){if(typeof Proxy>"u")return be;const n=new Map,s=(r,o)=>be(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,be(o,void 0,t,e)),n.get(o))})}const Wc=(t,e)=>e.isSVG??Sn(t)?new bl(e):new gl(e,{allowProjection:t!==b.Fragment});class Kc extends rt{constructor(e){super(e),e.animationState||(e.animationState=Cl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();le(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Hc=0;class Gc extends rt{constructor(){super(...arguments),this.id=Hc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=mt(this.node,r,o);if(a){const{transition:c,transitionEnd:u,...l}=a;for(const h in l)this.node.getValue(h)?.jump(l[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const zc={animation:{Feature:Kc},exit:{Feature:Gc}};function Ot(t){return{point:{x:t.pageX,y:t.pageY}}}const $c=t=>e=>yn(e)&&t(e,Ot(e));function Et(t,e,n,s){return Bt(t,e,$c(n),s)}const bo=({current:t})=>t?t.ownerDocument.defaultView:null,Ds=(t,e)=>Math.abs(t-e);function _c(t,e){const n=Ds(t.x,e.x),s=Ds(t.y,e.y);return Math.sqrt(n**2+s**2)}const Es=new Set(["auto","scroll"]);class Po{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Wt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Pe(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=_c(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:g}=d,{timestamp:y}=I;this.history.push({...g,timestamp:y});const{onStart:v,onMove:x}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Wt(m,this.transformPagePoint),D.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Pe(d.type==="pointercancel"?this.lastMoveEventInfo:Wt(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,v),g&&g(d,v)},!yn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const c=Ot(e),u=Wt(c,this.transformPagePoint),{point:l}=u,{timestamp:h}=I;this.history=[{...l,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Pe(u,this.history)),this.removeListeners=jt(Et(this.contextWindow,"pointermove",this.handlePointerMove),Et(this.contextWindow,"pointerup",this.handlePointerUp),Et(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Es.has(s.overflowX)||Es.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),D.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ot(this.updatePoint)}}function Wt(t,e){return e?{point:e(t.point)}:t}function Rs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pe({point:t},e){return{point:t,delta:Rs(t,So(e)),offset:Rs(t,Xc(e)),velocity:Yc(e,.1)}}function Xc(t){return t[0]}function So(t){return t[t.length-1]}function Yc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=So(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>K(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>K(e)*2&&(s=t[1]);const r=G(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function qc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?M(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function ks(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Zc(t,{top:e,left:n,bottom:s,right:i}){return{x:ks(t.x,n,i),y:ks(t.y,e,s)}}function Ls(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Jc(t,e){return{x:Ls(t.x,e.x),y:Ls(t.y,e.y)}}function Qc(t,e){let n=.5;const s=U(t),i=U(e);return i>s?n=Rt(e.min,e.max-s,t.min):s>i&&(n=Rt(t.min,t.max-i,e.min)),tt(0,1,n)}function tu(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const qe=.35;function eu(t=qe){return t===!1?t=0:t===!0&&(t=qe),{x:Bs(t,"left","right"),y:Bs(t,"top","bottom")}}function Bs(t,e,n){return{min:js(t,e),max:js(t,n)}}function js(t,e){return typeof t=="number"?t:t[e]||0}const nu=new WeakMap;class su{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=B(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Ot(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:p}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ja(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Z(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Q.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[y];w&&(v=U(w)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&D.update(()=>p(h,f),!1,!0),Ue(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:p,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=ou(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&D.update(()=>g(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Po(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:s,contextWindow:bo(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&D.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Kt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=qc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&gt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Zc(s.layoutBox,e):this.constraints=!1,this.elastic=eu(n),i!==this.constraints&&!gt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&Z(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=tu(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!gt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=ul(s,i.root,this.visualElement.getTransformPagePoint());let o=Jc(i.layout.layoutBox,r);if(n){const a=n(al(o));this.hasMutatedConstraints=!!a,a&&(o=Gi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Z(l=>{if(!Kt(l,n,this.currentDirection))return;let h=c&&c[l]||{};(o===!0||o===l)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[l]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(l,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ue(this.visualElement,e),s.start(dn(e,s,0,n,this.visualElement,!1))}stopAnimation(){Z(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Z(n=>{const{drag:s}=this.getProps();if(!Kt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],c=r.get()||0;r.set(e[n]-M(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!gt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Z(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();i[o]=Qc({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),Z(o=>{if(!Kt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(M(c,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;nu.set(this.visualElement,this);const e=this.visualElement.current,n=Et(e,"pointerdown",u=>{const{drag:l,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&Wa(f);l&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();gt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=iu(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),D.read(i);const a=Bt(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(Z(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=qe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Fs(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function iu(t,e,n){const s=zn(t,Fs(n)),i=zn(e,Fs(n));return()=>{s(),i()}}function Kt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ou(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ru extends rt{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new su(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Se=t=>(e,n)=>{t&&D.update(()=>t(e,n),!1,!0)};class au extends rt{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new Po(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Se(e),onStart:Se(n),onMove:Se(s),onEnd:(r,o)=>{delete this.session,i&&D.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Et(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ae=!1;class lu extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ae&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),qt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ae=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||D.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),gn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ae=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ao(t){const[e,n]=pc(),s=b.useContext(Us);return V.jsx(lu,{...t,layoutGroup:s,switchLayoutGroup:b.useContext(To),isPresent:e,safeToRemove:n})}const cu={pan:{Feature:au},drag:{Feature:ru,ProjectionNode:ho,MeasureLayout:Ao}};function Is(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&D.postRender(()=>r(e,Ot(e)))}class uu extends rt{mount(){const{current:e}=this.node;e&&(this.unmount=Ia(e,(n,s)=>(Is(this.node,s,"Start"),i=>Is(this.node,i,"End"))))}unmount(){}}class hu extends rt{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=jt(Bt(this.node.current,"focus",()=>this.onFocus()),Bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Os(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&D.postRender(()=>r(e,Ot(e)))}class fu extends rt{mount(){const{current:e}=this.node;if(!e)return;
1const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ha(e,(i,r)=>(Os(this.node,r,"Start"),(o,{success:a})=>Os(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Ze=new WeakMap,Ve=new WeakMap,du=t=>{const e=Ze.get(t.target);e&&e(t)},mu=t=>{t.forEach(du)};function pu({root:t,...e}){const n=t||document;Ve.has(n)||Ve.set(n,{});const s=Ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(mu,{root:t,...e})),s[i]}function gu(t,e,n){const s=pu(e);return Ze.set(t,n),s.observe(t),()=>{Ze.delete(t),s.unobserve(t)}}const yu={some:0,all:1};class vu extends rt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:yu[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:h}=this.node.getProps(),f=u?l:h;f&&f(c)};this.stopObserver=gu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(xu(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function xu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Tu={inView:{Feature:vu},tap:{Feature:fu},focus:{Feature:hu},hover:{Feature:uu}},wu={layout:{ProjectionNode:ho,MeasureLayout:Ao}},bu={...zc,...Tu,...cu,...wu},Pu=Uc(bu,Wc),Su="/__l5e/assets-v1/74a2f629-58f4-4285-9468-8c467cde6d86/fleming-owl.jpg",Au={url:Su},Ns=[{href:"/#palvelulupaus",label:"Palvelulupaus"},{href:"/#palvelut",label:"Palvelut"},{href:"/#tiimi",label:"Tiimi"},{href:"/#hinnoittelu",label:"Hinnoittelu"},{href:"/#yhteystiedot",label:"Yhteystiedot"}];function Du(){const[t,e]=b.useState(!1),[n,s]=b.useState(!1);return b.useEffect(()=>{const i=()=>e(window.scrollY>8);return i(),window.addEventListener("scroll",i,{passive:!0}),()=>window.removeEventListener("scroll",i)},[]),V.jsxs("header",{className:`fixed top-0 inset-x-0 z-50 transition-all ${t?"bg-white/90 backdrop-blur-md border-b border-border shadow-sm":"bg-transparent"}`,children:[V.jsxs("div",{className:"mx-auto max-w-7xl px-5 lg:px-8 h-16 flex items-center justify-between",children:[V.jsxs(Co,{to:"/",className:"flex items-center gap-2 font-black text-lg text-brand-dark",children:[V.jsx("img",{src:Au.url,alt:"Lääkeakatemia logo",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover"}}),V.jsx("span",{children:"Lääkeakatemia"})]}),V.jsx("nav",{className:"hidden md:flex items-center gap-7",children:Ns.map(i=>V.jsx("a",{href:i.href,className:"text-sm font-medium text-brand-dark/80 hover:text-brand-dark transition-colors",children:i.label},i.href))}),V.jsxs("div",{className:"flex items-center gap-3",children:[V.jsx("a",{href:"https://outlook.office.com/bookwithme/user/[email protected]/meetingtype/Ao_fmeWGckSQDAHEdb_Sjw2?anonymous&ismsaljsauthenabled",target:"_blank",rel:"noopener noreferrer",className:"hidden sm:inline-flex items-center rounded-full bg-brand-yellow px-5 py-2.5 text-sm font-bold text-brand-dark hover:brightness-95 transition-all shadow-sm",children:"Varaa tapaaminen"}),V.jsx("button",{"aria-label":"Avaa valikko",className:"md:hidden p-2 rounded-md text-brand-dark",onClick:()=>s(i=>!i),children:V.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n?V.jsx("path",{d:"M6 6l12 12M18 6L6 18"}):V.jsx("path",{d:"M4 7h16M4 12h16M4 17h16"})})})]})]}),n&&V.jsx(Pu.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:"md:hidden bg-white border-t border-border",children:V.jsx("div",{className:"px-5 py-3 flex flex-col gap-1",children:Ns.map(i=>V.jsx("a",{href:i.href,onClick:()=>s(!1),className:"py-2 text-brand-dark font-medium",children:i.label},i.href))})})]})}function Eu(){return V.jsx("footer",{className:"border-t border-white/10 py-10",style:{backgroundColor:"#161f16"},children:V.jsxs("div",{className:"mx-auto max-w-7xl px-5 lg:px-8 grid md:grid-cols-3 gap-6 items-center text-sm",children:[V.jsxs("div",{className:"text-white/80",children:[V.jsxs("p",{className:"font-black text-white flex items-center gap-2",children:[V.jsx("span",{children:"🦉"})," Lääkeakatemia"]}),V.jsx("p",{className:"mt-2 text-white/50 text-xs",children:"© 2026 LäÃ
1¤keakatemia. Kaikki oikeudet pidätetään."})]}),V.jsxs("nav",{className:"flex flex-wrap gap-x-5 gap-y-2 md:justify-center text-white/70 text-xs",children:[V.jsx("a",{href:"/#palvelulupaus",className:"hover:text-brand-yellow",children:"Palvelulupaus"}),V.jsx("a",{href:"/#palvelut",className:"hover:text-brand-yellow",children:"Palvelut"}),V.jsx("a",{href:"/#tiimi",className:"hover:text-brand-yellow",children:"Tiimi"}),V.jsx("a",{href:"/#hinnoittelu",className:"hover:text-brand-yellow",children:"Hinnoittelu"}),V.jsx("a",{href:"/#yhteystiedot",className:"hover:text-brand-yellow",children:"Yhteystiedot"})]}),V.jsxs("div",{className:"md:text-right text-white/70",children:[V.jsx("a",{href:"mailto:[email protected]",className:"hover:text-brand-yellow",children:"[email protected]"}),V.jsx("div",{className:"mt-2 flex gap-2 md:justify-end",children:["in","X","f"].map(t=>V.jsx("span",{className:"w-7 h-7 rounded-full bg-white/10 flex items-center justify-center text-[11px] font-bold text-white/70",children:t},t))})]})]})})}export{Eu as F,Us as L,fo as M,Du as N,Je as P,pc as a,Eo as b,Au as f,Ba as i,Pu as m,Mo as u};

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.