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