@telegraph/tooltip 0.0.53 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +710 -7
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +1595 -1583
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),Ss=require("@radix-ui/react-tooltip"),Vs=require("@radix-ui/react-use-controllable-state"),As=require("@telegraph/appearance"),Ms=require("@telegraph/helpers"),Cs=require("@telegraph/layout"),Ps=require("@telegraph/typography"),v=require("react");function Fs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const re=Fs(Ss),Os=v.createContext({});function Ds(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const rt=typeof window<"u",Rs=rt?v.useLayoutEffect:v.useEffect,un=v.createContext(null);function Is(e,t){e.indexOf(t)===-1&&e.push(t)}function Es(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const z=(e,t,n)=>n>t?t:n<e?e:n;let de=()=>{},q=()=>{};process.env.NODE_ENV!=="production"&&(de=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},q=(e,t)=>{if(!e)throw new Error(t)});const j={},cn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ks(e){return typeof e=="object"&&e!==null}const ln=e=>/^0[^.\s]+$/u.test(e);function ot(e){let t;return()=>(t===void 0&&(t=e()),t)}const Q=e=>e,Ns=(e,t)=>n=>t(e(n)),Fe=(...e)=>e.reduce(Ns),fn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class dn{constructor(){this.subscriptions=[]}add(t){return Is(this.subscriptions,t),()=>Es(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const L=e=>e*1e3,K=e=>e/1e3;function hn(e,t){return t?e*(1e3/t):0}const Ot=new Set;function pn(e,t,n){e||Ot.has(t)||(console.warn(t),Ot.add(t))}const mn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ls=1e-7,Bs=12;function Ks(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=mn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Ls&&++a<Bs);return o}function he(e,t,n,s){if(e===t&&n===s)return Q;const i=r=>Ks(r,0,1,e,n);return r=>r===0||r===1?r:mn(i(r),t,s)}const gn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yn=e=>t=>1-e(1-t),bn=he(.33,1.53,.69,.99),at=yn(bn),Tn=gn(at),vn=e=>(e*=2)<1?.5*at(e):.5*(2-Math.pow(2,-10*(e-1))),ut=e=>1-Math.sin(Math.acos(e)),js=yn(ut),wn=gn(ut),Ws=he(.42,0,1,1),$s=he(0,0,.58,1),xn=he(.42,0,.58,1),_s=e=>Array.isArray(e)&&typeof e[0]!="number",Sn=e=>Array.isArray(e)&&typeof e[0]=="number",Dt={linear:Q,easeIn:Ws,easeInOut:xn,easeOut:$s,circIn:ut,circInOut:wn,circOut:js,backIn:at,backInOut:Tn,backOut:bn,anticipate:vn},Gs=e=>typeof e=="string",Rt=e=>{if(Sn(e)){q(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,s,i]=e;return he(t,n,s,i)}else if(Gs(e))return q(Dt[e]!==void 0,`Invalid easing type '${e}'`),Dt[e];return e},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Us(e,t){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,d=!1,f=!1)=>{const y=f&&i?n:s;return d&&o.add(u),y.has(u)||y.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,r&&(r=!1,l.process(u))}};return l}const Hs=40;function Vn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Te.reduce((m,A)=>(m[A]=Us(r),m),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:h,postRender:y}=o,b=()=>{const m=j.useManualTiming?i.timestamp:performance.now();n=!1,j.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(m-i.timestamp,Hs),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),h.process(i),y.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(b))},w=()=>{n=!0,s=!0,i.isProcessing||e(b)};return{schedule:Te.reduce((m,A)=>{const T=o[A];return m[A]=(V,C=!1,x=!1)=>(n||w(),T.schedule(V,C,x)),m},{}),cancel:m=>{for(let A=0;A<Te.length;A++)o[Te[A]].cancel(m)},state:i,steps:o}}const{schedule:N,cancel:$e,state:Se}=Vn(typeof requestAnimationFrame<"u"?requestAnimationFrame:Q,!0);let we;function zs(){we=void 0}const k={now:()=>(we===void 0&&k.set(Se.isProcessing||j.useManualTiming?Se.timestamp:performance.now()),we),set:e=>{we=e,queueMicrotask(zs)}},An=e=>t=>typeof t=="string"&&t.startsWith(e),Mn=An("--"),qs=An("var(--"),ct=e=>qs(e)?Ys.test(e.split("/*")[0].trim()):!1,Ys=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ee={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ue={...ee,transform:e=>z(0,1,e)},ve={...ee,default:1},ae=e=>Math.round(e*1e5)/1e5,lt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Xs(e){return e==null}const Zs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ft=(e,t)=>n=>!!(typeof n=="string"&&Zs.test(n)&&n.startsWith(e)||t&&!Xs(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cn=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(lt);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Js=e=>z(0,255,e),ke={...ee,transform:e=>Math.round(Js(e))},_={test:ft("rgb","red"),parse:Cn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ke.transform(e)+", "+ke.transform(t)+", "+ke.transform(n)+", "+ae(ue.transform(s))+")"};function Qs(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const _e={test:ft("#"),parse:Qs,transform:_.transform},pe=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),W=pe("deg"),Z=pe("%"),g=pe("px"),ei=pe("vh"),ti=pe("vw"),It={...Z,parse:e=>Z.parse(e)/100,transform:e=>Z.transform(e*100)},Y={test:ft("hsl","hue"),parse:Cn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Z.transform(ae(t))+", "+Z.transform(ae(n))+", "+ae(ue.transform(s))+")"},P={test:e=>_.test(e)||_e.test(e)||Y.test(e),parse:e=>_.test(e)?_.parse(e):Y.test(e)?Y.parse(e):_e.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_.transform(e):Y.transform(e),getAnimatableNone:e=>{const t=P.parse(e);return t.alpha=0,P.transform(t)}},ni=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function si(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(lt))==null?void 0:t.length)||0)+(((n=e.match(ni))==null?void 0:n.length)||0)>0}const Pn="number",Fn="color",ii="var",ri="var(",Et="${}",oi=/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 ce(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(oi,c=>(P.test(c)?(s.color.push(r),i.push(Fn),n.push(P.parse(c))):c.startsWith(ri)?(s.var.push(r),i.push(ii),n.push(c)):(s.number.push(r),i.push(Pn),n.push(parseFloat(c))),++r,Et)).split(Et);return{values:n,split:a,indexes:s,types:i}}function On(e){return ce(e).values}function Dn(e){const{split:t,types:n}=ce(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const a=n[o];a===Pn?r+=ae(i[o]):a===Fn?r+=P.transform(i[o]):r+=i[o]}return r}}const ai=e=>typeof e=="number"?0:P.test(e)?P.getAnimatableNone(e):e;function ui(e){const t=On(e);return Dn(e)(t.map(ai))}const te={test:si,parse:On,createTransformer:Dn,getAnimatableNone:ui};function Ne(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 ci({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=Ne(c,a,e+1/3),r=Ne(c,a,e),o=Ne(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Ve(e,t){return n=>n>0?t:e}const Oe=(e,t,n)=>e+(t-e)*n,Le=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},li=[_e,_,Y],fi=e=>li.find(t=>t.test(e));function kt(e){const t=fi(e);if(de(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Y&&(n=ci(n)),n}const Nt=(e,t)=>{const n=kt(e),s=kt(t);if(!n||!s)return Ve(e,t);const i={...n};return r=>(i.red=Le(n.red,s.red,r),i.green=Le(n.green,s.green,r),i.blue=Le(n.blue,s.blue,r),i.alpha=Oe(n.alpha,s.alpha,r),_.transform(i))},Ge=new Set(["none","hidden"]);function di(e,t){return Ge.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function hi(e,t){return n=>Oe(e,t,n)}function dt(e){return typeof e=="number"?hi:typeof e=="string"?ct(e)?Ve:P.test(e)?Nt:gi:Array.isArray(e)?Rn:typeof e=="object"?P.test(e)?Nt:pi:Ve}function Rn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>dt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function pi(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=dt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function mi(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=e.indexes[r][s[r]],a=e.values[o]??0;n[i]=a,s[r]++}return n}const gi=(e,t)=>{const n=te.createTransformer(t),s=ce(e),i=ce(t);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?Ge.has(e)&&!i.values.length||Ge.has(t)&&!s.values.length?di(e,t):Fe(Rn(mi(s,i),i.values),n):(de(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ve(e,t))};function In(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Oe(e,t,n):dt(e)(e,t)}const yi=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>N.update(t,n),stop:()=>$e(t),now:()=>Se.isProcessing?Se.timestamp:k.now()}},En=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ae=2e4;function ht(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ae;)t+=n,s=e.next(t);return t>=Ae?1/0:t}function bi(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(ht(s),Ae);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:K(i)}}const Ti=5;function kn(e,t,n){const s=Math.max(t-Ti,0);return hn(n-e(s),t-s)}const M={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},Be=.001;function vi({duration:e=M.duration,bounce:t=M.bounce,velocity:n=M.velocity,mass:s=M.mass}){let i,r;de(e<=L(M.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=z(M.minDamping,M.maxDamping,o),e=z(M.minDuration,M.maxDuration,K(e)),o<1?(i=l=>{const u=l*o,d=u*e,f=u-n,h=Ue(l,o),y=Math.exp(-d);return Be-f/h*y},r=l=>{const d=l*o*e,f=d*n+n,h=Math.pow(o,2)*Math.pow(l,2)*e,y=Math.exp(-d),b=Ue(Math.pow(l,2),o);return(-i(l)+Be>0?-1:1)*((f-h)*y)/b}):(i=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-Be+u*d},r=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const a=5/e,c=xi(i,r,a);if(e=L(e),isNaN(c))return{stiffness:M.stiffness,damping:M.damping,duration:e};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:e}}}const wi=12;function xi(e,t,n){let s=n;for(let i=1;i<wi;i++)s=s-e(s)/t(s);return s}function Ue(e,t){return e*Math.sqrt(1-t*t)}const Si=["duration","bounce"],Vi=["stiffness","damping","mass"];function Lt(e,t){return t.some(n=>e[n]!==void 0)}function Ai(e){let t={velocity:M.velocity,stiffness:M.stiffness,damping:M.damping,mass:M.mass,isResolvedFromDuration:!1,...e};if(!Lt(e,Vi)&&Lt(e,Si))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*z(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:M.mass,stiffness:i,damping:r}}else{const n=vi(e);t={...t,...n,mass:M.mass},t.isResolvedFromDuration=!0}return t}function Me(e=M.visualDuration,t=M.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Ai({...n,velocity:-K(n.velocity||0)}),y=f||0,b=l/(2*Math.sqrt(c*u)),w=o-r,p=K(Math.sqrt(c/u)),S=Math.abs(w)<5;s||(s=S?M.restSpeed.granular:M.restSpeed.default),i||(i=S?M.restDelta.granular:M.restDelta.default);let m;if(b<1){const T=Ue(p,b);m=V=>{const C=Math.exp(-b*p*V);return o-C*((y+b*p*w)/T*Math.sin(T*V)+w*Math.cos(T*V))}}else if(b===1)m=T=>o-Math.exp(-p*T)*(w+(y+p*w)*T);else{const T=p*Math.sqrt(b*b-1);m=V=>{const C=Math.exp(-b*p*V),x=Math.min(T*V,300);return o-C*((y+b*p*w)*Math.sinh(x)+T*w*Math.cosh(x))/T}}const A={calculatedDuration:h&&d||null,next:T=>{const V=m(T);if(h)a.done=T>=d;else{let C=T===0?y:0;b<1&&(C=T===0?L(y):kn(m,T,V));const x=Math.abs(C)<=s,O=Math.abs(o-V)<=i;a.done=x&&O}return a.value=a.done?o:V,a},toString:()=>{const T=Math.min(ht(A),Ae),V=En(C=>A.next(T*C).value,T,30);return T+"ms "+V},toTransition:()=>{}};return A}Me.applyToOptions=e=>{const t=bi(e,100,Me);return e.ease=t.ease,e.duration=L(t.duration),e.type="keyframes",e};function He({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=x=>a!==void 0&&x<a||c!==void 0&&x>c,y=x=>a===void 0?c:c===void 0||Math.abs(a-x)<Math.abs(c-x)?a:c;let b=n*t;const w=d+b,p=o===void 0?w:o(w);p!==w&&(b=p-d);const S=x=>-b*Math.exp(-x/s),m=x=>p+S(x),A=x=>{const O=S(x),R=m(x);f.done=Math.abs(O)<=l,f.value=f.done?p:R};let T,V;const C=x=>{h(f.value)&&(T=x,V=Me({keyframes:[f.value,y(f.value)],velocity:kn(m,x,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:x=>{let O=!1;return!V&&T===void 0&&(O=!0,A(x),C(x)),T!==void 0&&x>=T?V.next(x-T):(!O&&A(x),f)}}}function Mi(e,t,n){const s=[],i=n||j.mix||In,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Q:t;a=Fe(c,a)}s.push(a)}return s}function Ci(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(q(r===t.length,"Both input and output ranges must be the same length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Mi(t,s,i),c=a.length,l=u=>{if(o&&u<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=fn(e[d],e[d+1],u);return a[d](f)};return n?u=>l(z(e[0],e[r-1],u)):l}function Pi(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=fn(0,t,s);e.push(Oe(n,1,i))}}function Fi(e){const t=[0];return Pi(t,e.length-1),t}function Oi(e,t){return e.map(n=>n*t)}function Di(e,t){return e.map(()=>t||xn).splice(0,e.length-1)}function X({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=_s(s)?s.map(Rt):Rt(s),r={done:!1,value:t[0]},o=Oi(n&&n.length===t.length?n:Fi(t),e),a=Ci(o,t,{ease:Array.isArray(i)?i:Di(t,i)});return{calculatedDuration:e,next:c=>(r.value=a(c),r.done=c>=e,r)}}const Ri=e=>e!==null;function pt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(Ri),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Ii={decay:He,inertia:He,tween:X,keyframes:X,spring:Me};function Nn(e){typeof e.type=="string"&&(e.type=Ii[e.type])}class mt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Ei=e=>e/100;class gt extends mt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Nn(t);const{type:n=X,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=n||X;process.env.NODE_ENV!=="production"&&c!==X&&q(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),c!==X&&typeof a[0]!="number"&&(this.mixKeyframes=Fe(Ei,In(a[0],a[1])),a=[0,100]);const l=c({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=ht(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:y,onUpdate:b,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,A=s;if(d){const x=Math.min(this.currentTime,i)/a;let O=Math.floor(x),R=x%1;!R&&x>=1&&(R=1),R===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(f==="reverse"?(R=1-R,h&&(R-=h/a)):f==="mirror"&&(A=o)),m=z(0,1,R)*a}const T=S?{done:!1,value:u[0]}:A.next(m);r&&(T.value=r(T.value));let{done:V}=T;!S&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return C&&y!==He&&(T.value=pt(u,this.options,w,this.speed)),b&&b(T.value),C&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return K(this.calculatedDuration)}get time(){return K(this.currentTime)}set time(t){var n;t=L(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(k.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=K(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=yi,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function ki(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const G=e=>e*180/Math.PI,ze=e=>{const t=G(Math.atan2(e[1],e[0]));return qe(t)},Ni={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ze,rotateZ:ze,skewX:e=>G(Math.atan(e[1])),skewY:e=>G(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qe=e=>(e=e%360,e<0&&(e+=360),e),Bt=ze,Kt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jt=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Li={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kt,scaleY:jt,scale:e=>(Kt(e)+jt(e))/2,rotateX:e=>qe(G(Math.atan2(e[6],e[5]))),rotateY:e=>qe(G(Math.atan2(-e[2],e[0]))),rotateZ:Bt,rotate:Bt,skewX:e=>G(Math.atan(e[4])),skewY:e=>G(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ye(e){return e.includes("scale")?1:0}function Xe(e,t){if(!e||e==="none")return Ye(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Li,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ni,i=a}if(!i)return Ye(t);const r=s[t],o=i[1].split(",").map(Ki);return typeof r=="function"?r(o):o[r]}const Bi=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Xe(n,t)};function Ki(e){return parseFloat(e.trim())}const ne=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],se=new Set(ne),Wt=e=>e===ee||e===g,ji=new Set(["x","y","z"]),Wi=ne.filter(e=>!ji.has(e));function $i(e){const t=[];return Wi.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const U={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:(e,{transform:t})=>Xe(t,"x"),y:(e,{transform:t})=>Xe(t,"y")};U.translateX=U.x;U.translateY=U.y;const H=new Set;let Ze=!1,Je=!1,Qe=!1;function Ln(){if(Je){const e=Array.from(H).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=$i(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Je=!1,Ze=!1,H.forEach(e=>e.complete(Qe)),H.clear()}function Bn(){H.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Je=!0)})}function _i(){Qe=!0,Bn(),Ln(),Qe=!1}class yt{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(H.add(this),Ze||(Ze=!0,N.read(Bn),N.resolveKeyframes(Ln))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}ki(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),H.delete(this)}cancel(){this.state==="scheduled"&&(H.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Gi=e=>e.startsWith("--");function Ui(e,t,n){Gi(t)?e.style.setProperty(t,n):e.style[t]=n}const Hi=ot(()=>window.ScrollTimeline!==void 0),zi={};function qi(e,t){const n=ot(e);return()=>zi[t]??n()}const Kn=qi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),oe=([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:oe([0,.65,.55,1]),circOut:oe([.55,0,1,.45]),backIn:oe([.31,.01,.66,-.59]),backOut:oe([.33,1.53,.69,.99])};function jn(e,t){if(e)return typeof e=="function"?Kn()?En(e,t):"ease-out":Sn(e)?oe(e):Array.isArray(e)?e.map(n=>jn(n,t)||$t.easeOut):$t[e]}function Yi(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const d=jn(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(u,f)}function Wn(e){return typeof e=="function"&&"applyToOptions"in e}function Xi({type:e,...t}){return Wn(e)&&Kn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Zi extends mt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,q(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Xi(t);this.animation=Yi(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=pt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Ui(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return K(Number(t))}get time(){return K(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=L(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Hi()?(this.animation.timeline=t,Q):n(this)}}const $n={anticipate:vn,backInOut:Tn,circInOut:wn};function Ji(e){return e in $n}function Qi(e){typeof e.ease=="string"&&Ji(e.ease)&&(e.ease=$n[e.ease])}const _t=10;class er extends Zi{constructor(t){Qi(t),Nn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new gt({...o,autoplay:!1}),c=L(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-_t).value,a.sample(c).value,_t),a.stop()}}const Gt=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(te.test(e)||e==="0")&&!e.startsWith("url("));function tr(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function nr(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=Gt(i,t),a=Gt(r,t);return de(o===a,`You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`),!o||!a?!1:tr(e)||(n==="spring"||Wn(n))&&s}function _n(e){return ks(e)&&"offsetHeight"in e}const sr=new Set(["opacity","clipPath","filter","transform"]),ir=ot(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function rr(e){var l;const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!_n((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:a,transformTemplate:c}=t.owner.getProps();return ir()&&n&&sr.has(n)&&(n!=="transform"||!c)&&!a&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const or=40;class ar extends mt{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...d}){var y;super(),this.stop=()=>{var b,w;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=k.now();const f={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:l,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||yt;this.keyframeResolver=new h(a,(b,w,p)=>this.onKeyframesResolved(b,w,f,!p),c,l,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=k.now(),nr(t,r,o,a)||((j.instantAnimations||!c)&&(u==null||u(pt(t,s,n))),t[0]=t[t.length-1],s.duration=0,s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>or?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!l&&rr(f)?new er({...f,element:f.motionValue.owner.current}):new gt(f);h.finished.then(()=>this.notifyFinished()).catch(Q),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),_i()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const ur=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cr(e){const t=ur.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const lr=4;function Gn(e,t,n=1){q(n<=lr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[s,i]=cr(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return cn(o)?parseFloat(o):o}return ct(i)?Gn(i,t,n+1):i}function Un(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Hn=new Set(["width","height","top","left","right","bottom",...ne]),fr={test:e=>e==="auto",parse:e=>e},zn=e=>t=>t.test(e),qn=[ee,g,Z,W,ti,ei,fr],Ut=e=>qn.find(zn(e));function dr(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ln(e):!0}const hr=new Set(["brightness","contrast","saturate","opacity"]);function pr(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(lt)||[];if(!s)return e;const i=n.replace(s,"");let r=hr.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const mr=/\b([a-z-]*)\(.*?\)/gu,et={...te,getAnimatableNone:e=>{const t=e.match(mr);return t?t.map(pr).join(" "):e}},Ht={...ee,transform:Math.round},gr={rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:ve,scaleX:ve,scaleY:ve,scaleZ:ve,skew:W,skewX:W,skewY:W,distance:g,translateX:g,translateY:g,translateZ:g,x:g,y:g,z:g,perspective:g,transformPerspective:g,opacity:ue,originX:It,originY:It,originZ:g},bt={borderWidth:g,borderTopWidth:g,borderRightWidth:g,borderBottomWidth:g,borderLeftWidth:g,borderRadius:g,radius:g,borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomRightRadius:g,borderBottomLeftRadius:g,width:g,maxWidth:g,height:g,maxHeight:g,top:g,right:g,bottom:g,left:g,padding:g,paddingTop:g,paddingRight:g,paddingBottom:g,paddingLeft:g,margin:g,marginTop:g,marginRight:g,marginBottom:g,marginLeft:g,backgroundPositionX:g,backgroundPositionY:g,...gr,zIndex:Ht,fillOpacity:ue,strokeOpacity:ue,numOctaves:Ht},yr={...bt,color:P,backgroundColor:P,outlineColor:P,fill:P,stroke:P,borderColor:P,borderTopColor:P,borderRightColor:P,borderBottomColor:P,borderLeftColor:P,filter:et,WebkitFilter:et},Yn=e=>yr[e];function Xn(e,t){let n=Yn(e);return n!==et&&(n=te),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const br=new Set(["auto","none","0"]);function Tr(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!br.has(r)&&ce(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=Xn(n,i)}class vr extends yt{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),ct(l))){const u=Gn(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Hn.has(s)||t.length!==2)return;const[i,r]=t,o=Ut(i),a=Ut(r);if(o!==a)if(Wt(o)&&Wt(a))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else U[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||dr(t[i]))&&s.push(i);s.length&&Tr(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=U[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=U[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function wr(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=(n==null?void 0:n[e])??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Zn=(e,t)=>t&&typeof e=="number"?t.transform(e):e,zt=30,xr=e=>!isNaN(parseFloat(e));class Sr{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{var o,a;const r=k.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();i&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=k.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xr(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new dn);const s=this.events[t].add(n);return t==="change"?()=>{s(),N.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=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zt);return hn(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ce(e,t){return new Sr(e,t)}const{schedule:Vr}=Vn(queueMicrotask,!1),Ar={y:!1};function Mr(){return Ar.y}function Jn(e,t){const n=wr(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function qt(e){return!(e.pointerType==="touch"||Mr())}function Cr(e,t,n={}){const[s,i,r]=Jn(e,n),o=a=>{if(!qt(a))return;const{target:c}=a,l=t(c,a);if(typeof l!="function"||!c)return;const u=d=>{qt(d)&&(l(d),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const Qn=(e,t)=>t?e===t?!0:Qn(e,t.parentElement):!1,Pr=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Fr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Or(e){return Fr.has(e.tagName)||e.tabIndex!==-1}const xe=new WeakSet;function Yt(e){return t=>{t.key==="Enter"&&e(t)}}function Ke(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Dr=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Yt(()=>{if(xe.has(n))return;Ke(n,"down");const i=Yt(()=>{Ke(n,"up")}),r=()=>Ke(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Xt(e){return Pr(e)&&!0}function Rr(e,t,n={}){const[s,i,r]=Jn(e,n),o=a=>{const c=a.currentTarget;if(!Xt(a))return;xe.add(c);const l=t(c,a),u=(h,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),xe.has(c)&&xe.delete(c),Xt(h)&&typeof l=="function"&&l(h,{success:y})},d=h=>{u(h,c===window||c===document||n.useGlobalTarget||Qn(c,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),_n(a)&&(a.addEventListener("focus",l=>Dr(l,i)),!Or(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const I=e=>!!(e&&e.getVelocity),Ir=[...qn,P,te],Er=e=>Ir.find(zn(e)),es=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Tt=v.createContext({strict:!1}),Zt={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"]},J={};for(const e in Zt)J[e]={isEnabled:t=>Zt[e].some(n=>!!t[n])};function Jt(e){for(const t in e)J[t]={...J[t],...e[t]}}function kr({children:e,features:t,strict:n=!1}){const[,s]=v.useState(!je(t)),i=v.useRef(void 0);if(!je(t)){const{renderer:r,...o}=t;i.current=r,Jt(o)}return v.useEffect(()=>{je(t)&&t().then(({renderer:r,...o})=>{Jt(o),i.current=r,s(!0)})},[]),E.jsx(Tt.Provider,{value:{renderer:i.current,strict:n},children:e})}function je(e){return typeof e=="function"}const Nr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Pe(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Nr.has(e)}let ts=e=>!Pe(e);function Lr(e){typeof e=="function"&&(ts=t=>t.startsWith("on")?!Pe(t):e(t))}try{Lr(require("@emotion/is-prop-valid").default)}catch{}function Br(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(ts(i)||n===!0&&Pe(i)||!t&&!Pe(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const De=v.createContext({});function Re(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function le(e){return typeof e=="string"||Array.isArray(e)}const vt=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wt=["initial",...vt];function Ie(e){return Re(e.animate)||wt.some(t=>le(e[t]))}function ns(e){return!!(Ie(e)||e.variants)}function Kr(e,t){if(Ie(e)){const{initial:n,animate:s}=e;return{initial:n===!1||le(n)?n:void 0,animate:le(s)?s:void 0}}return e.inherit!==!1?t:{}}function jr(e){const{initial:t,animate:n}=Kr(e,v.useContext(De));return v.useMemo(()=>({initial:t,animate:n}),[Qt(t),Qt(n)])}function Qt(e){return Array.isArray(e)?e.join(" "):e}const Wr=Symbol.for("motionComponentSymbol");function ss(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $r(e,t,n){return v.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):ss(n)&&(n.current=s))},[t])}const xt=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_r="framerAppearId",is="data-"+xt(_r),Gr=v.createContext({});function Ur(e,t,n,s,i){var b,w;const{visualElement:r}=v.useContext(De),o=v.useContext(Tt),a=v.useContext(un),c=v.useContext(es).reducedMotion,l=v.useRef(null);s=s||o.renderer,!l.current&&s&&(l.current=s(e,{visualState:t,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,d=v.useContext(Gr);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Hr(l.current,n,i,d);const f=v.useRef(!1);v.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[is],y=v.useRef(!!h&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Rs(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Vr.render(u.render),y.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(!y.current&&u.animationState&&u.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),y.current=!1))}),u}function Hr(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:rs(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&ss(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:c,layoutRoot:l})}function rs(e){if(e)return e.options.allowProjection!==!1?e.projection:rs(e.parent)}function zr({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:i}){function r(a,c){let l;const u={...v.useContext(es),...a,layoutId:qr(a)},{isStatic:d}=u,f=jr(a),h=s(a,d);if(!d&&rt){Yr(u,e);const y=Xr(u);l=y.MeasureLayout,f.visualElement=Ur(i,h,u,t,y.ProjectionNode)}return E.jsxs(De.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...u}):null,n(i,a,$r(h,f.visualElement,c),h,d,f.visualElement)]})}r.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(r);return o[Wr]=i,o}function qr({layoutId:e}){const t=v.useContext(Os).id;return t&&e!==void 0?t+"-"+e:e}function Yr(e,t){v.useContext(Tt).strict,process.env.NODE_ENV}function Xr(e){const{drag:t,layout:n}=J;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Zr={};function os(e,{layout:t,layoutId:n}){return se.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zr[e]||e==="opacity")}const Jr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qr=ne.length;function eo(e,t,n){let s="",i=!0;for(let r=0;r<Qr;r++){const o=ne[r],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Zn(a,bt[o]);if(!c){i=!1;const u=Jr[o]||o;s+=`${u}(${l}) `}n&&(t[o]=l)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function St(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,a=!1;for(const c in t){const l=t[c];if(se.has(c)){o=!0;continue}else if(Mn(c)){i[c]=l;continue}else{const u=Zn(l,bt[c]);c.startsWith("origin")?(a=!0,r[c]=u):s[c]=u}}if(t.transform||(o||n?s.transform=eo(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=r;s.transformOrigin=`${c} ${l} ${u}`}}const Vt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function as(e,t,n){for(const s in t)!I(t[s])&&!os(s,n)&&(e[s]=t[s])}function to({transformTemplate:e},t){return v.useMemo(()=>{const n=Vt();return St(n,t,e),Object.assign({},n.vars,n.style)},[t])}function no(e,t){const n=e.style||{},s={};return as(s,n,e),Object.assign(s,to(e,t)),s}function so(e,t){const n={},s=no(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const io={offset:"stroke-dashoffset",array:"stroke-dasharray"},ro={offset:"strokeDashoffset",array:"strokeDasharray"};function oo(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?io:ro;e[r.offset]=g.transform(-s);const o=g.transform(t),a=g.transform(n);e[r.array]=`${o} ${a}`}function us(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(St(e,a,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&oo(d,i,r,o,!1)}const cs=()=>({...Vt(),attrs:{}}),ls=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ao(e,t,n,s){const i=v.useMemo(()=>{const r=cs();return us(r,t,ls(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};as(r,e.style,e),i.style={...r,...i.style}}return i}const uo=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function At(e){return typeof e!="string"||e.includes("-")?!1:!!(uo.indexOf(e)>-1||/[A-Z]/u.test(e))}function co(e=!1){return(n,s,i,{latestValues:r},o)=>{const c=(At(n)?ao:so)(s,r,o,n),l=Br(s,typeof n=="string",e),u=n!==v.Fragment?{...l,...c,ref:i}:{},{children:d}=s,f=v.useMemo(()=>I(d)?d.get():d,[d]);return v.createElement(n,{...u,children:f})}}function en(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Mt(e,t,n,s){if(typeof t=="function"){const[i,r]=en(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=en(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function lo(e){return I(e)?e.get():e}function fo({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:ho(n,s,i,e),renderState:t()}}const fs=e=>(t,n)=>{const s=v.useContext(De),i=v.useContext(un),r=()=>fo(e,t,s,i);return n?r():Ds(r)};function ho(e,t,n,s){const i={},r=s(e,{});for(const f in r)i[f]=lo(r[f]);let{initial:o,animate:a}=e;const c=Ie(e),l=ns(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Re(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const y=Mt(e,f[h]);if(y){const{transitionEnd:b,transition:w,...p}=y;for(const S in p){let m=p[S];if(Array.isArray(m)){const A=u?m.length-1:0;m=m[A]}m!==null&&(i[S]=m)}for(const S in b)i[S]=b[S]}}}return i}function Ct(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(I(s[o])||t.style&&I(t.style[o])||os(o,e)||((r=n==null?void 0:n.getValue(o))==null?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const po={useVisualState:fs({scrapeMotionValuesFromProps:Ct,createRenderState:Vt})};function ds(e,t,n){const s=Ct(e,t,n);for(const i in e)if(I(e[i])||I(t[i])){const r=ne.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const mo={useVisualState:fs({scrapeMotionValuesFromProps:ds,createRenderState:cs})};function go(e,t){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...At(s)?mo:po,preloadedFeatures:e,useRender:co(i),createVisualElement:t,Component:s};return zr(o)}}const yo=go();function fe(e,t,n){const s=e.getProps();return Mt(s,t,n!==void 0?n:s.custom,e)}const tt=e=>Array.isArray(e);function bo(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ce(n))}function To(e){return tt(e)?e[e.length-1]||0:e}function vo(e,t){const n=fe(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=To(r[o]);bo(e,o,a)}}function wo(e){return!!(I(e)&&e.add)}function xo(e,t){const n=e.getValue("willChange");if(wo(n))return n.add(t);if(!n&&j.WillChange){const s=new j.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function So(e){return e.props[is]}const Vo=e=>e!==null;function Ao(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Vo),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}const Mo={type:"spring",stiffness:500,damping:25,restSpeed:10},Co=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Po={type:"keyframes",duration:.8},Fo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Oo=(e,{keyframes:t})=>t.length>2?Po:se.has(e)?e.startsWith("scale")?Co(t[1]):Mo:Fo;function Do({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const Ro=(e,t,n,s={},i,r)=>o=>{const a=Un(s,e)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-L(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:i};Do(a)||Object.assign(u,Oo(e,u)),u.duration&&(u.duration=L(u.duration)),u.repeatDelay&&(u.repeatDelay=L(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(j.instantAnimations||j.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!r&&t.get()!==void 0){const f=Ao(u.keyframes,a);if(f!==void 0){N.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new gt(u):new ar(u)};function Io({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function hs(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(r=s);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||l&&Io(l,u))continue;const h={delay:n,...Un(r||{},u)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===y&&!h.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const p=So(e);if(p){const S=window.MotionHandoffAnimation(p,u,N);S!==null&&(h.startTime=S,b=!0)}}xo(e,u),d.start(Ro(u,d,f,e.shouldReduceMotion&&Hn.has(u)?{type:!1}:h,e,b));const w=d.animation;w&&c.push(w)}return o&&Promise.all(c).then(()=>{N.update(()=>{o&&vo(e,o)})}),c}function nt(e,t,n={}){var c;const s=fe(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(hs(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return Eo(e,t,l,u,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Eo(e,t,n=0,s=0,i=0,r=1,o){const a=[],c=e.variantChildren.size,l=(c-1)*i,u=typeof s=="function",d=u?f=>s(f,c):r===1?(f=0)=>f*i:(f=0)=>l-f*i;return Array.from(e.variantChildren).sort(ko).forEach((f,h)=>{f.notify("AnimationStart",t),a.push(nt(f,t,{...o,delay:n+(u?0:s)+d(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(a)}function ko(e,t){return e.sortNodePosition(t)}function No(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>nt(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=nt(e,t,n);else{const i=typeof t=="function"?fe(e,t,n.custom):t;s=Promise.all(hs(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function ps(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Lo=wt.length;function ms(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ms(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Lo;n++){const s=wt[n],i=e.props[s];(le(i)||i===!1)&&(t[s]=i)}return t}const Bo=[...vt].reverse(),Ko=vt.length;function jo(e){return t=>Promise.all(t.map(({animation:n,options:s})=>No(e,n,s)))}function Wo(e){let t=jo(e),n=tn(),s=!0;const i=c=>(l,u)=>{var f;const d=fe(e,u,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:y,...b}=d;l={...l,...b,...y}}return l};function r(c){t=c(e)}function o(c){const{props:l}=e,u=ms(e.parent)||{},d=[],f=new Set;let h={},y=1/0;for(let w=0;w<Ko;w++){const p=Bo[w],S=n[p],m=l[p]!==void 0?l[p]:u[p],A=le(m),T=p===c?S.isActive:null;T===!1&&(y=w);let V=m===u[p]&&m!==l[p]&&A;if(V&&s&&e.manuallyAnimateOnMount&&(V=!1),S.protectedKeys={...h},!S.isActive&&T===null||!m&&!S.prevProp||Re(m)||typeof m=="boolean")continue;const C=$o(S.prevProp,m);let x=C||p===c&&S.isActive&&!V&&A||w>y&&A,O=!1;const R=Array.isArray(m)?m:[m];let B=R.reduce(i(p),{});T===!1&&(B={});const{prevResolvedValues:me={}}=S,ge={...me,...B},ye=F=>{x=!0,f.has(F)&&(O=!0,f.delete(F)),S.needsAnimating[F]=!0;const D=e.getValue(F);D&&(D.liveStyle=!1)};for(const F in ge){const D=B[F],be=me[F];if(h.hasOwnProperty(F))continue;let Ee=!1;tt(D)&&tt(be)?Ee=!ps(D,be):Ee=D!==be,Ee?D!=null?ye(F):f.add(F):D!==void 0&&f.has(F)?ye(F):S.protectedKeys[F]=!0}S.prevProp=m,S.prevResolvedValues=B,S.isActive&&(h={...h,...B}),s&&e.blockInitialAnimation&&(x=!1),x&&(!(V&&C)||O)&&d.push(...R.map(F=>({animation:F,options:{type:p}})))}if(f.size){const w={};if(typeof l.initial!="boolean"){const p=fe(e,Array.isArray(l.initial)?l.initial[0]:l.initial);p&&p.transition&&(w.transition=p.transition)}f.forEach(p=>{const S=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),w[p]=S??null}),d.push({animation:w})}let b=!!d.length;return s&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(b=!1),s=!1,b?t(d):Promise.resolve()}function a(c,l){var d;if(n[c].isActive===l)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(c,l)}),n[c].isActive=l;const u=o(c);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=tn(),s=!0}}}function $o(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ps(t,e):!1}function $(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tn(){return{animate:$(!0),whileInView:$(),whileHover:$(),whileTap:$(),whileDrag:$(),whileFocus:$(),exit:$()}}class ie{constructor(t){this.isMounted=!1,this.node=t}update(){}}class _o extends ie{constructor(t){super(t),t.animationState||(t.animationState=Wo(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Re(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Go=0;class Uo extends ie{constructor(){super(...arguments),this.id=Go++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ho={animation:{Feature:_o},exit:{Feature:Uo}};function nn(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function gs(e){return{point:{x:e.pageX,y:e.pageY}}}function zo({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function qo(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}}const sn=()=>({min:0,max:0}),ys=()=>({x:sn(),y:sn()});function Yo(e,t){return zo(qo(e.getBoundingClientRect(),t))}function rn(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&N.postRender(()=>r(t,gs(t)))}class Xo extends ie{mount(){const{current:t}=this.node;t&&(this.unmount=Cr(t,(n,s)=>(rn(this.node,s,"Start"),i=>rn(this.node,i,"End"))))}unmount(){}}class Zo extends ie{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Fe(nn(this.node.current,"focus",()=>this.onFocus()),nn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function on(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&N.postRender(()=>r(t,gs(t)))}class Jo extends ie{mount(){const{current:t}=this.node;t&&(this.unmount=Rr(t,(n,s)=>(on(this.node,s,"Start"),(i,{success:r})=>on(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const st=new WeakMap,We=new WeakMap,Qo=e=>{const t=st.get(e.target);t&&t(e)},ea=e=>{e.forEach(Qo)};function ta({root:e,...t}){const n=e||document;We.has(n)||We.set(n,{});const s=We.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(ea,{root:e,...t})),s[i]}function na(e,t,n){const s=ta(t);return st.set(e,n),s.observe(e),()=>{st.delete(e),s.unobserve(e)}}const sa={some:0,all:1};class ia extends ie{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:sa[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=l?u:d;f&&f(c)};return na(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ra(t,n))&&this.startObserver()}unmount(){}}function ra({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const oa={inView:{Feature:ia},tap:{Feature:Jo},focus:{Feature:Zo},hover:{Feature:Xo}},it={current:null},bs={current:!1};function aa(){if(bs.current=!0,!!rt)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>it.current=e.matches;e.addEventListener("change",t),t()}else it.current=!1}const ua=new WeakMap;function ca(e,t,n){for(const s in t){const i=t[s],r=n[s];if(I(i))e.addValue(s,i);else if(I(r))e.addValue(s,Ce(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,Ce(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const an=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class la{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=k.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,N.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Ie(n),this.isVariantNode=ns(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];c[f]!==void 0&&I(h)&&h.set(c[f],!1)}}mount(t){this.current=t,ua.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)),bs.current||aa(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:it.current,process.env.NODE_ENV!=="production"&&pn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),$e(this.notifyUpdate),$e(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=se.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&N.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in J){const n=J[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];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):ys()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=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<an.length;s++){const i=an[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=ca(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),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}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&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=Ce(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(cn(s)||ln(s))?s=parseFloat(s):!Er(s)&&te.test(n)&&(s=Xn(t,n)),this.setBaseTarget(t,I(s)?s.get():s)),I(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Mt(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!I(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new dn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ts extends la{constructor(){super(...arguments),this.KeyframeResolver=vr}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]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;I(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function vs(e,{style:t,vars:n},s,i){const r=e.style;let o;for(o in t)r[o]=t[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function fa(e){return window.getComputedStyle(e)}class da extends Ts{constructor(){super(...arguments),this.type="html",this.renderInstance=vs}readValueFromInstance(t,n){var s;if(se.has(n))return(s=this.projection)!=null&&s.isProjecting?Ye(n):Bi(t,n);{const i=fa(t),r=(Mn(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yo(t,n)}build(t,n,s){St(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Ct(t,n,s)}}const ws=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 ha(e,t,n,s){vs(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(ws.has(i)?i:xt(i),t.attrs[i])}class pa extends Ts{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ys}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(se.has(n)){const s=Yn(n);return s&&s.default||0}return n=ws.has(n)?n:xt(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return ds(t,n,s)}build(t,n,s){us(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){ha(t,n,s,i)}mount(t){this.isSVGTag=ls(t.tagName),super.mount(t)}}const ma=(e,t)=>At(e)?new pa(t):new da(t,{allowProjection:e!==v.Fragment}),ga={renderer:ma,...Ho,...oa},ya=yo("div"),ba={light:{border:"px",shadow:"2"},dark:{}},xs=v.createContext({groupOpen:!1,setGroupOpen:()=>{}}),Ta=({open:e,delay:t=600})=>{const n=v.useContext(xs);return v.useEffect(()=>{let s=null;return n.setGroupOpen&&(e===!0&&n.setGroupOpen(!0),e===!1&&(s=setTimeout(()=>{n.setGroupOpen&&n.setGroupOpen(!1)},t))),()=>{s&&clearTimeout(s)}},[e,n,t]),{groupOpen:n.groupOpen}},va=({children:e})=>{const[t,n]=v.useState(!1);return E.jsx(xs.Provider,{value:{groupOpen:t,setGroupOpen:n},children:e})},wa=({delayDuration:e=400,skipDelayDuration:t,disableHoverableContent:n,defaultOpen:s,open:i,onOpenChange:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:c,forceMount:l,side:u="bottom",sideOffset:d=4,align:f="center",alignOffset:h,avoidCollisions:y,collisionBoundary:b,collisionPadding:w,arrowPadding:p,sticky:S,hideWhenDetached:m,skipAnimation:A,label:T,labelProps:V,enabled:C=!0,appearance:x="dark",triggerRef:O,children:R})=>{const[B,me]=Vs.useControllableState({prop:i,onChange:r,defaultProp:s??!1}),{groupOpen:ge}=Ta({open:!!B,delay:e}),ye=v.Children.toArray(R).some(D=>D.props.disabled),Pt=ge||ye?0:e,Ft=!ge,F=D=>{if(D==="top")return{y:-5};if(D==="bottom")return{y:5};if(D==="left")return{x:-5};if(D==="right")return{x:5}};return E.jsx(kr,{features:ga,children:E.jsx(re.Provider,{delayDuration:Pt,skipDelayDuration:t,disableHoverableContent:n,children:E.jsxs(re.Root,{open:C===!1?!1:B,onOpenChange:me,children:[E.jsx(re.Trigger,{asChild:!0,ref:O,children:E.jsx(Ms.RefToTgphRef,{children:R})}),E.jsx(re.Portal,{children:E.jsx(re.Content,{"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:c,forceMount:l,side:u,sideOffset:d,align:f,alignOffset:h,avoidCollisions:y,collisionBoundary:b,collisionPadding:w,arrowPadding:p,sticky:S,hideWhenDetached:m,style:{zIndex:"var(--tgph-zIndex-tooltip)"},children:E.jsx(As.OverrideAppearance,{appearance:x,asChild:!0,children:E.jsx(Cs.Stack,{as:ya,className:"tgph",initial:Ft&&!A?{opacity:0,scale:.5,...F(u)}:{},animate:{opacity:1,scale:1,x:0,y:0},transition:{duration:.1,type:"spring",bounce:0},bg:"gray-1",rounded:"3",py:"2",px:"3",align:"center",justify:"center",style:{transformOrigin:"var(--radix-tooltip-content-transform-origin)"},...V?{labelProps:V}:{},...ba[x],children:typeof T=="string"?E.jsx(Ps.Text,{as:"span",size:"1",children:T}):T})})})})]})})})};exports.Tooltip=wa;exports.TooltipGroupProvider=va;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),Ms=require("@radix-ui/react-tooltip"),Cs=require("@radix-ui/react-use-controllable-state"),Ps=require("@telegraph/appearance"),Fs=require("@telegraph/helpers"),Os=require("@telegraph/layout"),Ds=require("@telegraph/typography"),v=require("react");function Is(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ue=Is(Ms),Rs=v.createContext({});function Es(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const ut=typeof window<"u",ks=ut?v.useLayoutEffect:v.useEffect,ln=v.createContext(null);function Ns(e,t){e.indexOf(t)===-1&&e.push(t)}function Ls(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const q=(e,t,n)=>n>t?t:n<e?e:n;function _e(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let pe=()=>{},Y=()=>{};process.env.NODE_ENV!=="production"&&(pe=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(_e(t,n))},Y=(e,t,n)=>{if(!e)throw new Error(_e(t,n))});const j={},fn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Bs(e){return typeof e=="object"&&e!==null}const dn=e=>/^0[^.\s]+$/u.test(e);function ct(e){let t;return()=>(t===void 0&&(t=e()),t)}const ne=e=>e,Ks=(e,t)=>n=>t(e(n)),De=(...e)=>e.reduce(Ks),hn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class pn{constructor(){this.subscriptions=[]}add(t){return Ns(this.subscriptions,t),()=>Ls(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const L=e=>e*1e3,K=e=>e/1e3;function mn(e,t){return t?e*(1e3/t):0}const It=new Set;function gn(e,t,n){e||It.has(t)||(console.warn(_e(t,n)),It.add(t))}const yn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,js=1e-7,Ws=12;function $s(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=yn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>js&&++a<Ws);return o}function me(e,t,n,s){if(e===t&&n===s)return ne;const i=r=>$s(r,0,1,e,n);return r=>r===0||r===1?r:yn(i(r),t,s)}const bn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Tn=e=>t=>1-e(1-t),vn=me(.33,1.53,.69,.99),lt=Tn(vn),wn=bn(lt),xn=e=>(e*=2)<1?.5*lt(e):.5*(2-Math.pow(2,-10*(e-1))),ft=e=>1-Math.sin(Math.acos(e)),_s=Tn(ft),Sn=bn(ft),Gs=me(.42,0,1,1),Hs=me(0,0,.58,1),Vn=me(.42,0,.58,1),Us=e=>Array.isArray(e)&&typeof e[0]!="number",An=e=>Array.isArray(e)&&typeof e[0]=="number",Rt={linear:ne,easeIn:Gs,easeInOut:Vn,easeOut:Hs,circIn:ft,circInOut:Sn,circOut:_s,backIn:lt,backInOut:wn,backOut:vn,anticipate:xn},zs=e=>typeof e=="string",Et=e=>{if(An(e)){Y(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return me(t,n,s,i)}else if(zs(e))return Y(Rt[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Rt[e];return e},we=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function qs(e,t){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const y=d&&i?n:s;return f&&o.add(u),y.has(u)||y.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,r&&(r=!1,l.process(u))}};return l}const Ys=40;function Mn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=we.reduce((m,A)=>(m[A]=qs(r),m),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:d,render:h,postRender:y}=o,b=()=>{const m=j.useManualTiming?i.timestamp:performance.now();n=!1,j.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(m-i.timestamp,Ys),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),y.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(b))},w=()=>{n=!0,s=!0,i.isProcessing||e(b)};return{schedule:we.reduce((m,A)=>{const T=o[A];return m[A]=(V,C=!1,x=!1)=>(n||w(),T.schedule(V,C,x)),m},{}),cancel:m=>{for(let A=0;A<we.length;A++)o[we[A]].cancel(m)},state:i,steps:o}}const{schedule:N,cancel:Ge,state:Ae}=Mn(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let Se;function Xs(){Se=void 0}const k={now:()=>(Se===void 0&&k.set(Ae.isProcessing||j.useManualTiming?Ae.timestamp:performance.now()),Se),set:e=>{Se=e,queueMicrotask(Xs)}},Cn=e=>t=>typeof t=="string"&&t.startsWith(e),Pn=Cn("--"),Zs=Cn("var(--"),dt=e=>Zs(e)?Js.test(e.split("/*")[0].trim()):!1,Js=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,se={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},fe={...se,transform:e=>q(0,1,e)},xe={...se,default:1},le=e=>Math.round(e*1e5)/1e5,ht=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qs(e){return e==null}const ei=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pt=(e,t)=>n=>!!(typeof n=="string"&&ei.test(n)&&n.startsWith(e)||t&&!Qs(n)&&Object.prototype.hasOwnProperty.call(n,t)),Fn=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ht);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ti=e=>q(0,255,e),Ne={...se,transform:e=>Math.round(ti(e))},G={test:pt("rgb","red"),parse:Fn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Ne.transform(e)+", "+Ne.transform(t)+", "+Ne.transform(n)+", "+le(fe.transform(s))+")"};function ni(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const He={test:pt("#"),parse:ni,transform:G.transform},ge=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$=ge("deg"),Q=ge("%"),g=ge("px"),si=ge("vh"),ii=ge("vw"),kt={...Q,parse:e=>Q.parse(e)/100,transform:e=>Q.transform(e*100)},Z={test:pt("hsl","hue"),parse:Fn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Q.transform(le(t))+", "+Q.transform(le(n))+", "+le(fe.transform(s))+")"},P={test:e=>G.test(e)||He.test(e)||Z.test(e),parse:e=>G.test(e)?G.parse(e):Z.test(e)?Z.parse(e):He.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?G.transform(e):Z.transform(e),getAnimatableNone:e=>{const t=P.parse(e);return t.alpha=0,P.transform(t)}},ri=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function oi(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ht))==null?void 0:t.length)||0)+(((n=e.match(ri))==null?void 0:n.length)||0)>0}const On="number",Dn="color",ai="var",ui="var(",Nt="${}",ci=/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 de(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(ci,c=>(P.test(c)?(s.color.push(r),i.push(Dn),n.push(P.parse(c))):c.startsWith(ui)?(s.var.push(r),i.push(ai),n.push(c)):(s.number.push(r),i.push(On),n.push(parseFloat(c))),++r,Nt)).split(Nt);return{values:n,split:a,indexes:s,types:i}}function In(e){return de(e).values}function Rn(e){const{split:t,types:n}=de(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const a=n[o];a===On?r+=le(i[o]):a===Dn?r+=P.transform(i[o]):r+=i[o]}return r}}const li=e=>typeof e=="number"?0:P.test(e)?P.getAnimatableNone(e):e;function fi(e){const t=In(e);return Rn(e)(t.map(li))}const ie={test:oi,parse:In,createTransformer:Rn,getAnimatableNone:fi};function Le(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 di({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=Le(c,a,e+1/3),r=Le(c,a,e),o=Le(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Me(e,t){return n=>n>0?t:e}const Ie=(e,t,n)=>e+(t-e)*n,Be=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},hi=[He,G,Z],pi=e=>hi.find(t=>t.test(e));function Lt(e){const t=pi(e);if(pe(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Z&&(n=di(n)),n}const Bt=(e,t)=>{const n=Lt(e),s=Lt(t);if(!n||!s)return Me(e,t);const i={...n};return r=>(i.red=Be(n.red,s.red,r),i.green=Be(n.green,s.green,r),i.blue=Be(n.blue,s.blue,r),i.alpha=Ie(n.alpha,s.alpha,r),G.transform(i))},Ue=new Set(["none","hidden"]);function mi(e,t){return Ue.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gi(e,t){return n=>Ie(e,t,n)}function mt(e){return typeof e=="number"?gi:typeof e=="string"?dt(e)?Me:P.test(e)?Bt:Ti:Array.isArray(e)?En:typeof e=="object"?P.test(e)?Bt:yi:Me}function En(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>mt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function yi(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=mt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function bi(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=e.indexes[r][s[r]],a=e.values[o]??0;n[i]=a,s[r]++}return n}const Ti=(e,t)=>{const n=ie.createTransformer(t),s=de(e),i=de(t);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?Ue.has(e)&&!i.values.length||Ue.has(t)&&!s.values.length?mi(e,t):De(En(bi(s,i),i.values),n):(pe(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Me(e,t))};function kn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ie(e,t,n):mt(e)(e,t)}const vi=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>N.update(t,n),stop:()=>Ge(t),now:()=>Ae.isProcessing?Ae.timestamp:k.now()}},Nn=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ce=2e4;function gt(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ce;)t+=n,s=e.next(t);return t>=Ce?1/0:t}function wi(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(gt(s),Ce);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:K(i)}}const xi=5;function Ln(e,t,n){const s=Math.max(t-xi,0);return mn(n-e(s),t-s)}const M={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},Ke=.001;function Si({duration:e=M.duration,bounce:t=M.bounce,velocity:n=M.velocity,mass:s=M.mass}){let i,r;pe(e<=L(M.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=q(M.minDamping,M.maxDamping,o),e=q(M.minDuration,M.maxDuration,K(e)),o<1?(i=l=>{const u=l*o,f=u*e,d=u-n,h=ze(l,o),y=Math.exp(-f);return Ke-d/h*y},r=l=>{const f=l*o*e,d=f*n+n,h=Math.pow(o,2)*Math.pow(l,2)*e,y=Math.exp(-f),b=ze(Math.pow(l,2),o);return(-i(l)+Ke>0?-1:1)*((d-h)*y)/b}):(i=l=>{const u=Math.exp(-l*e),f=(l-n)*e+1;return-Ke+u*f},r=l=>{const u=Math.exp(-l*e),f=(n-l)*(e*e);return u*f});const a=5/e,c=Ai(i,r,a);if(e=L(e),isNaN(c))return{stiffness:M.stiffness,damping:M.damping,duration:e};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:e}}}const Vi=12;function Ai(e,t,n){let s=n;for(let i=1;i<Vi;i++)s=s-e(s)/t(s);return s}function ze(e,t){return e*Math.sqrt(1-t*t)}const Mi=["duration","bounce"],Ci=["stiffness","damping","mass"];function Kt(e,t){return t.some(n=>e[n]!==void 0)}function Pi(e){let t={velocity:M.velocity,stiffness:M.stiffness,damping:M.damping,mass:M.mass,isResolvedFromDuration:!1,...e};if(!Kt(e,Ci)&&Kt(e,Mi))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*q(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:M.mass,stiffness:i,damping:r}}else{const n=Si(e);t={...t,...n,mass:M.mass},t.isResolvedFromDuration=!0}return t}function Pe(e=M.visualDuration,t=M.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=Pi({...n,velocity:-K(n.velocity||0)}),y=d||0,b=l/(2*Math.sqrt(c*u)),w=o-r,p=K(Math.sqrt(c/u)),S=Math.abs(w)<5;s||(s=S?M.restSpeed.granular:M.restSpeed.default),i||(i=S?M.restDelta.granular:M.restDelta.default);let m;if(b<1){const T=ze(p,b);m=V=>{const C=Math.exp(-b*p*V);return o-C*((y+b*p*w)/T*Math.sin(T*V)+w*Math.cos(T*V))}}else if(b===1)m=T=>o-Math.exp(-p*T)*(w+(y+p*w)*T);else{const T=p*Math.sqrt(b*b-1);m=V=>{const C=Math.exp(-b*p*V),x=Math.min(T*V,300);return o-C*((y+b*p*w)*Math.sinh(x)+T*w*Math.cosh(x))/T}}const A={calculatedDuration:h&&f||null,next:T=>{const V=m(T);if(h)a.done=T>=f;else{let C=T===0?y:0;b<1&&(C=T===0?L(y):Ln(m,T,V));const x=Math.abs(C)<=s,D=Math.abs(o-V)<=i;a.done=x&&D}return a.value=a.done?o:V,a},toString:()=>{const T=Math.min(gt(A),Ce),V=Nn(C=>A.next(T*C).value,T,30);return T+"ms "+V},toTransition:()=>{}};return A}Pe.applyToOptions=e=>{const t=wi(e,100,Pe);return e.ease=t.ease,e.duration=L(t.duration),e.type="keyframes",e};function qe({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=x=>a!==void 0&&x<a||c!==void 0&&x>c,y=x=>a===void 0?c:c===void 0||Math.abs(a-x)<Math.abs(c-x)?a:c;let b=n*t;const w=f+b,p=o===void 0?w:o(w);p!==w&&(b=p-f);const S=x=>-b*Math.exp(-x/s),m=x=>p+S(x),A=x=>{const D=S(x),I=m(x);d.done=Math.abs(D)<=l,d.value=d.done?p:I};let T,V;const C=x=>{h(d.value)&&(T=x,V=Pe({keyframes:[d.value,y(d.value)],velocity:Ln(m,x,d.value),damping:i,stiffness:r,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:x=>{let D=!1;return!V&&T===void 0&&(D=!0,A(x),C(x)),T!==void 0&&x>=T?V.next(x-T):(!D&&A(x),d)}}}function Fi(e,t,n){const s=[],i=n||j.mix||kn,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||ne:t;a=De(c,a)}s.push(a)}return s}function Oi(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(Y(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Fi(t,s,i),c=a.length,l=u=>{if(o&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const d=hn(e[f],e[f+1],u);return a[f](d)};return n?u=>l(q(e[0],e[r-1],u)):l}function Di(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=hn(0,t,s);e.push(Ie(n,1,i))}}function Ii(e){const t=[0];return Di(t,e.length-1),t}function Ri(e,t){return e.map(n=>n*t)}function Ei(e,t){return e.map(()=>t||Vn).splice(0,e.length-1)}function J({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Us(s)?s.map(Et):Et(s),r={done:!1,value:t[0]},o=Ri(n&&n.length===t.length?n:Ii(t),e),a=Oi(o,t,{ease:Array.isArray(i)?i:Ei(t,i)});return{calculatedDuration:e,next:c=>(r.value=a(c),r.done=c>=e,r)}}const ki=e=>e!==null;function yt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(ki),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Ni={decay:qe,inertia:qe,tween:J,keyframes:J,spring:Pe};function Bn(e){typeof e.type=="string"&&(e.type=Ni[e.type])}class bt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Li=e=>e/100;class Tt extends bt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Bn(t);const{type:n=J,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=n||J;process.env.NODE_ENV!=="production"&&c!==J&&Y(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==J&&typeof a[0]!="number"&&(this.mixKeyframes=De(Li,kn(a[0],a[1])),a=[0,100]);const l=c({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=gt(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:y,onUpdate:b,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,A=s;if(f){const x=Math.min(this.currentTime,i)/a;let D=Math.floor(x),I=x%1;!I&&x>=1&&(I=1),I===1&&D--,D=Math.min(D,f+1),!!(D%2)&&(d==="reverse"?(I=1-I,h&&(I-=h/a)):d==="mirror"&&(A=o)),m=q(0,1,I)*a}const T=S?{done:!1,value:u[0]}:A.next(m);r&&(T.value=r(T.value));let{done:V}=T;!S&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return C&&y!==qe&&(T.value=yt(u,this.options,w,this.speed)),b&&b(T.value),C&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return K(this.calculatedDuration)}get time(){return K(this.currentTime)}set time(t){var n;t=L(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(k.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=K(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=vi,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Bi(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const H=e=>e*180/Math.PI,Ye=e=>{const t=H(Math.atan2(e[1],e[0]));return Xe(t)},Ki={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ye,rotateZ:Ye,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xe=e=>(e=e%360,e<0&&(e+=360),e),jt=Ye,Wt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),$t=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ji={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wt,scaleY:$t,scale:e=>(Wt(e)+$t(e))/2,rotateX:e=>Xe(H(Math.atan2(e[6],e[5]))),rotateY:e=>Xe(H(Math.atan2(-e[2],e[0]))),rotateZ:jt,rotate:jt,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ze(e){return e.includes("scale")?1:0}function Je(e,t){if(!e||e==="none")return Ze(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=ji,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ki,i=a}if(!i)return Ze(t);const r=s[t],o=i[1].split(",").map($i);return typeof r=="function"?r(o):o[r]}const Wi=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Je(n,t)};function $i(e){return parseFloat(e.trim())}const re=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],oe=new Set(re),_t=e=>e===se||e===g,_i=new Set(["x","y","z"]),Gi=re.filter(e=>!_i.has(e));function Hi(e){const t=[];return Gi.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const U={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:(e,{transform:t})=>Je(t,"x"),y:(e,{transform:t})=>Je(t,"y")};U.translateX=U.x;U.translateY=U.y;const z=new Set;let Qe=!1,et=!1,tt=!1;function Kn(){if(et){const e=Array.from(z).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Hi(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}et=!1,Qe=!1,z.forEach(e=>e.complete(tt)),z.clear()}function jn(){z.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(et=!0)})}function Ui(){tt=!0,jn(),Kn(),tt=!1}class vt{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(z.add(this),Qe||(Qe=!0,N.read(jn),N.resolveKeyframes(Kn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}Bi(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),z.delete(this)}cancel(){this.state==="scheduled"&&(z.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zi=e=>e.startsWith("--");function qi(e,t,n){zi(t)?e.style.setProperty(t,n):e.style[t]=n}const Yi=ct(()=>window.ScrollTimeline!==void 0),Xi={};function Zi(e,t){const n=ct(e);return()=>Xi[t]??n()}const Wn=Zi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ce=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Gt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ce([0,.65,.55,1]),circOut:ce([.55,0,1,.45]),backIn:ce([.31,.01,.66,-.59]),backOut:ce([.33,1.53,.69,.99])};function $n(e,t){if(e)return typeof e=="function"?Wn()?Nn(e,t):"ease-out":An(e)?ce(e):Array.isArray(e)?e.map(n=>$n(n,t)||Gt.easeOut):Gt[e]}function Ji(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const f=$n(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),e.animate(u,d)}function _n(e){return typeof e=="function"&&"applyToOptions"in e}function Qi({type:e,...t}){return _n(e)&&Wn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class er extends bt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Y(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=Qi(t);this.animation=Ji(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=yt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):qi(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return K(Number(t))}get time(){return K(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=L(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Yi()?(this.animation.timeline=t,ne):n(this)}}const Gn={anticipate:xn,backInOut:wn,circInOut:Sn};function tr(e){return e in Gn}function nr(e){typeof e.ease=="string"&&tr(e.ease)&&(e.ease=Gn[e.ease])}const Ht=10;class sr extends er{constructor(t){nr(t),Bn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Tt({...o,autoplay:!1}),c=L(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-Ht).value,a.sample(c).value,Ht),a.stop()}}const Ut=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ie.test(e)||e==="0")&&!e.startsWith("url("));function ir(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function rr(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=Ut(i,t),a=Ut(r,t);return pe(o===a,`You are trying to animate ${t} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:ir(e)||(n==="spring"||_n(n))&&s}function nt(e){e.duration=0,e.type}const or=new Set(["opacity","clipPath","filter","transform"]),ar=ct(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ur(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return ar()&&n&&or.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const cr=40;class lr extends bt{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){var y;super(),this.stop=()=>{var b,w;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=k.now();const d={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:l,element:u,...f},h=(u==null?void 0:u.KeyframeResolver)||vt;this.keyframeResolver=new h(a,(b,w,p)=>this.onKeyframesResolved(b,w,d,!p),c,l,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=k.now(),rr(t,r,o,a)||((j.instantAnimations||!c)&&(u==null||u(yt(t,s,n))),t[0]=t[t.length-1],nt(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>cr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!l&&ur(d)?new sr({...d,element:d.motionValue.owner.current}):new Tt(d);h.finished.then(()=>this.notifyFinished()).catch(ne),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ui()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const fr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dr(e){const t=fr.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const hr=4;function Hn(e,t,n=1){Y(n<=hr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=dr(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return fn(o)?parseFloat(o):o}return dt(i)?Hn(i,t,n+1):i}function Un(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const zn=new Set(["width","height","top","left","right","bottom",...re]),pr={test:e=>e==="auto",parse:e=>e},qn=e=>t=>t.test(e),Yn=[se,g,Q,$,ii,si,pr],zt=e=>Yn.find(qn(e));function mr(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||dn(e):!0}const gr=new Set(["brightness","contrast","saturate","opacity"]);function yr(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(ht)||[];if(!s)return e;const i=n.replace(s,"");let r=gr.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const br=/\b([a-z-]*)\(.*?\)/gu,st={...ie,getAnimatableNone:e=>{const t=e.match(br);return t?t.map(yr).join(" "):e}},qt={...se,transform:Math.round},Tr={rotate:$,rotateX:$,rotateY:$,rotateZ:$,scale:xe,scaleX:xe,scaleY:xe,scaleZ:xe,skew:$,skewX:$,skewY:$,distance:g,translateX:g,translateY:g,translateZ:g,x:g,y:g,z:g,perspective:g,transformPerspective:g,opacity:fe,originX:kt,originY:kt,originZ:g},wt={borderWidth:g,borderTopWidth:g,borderRightWidth:g,borderBottomWidth:g,borderLeftWidth:g,borderRadius:g,radius:g,borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomRightRadius:g,borderBottomLeftRadius:g,width:g,maxWidth:g,height:g,maxHeight:g,top:g,right:g,bottom:g,left:g,padding:g,paddingTop:g,paddingRight:g,paddingBottom:g,paddingLeft:g,margin:g,marginTop:g,marginRight:g,marginBottom:g,marginLeft:g,backgroundPositionX:g,backgroundPositionY:g,...Tr,zIndex:qt,fillOpacity:fe,strokeOpacity:fe,numOctaves:qt},vr={...wt,color:P,backgroundColor:P,outlineColor:P,fill:P,stroke:P,borderColor:P,borderTopColor:P,borderRightColor:P,borderBottomColor:P,borderLeftColor:P,filter:st,WebkitFilter:st},Xn=e=>vr[e];function Zn(e,t){let n=Xn(e);return n!==st&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wr=new Set(["auto","none","0"]);function xr(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!wr.has(r)&&de(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=Zn(n,i)}class Sr extends vt{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),dt(l))){const u=Hn(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!zn.has(s)||t.length!==2)return;const[i,r]=t,o=zt(i),a=zt(r);if(o!==a)if(_t(o)&&_t(a))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else U[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||mr(t[i]))&&s.push(i);s.length&&xr(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=U[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=U[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function Vr(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=(n==null?void 0:n[e])??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Jn=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ar(e){return Bs(e)&&"offsetHeight"in e}const Yt=30,Mr=e=>!isNaN(parseFloat(e));class Cr{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=k.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=k.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Mr(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new pn);const s=this.events[t].add(n);return t==="change"?()=>{s(),N.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yt);return mn(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fe(e,t){return new Cr(e,t)}const{schedule:Pr}=Mn(queueMicrotask,!1),Fr={y:!1};function Or(){return Fr.y}function Qn(e,t){const n=Vr(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function Xt(e){return!(e.pointerType==="touch"||Or())}function Dr(e,t,n={}){const[s,i,r]=Qn(e,n),o=a=>{if(!Xt(a))return;const{target:c}=a,l=t(c,a);if(typeof l!="function"||!c)return;const u=f=>{Xt(f)&&(l(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const es=(e,t)=>t?e===t?!0:es(e,t.parentElement):!1,Ir=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Rr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Er(e){return Rr.has(e.tagName)||e.tabIndex!==-1}const Ve=new WeakSet;function Zt(e){return t=>{t.key==="Enter"&&e(t)}}function je(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const kr=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Zt(()=>{if(Ve.has(n))return;je(n,"down");const i=Zt(()=>{je(n,"up")}),r=()=>je(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Jt(e){return Ir(e)&&!0}function Nr(e,t,n={}){const[s,i,r]=Qn(e,n),o=a=>{const c=a.currentTarget;if(!Jt(a))return;Ve.add(c);const l=t(c,a),u=(h,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Ve.has(c)&&Ve.delete(c),Jt(h)&&typeof l=="function"&&l(h,{success:y})},f=h=>{u(h,c===window||c===document||n.useGlobalTarget||es(c,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Ar(a)&&(a.addEventListener("focus",l=>kr(l,i)),!Er(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const R=e=>!!(e&&e.getVelocity),Lr=[...Yn,P,ie],Br=e=>Lr.find(qn(e)),ts=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),xt=v.createContext({strict:!1}),Qt={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"]},te={};for(const e in Qt)te[e]={isEnabled:t=>Qt[e].some(n=>!!t[n])};function en(e){for(const t in e)te[t]={...te[t],...e[t]}}function Kr({children:e,features:t,strict:n=!1}){const[,s]=v.useState(!We(t)),i=v.useRef(void 0);if(!We(t)){const{renderer:r,...o}=t;i.current=r,en(o)}return v.useEffect(()=>{We(t)&&t().then(({renderer:r,...o})=>{en(o),i.current=r,s(!0)})},[]),E.jsx(xt.Provider,{value:{renderer:i.current,strict:n},children:e})}function We(e){return typeof e=="function"}const jr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Oe(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jr.has(e)}let ns=e=>!Oe(e);function Wr(e){typeof e=="function"&&(ns=t=>t.startsWith("on")?!Oe(t):e(t))}try{Wr(require("@emotion/is-prop-valid").default)}catch{}function $r(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(ns(i)||n===!0&&Oe(i)||!t&&!Oe(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Re=v.createContext({});function Ee(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function he(e){return typeof e=="string"||Array.isArray(e)}const St=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vt=["initial",...St];function ke(e){return Ee(e.animate)||Vt.some(t=>he(e[t]))}function ss(e){return!!(ke(e)||e.variants)}function _r(e,t){if(ke(e)){const{initial:n,animate:s}=e;return{initial:n===!1||he(n)?n:void 0,animate:he(s)?s:void 0}}return e.inherit!==!1?t:{}}function Gr(e){const{initial:t,animate:n}=_r(e,v.useContext(Re));return v.useMemo(()=>({initial:t,animate:n}),[tn(t),tn(n)])}function tn(e){return Array.isArray(e)?e.join(" "):e}const Hr={};function is(e,{layout:t,layoutId:n}){return oe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hr[e]||e==="opacity")}const Ur={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zr=re.length;function qr(e,t,n){let s="",i=!0;for(let r=0;r<zr;r++){const o=re[r],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Jn(a,wt[o]);if(!c){i=!1;const u=Ur[o]||o;s+=`${u}(${l}) `}n&&(t[o]=l)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function At(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,a=!1;for(const c in t){const l=t[c];if(oe.has(c)){o=!0;continue}else if(Pn(c)){i[c]=l;continue}else{const u=Jn(l,wt[c]);c.startsWith("origin")?(a=!0,r[c]=u):s[c]=u}}if(t.transform||(o||n?s.transform=qr(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=r;s.transformOrigin=`${c} ${l} ${u}`}}const Mt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rs(e,t,n){for(const s in t)!R(t[s])&&!is(s,n)&&(e[s]=t[s])}function Yr({transformTemplate:e},t){return v.useMemo(()=>{const n=Mt();return At(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Xr(e,t){const n=e.style||{},s={};return rs(s,n,e),Object.assign(s,Yr(e,t)),s}function Zr(e,t){const n={},s=Xr(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const Jr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qr={offset:"strokeDashoffset",array:"strokeDasharray"};function eo(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?Jr:Qr;e[r.offset]=g.transform(-s);const o=g.transform(t),a=g.transform(n);e[r.array]=`${o} ${a}`}function os(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(At(e,a,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&eo(f,i,r,o,!1)}const as=()=>({...Mt(),attrs:{}}),us=e=>typeof e=="string"&&e.toLowerCase()==="svg";function to(e,t,n,s){const i=v.useMemo(()=>{const r=as();return os(r,t,us(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};rs(r,e.style,e),i.style={...r,...i.style}}return i}const no=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ct(e){return typeof e!="string"||e.includes("-")?!1:!!(no.indexOf(e)>-1||/[A-Z]/u.test(e))}function so(e,t,n,{latestValues:s},i,r=!1){const a=(Ct(e)?to:Zr)(t,s,i,e),c=$r(t,typeof e=="string",r),l=e!==v.Fragment?{...c,...a,ref:n}:{},{children:u}=t,f=v.useMemo(()=>R(u)?u.get():u,[u]);return v.createElement(e,{...l,children:f})}function nn(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Pt(e,t,n,s){if(typeof t=="function"){const[i,r]=nn(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=nn(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function io(e){return R(e)?e.get():e}function ro({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:oo(n,s,i,e),renderState:t()}}function oo(e,t,n,s){const i={},r=s(e,{});for(const d in r)i[d]=io(r[d]);let{initial:o,animate:a}=e;const c=ke(e),l=ss(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;if(f&&typeof f!="boolean"&&!Ee(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const y=Pt(e,d[h]);if(y){const{transitionEnd:b,transition:w,...p}=y;for(const S in p){let m=p[S];if(Array.isArray(m)){const A=u?m.length-1:0;m=m[A]}m!==null&&(i[S]=m)}for(const S in b)i[S]=b[S]}}}return i}const cs=e=>(t,n)=>{const s=v.useContext(Re),i=v.useContext(ln),r=()=>ro(e,t,s,i);return n?r():Es(r)};function Ft(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(R(s[o])||t.style&&R(t.style[o])||is(o,e)||((r=n==null?void 0:n.getValue(o))==null?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const ao=cs({scrapeMotionValuesFromProps:Ft,createRenderState:Mt});function ls(e,t,n){const s=Ft(e,t,n);for(const i in e)if(R(e[i])||R(t[i])){const r=re.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const uo=cs({scrapeMotionValuesFromProps:ls,createRenderState:as}),co=Symbol.for("motionComponentSymbol");function fs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function lo(e,t,n){return v.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):fs(n)&&(n.current=s))},[t])}const Ot=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fo="framerAppearId",ds="data-"+Ot(fo),ho=v.createContext({});function po(e,t,n,s,i){var b,w;const{visualElement:r}=v.useContext(Re),o=v.useContext(xt),a=v.useContext(ln),c=v.useContext(ts).reducedMotion,l=v.useRef(null);s=s||o.renderer,!l.current&&s&&(l.current=s(e,{visualState:t,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,f=v.useContext(ho);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&mo(l.current,n,i,f);const d=v.useRef(!1);v.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[ds],y=v.useRef(!!h&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return ks(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),y.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(!y.current&&u.animationState&&u.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),y.current=!1),u.enteringChildren=void 0)}),u}function mo(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:hs(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&fs(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:c,layoutRoot:l})}function hs(e){if(e)return e.options.allowProjection!==!1?e.projection:hs(e.parent)}function go(e,{forwardMotionProps:t=!1}={},n,s){const i=Ct(e)?uo:ao;function r(a,c){let l;const u={...v.useContext(ts),...a,layoutId:yo(a)},{isStatic:f}=u,d=Gr(a),h=i(a,f);if(!f&&ut){bo(u,n);const y=To(u);l=y.MeasureLayout,d.visualElement=po(e,h,u,s,y.ProjectionNode)}return E.jsxs(Re.Provider,{value:d,children:[l&&d.visualElement?E.jsx(l,{visualElement:d.visualElement,...u}):null,so(e,a,lo(h,d.visualElement,c),h,f,t)]})}r.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=v.forwardRef(r);return o[co]=e,o}function yo({layoutId:e}){const t=v.useContext(Rs).id;return t&&e!==void 0?t+"-"+e:e}function bo(e,t){v.useContext(xt).strict,process.env.NODE_ENV}function To(e){const{drag:t,layout:n}=te;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function vo({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function wo(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 xo(e,t){return vo(wo(e.getBoundingClientRect(),t))}const sn=()=>({min:0,max:0}),ps=()=>({x:sn(),y:sn()}),it={current:null},ms={current:!1};function So(){if(ms.current=!0,!!ut)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>it.current=e.matches;e.addEventListener("change",t),t()}else it.current=!1}const Vo=new WeakMap;function Ao(e,t,n){for(const s in t){const i=t[s],r=n[s];if(R(i))e.addValue(s,i);else if(R(r))e.addValue(s,Fe(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,Fe(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const rn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mo{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=k.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,N.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=ke(n),this.isVariantNode=ss(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];c[d]!==void 0&&R(h)&&h.set(c[d])}}mount(t){var n;this.current=t,Vo.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((s,i)=>this.bindToMotionValue(i,s)),ms.current||So(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:it.current,process.env.NODE_ENV!=="production"&&gn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Ge(this.notifyUpdate),Ge(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=oe.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&N.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in te){const n=te[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];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):ps()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=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<rn.length;s++){const i=rn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Ao(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),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}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&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=Fe(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(fn(s)||dn(s))?s=parseFloat(s):!Br(s)&&ie.test(n)&&(s=Zn(t,n)),this.setBaseTarget(t,R(s)?s.get():s)),R(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Pt(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!R(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new pn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Pr.render(this.render)}}class gs extends Mo{constructor(){super(...arguments),this.KeyframeResolver=Sr}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]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;R(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ys(e,{style:t,vars:n},s,i){const r=e.style;let o;for(o in t)r[o]=t[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function Co(e){return window.getComputedStyle(e)}class Po extends gs{constructor(){super(...arguments),this.type="html",this.renderInstance=ys}readValueFromInstance(t,n){var s;if(oe.has(n))return(s=this.projection)!=null&&s.isProjecting?Ze(n):Wi(t,n);{const i=Co(t),r=(Pn(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xo(t,n)}build(t,n,s){At(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Ft(t,n,s)}}const bs=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 Fo(e,t,n,s){ys(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(bs.has(i)?i:Ot(i),t.attrs[i])}class Oo extends gs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ps}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(oe.has(n)){const s=Xn(n);return s&&s.default||0}return n=bs.has(n)?n:Ot(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return ls(t,n,s)}build(t,n,s){os(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){Fo(t,n,s,i)}mount(t){this.isSVGTag=us(t.tagName),super.mount(t)}}const Do=(e,t)=>Ct(e)?new Oo(t):new Po(t,{allowProjection:e!==v.Fragment});function ee(e,t,n){const s=e.getProps();return Pt(s,t,n!==void 0?n:s.custom,e)}const rt=e=>Array.isArray(e);function Io(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fe(n))}function Ro(e){return rt(e)?e[e.length-1]||0:e}function Eo(e,t){const n=ee(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Ro(r[o]);Io(e,o,a)}}function ko(e){return!!(R(e)&&e.add)}function No(e,t){const n=e.getValue("willChange");if(ko(n))return n.add(t);if(!n&&j.WillChange){const s=new j.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Lo(e){return e.props[ds]}const Bo=e=>e!==null;function Ko(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Bo),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}const jo={type:"spring",stiffness:500,damping:25,restSpeed:10},Wo=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$o={type:"keyframes",duration:.8},_o={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Go=(e,{keyframes:t})=>t.length>2?$o:oe.has(e)?e.startsWith("scale")?Wo(t[1]):jo:_o;function Ho({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const Uo=(e,t,n,s={},i,r)=>o=>{const a=Un(s,e)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-L(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:i};Ho(a)||Object.assign(u,Go(e,u)),u.duration&&(u.duration=L(u.duration)),u.repeatDelay&&(u.repeatDelay=L(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(nt(u),u.delay===0&&(f=!0)),(j.instantAnimations||j.skipAnimations)&&(f=!0,nt(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!r&&t.get()!==void 0){const d=Ko(u.keyframes,a);if(d!==void 0){N.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Tt(u):new lr(u)};function zo({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Ts(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(r=s);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),d=a[u];if(d===void 0||l&&zo(l,u))continue;const h={delay:n,...Un(r||{},u)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===y&&!h.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const p=Lo(e);if(p){const S=window.MotionHandoffAnimation(p,u,N);S!==null&&(h.startTime=S,b=!0)}}No(e,u),f.start(Uo(u,f,d,e.shouldReduceMotion&&zn.has(u)?{type:!1}:h,e,b));const w=f.animation;w&&c.push(w)}return o&&Promise.all(c).then(()=>{N.update(()=>{o&&Eo(e,o)})}),c}function vs(e,t,n,s=0,i=1){const r=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function ot(e,t,n={}){var c;const s=ee(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ts(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return qo(e,t,l,u,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function qo(e,t,n=0,s=0,i=0,r=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(ot(c,t,{...o,delay:n+(typeof s=="function"?0:s)+vs(e.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Yo(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>ot(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=ot(e,t,n);else{const i=typeof t=="function"?ee(e,t,n.custom):t;s=Promise.all(Ts(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function ws(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Xo=Vt.length;function xs(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xs(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Xo;n++){const s=Vt[n],i=e.props[s];(he(i)||i===!1)&&(t[s]=i)}return t}const Zo=[...St].reverse(),Jo=St.length;function Qo(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Yo(e,n,s)))}function ea(e){let t=Qo(e),n=on(),s=!0;const i=c=>(l,u)=>{var d;const f=ee(e,u,c==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:y,...b}=f;l={...l,...b,...y}}return l};function r(c){t=c(e)}function o(c){const{props:l}=e,u=xs(e.parent)||{},f=[],d=new Set;let h={},y=1/0;for(let w=0;w<Jo;w++){const p=Zo[w],S=n[p],m=l[p]!==void 0?l[p]:u[p],A=he(m),T=p===c?S.isActive:null;T===!1&&(y=w);let V=m===u[p]&&m!==l[p]&&A;if(V&&s&&e.manuallyAnimateOnMount&&(V=!1),S.protectedKeys={...h},!S.isActive&&T===null||!m&&!S.prevProp||Ee(m)||typeof m=="boolean")continue;const C=ta(S.prevProp,m);let x=C||p===c&&S.isActive&&!V&&A||w>y&&A,D=!1;const I=Array.isArray(m)?m:[m];let B=I.reduce(i(p),{});T===!1&&(B={});const{prevResolvedValues:ye={}}=S,be={...ye,...B},Te=F=>{x=!0,d.has(F)&&(D=!0,d.delete(F)),S.needsAnimating[F]=!0;const O=e.getValue(F);O&&(O.liveStyle=!1)};for(const F in be){const O=B[F],W=ye[F];if(h.hasOwnProperty(F))continue;let X=!1;rt(O)&&rt(W)?X=!ws(O,W):X=O!==W,X?O!=null?Te(F):d.add(F):O!==void 0&&d.has(F)?Te(F):S.protectedKeys[F]=!0}S.prevProp=m,S.prevResolvedValues=B,S.isActive&&(h={...h,...B}),s&&e.blockInitialAnimation&&(x=!1);const ve=V&&C;x&&(!ve||D)&&f.push(...I.map(F=>{const O={type:p};if(typeof F=="string"&&s&&!ve&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,X=ee(W,F);if(W.enteringChildren&&X){const{delayChildren:As}=X.transition||{};O.delay=vs(W.enteringChildren,e,As)}}return{animation:F,options:O}}))}if(d.size){const w={};if(typeof l.initial!="boolean"){const p=ee(e,Array.isArray(l.initial)?l.initial[0]:l.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const S=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),w[p]=S??null}),f.push({animation:w})}let b=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(b=!1),s=!1,b?t(f):Promise.resolve()}function a(c,l){var f;if(n[c].isActive===l)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(c,l)}),n[c].isActive=l;const u=o(c);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=on(),s=!0}}}function ta(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ws(t,e):!1}function _(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function on(){return{animate:_(!0),whileInView:_(),whileHover:_(),whileTap:_(),whileDrag:_(),whileFocus:_(),exit:_()}}class ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}class na extends ae{constructor(t){super(t),t.animationState||(t.animationState=ea(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ee(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let sa=0;class ia extends ae{constructor(){super(...arguments),this.id=sa++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const ra={animation:{Feature:na},exit:{Feature:ia}};function an(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Ss(e){return{point:{x:e.pageX,y:e.pageY}}}function un(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&N.postRender(()=>r(t,Ss(t)))}class oa extends ae{mount(){const{current:t}=this.node;t&&(this.unmount=Dr(t,(n,s)=>(un(this.node,s,"Start"),i=>un(this.node,i,"End"))))}unmount(){}}class aa extends ae{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=De(an(this.node.current,"focus",()=>this.onFocus()),an(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function cn(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&N.postRender(()=>r(t,Ss(t)))}class ua extends ae{mount(){const{current:t}=this.node;t&&(this.unmount=Nr(t,(n,s)=>(cn(this.node,s,"Start"),(i,{success:r})=>cn(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const at=new WeakMap,$e=new WeakMap,ca=e=>{const t=at.get(e.target);t&&t(e)},la=e=>{e.forEach(ca)};function fa({root:e,...t}){const n=e||document;$e.has(n)||$e.set(n,{});const s=$e.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(la,{root:e,...t})),s[i]}function da(e,t,n){const s=fa(t);return at.set(e,n),s.observe(e),()=>{at.delete(e),s.unobserve(e)}}const ha={some:0,all:1};class pa extends ae{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:ha[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=l?u:f;d&&d(c)};return da(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ma(t,n))&&this.startObserver()}unmount(){}}function ma({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ga={inView:{Feature:pa},tap:{Feature:ua},focus:{Feature:aa},hover:{Feature:oa}},ya={renderer:Do,...ra,...ga};function ba(e,t){return go(e,t)}const Ta=ba("div"),va={light:{border:"px",shadow:"2"},dark:{}},Vs=v.createContext({groupOpen:!1,setGroupOpen:()=>{}}),wa=({open:e,delay:t=600})=>{const n=v.useContext(Vs);return v.useEffect(()=>{let s=null;return n.setGroupOpen&&(e===!0&&n.setGroupOpen(!0),e===!1&&(s=setTimeout(()=>{n.setGroupOpen&&n.setGroupOpen(!1)},t))),()=>{s&&clearTimeout(s)}},[e,n,t]),{groupOpen:n.groupOpen}},xa=({children:e})=>{const[t,n]=v.useState(!1);return E.jsx(Vs.Provider,{value:{groupOpen:t,setGroupOpen:n},children:e})},Sa=({delayDuration:e=400,skipDelayDuration:t,disableHoverableContent:n,defaultOpen:s,open:i,onOpenChange:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:c,forceMount:l,side:u="bottom",sideOffset:f=4,align:d="center",alignOffset:h,avoidCollisions:y,collisionBoundary:b,collisionPadding:w,arrowPadding:p,sticky:S,hideWhenDetached:m,skipAnimation:A,label:T,labelProps:V,enabled:C=!0,appearance:x="dark",triggerRef:D,children:I})=>{const[B,ye]=Cs.useControllableState({prop:i,onChange:r,defaultProp:s??!1}),{groupOpen:be}=wa({open:!!B,delay:e}),Te=v.Children.toArray(I).some(O=>O.props.disabled),ve=be||Te?0:e,Dt=!be,F=O=>{if(O==="top")return{y:-5};if(O==="bottom")return{y:5};if(O==="left")return{x:-5};if(O==="right")return{x:5}};return E.jsx(Kr,{features:ya,children:E.jsx(ue.Provider,{delayDuration:ve,skipDelayDuration:t,disableHoverableContent:n,children:E.jsxs(ue.Root,{open:C===!1?!1:B,onOpenChange:ye,children:[E.jsx(ue.Trigger,{asChild:!0,ref:D,children:E.jsx(Fs.RefToTgphRef,{children:I})}),E.jsx(ue.Portal,{children:E.jsx(ue.Content,{"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:c,forceMount:l,side:u,sideOffset:f,align:d,alignOffset:h,avoidCollisions:y,collisionBoundary:b,collisionPadding:w,arrowPadding:p,sticky:S,hideWhenDetached:m,style:{zIndex:"var(--tgph-zIndex-tooltip)"},children:E.jsx(Ps.OverrideAppearance,{appearance:x,asChild:!0,children:E.jsx(Os.Stack,{as:Ta,className:"tgph",initial:Dt&&!A?{opacity:0,scale:.5,...F(u)}:{},animate:{opacity:1,scale:1,x:0,y:0},transition:{duration:.1,type:"spring",bounce:0},bg:"gray-1",rounded:"3",py:"2",px:"3",align:"center",justify:"center",style:{transformOrigin:"var(--radix-tooltip-content-transform-origin)"},...V?{labelProps:V}:{},...va[x],children:typeof T=="string"?E.jsx(Ds.Text,{as:"span",size:"1",children:T}):T})})})})]})})})};exports.Tooltip=Sa;exports.TooltipGroupProvider=xa;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|