UNPKG

sui-explorer-local

Version:
2 lines (1 loc) 43.6 kB
import{r as Cn}from"./index-76fb7be0.js";const wt=typeof document<"u",Ie=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Sn="framerAppearId",Fn="data-"+Ie(Sn);function Pn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function At(e){return typeof e=="string"||Array.isArray(e)}function On(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Dn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ke=["initial",...Dn];function Mt(e){return On(e.animate)||ke.some(t=>At(e[t]))}function Bn(e){return!!(Mt(e)||e.variants)}const _e={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ne={};for(const e in _e)Ne[e]={isEnabled:t=>_e[e].some(n=>!!t[n])};const Ct={};function ei(e){Object.assign(Ct,e)}const te=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],L=new Set(te);function Rn(e,{layout:t,layoutId:n}){return L.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ct[e]||e==="opacity")}const D=e=>!!(e&&e.getVelocity),In={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kn=te.length;function Nn(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},s,r){let i="";for(let o=0;o<kn;o++){const a=te[o];if(e[a]!==void 0){const c=In[a]||a;i+=`${c}(${e[a]}) `}}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),r?i=r(e,s?"":i):n&&s&&(i="none"),i}const St=e=>t=>typeof t=="string"&&t.startsWith(e),Ft=St("--"),Me=St("var(--"),jn=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Ln=(e,t)=>t&&typeof e=="number"?t.transform(e):e,U=(e,t,n)=>Math.min(Math.max(n,e),t),K={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},J={...K,transform:e=>U(0,1,e)},ae={...K,default:1},ee=e=>Math.round(e*1e5)/1e5,me=/(-)?([\d]*\.?[\d])+/g,Pt=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Kn=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ne(e){return typeof e=="string"}const se=e=>({test:t=>ne(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),B=se("deg"),G=se("%"),m=se("px"),$n=se("vh"),Wn=se("vw"),Ee={...G,parse:e=>G.parse(e)/100,transform:e=>G.transform(e*100)},Qe={...K,transform:Math.round},Ot={borderWidth:m,borderTopWidth:m,borderRightWidth:m,borderBottomWidth:m,borderLeftWidth:m,borderRadius:m,radius:m,borderTopLeftRadius:m,borderTopRightRadius:m,borderBottomRightRadius:m,borderBottomLeftRadius:m,width:m,maxWidth:m,height:m,maxHeight:m,size:m,top:m,right:m,bottom:m,left:m,padding:m,paddingTop:m,paddingRight:m,paddingBottom:m,paddingLeft:m,margin:m,marginTop:m,marginRight:m,marginBottom:m,marginLeft:m,rotate:B,rotateX:B,rotateY:B,rotateZ:B,scale:ae,scaleX:ae,scaleY:ae,scaleZ:ae,skew:B,skewX:B,skewY:B,distance:m,translateX:m,translateY:m,translateZ:m,x:m,y:m,z:m,perspective:m,transformPerspective:m,opacity:J,originX:Ee,originY:Ee,originZ:m,zIndex:Qe,fillOpacity:J,strokeOpacity:J,numOctaves:Qe};function Dt(e,t,n,s){const{style:r,vars:i,transform:o,transformOrigin:a}=e;let c=!1,l=!1,u=!0;for(const f in t){const h=t[f];if(Ft(f)){i[f]=h;continue}const d=Ot[f],p=Ln(h,d);if(L.has(f)){if(c=!0,o[f]=p,!u)continue;h!==(d.default||0)&&(u=!1)}else f.startsWith("origin")?(l=!0,a[f]=p):r[f]=p}if(t.transform||(c||s?r.transform=Nn(e.transform,n,u,s):r.transform&&(r.transform="none")),l){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;r.transformOrigin=`${f} ${h} ${d}`}}function Je(e,t,n){return typeof e=="string"?e:m.transform(t+n*e)}function zn(e,t,n){const s=Je(t,e.x,e.width),r=Je(n,e.y,e.height);return`${s} ${r}`}const Gn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Un={offset:"strokeDashoffset",array:"strokeDasharray"};function Hn(e,t,n=1,s=0,r=!0){e.pathLength=1;const i=r?Gn:Un;e[i.offset]=m.transform(-s);const o=m.transform(t),a=m.transform(n);e[i.array]=`${o} ${a}`}function qn(e,{attrX:t,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...l},u,f,h){if(Dt(e,l,u,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p,dimensions:g}=e;d.transform&&(g&&(p.transform=d.transform),delete d.transform),g&&(r!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=zn(g,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),o!==void 0&&Hn(d,o,a,c,!1)}const Xn=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Bt(e,{style:t,vars:n},s,r){Object.assign(e.style,t,r&&r.getProjectionStyles(s));for(const i in n)e.style.setProperty(i,n[i])}const Rt=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"]);function Yn(e,t,n,s){Bt(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Rt.has(r)?r:Ie(r),t.attrs[r])}function It(e,t){const{style:n}=e,s={};for(const r in n)(D(n[r])||t.style&&D(t.style[r])||Rn(r,e))&&(s[r]=n[r]);return s}function Zn(e,t){const n=It(e,t);for(const s in e)if(D(e[s])||D(t[s])){const r=te.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[r]=e[s]}return n}function kt(e,t,n,s={},r={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,s,r)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,s,r)),t}function ti(e){const t=Cn.useRef(null);return t.current===null&&(t.current=e()),t.current}const Nt=e=>Array.isArray(e),ni=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),_n=e=>Nt(e)?e[e.length-1]||0:e,O=e=>e;class et{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function En(e){let t=new et,n=new et,s=0,r=!1,i=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&r,h=f?t:n;return l&&o.add(c),h.add(c)&&f&&r&&(s=t.order.length),c},cancel:c=>{n.remove(c),o.delete(c)},process:c=>{if(r){i=!0;return}if(r=!0,[t,n]=[n,t],n.clear(),s=t.order.length,s)for(let l=0;l<s;l++){const u=t.order[l];u(c),o.has(u)&&(a.schedule(u),e())}r=!1,i&&(i=!1,a.process(c))}};return a}const ce=["prepare","read","update","preRender","render","postRender"],Qn=40;function Jn(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=ce.reduce((f,h)=>(f[h]=En(()=>n=!0),f),{}),o=f=>i[f].process(r),a=()=>{const f=performance.now();n=!1,r.delta=s?1e3/60:Math.max(Math.min(f-r.timestamp,Qn),1),r.timestamp=f,r.isProcessing=!0,ce.forEach(o),r.isProcessing=!1,n&&t&&(s=!1,e(a))},c=()=>{n=!0,s=!0,r.isProcessing||e(a)};return{schedule:ce.reduce((f,h)=>{const d=i[h];return f[h]=(p,g=!1,V=!1)=>(n||c(),d.schedule(p,g,V)),f},{}),cancel:f=>ce.forEach(h=>i[h].cancel(f)),state:r,steps:i}}const{schedule:R,cancel:ue,state:Ce,steps:si}=Jn(typeof requestAnimationFrame<"u"?requestAnimationFrame:O,!0),es=(e,t)=>n=>t(e(n)),jt=(...e)=>e.reduce(es);function ts(e){const t={};return e.values.forEach((n,s)=>t[s]=n.get()),t}function ns(e){const t={};return e.values.forEach((n,s)=>t[s]=n.getVelocity()),t}function ss(e,t,n){const s=e.getProps();return kt(s,t,n!==void 0?n:s.custom,ts(e),ns(e))}let rs=O,je=O;const j=e=>e*1e3,I=e=>e/1e3,is={current:!1},Lt=e=>Array.isArray(e)&&typeof e[0]=="number";function Kt(e){return!!(!e||typeof e=="string"&&$t[e]||Lt(e)||Array.isArray(e)&&e.every(Kt))}const Q=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,$t={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Q([0,.65,.55,1]),circOut:Q([.55,0,1,.45]),backIn:Q([.31,.01,.66,-.59]),backOut:Q([.33,1.53,.69,.99])};function Wt(e){if(e)return Lt(e)?Q(e):Array.isArray(e)?e.map(Wt):$t[e]}function os(e,t,n,{delay:s=0,duration:r,repeat:i=0,repeatType:o="loop",ease:a,times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Wt(a);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:s,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function as(e,{repeat:t,repeatType:n="loop"}){const s=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[s]}const zt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,cs=1e-7,ls=12;function us(e,t,n,s,r){let i,o,a=0;do o=t+(n-t)/2,i=zt(o,s,r)-e,i>0?n=o:t=o;while(Math.abs(i)>cs&&++a<ls);return o}function re(e,t,n,s){if(e===t&&n===s)return O;const r=i=>us(i,0,1,e,n);return i=>i===0||i===1?i:zt(r(i),t,s)}const fs=re(.42,0,1,1),hs=re(0,0,.58,1),Gt=re(.42,0,.58,1),ds=e=>Array.isArray(e)&&typeof e[0]!="number",Ut=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ht=e=>t=>1-e(1-t),Le=e=>1-Math.sin(Math.acos(e)),ps=Ht(Le),ms=Ut(Le),qt=re(.33,1.53,.69,.99),Ke=Ht(qt),gs=Ut(Ke),ys=e=>(e*=2)<1?.5*Ke(e):.5*(2-Math.pow(2,-10*(e-1))),bs={linear:O,easeIn:fs,easeInOut:Gt,easeOut:hs,circIn:Le,circInOut:ms,circOut:ps,backIn:Ke,backInOut:gs,backOut:qt,anticipate:ys},tt=e=>{if(Array.isArray(e)){je(e.length===4);const[t,n,s,r]=e;return re(t,n,s,r)}else if(typeof e=="string")return bs[e];return e},$e=(e,t)=>n=>!!(ne(n)&&Kn.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Xt=(e,t,n)=>s=>{if(!ne(s))return s;const[r,i,o,a]=s.match(me);return{[e]:parseFloat(r),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Vs=e=>U(0,255,e),Ve={...K,transform:e=>Math.round(Vs(e))},N={test:$e("rgb","red"),parse:Xt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Ve.transform(e)+", "+Ve.transform(t)+", "+Ve.transform(n)+", "+ee(J.transform(s))+")"};function xs(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const Se={test:$e("#"),parse:xs,transform:N.transform},z={test:$e("hsl","hue"),parse:Xt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+G.transform(ee(t))+", "+G.transform(ee(n))+", "+ee(J.transform(s))+")"},F={test:e=>N.test(e)||Se.test(e)||z.test(e),parse:e=>N.test(e)?N.parse(e):z.test(e)?z.parse(e):Se.parse(e),transform:e=>ne(e)?e:e.hasOwnProperty("red")?N.transform(e):z.transform(e)},ie=(e,t,n)=>-n*e+n*t+e;function xe(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ts({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,i=0,o=0;if(!t)r=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=xe(c,a,e+1/3),i=xe(c,a,e),o=xe(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:s}}const Te=(e,t,n)=>{const s=e*e;return Math.sqrt(Math.max(0,n*(t*t-s)+s))},vs=[Se,N,z],ws=e=>vs.find(t=>t.test(e));function nt(e){const t=ws(e);let n=t.parse(e);return t===z&&(n=Ts(n)),n}const Yt=(e,t)=>{const n=nt(e),s=nt(t),r={...n};return i=>(r.red=Te(n.red,s.red,i),r.green=Te(n.green,s.green,i),r.blue=Te(n.blue,s.blue,i),r.alpha=ie(n.alpha,s.alpha,i),N.transform(r))};function As(e){var t,n;return isNaN(e)&&ne(e)&&(((t=e.match(me))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Pt))===null||n===void 0?void 0:n.length)||0)>0}const Zt={regex:jn,countKey:"Vars",token:"${v}",parse:O},_t={regex:Pt,countKey:"Colors",token:"${c}",parse:F.parse},Et={regex:me,countKey:"Numbers",token:"${n}",parse:K.parse};function ve(e,{regex:t,countKey:n,token:s,parse:r}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,s),e.values.push(...i.map(r)))}function fe(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&ve(n,Zt),ve(n,_t),ve(n,Et),n}function Qt(e){return fe(e).values}function Jt(e){const{values:t,numColors:n,numVars:s,tokenised:r}=fe(e),i=t.length;return o=>{let a=r;for(let c=0;c<i;c++)c<s?a=a.replace(Zt.token,o[c]):c<s+n?a=a.replace(_t.token,F.transform(o[c])):a=a.replace(Et.token,ee(o[c]));return a}}const Ms=e=>typeof e=="number"?0:e;function Cs(e){const t=Qt(e);return Jt(e)(t.map(Ms))}const X={test:As,parse:Qt,createTransformer:Jt,getAnimatableNone:Cs},en=(e,t)=>n=>`${n>0?t:e}`;function tn(e,t){return typeof e=="number"?n=>ie(e,t,n):F.test(e)?Yt(e,t):e.startsWith("var(")?en(e,t):sn(e,t)}const nn=(e,t)=>{const n=[...e],s=n.length,r=e.map((i,o)=>tn(i,t[o]));return i=>{for(let o=0;o<s;o++)n[o]=r[o](i);return n}},Ss=(e,t)=>{const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=tn(e[r],t[r]));return r=>{for(const i in s)n[i]=s[i](r);return n}},sn=(e,t)=>{const n=X.createTransformer(t),s=fe(e),r=fe(t);return s.numVars===r.numVars&&s.numColors===r.numColors&&s.numNumbers>=r.numNumbers?jt(nn(s.values,r.values),n):en(e,t)},rn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},st=(e,t)=>n=>ie(e,t,n);function Fs(e){return typeof e=="number"?st:typeof e=="string"?F.test(e)?Yt:sn:Array.isArray(e)?nn:typeof e=="object"?Ss:st}function Ps(e,t,n){const s=[],r=n||Fs(e[0]),i=e.length-1;for(let o=0;o<i;o++){let a=r(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||O:t;a=jt(c,a)}s.push(a)}return s}function on(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const i=e.length;if(je(i===t.length),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Ps(t,s,r),a=o.length,c=l=>{let u=0;if(a>1)for(;u<e.length-2&&!(l<e[u+1]);u++);const f=rn(e[u],e[u+1],l);return o[u](f)};return n?l=>c(U(e[0],e[i-1],l)):c}function Os(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=rn(0,t,s);e.push(ie(n,1,r))}}function Ds(e){const t=[0];return Os(t,e.length-1),t}function Bs(e,t){return e.map(n=>n*t)}function Rs(e,t){return e.map(()=>t||Gt).splice(0,e.length-1)}function he({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=ds(s)?s.map(tt):tt(s),i={done:!1,value:t[0]},o=Bs(n&&n.length===t.length?n:Ds(t),e),a=on(o,t,{ease:Array.isArray(r)?r:Rs(t,r)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}function an(e,t){return t?e*(1e3/t):0}const Is=5;function cn(e,t,n){const s=Math.max(t-Is,0);return an(n-e(s),t-s)}const we=.001,ks=.01,rt=10,Ns=.05,js=1;function Ls({duration:e=800,bounce:t=.25,velocity:n=0,mass:s=1}){let r,i;rs(e<=j(rt));let o=1-t;o=U(Ns,js,o),e=U(ks,rt,I(e)),o<1?(r=l=>{const u=l*o,f=u*e,h=u-n,d=Fe(l,o),p=Math.exp(-f);return we-h/d*p},i=l=>{const f=l*o*e,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*e,p=Math.exp(-f),g=Fe(Math.pow(l,2),o);return(-r(l)+we>0?-1:1)*((h-d)*p)/g}):(r=l=>{const u=Math.exp(-l*e),f=(l-n)*e+1;return-we+u*f},i=l=>{const u=Math.exp(-l*e),f=(n-l)*(e*e);return u*f});const a=5/e,c=$s(r,i,a);if(e=j(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:e}}}const Ks=12;function $s(e,t,n){let s=n;for(let r=1;r<Ks;r++)s=s-e(s)/t(s);return s}function Fe(e,t){return e*Math.sqrt(1-t*t)}const Ws=["duration","bounce"],zs=["stiffness","damping","mass"];function it(e,t){return t.some(n=>e[n]!==void 0)}function Gs(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!it(e,zs)&&it(e,Ws)){const n=Ls(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function ln({keyframes:e,restDelta:t,restSpeed:n,...s}){const r=e[0],i=e[e.length-1],o={done:!1,value:r},{stiffness:a,damping:c,mass:l,duration:u,velocity:f,isResolvedFromDuration:h}=Gs({...s,velocity:-I(s.velocity||0)}),d=f||0,p=c/(2*Math.sqrt(a*l)),g=i-r,V=I(Math.sqrt(a/l)),A=Math.abs(g)<5;n||(n=A?.01:2),t||(t=A?.005:.5);let v;if(p<1){const y=Fe(V,p);v=x=>{const T=Math.exp(-p*V*x);return i-T*((d+p*V*g)/y*Math.sin(y*x)+g*Math.cos(y*x))}}else if(p===1)v=y=>i-Math.exp(-V*y)*(g+(d+V*g)*y);else{const y=V*Math.sqrt(p*p-1);v=x=>{const T=Math.exp(-p*V*x),S=Math.min(y*x,300);return i-T*((d+p*V*g)*Math.sinh(S)+y*g*Math.cosh(S))/y}}return{calculatedDuration:h&&u||null,next:y=>{const x=v(y);if(h)o.done=y>=u;else{let T=d;y!==0&&(p<1?T=cn(v,y,x):T=0);const S=Math.abs(T)<=n,M=Math.abs(i-x)<=t;o.done=S&&M}return o.value=o.done?i:x,o}}}function ot({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=b=>a!==void 0&&b<a||c!==void 0&&b>c,p=b=>a===void 0?c:c===void 0||Math.abs(a-b)<Math.abs(c-b)?a:c;let g=n*t;const V=f+g,A=o===void 0?V:o(V);A!==V&&(g=A-f);const v=b=>-g*Math.exp(-b/s),y=b=>A+v(b),x=b=>{const C=v(b),$=y(b);h.done=Math.abs(C)<=l,h.value=h.done?A:$};let T,S;const M=b=>{d(h.value)&&(T=b,S=ln({keyframes:[h.value,p(h.value)],velocity:cn(y,b,h.value),damping:r,stiffness:i,restDelta:l,restSpeed:u}))};return M(0),{calculatedDuration:null,next:b=>{let C=!1;return!S&&T===void 0&&(C=!0,x(b),M(b)),T!==void 0&&b>T?S.next(b-T):(!C&&x(b),h)}}}const Us=e=>{const t=({timestamp:n})=>e(n);return{start:()=>R.update(t,!0),stop:()=>ue(t),now:()=>Ce.isProcessing?Ce.timestamp:performance.now()}},at=2e4;function ct(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<at;)t+=n,s=e.next(t);return t>=at?1/0:t}const Hs={decay:ot,inertia:ot,tween:he,keyframes:he,spring:ln};function de({autoplay:e=!0,delay:t=0,driver:n=Us,keyframes:s,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:u,onUpdate:f,...h}){let d=1,p=!1,g,V;const A=()=>{V=new Promise(w=>{g=w})};A();let v;const y=Hs[r]||he;let x;y!==he&&typeof s[0]!="number"&&(x=on([0,100],s,{clamp:!1}),s=[0,100]);const T=y({...h,keyframes:s});let S;a==="mirror"&&(S=y({...h,keyframes:[...s].reverse(),velocity:-(h.velocity||0)}));let M="idle",b=null,C=null,$=null;T.calculatedDuration===null&&i&&(T.calculatedDuration=ct(T));const{calculatedDuration:ge}=T;let Y=1/0,W=1/0;ge!==null&&(Y=ge+o,W=Y*(i+1)-o);let P=0;const ye=w=>{if(C===null)return;d>0&&(C=Math.min(C,w)),d<0&&(C=Math.min(w-W/d,C)),b!==null?P=b:P=Math.round(w-C)*d;const Z=P-t*(d>=0?1:-1),qe=d>=0?Z<0:Z>W;P=Math.max(Z,0),M==="finished"&&b===null&&(P=W);let Xe=P,Ye=T;if(i){const be=Math.min(P,W)/Y;let oe=Math.floor(be),k=be%1;!k&&be>=1&&(k=1),k===1&&oe--,oe=Math.min(oe,i+1),!!(oe%2)&&(a==="reverse"?(k=1-k,o&&(k-=o/Y)):a==="mirror"&&(Ye=S)),Xe=U(0,1,k)*Y}const _=qe?{done:!1,value:s[0]}:Ye.next(Xe);x&&(_.value=x(_.value));let{done:Ze}=_;!qe&&ge!==null&&(Ze=d>=0?P>=W:P<=0);const Mn=b===null&&(M==="finished"||M==="running"&&Ze);return f&&f(_.value),Mn&&An(),_},ze=()=>{v&&v.stop(),v=void 0},Ge=()=>{M="idle",ze(),g(),A(),C=$=null},An=()=>{M="finished",u&&u(),ze(),g()},Ue=()=>{if(p)return;v||(v=n(ye));const w=v.now();c&&c(),b!==null?C=w-b:(!C||M==="finished")&&(C=w),M==="finished"&&A(),$=C,b=null,M="running",v.start()};e&&Ue();const He={then(w,Z){return V.then(w,Z)},get time(){return I(P)},set time(w){w=j(w),P=w,b!==null||!v||d===0?b=w:C=v.now()-w/d},get duration(){const w=T.calculatedDuration===null?ct(T):T.calculatedDuration;return I(w)},get speed(){return d},set speed(w){w===d||!v||(d=w,He.time=I(P))},get state(){return M},play:Ue,pause:()=>{M="paused",b=P},stop:()=>{p=!0,M!=="idle"&&(M="idle",l&&l(),Ge())},cancel:()=>{$!==null&&ye($),Ge()},complete:()=>{M="finished"},sample:w=>(C=0,ye(w))};return He}function qs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xs=qs(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ys=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),le=10,Zs=2e4,_s=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Kt(t.ease);function Es(e,t,{onUpdate:n,onComplete:s,...r}){if(!(Xs()&&Ys.has(t)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,c,l=!1;const u=()=>{c=new Promise(y=>{a=y})};u();let{keyframes:f,duration:h=300,ease:d,times:p}=r;if(_s(t,r)){const y=de({...r,repeat:0,delay:0});let x={done:!1,value:f[0]};const T=[];let S=0;for(;!x.done&&S<Zs;)x=y.sample(S),T.push(x.value),S+=le;p=void 0,f=T,h=S-le,d="linear"}const g=os(e.owner.current,t,f,{...r,duration:h,ease:d,times:p}),V=()=>{l=!1,g.cancel()},A=()=>{l=!0,R.update(V),a(),u()};return g.onfinish=()=>{l||(e.set(as(f,r)),s&&s(),A())},{then(y,x){return c.then(y,x)},attachTimeline(y){return g.timeline=y,g.onfinish=null,O},get time(){return I(g.currentTime||0)},set time(y){g.currentTime=j(y)},get speed(){return g.playbackRate},set speed(y){g.playbackRate=y},get duration(){return I(h)},play:()=>{o||(g.play(),ue(V))},pause:()=>g.pause(),stop:()=>{if(o=!0,g.playState==="idle")return;const{currentTime:y}=g;if(y){const x=de({...r,autoplay:!1});e.setWithVelocity(x.sample(y-le).value,x.sample(y).value,le)}A()},complete:()=>{l||g.finish()},cancel:A}}function Qs({keyframes:e,delay:t,onUpdate:n,onComplete:s}){const r=()=>(n&&n(e[e.length-1]),s&&s(),{time:0,speed:1,duration:0,play:O,pause:O,stop:O,then:i=>(i(),Promise.resolve()),cancel:O,complete:O});return t?de({keyframes:[0,1],duration:0,delay:t,onComplete:r}):r()}const Js={type:"spring",stiffness:500,damping:25,restSpeed:10},er=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tr={type:"keyframes",duration:.8},nr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sr=(e,{keyframes:t})=>t.length>2?tr:L.has(e)?e.startsWith("scale")?er(t[1]):Js:nr,Pe=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(X.test(t)||t==="0")&&!t.startsWith("url(")),rr=new Set(["brightness","contrast","saturate","opacity"]);function ir(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(me)||[];if(!s)return e;const r=n.replace(s,"");let i=rr.has(t)?1:0;return s!==n&&(i*=100),t+"("+i+r+")"}const or=/([a-z-]*)\(.*?\)/g,Oe={...X,getAnimatableNone:e=>{const t=e.match(or);return t?t.map(ir).join(" "):e}},ar={...Ot,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:Oe,WebkitFilter:Oe},We=e=>ar[e];function un(e,t){let n=We(e);return n!==Oe&&(n=X),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fn=e=>/^0[^.\s]+$/.test(e);function cr(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||fn(e)}function lr(e,t,n,s){const r=Pe(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const o=s.from!==void 0?s.from:e.get();let a;const c=[];for(let l=0;l<i.length;l++)i[l]===null&&(i[l]=l===0?o:i[l-1]),cr(i[l])&&c.push(l),typeof i[l]=="string"&&i[l]!=="none"&&i[l]!=="0"&&(a=i[l]);if(r&&c.length&&a)for(let l=0;l<c.length;l++){const u=c[l];i[u]=un(t,a)}return i}function ur({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function hn(e,t){return e[t]||e.default||e}const fr={skipAnimations:!1},dn=(e,t,n,s={})=>r=>{const i=hn(s,e)||{},o=i.delay||s.delay||0;let{elapsed:a=0}=s;a=a-j(o);const c=lr(t,e,n,i),l=c[0],u=c[c.length-1],f=Pe(e,l),h=Pe(e,u);let d={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:p=>{t.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{r(),i.onComplete&&i.onComplete()}};if(ur(i)||(d={...d,...sr(e,d)}),d.duration&&(d.duration=j(d.duration)),d.repeatDelay&&(d.repeatDelay=j(d.repeatDelay)),!f||!h||is.current||i.type===!1||fr.skipAnimations)return Qs(d);if(!s.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=Es(t,e,d);if(p)return p}return de(d)};function pe(e){return!!(D(e)&&e.add)}const pn=e=>/^\-?\d*\.?\d+$/.test(e);function hr(e,t){e.indexOf(t)===-1&&e.push(t)}function dr(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class mn{constructor(){this.subscriptions=[]}add(t){return hr(this.subscriptions,t),()=>dr(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let i=0;i<r;i++){const o=this.subscriptions[i];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const pr=e=>!isNaN(parseFloat(e));class mr{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,r=!0)=>{this.prev=this.current,this.current=s;const{delta:i,timestamp:o}=Ce;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,R.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>R.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=pr(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new mn);const s=this.events[t].add(n);return t==="change"?()=>{s(),R.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=t,this.timeDelta=s}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?an(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function H(e,t){return new mr(e,t)}const gn=e=>t=>t.test(e),gr={test:e=>e==="auto",parse:e=>e},yn=[K,m,G,B,Wn,$n,gr],E=e=>yn.find(gn(e)),yr=[...yn,F,X],br=e=>yr.find(gn(e));function Vr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,H(n))}function xr(e,t){const n=ss(e,t);let{transitionEnd:s={},transition:r={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...s};for(const o in i){const a=_n(i[o]);Vr(e,o,a)}}function Tr(e,t,n){var s,r;const i=Object.keys(t).filter(a=>!e.hasValue(a)),o=i.length;if(o)for(let a=0;a<o;a++){const c=i[a],l=t[c];let u=null;Array.isArray(l)&&(u=l[0]),u===null&&(u=(r=(s=n[c])!==null&&s!==void 0?s:e.readValue(c))!==null&&r!==void 0?r:t[c]),u!=null&&(typeof u=="string"&&(pn(u)||fn(u))?u=parseFloat(u):!br(u)&&X.test(l)&&(u=un(c,l)),e.addValue(c,H(u,{owner:e})),n[c]===void 0&&(n[c]=u),u!==null&&e.setBaseTarget(c,u))}}function vr(e,t){return t?(t[e]||t.default||t).from:void 0}function wr(e,t,n){const s={};for(const r in e){const i=vr(r,t);if(i!==void 0)s[r]=i;else{const o=n.getValue(r);o&&(s[r]=o.get())}}return s}function Ar({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Mr(e,t){const n=e.get();if(Array.isArray(t)){for(let s=0;s<t.length;s++)if(t[s]!==n)return!0}else return n!==t}function ri(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");s&&(i=s);const l=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const f in a){const h=e.getValue(f),d=a[f];if(!h||d===void 0||u&&Ar(u,f))continue;const p={delay:n,elapsed:0,...hn(i||{},f)};if(window.HandoffAppearAnimations){const A=e.getProps()[Fn];if(A){const v=window.HandoffAppearAnimations(A,f,h,R);v!==null&&(p.elapsed=v,p.isHandoff=!0)}}let g=!p.isHandoff&&!Mr(h,d);if(p.type==="spring"&&(h.getVelocity()||p.velocity)&&(g=!1),h.animation&&(g=!1),g)continue;h.start(dn(f,h,d,e.shouldReduceMotion&&L.has(f)?{type:!1}:p));const V=h.animation;pe(c)&&(c.add(f),V.then(()=>c.remove(f))),l.push(V)}return o&&Promise.all(l).then(()=>{o&&xr(e,o)}),l}const lt=()=>({translate:0,scale:1,origin:0,originPoint:0}),ii=()=>({x:lt(),y:lt()}),ut=()=>({min:0,max:0}),bn=()=>({x:ut(),y:ut()});function Cr({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function oi({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Sr(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ae(e){return e===void 0||e===1}function Fr({scale:e,scaleX:t,scaleY:n}){return!Ae(e)||!Ae(t)||!Ae(n)}function Pr(e){return Fr(e)||Or(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Or(e){return ft(e.x)||ft(e.y)}function ft(e){return e&&e!=="0%"}function ht(e,t,n){const s=e-n,r=t*s;return n+r}function dt(e,t,n,s,r){return r!==void 0&&(e=ht(e,r,s)),ht(e,n,s)+t}function De(e,t=0,n=1,s,r){e.min=dt(e.min,t,n,s,r),e.max=dt(e.max,t,n,s,r)}function Dr(e,{x:t,y:n}){De(e.x,t.translate,t.scale,t.originPoint),De(e.y,n.translate,n.scale,n.originPoint)}function ai(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let i,o;for(let a=0;a<r;a++){i=n[a],o=i.projectionDelta;const c=i.instance;c&&c.style&&c.style.display==="contents"||(s&&i.options.layoutScroll&&i.scroll&&i!==i.root&&yt(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Dr(e,o)),s&&Pr(i.latestValues)&&yt(e,i.latestValues))}t.x=pt(t.x),t.y=pt(t.y)}function pt(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function mt(e,t){e.min=e.min+t,e.max=e.max+t}function gt(e,t,[n,s,r]){const i=t[r]!==void 0?t[r]:.5,o=ie(e.min,e.max,i);De(e,t[n],t[s],o,t.scale)}const Br=["x","scaleX","originX"],Rr=["y","scaleY","originY"];function yt(e,t){gt(e.x,t,Br),gt(e.y,t,Rr)}function Vn(e,t){return Cr(Sr(e.getBoundingClientRect(),t))}function ci(e,t,n){const s=Vn(e,n),{scroll:r}=t;return r&&(mt(s.x,r.offset.x),mt(s.y,r.offset.y)),s}function li(e){return e instanceof SVGElement&&e.tagName!=="svg"}function ui(e,t,n){const s=D(e)?e:H(e);return s.start(dn("",s,t,n)),s.animation}const Ir=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function kr(e){const t=Ir.exec(e);if(!t)return[,];const[,n,s]=t;return[n,s]}function Be(e,t,n=1){const[s,r]=kr(e);if(!s)return;const i=window.getComputedStyle(t).getPropertyValue(s);if(i){const o=i.trim();return pn(o)?parseFloat(o):o}else return Me(r)?Be(r,t,n+1):r}function Nr(e,{...t},n){const s=e.current;if(!(s instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(r=>{const i=r.get();if(!Me(i))return;const o=Be(i,s);o&&r.set(o)});for(const r in t){const i=t[r];if(!Me(i))continue;const o=Be(i,s);o&&(t[r]=o,n||(n={}),n[r]===void 0&&(n[r]=i))}return{target:t,transitionEnd:n}}const jr=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),xn=e=>jr.has(e),Lr=e=>Object.keys(e).some(xn),bt=e=>e===K||e===m,Vt=(e,t)=>parseFloat(e.split(", ")[t]),xt=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/);if(r)return Vt(r[1],t);{const i=s.match(/^matrix\((.+)\)$/);return i?Vt(i[1],e):0}},Kr=new Set(["x","y","z"]),$r=te.filter(e=>!Kr.has(e));function Wr(e){const t=[];return $r.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const q={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:xt(4,13),y:xt(5,14)};q.translateX=q.x;q.translateY=q.y;const zr=(e,t,n)=>{const s=t.measureViewportBox(),r=t.current,i=getComputedStyle(r),{display:o}=i,a={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(l=>{a[l]=q[l](s,i)}),t.render();const c=t.measureViewportBox();return n.forEach(l=>{const u=t.getValue(l);u&&u.jump(a[l]),e[l]=q[l](c,i)}),e},Gr=(e,t,n={},s={})=>{t={...t},s={...s};const r=Object.keys(t).filter(xn);let i=[],o=!1;const a=[];if(r.forEach(c=>{const l=e.getValue(c);if(!e.hasValue(c))return;let u=n[c],f=E(u);const h=t[c];let d;if(Nt(h)){const p=h.length,g=h[0]===null?1:0;u=h[g],f=E(u);for(let V=g;V<p&&h[V]!==null;V++)d?je(E(h[V])===d):d=E(h[V])}else d=E(h);if(f!==d)if(bt(f)&&bt(d)){const p=l.get();typeof p=="string"&&l.set(parseFloat(p)),typeof h=="string"?t[c]=parseFloat(h):Array.isArray(h)&&d===m&&(t[c]=h.map(parseFloat))}else f!=null&&f.transform&&(d!=null&&d.transform)&&(u===0||h===0)?u===0?l.set(d.transform(u)):t[c]=f.transform(h):(o||(i=Wr(e),o=!0),a.push(c),s[c]=s[c]!==void 0?s[c]:t[c],l.jump(h))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,l=zr(t,e,a);return i.length&&i.forEach(([u,f])=>{e.getValue(u).set(f)}),e.render(),wt&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:s}}else return{target:t,transitionEnd:s}};function Ur(e,t,n,s){return Lr(t)?Gr(e,t,n,s):{target:t,transitionEnd:s}}const Hr=(e,t,n,s)=>{const r=Nr(e,t,s);return t=r.target,s=r.transitionEnd,Ur(e,t,n,s)},Re={current:null},Tn={current:!1};function qr(){if(Tn.current=!0,!!wt)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Re.current=e.matches;e.addListener(t),t()}else Re.current=!1}function Xr(e,t,n){const{willChange:s}=t;for(const r in t){const i=t[r],o=n[r];if(D(i))e.addValue(r,i),pe(s)&&s.add(r);else if(D(o))e.addValue(r,H(i,{owner:e})),pe(s)&&s.remove(r);else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,H(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Tt=new WeakMap,vn=Object.keys(Ne),Yr=vn.length,vt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Zr=ke.length;class _r{constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>R.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=Mt(n),this.isVariantNode=Bn(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const h=u[f];a[f]!==void 0&&D(h)&&(h.set(a[f],!1),pe(l)&&l.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Tt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Tn.current||qr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Re.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Tt.delete(this.current),this.projection&&this.projection.unmount(),ue(this.notifyUpdate),ue(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const s=L.has(t),r=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&R.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{r(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},s,r,i){let o,a;for(let c=0;c<Yr;c++){const l=vn[c],{isEnabled:u,Feature:f,ProjectionNode:h,MeasureLayout:d}=Ne[l];h&&(o=h),u(n)&&(!this.features[l]&&f&&(this.features[l]=new f(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:l,drag:u,dragConstraints:f,layoutScroll:h,layoutRoot:d}=n;this.projection.setOptions({layoutId:c,layout:l,alwaysMeasureLayout:!!u||f&&Pn(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<vt.length;s++){const r=vt[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i=t["on"+r];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Xr(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<Zr;s++){const r=ke[s],i=this.props[r];(At(i)||i===!1)&&(n[r]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=H(n,{owner:this}),this.addValue(t,s)),s}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props,r=typeof s=="string"||typeof s=="object"?(n=kt(this.props,s))===null||n===void 0?void 0:n[t]:void 0;if(s&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!D(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class wn extends _r{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...s},{transformValues:r},i){let o=wr(s,t||{},this);if(r&&(n&&(n=r(n)),s&&(s=r(s)),o&&(o=r(o))),i){Tr(this,s,o);const a=Hr(this,s,o,n);n=a.transitionEnd,s=a.target}return{transition:t,transitionEnd:n,...s}}}function Er(e){return window.getComputedStyle(e)}class fi extends wn{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(L.has(n)){const s=We(n);return s&&s.default||0}else{const s=Er(t),r=(Ft(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Vn(t,n)}build(t,n,s,r){Dt(t,n,s,r.transformTemplate)}scrapeMotionValuesFromProps(t,n){return It(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;D(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,s,r){Bt(t,n,s,r)}}class hi extends wn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(L.has(n)){const s=We(n);return s&&s.default||0}return n=Rt.has(n)?n:Ie(n),t.getAttribute(n)}measureInstanceViewportBox(){return bn()}scrapeMotionValuesFromProps(t,n){return Zn(t,n)}build(t,n,s,r){qn(t,n,s,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,s,r){Yn(t,n,s,r)}mount(t){this.isSVGTag=Xn(t.tagName),super.mount(t)}}export{m as $,Ne as A,Rn as B,Dt as C,qn as D,Xn as E,ni as F,Bn as G,fi as H,On as I,kt as J,Zn as K,Yn as L,It as M,jt as N,O,ss as P,Nt as Q,Dn as R,hi as S,Ce as T,U,bn as V,ci as W,oi as X,dn as Y,G as Z,Cr as _,li as a,X as a0,ei as a1,ps as a2,ht as a3,hr as a4,mn as a5,hn as a6,si as a7,Pr as a8,mt as a9,yt as aa,Fr as ab,Dr as ac,Or as ad,ai as ae,ii as af,Ct as ag,ct as b,ue as c,at as d,I as e,R as f,ds as g,ie as h,je as i,D as j,Ds as k,Os as l,qs as m,j as n,ui as o,rn as p,ri as q,dr as r,ln as s,wt as t,ti as u,Tt as v,Fn as w,Pn as x,Mt as y,At as z};