PageSourceSearch

https://creashop.ai/assets/vendor-motion-3KUSVesg.js

js creashop.ai collected 2026-10-05 14:25:39 UTC 120,198 bytes, 9 lines download raw bytes

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