Files
relaticle-comments/assets/P1Petxml.js
github-actions[bot] d45f686ca6 Deploy 1.x docs
2026-03-27 12:10:39 +00:00

10 lines
126 KiB
JavaScript

import{b5 as Ao,aO as Vo,c as Mt,v as Bs,bL as Co,w as Mo,bf as Eo,G as Fs,aY as Do,H as Is,bu as Ro,bM as Lo,d as js,bd as Os,bl as ko,m as Xt,Y as Bo,o as st,a as yt,p as et,q as Fo,s as D,W as be,bN as Io,bO as jo,a0 as Oo,a1 as Uo,a4 as dn,ar as No,e as pn,B as tt,bP as $o,F as Wo,bQ as mn,bR as Ko,bS as _o,ac as yn,f as gn,bT as Go,aS as zo,am as vn,bU as Ho}from"./DklXDfzJ.js";function jt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,s=Symbol(n);return[o=>{const a=Ao(s,o);if(a===void 0)throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(Vo(s,o),o),s]}function Xo(t,e){const{layoutGroup:n,presenceContext:s,config:i}=e,r=n.id&&t.layoutId?`${n.id}-${t.layoutId}`:t.layoutId||void 0;return{...t,layoutId:r,transition:t.transition??i.transition,layoutGroup:n,motionConfig:i,inViewOptions:t.inViewOptions??i.inViewOptions,presenceContext:s,initial:s.initial===!1?s.initial:t.initial===!0?void 0:t.initial}}function ze(t,e){t.indexOf(e)===-1&&t.push(e)}function Yt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Q=(t,e,n)=>n>e?e:n<t?t:n;let He=()=>{};const rt={},Us=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ns(t){return typeof t=="object"&&t!==null}const $s=t=>/^0[^.\s]+$/u.test(t);function Ws(t){let e;return()=>(e===void 0&&(e=t()),e)}const K=t=>t,Yo=(t,e)=>n=>e(t(n)),Ot=(...t)=>t.reduce(Yo),kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Xe{constructor(){this.subscriptions=[]}add(e){return ze(this.subscriptions,e),()=>Yt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _=t=>t*1e3,W=t=>t/1e3;function Ks(t,e){return e?t*(1e3/e):0}const _s=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,qo=1e-7,Zo=12;function Qo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=_s(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>qo&&++a<Zo);return o}function Ut(t,e,n,s){if(t===e&&n===s)return K;const i=r=>Qo(r,0,1,t,n);return r=>r===0||r===1?r:_s(i(r),e,s)}const Gs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zs=t=>e=>1-t(1-e),Hs=Ut(.33,1.53,.69,.99),Ye=zs(Hs),Xs=Gs(Ye),Ys=t=>t>=1?1:(t*=2)<1?.5*Ye(t):.5*(2-Math.pow(2,-10*(t-1))),qe=t=>1-Math.sin(Math.acos(t)),qs=zs(qe),Zs=Gs(qe),Jo=Ut(.42,0,1,1),tr=Ut(0,0,.58,1),Qs=Ut(.42,0,.58,1),er=t=>Array.isArray(t)&&typeof t[0]!="number",Js=t=>Array.isArray(t)&&typeof t[0]=="number",nr={linear:K,easeIn:Jo,easeInOut:Qs,easeOut:tr,circIn:qe,circInOut:Zs,circOut:qs,backIn:Ye,backInOut:Xs,backOut:Hs,anticipate:Ys},sr=t=>typeof t=="string",xn=t=>{if(Js(t)){He(t.length===4);const[e,n,s,i]=t;return Ut(e,n,s,i)}else if(sr(t))return nr[t];return t},$t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ir(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&o.add(u),p.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(l),n.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const or=40;function ti(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=$t.reduce((x,w)=>(x[w]=ir(r),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:p}=o,y=()=>{const x=rt.useManualTiming,w=x?i.timestamp:performance.now();n=!1,x||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,or),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},m=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:$t.reduce((x,w)=>{const S=o[w];return x[w]=(L,U=!1,P=!1)=>(n||m(),S.schedule(L,U,P)),x},{}),cancel:x=>{for(let w=0;w<$t.length;w++)o[$t[w]].cancel(x)},state:i,steps:o}}const{schedule:A,cancel:at,state:B,steps:re}=ti(typeof requestAnimationFrame<"u"?requestAnimationFrame:K,!0);let _t;function rr(){_t=void 0}const j={now:()=>(_t===void 0&&j.set(B.isProcessing||rt.useManualTiming?B.timestamp:performance.now()),_t),set:t=>{_t=t,queueMicrotask(rr)}},ei=t=>e=>typeof e=="string"&&e.startsWith(t),Ze=ei("--"),ar=ei("var(--"),Qe=t=>ar(t)?lr.test(t.split("/*")[0].trim()):!1,lr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Tn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const St={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Bt={...St,transform:t=>Q(0,1,t)},Wt={...St,default:1},Et=t=>Math.round(t*1e5)/1e5,Je=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ur(t){return t==null}const cr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tn=(t,e)=>n=>!!(typeof n=="string"&&cr.test(n)&&n.startsWith(t)||e&&!ur(n)&&Object.prototype.hasOwnProperty.call(n,e)),ni=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Je);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},hr=t=>Q(0,255,t),ae={...St,transform:t=>Math.round(hr(t))},ht={test:tn("rgb","red"),parse:ni("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ae.transform(t)+", "+ae.transform(e)+", "+ae.transform(n)+", "+Et(Bt.transform(s))+")"};function fr(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Se={test:tn("#"),parse:fr,transform:ht.transform},Nt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),it=Nt("deg"),Z=Nt("%"),v=Nt("px"),dr=Nt("vh"),pr=Nt("vw"),bn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},gt={test:tn("hsl","hue"),parse:ni("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Et(e))+", "+Z.transform(Et(n))+", "+Et(Bt.transform(s))+")"},R={test:t=>ht.test(t)||Se.test(t)||gt.test(t),parse:t=>ht.test(t)?ht.parse(t):gt.test(t)?gt.parse(t):Se.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},mr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yr(t){return isNaN(t)&&typeof t=="string"&&(t.match(Je)?.length||0)+(t.match(mr)?.length||0)>0}const si="number",ii="color",gr="var",vr="var(",Sn="${}",xr=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Tt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(xr,l=>(R.test(l)?(s.color.push(r),i.push(ii),n.push(R.parse(l))):l.startsWith(vr)?(s.var.push(r),i.push(gr),n.push(l)):(s.number.push(r),i.push(si),n.push(parseFloat(l))),++r,Sn)).split(Sn);return{values:n,split:a,indexes:s,types:i}}function Tr(t){return Tt(t).values}function oi({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===si?i+=Et(s[r]):o===ii?i+=R.transform(s[r]):i+=s[r]}return i}}function br(t){return oi(Tt(t))}const Sr=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t,wr=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Sr(t);function Pr(t){const e=Tt(t);return oi(e)(e.values.map((s,i)=>wr(s,e.split[i])))}const X={test:yr,parse:Tr,createTransformer:br,getAnimatableNone:Pr};function le(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ar({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=le(l,a,t+1/3),r=le(l,a,t),o=le(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function qt(t,e){return n=>n>0?e:t}const C=(t,e,n)=>t+(e-t)*n,ue=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Vr=[Se,ht,gt],Cr=t=>Vr.find(e=>e.test(t));function wn(t){const e=Cr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=Ar(n)),n}const Pn=(t,e)=>{const n=wn(t),s=wn(e);if(!n||!s)return qt(t,e);const i={...n};return r=>(i.red=ue(n.red,s.red,r),i.green=ue(n.green,s.green,r),i.blue=ue(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),ht.transform(i))},we=new Set(["none","hidden"]);function Mr(t,e){return we.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Er(t,e){return n=>C(t,e,n)}function en(t){return typeof t=="number"?Er:typeof t=="string"?Qe(t)?qt:R.test(t)?Pn:Lr:Array.isArray(t)?ri:typeof t=="object"?R.test(t)?Pn:Dr:qt}function ri(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>en(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Dr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=en(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Rr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const Lr=(t,e)=>{const n=X.createTransformer(e),s=Tt(t),i=Tt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?we.has(t)&&!i.values.length||we.has(e)&&!s.values.length?Mr(t,e):Ot(ri(Rr(s,i),i.values),n):qt(t,e)};function ai(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):en(t)(t,e)}const kr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>A.update(e,n),stop:()=>at(e),now:()=>B.isProcessing?B.timestamp:j.now()}},li=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Zt=2e4;function nn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Zt;)e+=n,s=t.next(e);return e>=Zt?1/0:e}function Br(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(nn(s),Zt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:W(i)}}const E={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Pe(t,e){return t*Math.sqrt(1-e*e)}const Fr=12;function Ir(t,e,n){let s=n;for(let i=1;i<Fr;i++)s=s-t(s)/e(s);return s}const ce=.001;function jr({duration:t=E.duration,bounce:e=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r,o=1-e;o=Q(E.minDamping,E.maxDamping,o),t=Q(E.minDuration,E.maxDuration,W(t)),o<1?(i=c=>{const u=c*o,h=u*t,f=u-n,d=Pe(c,o),p=Math.exp(-h);return ce-f/d*p},r=c=>{const h=c*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),y=Pe(Math.pow(c,2),o);return(-i(c)+ce>0?-1:1)*((f-d)*p)/y}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ce+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Ir(i,r,a);if(t=_(t),isNaN(l))return{stiffness:E.stiffness,damping:E.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const Or=["duration","bounce"],Ur=["stiffness","damping","mass"];function An(t,e){return e.some(n=>t[n]!==void 0)}function Nr(t){let e={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...t};if(!An(t,Ur)&&An(t,Or))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:E.mass,stiffness:i,damping:r}}else{const n=jr({...t,velocity:0});e={...e,...n,mass:E.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=E.visualDuration,e=E.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=Nr({...n,velocity:-W(n.velocity||0)}),p=f||0,y=c/(2*Math.sqrt(l*u)),m=o-r,g=W(Math.sqrt(l/u)),T=Math.abs(m)<5;s||(s=T?E.restSpeed.granular:E.restSpeed.default),i||(i=T?E.restDelta.granular:E.restDelta.default);let x,w,S,L,U,P;if(y<1)S=Pe(g,y),L=(p+y*g*m)/S,x=b=>{const M=Math.exp(-y*g*b);return o-M*(L*Math.sin(S*b)+m*Math.cos(S*b))},U=y*g*L+m*S,P=y*g*m-L*S,w=b=>Math.exp(-y*g*b)*(U*Math.sin(S*b)+P*Math.cos(S*b));else if(y===1){x=M=>o-Math.exp(-g*M)*(m+(p+g*m)*M);const b=p+g*m;w=M=>Math.exp(-g*M)*(g*b*M-p)}else{const b=g*Math.sqrt(y*y-1);x=z=>{const J=Math.exp(-y*g*z),V=Math.min(b*z,300);return o-J*((p+y*g*m)*Math.sinh(V)+b*m*Math.cosh(V))/b};const M=(p+y*g*m)/b,G=y*g*M-m*b,pt=y*g*m-M*b;w=z=>{const J=Math.exp(-y*g*z),V=Math.min(b*z,300);return J*(G*Math.sinh(V)+pt*Math.cosh(V))}}const F={calculatedDuration:d&&h||null,velocity:b=>_(w(b)),next:b=>{if(!d&&y<1){const G=Math.exp(-y*g*b),pt=Math.sin(S*b),z=Math.cos(S*b),J=o-G*(L*pt+m*z),V=_(G*(U*pt+P*z));return a.done=Math.abs(V)<=s&&Math.abs(o-J)<=i,a.value=a.done?o:J,a}const M=x(b);if(d)a.done=b>=h;else{const G=_(w(b));a.done=Math.abs(G)<=s&&Math.abs(o-M)<=i}return a.value=a.done?o:M,a},toString:()=>{const b=Math.min(nn(F),Zt),M=li(G=>F.next(b*G).value,b,30);return b+"ms "+M},toTransition:()=>{}};return F}Qt.applyToOptions=t=>{const e=Br(t,100,Qt);return t.ease=e.ease,t.duration=_(e.duration),t.type="keyframes",t};const $r=5;function ui(t,e,n){const s=Math.max(e-$r,0);return Ks(n-t(s),e-s)}function Ae({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let y=n*e;const m=h+y,g=o===void 0?m:o(m);g!==m&&(y=g-h);const T=P=>-y*Math.exp(-P/s),x=P=>g+T(P),w=P=>{const F=T(P),b=x(P);f.done=Math.abs(F)<=c,f.value=f.done?g:b};let S,L;const U=P=>{d(f.value)&&(S=P,L=Qt({keyframes:[f.value,p(f.value)],velocity:ui(x,P,f.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return U(0),{calculatedDuration:null,next:P=>{let F=!1;return!L&&S===void 0&&(F=!0,w(P),U(P)),S!==void 0&&P>=S?L.next(P-S):(!F&&w(P),f)}}}function Wr(t,e,n){const s=[],i=n||rt.mix||ai,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||K:e;a=Ot(l,a)}s.push(a)}return s}function Kr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(He(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Wr(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=kt(t[h],t[h+1],u);return a[h](f)};return n?u=>c(Q(t[0],t[r-1],u)):c}function _r(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=kt(0,e,s);t.push(C(n,1,i))}}function Gr(t){const e=[0];return _r(e,t.length-1),e}function zr(t,e){return t.map(n=>n*e)}function Hr(t,e){return t.map(()=>e||Qs).splice(0,t.length-1)}function Dt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=er(s)?s.map(xn):xn(s),r={done:!1,value:e[0]},o=zr(n&&n.length===e.length?n:Gr(e),t),a=Kr(o,e,{ease:Array.isArray(i)?i:Hr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Xr=t=>t!==null;function ie(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Xr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Yr={decay:Ae,inertia:Ae,tween:Dt,keyframes:Dt,spring:Qt};function ci(t){typeof t.type=="string"&&(t.type=Yr[t.type])}class sn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const qr=t=>t/100;class Jt extends sn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ci(e);const{type:n=Dt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Dt;l!==Dt&&typeof a[0]!="number"&&(this.mixKeyframes=Ot(qr,ai(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=nn(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:y,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,w=s;if(h){const P=Math.min(this.currentTime,i)/a;let F=Math.floor(P),b=P%1;!b&&P>=1&&(b=1),b===1&&F--,F=Math.min(F,h+1),F%2&&(f==="reverse"?(b=1-b,d&&(b-=d/a)):f==="mirror"&&(w=o)),x=Q(0,1,b)*a}let S;T?(this.delayState.value=u[0],S=this.delayState):S=w.next(x),r&&!T&&(S.value=r(S.value));let{done:L}=S;!T&&l!==null&&(L=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const U=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return U&&p!==Ae&&(S.value=ie(u,this.options,m,this.speed)),y&&y(S.value),U&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return W(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(this.currentTime)}set time(e){e=_(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return ui(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=W(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=kr,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Zr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ft=t=>t*180/Math.PI,Ve=t=>{const e=ft(Math.atan2(t[1],t[0]));return Ce(e)},Qr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ve,rotateZ:Ve,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ce=t=>(t=t%360,t<0&&(t+=360),t),Vn=Ve,Cn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Mn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Jr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cn,scaleY:Mn,scale:t=>(Cn(t)+Mn(t))/2,rotateX:t=>Ce(ft(Math.atan2(t[6],t[5]))),rotateY:t=>Ce(ft(Math.atan2(-t[2],t[0]))),rotateZ:Vn,rotate:Vn,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Me(t){return t.includes("scale")?1:0}function Ee(t,e){if(!t||t==="none")return Me(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Jr,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Qr,i=a}if(!i)return Me(e);const r=s[e],o=i[1].split(",").map(ea);return typeof r=="function"?r(o):o[r]}const ta=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ee(n,e)};function ea(t){return parseFloat(t.trim())}const wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pt=new Set(wt),En=t=>t===St||t===v,na=new Set(["x","y","z"]),sa=wt.filter(t=>!na.has(t));function ia(t){const e=[];return sa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ee(e,"x"),y:(t,{transform:e})=>Ee(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const dt=new Set;let De=!1,Re=!1,Le=!1;function hi(){if(Re){const t=Array.from(dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ia(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Re=!1,De=!1,dt.forEach(t=>t.complete(Le)),dt.clear()}function fi(){dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Re=!0)})}function oa(){Le=!0,fi(),hi(),Le=!1}class on{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dt.add(this),De||(De=!0,A.read(fi),A.resolveKeyframes(hi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Zr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dt.delete(this)}cancel(){this.state==="scheduled"&&(dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ra=t=>t.startsWith("--");function di(t,e,n){ra(e)?t.style.setProperty(e,n):t.style[e]=n}const aa={};function pi(t,e){const n=Ws(t);return()=>aa[e]??n()}const la=pi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),mi=pi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Dn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vt([0,.65,.55,1]),circOut:Vt([.55,0,1,.45]),backIn:Vt([.31,.01,.66,-.59]),backOut:Vt([.33,1.53,.69,.99])};function yi(t,e){if(t)return typeof t=="function"?mi()?li(t,e):"ease-out":Js(t)?Vt(t):Array.isArray(t)?t.map(n=>yi(n,e)||Dn.easeOut):Dn[t]}function ua(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=yi(a,i);Array.isArray(h)&&(u.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function gi(t){return typeof t=="function"&&"applyToOptions"in t}function ca({type:t,...e}){return gi(t)&&mi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class vi extends sn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,He(typeof e.type!="string");const c=ca(e);this.animation=ua(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=ie(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),di(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return W(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&la()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),K):i(this)}}const xi={anticipate:Ys,backInOut:Xs,circInOut:Zs};function ha(t){return t in xi}function fa(t){typeof t.ease=="string"&&ha(t.ease)&&(t.ease=xi[t.ease])}const he=10;class da extends vi{constructor(e){fa(e),ci(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Jt({...o,autoplay:!1}),l=Math.max(he,j.now()-this.startTime),c=Q(0,he,l-he),u=a.sample(l).value,{name:h}=this.options;r&&h&&di(r,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const Rn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(X.test(t)||t==="0")&&!t.startsWith("url("));function pa(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ma(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Rn(i,e),a=Rn(r,e);return!o||!a?!1:pa(t)||(n==="spring"||gi(n))&&s}function ke(t){t.duration=0,t.type="keyframes"}const Ti=new Set(["opacity","clipPath","filter","transform"]),ya=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ga(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&ya.test(t[e]))return!0;return!1}const va=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),xa=Ws(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ta(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return xa()&&n&&(Ti.has(n)||va.has(n)&&ga(a))&&(n!=="transform"||!u)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const ba=40;class Sa extends sn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},d=u?.KeyframeResolver||on;this.keyframeResolver=new d(a,(p,y,m)=>this.onKeyframesResolved(p,y,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=j.now();let h=!0;ma(e,r,o,a)||(h=!1,(rt.instantAnimations||!l)&&u?.(ie(e,s,n)),e[0]=e[e.length-1],ke(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ba?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},p=h&&!c&&Ta(d),y=d.motionValue?.owner?.current;let m;if(p)try{m=new da({...d,element:y})}catch{m=new Jt(d)}else m=new Jt(d);m.finished.then(()=>{this.notifyFinished()}).catch(K),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),oa()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function bi(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const wa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Pa(t){const e=wa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Si(t,e,n=1){const[s,i]=Pa(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Us(o)?parseFloat(o):o}return Qe(i)?Si(i,e,n+1):i}const Aa={type:"spring",stiffness:500,damping:25,restSpeed:10},Va=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ca={type:"keyframes",duration:.8},Ma={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ea=(t,{keyframes:e})=>e.length>2?Ca:Pt.has(t)?t.startsWith("scale")?Va(e[1]):Aa:Ma;function wi(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function rn(t,e){const n=t?.[e]??t?.default??t;return n!==t?wi(n,t):n}const Da=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ra(t){for(const e in t)if(!Da.has(e))return!0;return!1}const an=(t,e,n,s={},i,r)=>o=>{const a=rn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-_(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Ra(a)||Object.assign(u,Ea(t,u)),u.duration&&(u.duration=_(u.duration)),u.repeatDelay&&(u.repeatDelay=_(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ke(u),u.delay===0&&(h=!0)),(rt.instantAnimations||rt.skipAnimations||i?.shouldSkipAnimations)&&(h=!0,ke(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=ie(u.keyframes,a);if(f!==void 0){A.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Jt(u):new Sa(u)};function Ln(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Pi(t,e,n,s){if(typeof e=="function"){const[i,r]=Ln(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Ln(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function xt(t,e,n){const s=t.getProps();return Pi(s,e,n!==void 0?n:s.custom,t)}const Ai=new Set(["width","height","top","left","right","bottom",...wt]),kn=30,La=t=>!isNaN(parseFloat(t));class ka{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=La(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Xe);const s=this.events[e].add(n);return e==="change"?()=>{s(),A.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>kn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,kn);return Ks(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bt(t,e){return new ka(t,e)}const Ba=t=>Array.isArray(t);function Fa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,bt(n))}function Ia(t){return Ba(t)?t[t.length-1]||0:t}function ja(t,e){const n=xt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Ia(r[o]);Fa(t,o,a)}}const I=t=>!!(t&&t.getVelocity);function Oa(t){return!!(I(t)&&t.add)}function Be(t,e){const n=t.getValue("willChange");if(Oa(n))return n.add(e);if(!n&&rt.WillChange){const s=new rt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function ln(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Ua="framerAppearId",Na="data-"+ln(Ua);function Vi(t){return t.props[Na]}function $a({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ci(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?wi(r,l):l;const c=r?.reduceMotion;s&&(r=s);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),p=a[f];if(p===void 0||h&&$a(h,f))continue;const y={delay:n,...rn(r||{},f)},m=d.get();if(m!==void 0&&!d.isAnimating()&&!Array.isArray(p)&&p===m&&!y.velocity){A.update(()=>d.set(p));continue}let g=!1;if(window.MotionHandoffAnimation){const w=Vi(t);if(w){const S=window.MotionHandoffAnimation(w,f,A);S!==null&&(y.startTime=S,g=!0)}}Be(t,f);const T=c??t.shouldReduceMotion;d.start(an(f,d,p,T&&Ai.has(f)?{type:!1}:y,t,g));const x=d.animation;x&&u.push(x)}if(o){const f=()=>A.update(()=>{o&&ja(t,o)});u.length?Promise.all(u).then(f):f()}return u}function Fe(t,e,n={}){const s=xt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ci(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return Wa(t,e,l,c,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Wa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Fe(l,e,{...o,delay:n+(typeof s=="function"?0:s)+bi(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ka(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Fe(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Fe(t,e,n);else{const i=typeof e=="function"?xt(t,e,n.custom):e;s=Promise.all(Ci(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const _a={test:t=>t==="auto",parse:t=>t},Mi=t=>e=>e.test(t),Ei=[St,v,Z,it,pr,dr,_a],Bn=t=>Ei.find(Mi(t));function Ga(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||$s(t):!0}const za=new Set(["brightness","contrast","saturate","opacity"]);function Ha(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Je)||[];if(!s)return t;const i=n.replace(s,"");let r=za.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Xa=/\b([a-z-]*)\(.*?\)/gu,Ie={...X,getAnimatableNone:t=>{const e=t.match(Xa);return e?e.map(Ha).join(" "):t}},je={...X,getAnimatableNone:t=>{const e=X.parse(t);return X.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Fn={...St,transform:Math.round},Ya={rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:it,skewX:it,skewY:it,distance:v,translateX:v,translateY:v,translateZ:v,x:v,y:v,z:v,perspective:v,transformPerspective:v,opacity:Bt,originX:bn,originY:bn,originZ:v},un={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,...Ya,zIndex:Fn,fillOpacity:Bt,strokeOpacity:Bt,numOctaves:Fn},qa={...un,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Ie,WebkitFilter:Ie,mask:je,WebkitMask:je},Di=t=>qa[t],Za=new Set([Ie,je]);function Ri(t,e){let n=Di(t);return Za.has(n)||(n=X),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Qa=new Set(["auto","none","0"]);function Ja(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Qa.has(r)&&Tt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ri(n,i)}class tl extends on{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Qe(h))){const f=Si(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Ai.has(s)||e.length!==2)return;const[i,r]=e,o=Bn(i),a=Bn(r),l=Tn(i),c=Tn(r);if(l!==c&&ot[s]){this.needsMeasurement=!0;return}if(o!==a)if(En(o)&&En(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Ga(e[i]))&&s.push(i);s.length&&Ja(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=ot[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Li(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ki=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function el(t){return Ns(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Bi}=ti(queueMicrotask,!1),nl={y:!1};function sl(){return nl.y}function Fi(t,e){const n=Li(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function il(t){return!(t.pointerType==="touch"||sl())}function ol(t,e,n={}){const[s,i,r]=Fi(t,n);return s.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",p)},h=m=>{c&&(c(m),c=void 0),u()},f=m=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(m))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}h(m)}},y=m=>{if(!il(m))return;l=!1;const g=e(o,m);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",d,i)}),r}const Ii=(t,e)=>e?t===e?!0:Ii(t,e.parentElement):!1,rl=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,al=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ll(t){return al.has(t.tagName)||t.isContentEditable===!0}const Gt=new WeakSet;function In(t){return e=>{e.key==="Enter"&&t(e)}}function fe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const ul=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=In(()=>{if(Gt.has(n))return;fe(n,"down");const i=In(()=>{fe(n,"up")}),r=()=>fe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function jn(t){return rl(t)&&!0}const On=new WeakSet;function cl(t,e,n={}){const[s,i,r]=Fi(t,n),o=a=>{const l=a.currentTarget;if(!jn(a)||On.has(a))return;Gt.add(l),n.stopPropagation&&On.add(a);const c=e(l,a),u=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Gt.has(l)&&Gt.delete(l),jn(d)&&typeof c=="function"&&c(d,{success:p})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||Ii(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),el(a)&&(a.addEventListener("focus",c=>ul(c,i)),!ll(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function ji(t){return Ns(t)&&"ownerSVGElement"in t}function hl(t){return ji(t)&&t.tagName==="svg"}const fl=[...Ei,R,X],dl=t=>fl.find(Mi(t)),Un=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Un(),y:Un()}),Nn=()=>({min:0,max:0}),k=()=>({x:Nn(),y:Nn()}),pl=new WeakMap;function cn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function oe(t){return typeof t=="string"||Array.isArray(t)}const ml=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yl=["initial",...ml];function Oi(t){return cn(t.animate)||yl.some(e=>oe(t[e]))}function gl(t){return!!(Oi(t)||t.variants)}function vl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(I(i))t.addValue(s,i);else if(I(r))t.addValue(s,bt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,bt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Oe={current:null},Ui={current:!1},xl=typeof window<"u";function Tl(){if(Ui.current=!0,!!xl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Oe.current=t.matches;t.addEventListener("change",e),e()}else Oe.current=!1}const $n=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wn={};class bl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=on,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=j.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,A.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Oi(n),this.isVariantNode=gl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];c[d]!==void 0&&I(p)&&p.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,pl.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ui.current||Tl(),this.shouldReduceMotion=Oe.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(),at(this.notifyUpdate),at(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ti.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new vi({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:_(u)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=Pt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&A.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Wn){const n=Wn[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<$n.length;s++){const i=$n[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=vl(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=bt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Us(s)||$s(s))?s=parseFloat(s):!dl(s)&&X.test(n)&&(s=Ri(e,n)),this.setBaseTarget(e,I(s)?s.get():s)),I(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Pi(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!I(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Xe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Bi.render(this.render)}}class Ni extends bl{constructor(){super(...arguments),this.KeyframeResolver=tl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;I(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function $i({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Sl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function wl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function de(t){return t===void 0||t===1}function Ue({scale:t,scaleX:e,scaleY:n}){return!de(t)||!de(e)||!de(n)}function ct(t){return Ue(t)||Wi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Wi(t){return Kn(t.x)||Kn(t.y)}function Kn(t){return t&&t!=="0%"}function te(t,e,n){const s=t-n,i=e*s;return n+i}function _n(t,e,n,s,i){return i!==void 0&&(t=te(t,i,s)),te(t,n,s)+e}function Ne(t,e=0,n=1,s,i){t.min=_n(t.min,e,n,s,i),t.max=_n(t.max,e,n,s,i)}function Ki(t,{x:e,y:n}){Ne(t.x,e.translate,e.scale,e.originPoint),Ne(t.y,n.translate,n.scale,n.originPoint)}const Gn=.999999999999,zn=1.0000000000001;function Pl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(Y(t.x,-r.scroll.offset.x),Y(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ki(t,o)),s&&ct(r.latestValues)&&zt(t,r.latestValues,r.layout?.layoutBox))}e.x<zn&&e.x>Gn&&(e.x=1),e.y<zn&&e.y>Gn&&(e.y=1)}function Y(t,e){t.min+=e,t.max+=e}function Hn(t,e,n,s,i=.5){const r=C(t.min,t.max,i);Ne(t,e,n,r,s)}function Xn(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function zt(t,e,n){const s=n??t;Hn(t.x,Xn(e.x,s.x),e.scaleX,e.scale,e.originX),Hn(t.y,Xn(e.y,s.y),e.scaleY,e.scale,e.originY)}function _i(t,e){return $i(wl(t.getBoundingClientRect(),e))}function Al(t,e,n){const s=_i(t,n),{scroll:i}=e;return i&&(Y(s.x,i.offset.x),Y(s.y,i.offset.y)),s}const Vl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cl=wt.length;function Ml(t,e,n){let s="",i=!0;for(let r=0;r<Cl;r++){const o=wt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=ki(a,un[o]);if(!l){i=!1;const u=Vl[o]||o;s+=`${u}(${c}) `}n&&(e[o]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function hn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(Pt.has(l)){o=!0;continue}else if(Ze(l)){i[l]=c;continue}else{const u=ki(c,un[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=Ml(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}function Gi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function Yn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const q={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(v.test(t))t=parseFloat(t);else return t;const n=Yn(t,e.target.x),s=Yn(t,e.target.y);return`${n}% ${s}%`}},zi={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=X.parse(t);if(i.length>5)return s;const r=X.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=C(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},Ft={borderRadius:{...q,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomLeftRadius:q,borderBottomRightRadius:q,boxShadow:zi};function Hi(t){for(const e in t)Ft[e]=t[e],Ze(e)&&(Ft[e].isCSSVariable=!0)}function El(t,{layout:e,layoutId:n}){return Pt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ft[t]||t==="opacity")}function Xi(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(I(s[o])||i&&I(i[o])||El(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function Dl(t){return window.getComputedStyle(t)}class Rl extends Ni{constructor(){super(...arguments),this.type="html",this.renderInstance=Gi}readValueFromInstance(e,n){if(Pt.has(n))return this.projection?.isProjecting?Me(n):ta(e,n);{const s=Dl(e),i=(Ze(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return _i(e,n)}build(e,n,s){hn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Xi(e,n,s)}}const Ll={offset:"stroke-dashoffset",array:"stroke-dasharray"},kl={offset:"strokeDashoffset",array:"strokeDasharray"};function Bl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ll:kl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Fl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Yi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(hn(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const d of Fl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Bl(h,i,r,o,!1)}const fn=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"]),qi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Il(t,e,n,s){Gi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(fn.has(i)?i:ln(i),e.attrs[i])}function jl(t,e,n){const s=Xi(t,e,n);for(const i in t)if(I(t[i])||I(e[i])){const r=wt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Ol extends Ni{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Pt.has(n)){const s=Di(n);return s&&s.default||0}return n=fn.has(n)?n:ln(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return jl(e,n,s)}build(e,n,s){Yi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Il(e,n,s,i)}mount(e){this.isSVGTag=qi(e.tagName),super.mount(e)}}function $e(t,e){t.min=e.min,t.max=e.max}function H(t,e){$e(t.x,e.x),$e(t.y,e.y)}function qn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Zi=1e-4,Ul=1-Zi,Nl=1+Zi,Qi=.01,$l=0-Qi,Wl=0+Qi;function O(t){return t.max-t.min}function Kl(t,e,n){return Math.abs(t-e)<=n}function Zn(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=O(n)/O(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ul&&t.scale<=Nl||isNaN(t.scale))&&(t.scale=1),(t.translate>=$l&&t.translate<=Wl||isNaN(t.translate))&&(t.translate=0)}function Rt(t,e,n,s){Zn(t.x,e.x,n.x,s?s.originX:void 0),Zn(t.y,e.y,n.y,s?s.originY:void 0)}function Qn(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+O(e)}function _l(t,e,n,s){Qn(t.x,e.x,n.x,s?.x),Qn(t.y,e.y,n.y,s?.y)}function Jn(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+O(e)}function ee(t,e,n,s){Jn(t.x,e.x,n.x,s?.x),Jn(t.y,e.y,n.y,s?.y)}function ts(t,e,n,s,i){return t-=e,t=te(t,1/n,s),i!==void 0&&(t=te(t,1/i,s)),t}function Gl(t,e=0,n=1,s=.5,i,r=t,o=t){if(Z.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=ts(t.min,e,n,a,i),t.max=ts(t.max,e,n,a,i)}function es(t,e,[n,s,i],r,o){Gl(t,e[n],e[s],e[i],e.scale,r,o)}const zl=["x","scaleX","originX"],Hl=["y","scaleY","originY"];function ns(t,e,n,s){es(t.x,e,zl,n?n.x:void 0,s?s.x:void 0),es(t.y,e,Hl,n?n.y:void 0,s?s.y:void 0)}function ss(t){return t.translate===0&&t.scale===1}function Ji(t){return ss(t.x)&&ss(t.y)}function is(t,e){return t.min===e.min&&t.max===e.max}function Xl(t,e){return is(t.x,e.x)&&is(t.y,e.y)}function os(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function to(t,e){return os(t.x,e.x)&&os(t.y,e.y)}function rs(t){return O(t.x)/O(t.y)}function as(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function $(t){return[t("x"),t("y")]}function Yl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const eo=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ql=eo.length,ls=t=>typeof t=="string"?parseFloat(t):t,us=t=>typeof t=="number"||v.test(t);function Zl(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity??1,Ql(s)),t.opacityExit=C(e.opacity??1,0,Jl(s))):r&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let o=0;o<ql;o++){const a=eo[o];let l=cs(e,a),c=cs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||us(l)===us(c)?(t[a]=Math.max(C(ls(l),ls(c),s),0),(Z.test(c)||Z.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function cs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ql=no(0,.5,qs),Jl=no(.5,.95,K);function no(t,e,n){return s=>s<t?0:s>e?1:n(kt(t,e,s))}function tu(t,e,n){const s=I(t)?t:bt(t);return s.start(an("",s,e,n)),s.animation}function eu(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const nu=(t,e)=>t.depth-e.depth;class su{constructor(){this.children=[],this.isDirty=!1}add(e){ze(this.children,e),this.isDirty=!0}remove(e){Yt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(nu),this.isDirty=!1,this.children.forEach(e)}}function iu(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(at(s),t(r-e))};return A.setup(s,!0),()=>at(s)}function pe(t){return I(t)?t.get():t}class ou{constructor(){this.members=[]}add(e){ze(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Yt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Yt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ht={hasAnimatedSinceResize:!0,hasEverUpdated:!1},me=["","X","Y","Z"],ru=1e3;let au=0;function ye(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function so(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",A,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&so(s)}function io({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=au++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(cu),this.nodes.forEach(yu),this.nodes.forEach(gu),this.nodes.forEach(hu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new su)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Xe),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=ji(o)&&!hl(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;A.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=iu(f,250),Ht.hasAnimatedSinceResize&&(Ht.hasAnimatedSinceResize=!1,this.nodes.forEach(ds)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Su,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),g=!this.targetLayout||!to(this.targetLayout,d),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...rn(p,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,T)}else h||ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),at(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(vu),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&so(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(du),this.nodes.forEach(hs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(fs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(pu),this.nodes.forEach(mu),this.nodes.forEach(lu),this.nodes.forEach(uu)):this.nodes.forEach(fs),this.clearAllSnapshots();const a=j.now();B.delta=Q(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,re.update.process(B),re.preRender.process(B),re.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fu),this.sharedNodes.forEach(xu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ji(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||ct(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),wu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Pu))){const{scroll:c}=this.root;c&&(Y(a.x,c.offset.x),Y(a.y,c.offset.y))}return a}removeElementScroll(o){const a=k();if(H(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&H(a,o),Y(a.x,u.offset.x),Y(a.y,u.offset.y))}return a}applyTransform(o,a=!1,l){const c=l||k();H(c,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Y(c.x,-h.scroll.offset.x),Y(c.y,-h.scroll.offset.y)),ct(h.latestValues)&&zt(c,h.latestValues,h.layout?.layoutBox)}return ct(this.latestValues)&&zt(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=k();H(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!ct(c.latestValues))continue;let u;c.instance&&(Ue(c.latestValues)&&c.updateSnapshot(),u=k(),H(u,c.measurePageBox())),ns(a,c.latestValues,c.snapshot?.layoutBox,u)}return ct(this.latestValues)&&ns(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=B.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_l(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):H(this.target,this.layout.layoutBox),Ki(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ue(this.parent.latestValues)||Wi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),ee(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),H(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===B.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;H(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Pl(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=k());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qn(this.prevProjectionDelta.x,this.projectionDelta.x),qn(this.prevProjectionDelta.y,this.projectionDelta.y)),Rt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!as(this.projectionDelta.x,this.prevProjectionDelta.x)||!as(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=k(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=d!==p,m=this.getStack(),g=!m||m.members.length<=1,T=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(bu));this.animationProgress=0;let x;this.mixTargetDelta=w=>{const S=w/1e3;ps(h.x,o.x,S),ps(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ee(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Tu(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&Xl(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=k()),H(x,this.relativeTarget)),y&&(this.animationValues=u,Zl(u,c,this.latestValues,S,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(at(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=A.update(()=>{Ht.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=bt(0)),this.motionValue.jump(0,!1),this.currentAnimation=tu(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ru),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&oo(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||k();const h=O(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}H(a,l),zt(a,u),Rt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ou),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ye("z",o,c,this.animationValues);for(let u=0;u<me.length;u++)ye(`rotate${me[u]}`,o,c,this.animationValues),ye(`skew${me[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=pe(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=pe(a?.pointerEvents)||""),this.hasProjected&&!ct(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Yl(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Ft){if(u[p]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:g}=Ft[p],T=h==="none"?u[p]:y(u[p],c);if(m){const x=m.length;for(let w=0;w<x;w++)o[m[w]]=T}else g?this.options.visualElement.renderState.vars[p]=T:o[p]=T}this.options.layoutId&&(o.pointerEvents=c===this?pe(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(hs),this.root.sharedNodes.clear()}}}function lu(t){t.updateLayout()}function uu(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")$(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=O(h);h.min=n[u].min,h.max=h.min+f});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";$e(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else oo(i,e.layoutBox,n)&&$(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=O(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const o=vt();Rt(o,n,e.layoutBox);const a=vt();r?Rt(a,t.applyTransform(s,!0),e.measuredBox):Rt(a,n,e.layoutBox);const l=!Ji(o);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=t.options.layoutAnchor||void 0,p=k();ee(p,e.layoutBox,h.layoutBox,d);const y=k();ee(y,n,f.layoutBox,d),to(p,y)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function cu(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function hu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function fu(t){t.clearSnapshot()}function hs(t){t.clearMeasurements()}function du(t){t.isLayoutDirty=!0,t.updateLayout()}function fs(t){t.isLayoutDirty=!1}function pu(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function mu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ds(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function yu(t){t.resolveTargetDelta()}function gu(t){t.calcProjection()}function vu(t){t.resetSkewAndRotation()}function xu(t){t.removeLeadSnapshot()}function ps(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ms(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function Tu(t,e,n,s){ms(t.x,e.x,n.x,s),ms(t.y,e.y,n.y,s)}function bu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Su={duration:.45,ease:[.4,0,.1,1]},ys=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),gs=ys("applewebkit/")&&!ys("chrome/")?Math.round:K;function vs(t){t.min=gs(t.min),t.max=gs(t.max)}function wu(t){vs(t.x),vs(t.y)}function oo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Kl(rs(e),rs(n),.2)}function Pu(t){return t!==t.root&&t.scroll?.wasRoot}const Au=io({attachResizeListener:(t,e)=>eu(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ge={current:void 0},Vu=io({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ge.current){const t=new Au({});t.mount(window),t.setOptions({layoutScroll:!0}),ge.current=t}return ge.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Cu={some:0,all:1};function Mu(t,e,{root:n,margin:s,amount:i="some"}={}){const r=Li(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const f=e(u.target,u);typeof f=="function"?o.set(u.target,f):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:Cu[i]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}const xs=(t,e)=>Math.abs(t-e);function Eu(t,e){const n=xs(t.x,e.x),s=xs(t.y,e.y);return Math.sqrt(n**2+s**2)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ts=t=>typeof t<"u";function ro({current:t}){return t?t.ownerDocument.defaultView:null}function We(t){if(t)return t.nodeType===3||t.nodeType===8?We(t.nextSibling):t}const[Du,Ru]=jt("Motion"),[Lu]=jt("LayoutGroup"),ku={reducedMotion:"never",transition:void 0,nonce:void 0},[Bu]=jt("MotionConfig");function ao(){return Bu(Mt(()=>ku))}const Ke={motionAttribute:"data-ap"},_e=[];function lo(t){for(const e of t)e&&!_e.includes(e)&&_e.push(e)}function uo(t,e,n){if(Array.isArray(t))return t.reduce((s,i)=>{const r=uo(i,e,n);return r?{...s,...r}:s},{});if(typeof t=="object")return t;if(t&&e){const s=e[t];return typeof s=="function"?s(n):s}}function Fu(t,e,n){const s=uo(t,e,n);if(!s)return;const{transition:i,transitionEnd:r,...o}=s;return{...o,...r}}function Iu(t,e){const n=(t.initial===void 0&&t.variants?e?.initial:t.initial)===!1?["initial","animate"]:["initial"],s=t.custom??t.presenceContext?.custom;return n.reduce((i,r)=>({...i,...Fu(t[r]||e?.[r],t.variants,s)}),{})}function co(t,e){const n=e?.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}var ju=new Set(["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]);function ho(t){return ju.has(t)}const ne=new WeakMap;var Ou=class{constructor(t,e){this.element=null,this.isExiting=!1,this.presenceContainer=null,this.children=new Set,this.features=new Map,this._context=null,this.options=t,this.parent=e,e?.children?.add(this),this.latestValues=Iu(t,this.context),this.type=ho(this.options.as)?"svg":"html"}get context(){return this._context||(this._context=new Proxy({},{get:(t,e)=>{const n=this.options[e];return oe(n)||e==="initial"&&n===!1?n:this.parent?.context[e]}})),this._context}updateFeatures(){if(this.visualElement)for(const t of _e){this.features.has(t.key)||this.features.set(t.key,new t(this));const e=this.features.get(t.key);this.isMounted()&&(e.isMount?e.update():(e.mount(),e.isMount=!0))}}updateOptions(t){this.options=t,this.visualElement?.update({...this.options,whileTap:this.options.whilePress},this.options.presenceContext??null)}mount(t){ne.set(t,this),this.element=t,t.setAttribute(Ke.motionAttribute,this.options.presenceContext?.presenceId??""),this.visualElement?.mount(t),this.updateFeatures()}beforeUnmount(){this.getSnapshot(this.options,!1)}unmount(){this.parent?.children?.delete(this),ne.delete(this.element),this.features.forEach(t=>t.unmount?.()),this.visualElement?.unmount()}beforeUpdate(){this.getSnapshot(this.options,void 0)}update(){this.updateFeatures(),this.didUpdate()}tryExitComplete(){this.isExiting||this.options?.layoutId&&this.visualElement.projection?.currentAnimation?.state==="running"||this.options.presenceContext?.onMotionExitComplete?.(this.presenceContainer,this)}setActive(t,e){t==="exit"&&e&&(this.isExiting=!0),this.visualElement?.animationState?.setActive(t,e).then(()=>{t==="exit"&&e&&(this.isExiting=!1,this.options?.layoutId?A.postRender(()=>this.tryExitComplete()):this.tryExitComplete())})}isMounted(){return!!this.element}initVisualElement(t){this.visualElement||(this.visualElement=t(this.options.as,{presenceContext:this.options.presenceContext??null,parent:this.parent?.visualElement,props:{...this.options,whileTap:this.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.latestValues}},reducedMotionConfig:this.options.motionConfig?.reducedMotion}),this.visualElement.parent?.addChild(this.visualElement),this.isMounted()&&this.visualElement.mount(this.element))}getSnapshot(t,e){}didUpdate(){}},nt=class{constructor(t){this.state=t}mount(){}unmount(){}update(){}};const fo=["initial","animate","exit","whileHover","whileDrag","whileFocus","whilePress"];var Uu=fo.length;function po(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?po(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Uu;n++){const s=fo[n],i=t.props[s];(oe(i)||i===!1)&&(e[s]=i)}return e}var mo=["animate","whileInView","whileFocus","whileHover","whilePress","whileDrag","exit"],Nu=[...mo].reverse(),$u=mo.length;function ut(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bs(){return{animate:ut(!0),whileInView:ut(),whileHover:ut(),whilePress:ut(),whileDrag:ut(),whileFocus:ut(),exit:ut()}}function Wu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!co(e,t):!1}function Ss(t){return Array.isArray(t)}function Ku(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ka(t,n,s)))}function _u(t){let e=Ku(t),n=bs(),s=!0;const i=l=>(c,u)=>{const h=xt(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...p}=h;c={...c,...p,...d}}return c};function r(l){e=l(t)}function o(l){const{props:c}=t,u=po(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let m=0;m<$u;m++){const g=Nu[m],T=n[g],x=c[g]!==void 0?c[g]:u[g],w=oe(x),S=g===l?T.isActive:null;S===!1&&(p=m);let L=x===u[g]&&x!==c[g]&&w;if(L&&s&&t.manuallyAnimateOnMount&&(L=!1),T.protectedKeys={...d},!T.isActive&&S===null||!x&&!T.prevProp||cn(x)||typeof x=="boolean")continue;const U=Wu(T.prevProp,x);let P=U||g===l&&T.isActive&&!L&&w||m>p&&w,F=!1;const b=Array.isArray(x)?x:[x];let M=b.reduce(i(g),{});S===!1&&(M={});const{prevResolvedValues:G={}}=T,pt={...G,...M},z=V=>{P=!0,f.has(V)&&(F=!0,f.delete(V)),T.needsAnimating[V]=!0;const N=t.getValue(V);N&&(N.liveStyle=!1)};for(const V in pt){const N=M[V],lt=G[V];if(Object.hasOwnProperty.call(d,V))continue;let mt=!1;Ss(N)&&Ss(lt)?mt=!co(N,lt):mt=N!==lt,mt?N!=null?z(V):f.add(V):N!==void 0&&f.has(V)?z(V):T.protectedKeys[V]=!0}T.prevProp=x,T.prevResolvedValues=M,T.isActive&&(d={...d,...M}),s&&t.blockInitialAnimation&&(P=!1);const J=L&&U;P&&(!J||F)&&h.push(...b.map(V=>{const N={type:g};if(typeof V=="string"&&s&&!J&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,mt=xt(lt,V);if(lt.enteringChildren&&mt){const{delayChildren:Po}=mt.transition||{};N.delay=bi(lt.enteringChildren,t,Po)}}return{animation:V,options:N}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const g=xt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(m.transition=g.transition)}f.forEach(g=>{const T=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),m[g]=T??null}),h.push({animation:m})}let y=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,y?e(h):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>{h.animationState?.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=bs(),s=!0}}}function yo(t){return t.style.display==="none"||t.offsetParent===null&&window.getComputedStyle(t).position!=="fixed"}var Gu=class extends nt{static#t=this.key="animation";constructor(t){super(t);const e=t.visualElement;e.animationState||=_u(e)}updateAnimationControlsSubscription(){const{animate:t}=this.state.options;cn(t)&&(this.unmountControls=t.subscribe(this.state.visualElement))}mount(){yo(this.state.element)?this.state.setActive("exit",!0):this.state.visualElement.animationState?.animateChanges(),this.updateAnimationControlsSubscription()}update(){this.state.visualElement.animationState?.animateChanges();const{animate:t}=this.state.visualElement.getProps(),{animate:e}=this.state.visualElement.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.state.visualElement.animationState.reset(),this.unmountControls?.()}};function zu(t,e){return ho(t)?new Ol(e):new Rl(e)}function ws(t){return{point:{x:t.pageX,y:t.pageY}}}var Hu=class extends nt{static#t=this.key="press";constructor(t){super(t)}isActive(){const{whilePress:t,onPress:e,onPressCancel:n,onPressStart:s}=this.state.options;return!!(t||e||n||s)}register(){const t=this.state.element;!t||!this.isActive()||(this.removePress?.(),this.removePress=cl(t,(e,n)=>{const s=this.state.options;return this.state.setActive("whilePress",!0),s.onPressStart&&A.postRender(()=>s.onPressStart(n,ws(n))),(i,{success:r})=>{this.state.setActive("whilePress",!1);const o=r?"onPress":"onPressCancel",a=this.state.options[o];a&&A.postRender(()=>a(i,ws(i)))}},{useGlobalTarget:this.state.options.globalPressTarget}))}mount(){this.register()}update(){const t=this.state.visualElement.prevProps;!(t?.whilePress||t?.whileTap||t?.onPress||t?.onPressCancel||t?.onPressStart)&&this.isActive()&&this.register()}unmount(){this.removePress?.(),this.removePress=void 0}};function go(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function It(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function Xu(t){return e=>go(e)&&t(e,It(e))}var Yu=class extends nt{static#t=this.key="hover";constructor(t){super(t)}isActive(){const{whileHover:t,onHoverStart:e,onHoverEnd:n}=this.state.options;return!!(t||e||n)}register(){const t=this.state.element;!t||!this.isActive()||(this.removeHover?.(),this.removeHover=ol(t,(e,n)=>{const s=this.state.options;return this.state.setActive("whileHover",!0),s.onHoverStart&&A.postRender(()=>s.onHoverStart(n,It(n))),i=>{this.state.setActive("whileHover",!1);const r=this.state.options.onHoverEnd;r&&A.postRender(()=>r(i,It(i)))}}))}mount(){this.register()}update(){const t=this.state.visualElement.prevProps;!(t?.whileHover||t?.onHoverStart||t?.onHoverEnd)&&this.isActive()&&this.register()}unmount(){this.removeHover?.(),this.removeHover=void 0}},qu=class extends nt{static#t=this.key="inView";constructor(t){super(t)}isActive(){const{whileInView:t,onViewportEnter:e,onViewportLeave:n}=this.state.options;return!!(t||e||n)}startObserver(){const t=this.state.element;if(!t||!this.isActive())return;this.removeObserver?.();const{once:e,...n}=this.state.options.inViewOptions||{};this.removeObserver=Mu(t,(s,i)=>{const r=this.state.options;if(this.state.setActive("whileInView",!0),r.onViewportEnter&&A.postRender(()=>r.onViewportEnter(i)),!e)return()=>{this.state.setActive("whileInView",!1);const o=this.state.options.onViewportLeave;o&&A.postRender(()=>o(i))}},n)}mount(){this.startObserver()}update(){const{props:t,prevProps:e}=this.state.visualElement;["amount","margin","root"].some(n=>t.inViewOptions?.[n]!==e?.inViewOptions?.[n])&&this.startObserver()}unmount(){this.removeObserver?.(),this.removeObserver=void 0}};function se(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}var Zu=class extends nt{static#t=this.key="focus";constructor(t){super(t),this.isFocused=!1}onFocus(){let t=!1;try{t=this.state.element.matches(":focus-visible")}catch{t=!0}t&&(this.state.setActive("whileFocus",!0),this.isFocused=!0)}onBlur(){this.isFocused&&(this.state.setActive("whileFocus",!1),this.isFocused=!1)}mount(){const t=this.state.element;this.removeFocus=Ot(se(t,"focus",()=>this.onFocus()),se(t,"blur",()=>this.onBlur()))}unmount(){this.removeFocus?.(),this.removeFocus=void 0}};function vo(t){if(t)return t.options.allowProjection!==!1?t.projection:vo(t.parent)}const xo={borderRadius:{...q,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomLeftRadius:q,borderBottomRightRadius:q,boxShadow:zi};function Ct(t){return typeof t=="object"&&t!==null&&"nodeType"in t}const Qu=typeof window>"u";var Ju=class extends nt{static#t=this.key="projection";constructor(t){super(t),Hi(xo),Qu||this.initProjection()}initProjection(){const t=this.state.options;this.state.visualElement.projection=new Vu(this.state.visualElement.latestValues,t["data-framer-portal-id"]?void 0:vo(this.state.visualElement.parent)),this.projection=this.state.visualElement.projection,this.projection.isPresent=!0,this.setOptions()}setOptions(){const t=this.state.options,{layoutId:e,layout:n,drag:s=!1,dragConstraints:i=!1}=t;this.projection?.setOptions({layout:n,layoutId:e,alwaysMeasureLayout:!!e||!!s||i&&Ct(i),visualElement:this.state.visualElement,animationType:typeof t.layout=="string"?t.layout:"both",layoutRoot:t.layoutRoot,layoutScroll:t.layoutScroll,crossfade:t.crossfade,onExitComplete:()=>{!this.projection?.isPresent&&this.state.options.layoutId&&!this.state.isExiting&&queueMicrotask(()=>{this.state.options.presenceContext?.onMotionExitComplete?.(this.state.presenceContainer,this.state)})}})}update(){this.setOptions()}mount(){this.projection?.mount(this.state.element)}};function Lt(t,e,n,s){return se(t,e,Xu(n),s)}var Ps=new Set(["auto","scroll"]),To=class{constructor(t,e,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:i=!1,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=u=>{this.handleScroll(u.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=xe(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=Eu(u.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:d}=u,{timestamp:p}=B;this.history.push({...d,timestamp:p});const{onStart:y,onMove:m}=this.handlers;h||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=ve(h,this.transformPagePoint),A.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:f,onSessionEnd:d,resumeAnimation:p}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=xe(u.type==="pointercancel"?this.lastMoveEventInfo:ve(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,y),d&&d(u,y)},!go(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=s||window;const o=ve(It(t),this.transformPagePoint),{point:a}=o,{timestamp:l}=B;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=e;c&&c(t,xe(o,this.history)),this.removeListeners=Ot(Lt(this.contextWindow,"pointermove",this.handlePointerMove),Lt(this.contextWindow,"pointerup",this.handlePointerUp),Lt(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}isScrollable(t){const e=window.getComputedStyle(t);return e.overflow==="auto"||e.overflow==="scroll"||e.overflowX==="auto"||e.overflowX==="scroll"||e.overflowY==="auto"||e.overflowY==="scroll"}startScrollTracking(t){let e=t.parentElement;for(;e;){const n=getComputedStyle(e);(Ps.has(n.overflowX)||Ps.has(n.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,s=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-e.x,y:s.y-e.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(t,s),A.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners?.(),this.scrollPositions.clear(),at(this.updatePoint)}};function ve(t,e){return e?{point:e(t.point)}:t}function As(t,e){return{x:t.x-e.x,y:t.y-e.y}}function xe({point:t},e){return{point:t,delta:As(t,bo(e)),offset:As(t,tc(e)),velocity:ec(e,.1)}}function tc(t){return t[0]}function bo(t){return t[t.length-1]}function ec(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=bo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>_(e)));)n--;if(!s)return{x:0,y:0};const r=W(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Vs(t){return(e,n)=>{t&&A.postRender(()=>t(e,n))}}var nc=class extends nt{constructor(...t){super(...t),this.removePointerDownListener=K}static#t=this.key="pan";onPointerDown(t){this.session=new To(t,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:ro(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Vs((t,e)=>{const{onPanSessionStart:n}=this.state.options;n&&n(t,e)}),onStart:Vs((t,e)=>{const{onPanStart:n}=this.state.options;n&&n(t,e)}),onMove:(t,e)=>{const{onPan:n}=this.state.options;n&&n(t,e)},onEnd:(t,e)=>{const{onPanEnd:n}=this.state.options;delete this.session,n&&A.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=Lt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};function So(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}var Cs=So("dragHorizontal"),Ms=So("dragVertical");function sc(t){let e=!1;if(t==="y")e=Ms();else if(t==="x")e=Cs();else{const n=Cs(),s=Ms();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function ic(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}const Ge=.35;function oc(t,{top:e,left:n,bottom:s,right:i}){return{x:Es(t.x,n,i),y:Es(t.y,e,s)}}function Es(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function rc(t=Ge){return t===!1?t=0:t===!0&&(t=Ge),{x:Ds(t,"left","right"),y:Ds(t,"top","bottom")}}function Ds(t,e,n){return{min:Rs(t,e),max:Rs(t,n)}}function Rs(t,e){return typeof t=="number"?t:t[e]||0}function ac(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function lc(t,e){return{x:Ls(t.x,e.x),y:Ls(t.y,e.y)}}function Ls(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function uc(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=kt(e.min,e.max-s,t.min):s>i&&(n=kt(t.min,t.max-i,e.min)),Q(0,1,n)}const cc=new WeakMap;var hc=class{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=k(),this.state=t}get visualElement(){return this.state.visualElement}start(t,{snapToCursor:e=!1}={}){const n=l=>{e?this.stopAnimation():this.pauseAnimation(),e&&this.snapToCursor(It(l,"page").point)},s=(l,c)=>{this.stopAnimation();const{drag:u,dragPropagation:h,onDragStart:f}=this.getProps();u&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=sc(u),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$(d=>{let p=this.getAxisMotionValue(d).get()||0;if(Z.test(p)){const{projection:y}=this.visualElement;if(y&&y.layout){const m=y.layout.layoutBox[d];m&&(p=O(m)*(parseFloat(p)/100))}}this.originPoint[d]=p}),f&&A.postRender(()=>f(l,c)),Be(this.visualElement,"transform"),this.state.setActive("whileDrag",!0))},i=(l,c)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:f,onDrag:d}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=c;if(h&&this.currentDirection===null){this.currentDirection=fc(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),d&&d(l,c)},r=(l,c)=>this.stop(l,c),o=()=>$(l=>this.getAnimationState(l)==="paused"&&this.getAxisMotionValue(l).animation?.play()),{dragSnapToOrigin:a}=this.getProps();this.panSession=new To(t,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:r,resumeAnimation:o},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,contextWindow:ro(this.visualElement),element:this.state.element})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&A.postRender(()=>i(t,e))}cancel(){this.isDragging=!1;const{projection:t}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:e}=this.getProps();!e&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.state.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!Kt(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=ic(r,this.constraints[t],this.elastic[t])),i.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Ct(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=oc(n.layoutBox,t):this.constraints=!1,this.elastic=rc(e),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&$(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=ac(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Ct(t))return!1;const n=t,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Al(n,s.root,this.visualElement.getTransformPagePoint());let r=lc(s.layout.layoutBox,i);if(e){const o=e(Sl(r));this.hasMutatedConstraints=!!o,o&&(r=$i(o))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=$(c=>{if(!Kt(c,e,this.currentDirection))return;let u=a&&a[c]||{};r&&(u={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,d={type:"inertia",velocity:n?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(c,d)});return Promise.all(l).then(o)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Be(this.visualElement,t),n.start(an(t,n,0,e,this.visualElement,!1))}stopAnimation(){this.visualElement.projection?.isPresent&&$(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){$(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){$(e=>{const{drag:n}=this.getProps();if(!Kt(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:r,max:o}=s.layout.layoutBox[e];i.set(t[e]-C(r,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ct(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};$(r=>{const o=this.getAxisMotionValue(r);if(o&&this.constraints!==!1){const a=o.get();s[r]=uc({min:a,max:a},this.constraints[r])}});const{transformTemplate:i}=this.visualElement.getProps();this.state.element.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),$(r=>{if(!Kt(r,t,null))return;const o=this.getAxisMotionValue(r),{min:a,max:l}=this.constraints[r];o.set(C(a,l,s[r]))})}addListeners(){if(!this.state.element)return;cc.set(this.visualElement,this);const t=this.state.element,e=Lt(t,"pointerdown",a=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(a)}),n=()=>{const{dragConstraints:a}=this.getProps();Ct(a)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),A.read(n);const r=se(window,"resize",()=>this.scalePositionWithinConstraints()),o=s.addEventListener("didUpdate",(({delta:a,hasLayoutChanged:l})=>{this.isDragging&&l&&($(c=>{const u=this.getAxisMotionValue(c);u&&(this.originPoint[c]+=a[c].translate,u.set(u.get()+a[c].translate))}),this.visualElement.render())}));return()=>{r(),e(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:r=Ge,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:r,dragMomentum:o}}};function Kt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function fc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}var dc=class extends nt{static#t=this.key="drag";constructor(t){super(t),this.removeGroupControls=K,this.removeListeners=K,this.controls=new hc(t)}mount(){const{dragControls:t}=this.state.options;t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}unmount(){this.removeGroupControls(),this.removeListeners()}},At=!1,pc=class extends nt{static#t=this.key="layout";constructor(t){super(t),this.hasMountSettled=!1,Hi(xo),t.getSnapshot=this.getSnapshot.bind(this),t.didUpdate=this.didUpdate.bind(this)}updatePrevLead(t){const e=t.getStack();e?.prevLead&&!e.prevLead.snapshot&&(e.prevLead.willUpdate(),At=!0)}didUpdate(){At&&(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(At=!1,this.state.visualElement.projection?.root?.didUpdate())}mount(){const t=this.state.options,e=this.state.options.layoutGroup;if(t.layout||t.layoutId){const n=this.state.visualElement.projection;if(t.layoutId){const s=!yo(this.state.element);n.isPresent=s,s?n.promote():n.relegate(),this.updatePrevLead(n)}e?.group?.add(n),Ht.hasEverUpdated=!0}this.didUpdate(),A.postRender(()=>{this.hasMountSettled=!0})}unmount(){const t=this.state.options.layoutGroup,e=this.state.visualElement.projection;e&&(t?.group&&(this.state.options.layout||this.state.options.layoutId)&&t.group.remove(e),this.state.options.layoutId&&(At=!0),this.didUpdate())}getSnapshot(t,e){const n=this.state.visualElement.projection,{drag:s,layoutDependency:i,layout:r,layoutId:o}=t;if(!n||!r&&!o&&!s||!this.hasMountSettled)return;At=!0;const a=this.state.options;(s||a.layoutDependency!==i||i===void 0||Ts(e)&&n.isPresent!==e)&&n.willUpdate(),Ts(e)&&e!==n.isPresent&&(n.isPresent=e,e?(n.promote(),this.updatePrevLead(n)):n.relegate())}};const mc={renderer:zu,features:[Gu,Hu,Yu,qu,Zu,Ju,nc,dc,pc]},[yc]=jt("LazyMotionContext"),[gc,vc]=jt("AnimatePresenceContext");function xc(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function wo(){return{transform:{},transformOrigin:{},style:{},vars:{}}}function Tc(){return{...wo(),attrs:{}}}function bc(t){const e=wo();hn(e,t);const n={...e.style};for(const s in e.vars)n[s]=e.vars[s];return Object.keys(n).length===0?null:n}function Sc(t,e,n){const s=Tc();Yi(s,t,qi(e),void 0,n);const i={};for(const r in s.attrs){const o=fn.has(r)?r:xc(r);i[o]=s.attrs[r]}return{attrs:i,style:{...s.style,...s.vars}}}function wc(t,e){const n=Du(null),s=Lu({}),i=ao(),r=gc({}),o=yc({features:Bs({}),strict:!1}),a=Co();function l(){return Xo(t,{layoutGroup:s,presenceContext:r,config:i.value})}function c(){return{...a,...l()}}const u=new Ou(c(),n);Ru(u),e&&u.initVisualElement(e),Mo(o.features,d=>{d.features?.length&&lo(d.features),d.renderer&&u.initVisualElement(d.renderer),u.updateFeatures()},{immediate:!0,flush:"pre"});function h(){const d=u.type==="svg",p={...a};Object.keys(a).forEach(T=>{I(a[T])&&(p[T]=a[T].get())});const y=u.visualElement?.latestValues||u.latestValues;let m={...t.style,...d?{}:y};for(const T in m)I(m[T])&&(m[T]=m[T].get());if(d){const{attrs:T,style:x}=Sc({...y,...m},u.options.as,t.style);Object.assign(p,T),m=x}t.drag&&t.dragListener!==!1&&Object.assign(m,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`});const g=bc(m);return g&&(p.style=g),p}const f=Eo().proxy;return Fs(()=>{const d=We(f.$el);u.mount(d)}),Do(()=>u.beforeUnmount()),Is(()=>{We(f.$el)?.isConnected||u.unmount()}),Ro(()=>{u.beforeUpdate(),u.updateOptions(c())}),Lo(()=>{u.update()}),{getProps:l,getAttrs:h,layoutGroup:s,state:u}}const Pc={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object]},whilePress:{type:[String,Array,Object]},whileInView:{type:[String,Array,Object]},whileFocus:{type:[String,Array,Object]},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null,default:void 0},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};var Ac=new Map,Vc=new Map;function Cc(t){if(!Array.isArray(t))return[t];const e=[];for(const n of t)Array.isArray(n)?e.push(...n):e.push(n);return e}var Mc=["area","img","input"];function Ec(t,e,n){if(typeof t=="string"&&Mc.includes(t))return Os(t,e);if(t==="template"){if(!n.default)return null;const s=Cc(n.default()),i=s.findIndex(l=>l.type!==ko);if(i===-1)return s;const r=s[i];delete r.props?.ref;const o=r.props?Xt(e,r.props):e;e.class&&r.props?.class&&delete r.props.class;const a=Bo(r,o);for(const l in o)l.startsWith("on")&&(a.props||={},a.props[l]=o[l]);return s.length===1?a:(s[i]=a,s)}return null}function ks(t,e={}){const n=typeof t=="string",s=n?t:t.name||"",i=e.renderer?Ac:Vc;if(n&&i?.has(t))return i.get(t);const r=js({inheritAttrs:!1,props:{...Pc,as:{type:[String,Object],default:t||"div"}},name:s?`motion.${s}`:"Motion",setup(o,{slots:a}){const{getProps:l,getAttrs:c,state:u}=wc(o,e.renderer);function h(){const f=u.element;if((typeof o.as!="object"||o.asChild)&&f){const{style:d}=c();if(d)for(const[p,y]of Object.entries(d))f.style[p]=y}}return()=>{const f=l(),d=c(),p=o.asChild?"template":o.as,y={...o.forwardMotionProps?f:{},...d,onVnodeUpdated:h},m=Ec(p,y,a);return m!==null?m:Os(p,{...y},a)}}});return n&&i?.set(t,r),r}function Dc(t){const e=t?.renderer;return lo(t?.features||[]),new Proxy({},{get(n,s){return s==="create"?(i,r)=>ks(i,{...r,renderer:e}):ks(s,{renderer:e})}})}const Rc=Dc(mc),Te=Rc.create("div");var Lc=0;function kc(t){const e=new WeakMap,n=ao();function s(r){if(t.mode!=="popLayout")return;const o=r.offsetParent,a=o instanceof HTMLElement&&o.offsetWidth||0,l={height:r.offsetHeight||0,width:r.offsetWidth||0,top:r.offsetTop,left:r.offsetLeft,right:0};l.right=a-l.width-l.left;const c=t.anchorX==="left"?`left: ${l.left}px`:`right: ${l.right}px`,u=`pop-${Lc++}`;r.dataset.motionPopId=u;const h=document.createElement("style");n.value.nonce&&(h.nonce=n.value.nonce),e.set(r,h),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
[data-motion-pop-id="${u}"] {
position: absolute !important;
width: ${l.width}px !important;
height: ${l.height}px !important;
top: ${l.top}px !important;
${c} !important;
}
`)}function i(r){const o=e.get(r);o&&(e.delete(r),A.render(()=>{document.head.removeChild(o)}))}return{addPopStyle:s,removePopStyle:i}}var Bc=0;function Fc(t){const e=String(Bc++),n=new Map,{addPopStyle:s,removePopStyle:i}=kc(t);function r(h){const f=[],d=ne.get(h);d&&h.getAttribute(Ke.motionAttribute)===e&&f.push(d);const p=Array.from(h.querySelectorAll(`[${Ke.motionAttribute}="${e}"]`));for(const y of p){const m=ne.get(y);m&&f.push(m)}return f}function o(h,f){const d=n.get(h);d&&(d.remaining.delete(f),d.remaining.size===0&&l(d))}const a={initial:t.initial,custom:t.custom,presenceId:e,onMotionExitComplete:o};vc(a),Fs(()=>{a.initial=void 0});function l(h){i(h.el),h.states.forEach(f=>{f.getSnapshot(f.options,!1)}),h.done(),n.delete(h.el),h.el?.isConnected?h.states[0]?.didUpdate():h.states.forEach(f=>{f.unmount()}),t.onExitComplete?.()}function c(h,f){r(h).forEach(d=>{d.setActive("exit",!1),d.getSnapshot(d.options,!0)}),f()}function u(h,f){a.custom=t.custom;const d=h,p=r(d);if(p.length===0){f(),t.onExitComplete?.();return}const y={remaining:new Set(p),states:p,done:f,el:d};n.set(d,y),s(d),p.forEach(m=>{m.presenceContainer=d,m.setActive("exit",!0),m.getSnapshot(m.options,!1)}),p[0]?.didUpdate()}return Is(()=>{n.forEach(h=>{h.states.forEach(f=>{f.unmount()})}),n.clear()}),{enter:c,exit:u}}var Ic=js({name:"AnimatePresence",inheritAttrs:!0,__name:"AnimatePresence",props:{mode:{default:"sync"},initial:{type:Boolean,default:!0},as:{},custom:{},onExitComplete:{},anchorX:{default:"left"}},setup(t){const e=t,{enter:n,exit:s}=Fc(e),i=Mt(()=>e.mode!=="wait"?{tag:e.as}:{mode:e.mode==="wait"?"out-in":void 0});return(r,o)=>(st(),yt(be(r.mode==="wait"?Io:jo),Xt(i.value,{appear:"",css:!1,onLeave:D(s),onEnter:D(n)}),{default:et(()=>[Fo(r.$slots,"default")]),_:3},16,["onLeave","onEnter"]))}}),jc=Ic;const Oc={slots:{base:"rounded-md w-full",overlay:"fixed inset-0 bg-default/75 backdrop-blur-sm will-change-opacity",content:"fixed inset-0 flex items-center justify-center cursor-zoom-out focus:outline-none",zoomedImage:"w-full h-auto max-w-[95vw] max-h-[95vh] object-contain rounded-md"},variants:{zoom:{true:"will-change-transform"},open:{true:""}},compoundVariants:[{zoom:!0,open:!1,class:"cursor-zoom-in"}]},Uc=["onClick"],Wc=Object.assign({inheritAttrs:!1},{__name:"ProseImg",props:{src:{type:String,required:!0},alt:{type:String,required:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},class:{type:null,required:!1},zoom:{type:Boolean,required:!1,default:!0},ui:{type:Object,required:!1}},setup(t){const e=t,n=Oo(),s=Uo("prose.img",e),[i,r]=dn(),[o,a]=dn(),l=Bs(!1),c=Mt(()=>vn({extend:vn(Oc),...n.ui?.prose?.img||{}})({zoom:e.zoom,open:l.value})),u=Mt(()=>Go(e.src,zo().app.baseURL)),h=Mt(()=>`${u.value}::${Ho()}`);return e.zoom&&No(window,"scroll",()=>{l.value=!1}),(f,d)=>(st(),pn(Wo,null,[tt(D(i),null,{default:et(()=>[(st(),yt(be(D(mn)),Xt({src:u.value,alt:t.alt,width:t.width,height:t.height},f.$attrs,{class:c.value.base({class:[D(s)?.base,e.class]})}),null,16,["src","alt","width","height","class"]))]),_:1}),tt(D(o),null,{default:et(()=>[(st(),yt(be(D(mn)),Xt({src:u.value,alt:t.alt},f.$attrs,{class:c.value.zoomedImage({class:[D(s)?.zoomedImage]})}),null,16,["src","alt","class"]))]),_:1}),t.zoom?(st(),yt(D($o),{key:0,open:l.value,"onUpdate:open":d[0]||(d[0]=p=>l.value=p),modal:!1},{default:et(({close:p})=>[tt(D(Ko),{"as-child":""},{default:et(()=>[tt(D(Te),{"layout-id":h.value,"as-child":"",transition:{type:"spring",bounce:.15,duration:.5,ease:"easeInOut"}},{default:et(()=>[tt(D(r))]),_:1},8,["layout-id"])]),_:1}),tt(D(_o),null,{default:et(()=>[tt(D(jc),null,{default:et(()=>[l.value?(st(),yt(D(Te),{key:0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:yn(c.value.overlay({class:[D(s)?.overlay]}))},null,8,["class"])):gn("",!0),l.value?(st(),pn("div",{key:1,class:yn(c.value.content({class:[D(s)?.content]})),onClick:p},[tt(D(Te),{"as-child":"","layout-id":h.value,transition:{type:"spring",bounce:.15,duration:.5,ease:"easeInOut"}},{default:et(()=>[tt(D(a))]),_:1},8,["layout-id"])],10,Uc)):gn("",!0)]),_:2},1024)]),_:2},1024)]),_:1},8,["open"])):(st(),yt(D(r),{key:1}))],64))}});export{Wc as default};