@telegraph/tooltip 0.1.3 → 0.2.1

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @telegraph/tooltip
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`3c100cf`](https://github.com/knocklabs/telegraph/commit/3c100cf78d2b322f674e2f170860f938ea3b69a3)]:
8
+ - @telegraph/typography@0.4.0
9
+
10
+ ## 0.2.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#734](https://github.com/knocklabs/telegraph/pull/734) [`d3b6fee`](https://github.com/knocklabs/telegraph/commit/d3b6fee0e7cd308151efdc5921164d324ccaf045) Thanks [@ksorathia](https://github.com/ksorathia)! - Update shadow tokens to work in light and dark modes. Adjust modal, popover, menu, and tooltip to rely on shadow to apply border
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`1de6cf1`](https://github.com/knocklabs/telegraph/commit/1de6cf1874835db4389f5e7f14fbcc694229a5de)]:
19
+ - @telegraph/typography@0.3.0
20
+ - @telegraph/layout@0.5.0
21
+
3
22
  ## 0.1.3
4
23
 
5
24
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react/jsx-runtime"),Ns=require("@radix-ui/react-tooltip"),Bs=require("@radix-ui/react-use-controllable-state"),Ls=require("@telegraph/appearance"),Ks=require("@telegraph/helpers"),js=require("@telegraph/layout"),Ws=require("@telegraph/typography"),w=require("react");function $s(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 ae=$s(Ns),Gs=w.createContext({});function _s(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const pn=typeof window<"u",Hs=pn?w.useLayoutEffect:w.useEffect,mn=w.createContext(null);function Us(e,t){e.indexOf(t)===-1&&e.push(t)}function zs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const H=(e,t,n)=>n>t?t:n<e?e:n;function He(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let pe=()=>{},X=()=>{};var hn;typeof process<"u"&&((hn=process.env)==null?void 0:hn.NODE_ENV)!=="production"&&(pe=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(He(t,n))},X=(e,t,n)=>{if(!e)throw new Error(He(t,n))});const $={},gn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qs(e){return typeof e=="object"&&e!==null}const yn=e=>/^0[^.\s]+$/u.test(e);function bn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ne=e=>e,Ys=(e,t)=>n=>t(e(n)),Ie=(...e)=>e.reduce(Ys),Tn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class vn{constructor(){this.subscriptions=[]}add(t){return Us(this.subscriptions,t),()=>zs(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 K=e=>e*1e3,N=e=>e/1e3;function wn(e,t){return t?e*(1e3/t):0}const It=new Set;function Sn(e,t,n){e||It.has(t)||(console.warn(He(t,n)),It.add(t))}const xn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Xs=1e-7,Zs=12;function Js(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=xn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Xs&&++a<Zs);return o}function me(e,t,n,s){if(e===t&&n===s)return ne;const i=r=>Js(r,0,1,e,n);return r=>r===0||r===1?r:xn(i(r),t,s)}const Vn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,An=e=>t=>1-e(1-t),Mn=me(.33,1.53,.69,.99),ft=An(Mn),Cn=Vn(ft),Pn=e=>(e*=2)<1?.5*ft(e):.5*(2-Math.pow(2,-10*(e-1))),dt=e=>1-Math.sin(Math.acos(e)),Qs=An(dt),Fn=Vn(dt),ei=me(.42,0,1,1),ti=me(0,0,.58,1),On=me(.42,0,.58,1),ni=e=>Array.isArray(e)&&typeof e[0]!="number",Dn=e=>Array.isArray(e)&&typeof e[0]=="number",kt={linear:ne,easeIn:ei,easeInOut:On,easeOut:ti,circIn:dt,circInOut:Fn,circOut:Qs,backIn:ft,backInOut:Cn,backOut:Mn,anticipate:Pn},si=e=>typeof e=="string",Et=e=>{if(Dn(e)){X(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(si(e))return X(kt[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),kt[e];return e},Se=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ii(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 p=f&&i?n:s;return d&&o.add(u),p.has(u)||p.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 ri=40;function Rn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Se.reduce((T,V)=>(T[V]=ii(r),T),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=o,b=()=>{const T=$.useManualTiming?i.timestamp:performance.now();n=!1,$.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,ri),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(b))},y=()=>{n=!0,s=!0,i.isProcessing||e(b)};return{schedule:Se.reduce((T,V)=>{const v=o[V];return T[V]=(A,C=!1,x=!1)=>(n||y(),v.schedule(A,C,x)),T},{}),cancel:T=>{for(let V=0;V<Se.length;V++)o[Se[V]].cancel(T)},state:i,steps:o}}const{schedule:L,cancel:Ue,state:Me}=Rn(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let Ve;function oi(){Ve=void 0}const E={now:()=>(Ve===void 0&&E.set(Me.isProcessing||$.useManualTiming?Me.timestamp:performance.now()),Ve),set:e=>{Ve=e,queueMicrotask(oi)}},In=e=>t=>typeof t=="string"&&t.startsWith(e),kn=In("--"),ai=In("var(--"),ht=e=>ai(e)?ui.test(e.split("/*")[0].trim()):!1,ui=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Nt(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const se={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},fe={...se,transform:e=>H(0,1,e)},xe={...se,default:1},le=e=>Math.round(e*1e5)/1e5,pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ci(e){return e==null}const li=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(e,t)=>n=>!!(typeof n=="string"&&li.test(n)&&n.startsWith(e)||t&&!ci(n)&&Object.prototype.hasOwnProperty.call(n,t)),En=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(pt);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},fi=e=>H(0,255,e),Be={...se,transform:e=>Math.round(fi(e))},z={test:mt("rgb","red"),parse:En("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Be.transform(e)+", "+Be.transform(t)+", "+Be.transform(n)+", "+le(fe.transform(s))+")"};function di(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 ze={test:mt("#"),parse:di,transform:z.transform},ge=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),G=ge("deg"),ee=ge("%"),m=ge("px"),hi=ge("vh"),pi=ge("vw"),Bt={...ee,parse:e=>ee.parse(e)/100,transform:e=>ee.transform(e*100)},J={test:mt("hsl","hue"),parse:En("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ee.transform(le(t))+", "+ee.transform(le(n))+", "+le(fe.transform(s))+")"},F={test:e=>z.test(e)||ze.test(e)||J.test(e),parse:e=>z.test(e)?z.parse(e):J.test(e)?J.parse(e):ze.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?z.transform(e):J.transform(e),getAnimatableNone:e=>{const t=F.parse(e);return t.alpha=0,F.transform(t)}},mi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gi(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pt))==null?void 0:t.length)||0)+(((n=e.match(mi))==null?void 0:n.length)||0)>0}const Nn="number",Bn="color",yi="var",bi="var(",Lt="${}",Ti=/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(Ti,c=>(F.test(c)?(s.color.push(r),i.push(Bn),n.push(F.parse(c))):c.startsWith(bi)?(s.var.push(r),i.push(yi),n.push(c)):(s.number.push(r),i.push(Nn),n.push(parseFloat(c))),++r,Lt)).split(Lt);return{values:n,split:a,indexes:s,types:i}}function Ln(e){return de(e).values}function Kn(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===Nn?r+=le(i[o]):a===Bn?r+=F.transform(i[o]):r+=i[o]}return r}}const vi=e=>typeof e=="number"?0:F.test(e)?F.getAnimatableNone(e):e;function wi(e){const t=Ln(e);return Kn(e)(t.map(vi))}const B={test:gi,parse:Ln,createTransformer:Kn,getAnimatableNone:wi};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 Si({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 Ce(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,Ke=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},xi=[ze,z,J],Vi=e=>xi.find(t=>t.test(e));function Kt(e){const t=Vi(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===J&&(n=Si(n)),n}const jt=(e,t)=>{const n=Kt(e),s=Kt(t);if(!n||!s)return Ce(e,t);const i={...n};return r=>(i.red=Ke(n.red,s.red,r),i.green=Ke(n.green,s.green,r),i.blue=Ke(n.blue,s.blue,r),i.alpha=ye(n.alpha,s.alpha,r),z.transform(i))},qe=new Set(["none","hidden"]);function Ai(e,t){return qe.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Mi(e,t){return n=>ye(e,t,n)}function gt(e){return typeof e=="number"?Mi:typeof e=="string"?ht(e)?Ce:F.test(e)?jt:Fi:Array.isArray(e)?jn:typeof e=="object"?F.test(e)?jt:Ci:Ce}function jn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>gt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Ci(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=gt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Pi(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 Fi=(e,t)=>{const n=B.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?qe.has(e)&&!i.values.length||qe.has(t)&&!s.values.length?Ai(e,t):Ie(jn(Pi(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"),Ce(e,t))};function Wn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):gt(e)(e,t)}const Oi=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>L.update(t,n),stop:()=>Ue(t),now:()=>Me.isProcessing?Me.timestamp:E.now()}},$n=(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)})`},Pe=2e4;function yt(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Pe;)t+=n,s=e.next(t);return t>=Pe?1/0:t}function Di(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(yt(s),Pe);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:N(i)}}const Ri=5;function Gn(e,t,n){const s=Math.max(t-Ri,0);return wn(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},je=.001;function Ii({duration:e=M.duration,bounce:t=M.bounce,velocity:n=M.velocity,mass:s=M.mass}){let i,r;pe(e<=K(M.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=H(M.minDamping,M.maxDamping,o),e=H(M.minDuration,M.maxDuration,N(e)),o<1?(i=l=>{const u=l*o,d=u*e,f=u-n,h=Ye(l,o),p=Math.exp(-d);return je-f/h*p},r=l=>{const d=l*o*e,f=d*n+n,h=Math.pow(o,2)*Math.pow(l,2)*e,p=Math.exp(-d),b=Ye(Math.pow(l,2),o);return(-i(l)+je>0?-1:1)*((f-h)*p)/b}):(i=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-je+u*d},r=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const a=5/e,c=Ei(i,r,a);if(e=K(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 ki=12;function Ei(e,t,n){let s=n;for(let i=1;i<ki;i++)s=s-e(s)/t(s);return s}function Ye(e,t){return e*Math.sqrt(1-t*t)}const Ni=["duration","bounce"],Bi=["stiffness","damping","mass"];function Wt(e,t){return t.some(n=>e[n]!==void 0)}function Li(e){let t={velocity:M.velocity,stiffness:M.stiffness,damping:M.damping,mass:M.mass,isResolvedFromDuration:!1,...e};if(!Wt(e,Bi)&&Wt(e,Ni))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*H(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:M.mass,stiffness:i,damping:r}}else{const n=Ii({...e,velocity:0});t={...t,...n,mass:M.mass},t.isResolvedFromDuration=!0}return t}function Fe(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}=Li({...n,velocity:-N(n.velocity||0)}),p=f||0,b=l/(2*Math.sqrt(c*u)),y=o-r,g=N(Math.sqrt(c/u)),S=Math.abs(y)<5;s||(s=S?M.restSpeed.granular:M.restSpeed.default),i||(i=S?M.restDelta.granular:M.restDelta.default);let T;if(b<1){const v=Ye(g,b);T=A=>{const C=Math.exp(-b*g*A);return o-C*((p+b*g*y)/v*Math.sin(v*A)+y*Math.cos(v*A))}}else if(b===1)T=v=>o-Math.exp(-g*v)*(y+(p+g*y)*v);else{const v=g*Math.sqrt(b*b-1);T=A=>{const C=Math.exp(-b*g*A),x=Math.min(v*A,300);return o-C*((p+b*g*y)*Math.sinh(x)+v*y*Math.cosh(x))/v}}const V={calculatedDuration:h&&d||null,next:v=>{const A=T(v);if(h)a.done=v>=d;else{let C=v===0?p:0;b<1&&(C=v===0?K(p):Gn(T,v,A));const x=Math.abs(C)<=s,D=Math.abs(o-A)<=i;a.done=x&&D}return a.value=a.done?o:A,a},toString:()=>{const v=Math.min(yt(V),Pe),A=$n(C=>V.next(v*C).value,v,30);return v+"ms "+A},toTransition:()=>{}};return V}Fe.applyToOptions=e=>{const t=Di(e,100,Fe);return e.ease=t.ease,e.duration=K(t.duration),e.type="keyframes",e};function Xe({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,p=x=>a===void 0?c:c===void 0||Math.abs(a-x)<Math.abs(c-x)?a:c;let b=n*t;const y=d+b,g=o===void 0?y:o(y);g!==y&&(b=g-d);const S=x=>-b*Math.exp(-x/s),T=x=>g+S(x),V=x=>{const D=S(x),R=T(x);f.done=Math.abs(D)<=l,f.value=f.done?g:R};let v,A;const C=x=>{h(f.value)&&(v=x,A=Fe({keyframes:[f.value,p(f.value)],velocity:Gn(T,x,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:x=>{let D=!1;return!A&&v===void 0&&(D=!0,V(x),C(x)),v!==void 0&&x>=v?A.next(x-v):(!D&&V(x),f)}}}function Ki(e,t,n){const s=[],i=n||$.mix||Wn,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=Ie(c,a)}s.push(a)}return s}function ji(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(X(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=Ki(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=Tn(e[d],e[d+1],u);return a[d](f)};return n?u=>l(H(e[0],e[r-1],u)):l}function Wi(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Tn(0,t,s);e.push(ye(n,1,i))}}function $i(e){const t=[0];return Wi(t,e.length-1),t}function Gi(e,t){return e.map(n=>n*t)}function _i(e,t){return e.map(()=>t||On).splice(0,e.length-1)}function Q({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=ni(s)?s.map(Et):Et(s),r={done:!1,value:t[0]},o=Gi(n&&n.length===t.length?n:$i(t),e),a=ji(o,t,{ease:Array.isArray(i)?i:_i(t,i)});return{calculatedDuration:e,next:c=>(r.value=a(c),r.done=c>=e,r)}}const Hi=e=>e!==null;function bt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(Hi),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Ui={decay:Xe,inertia:Xe,tween:Q,keyframes:Q,spring:Fe};function _n(e){typeof e.type=="string"&&(e.type=Ui[e.type])}class Tt{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 zi=e=>e/100;class vt extends Tt{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!==E.now()&&this.tick(E.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;_n(t);const{type:n=Q,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=n||Q;process.env.NODE_ENV!=="production"&&c!==Q&&X(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Q&&typeof a[0]!="number"&&(this.mixKeyframes=Ie(zi,Wn(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=yt(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:p,onUpdate:b,finalKeyframe:y}=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 g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,V=s;if(d){const x=Math.min(this.currentTime,i)/a;let D=Math.floor(x),R=x%1;!R&&x>=1&&(R=1),R===1&&D--,D=Math.min(D,d+1),!!(D%2)&&(f==="reverse"?(R=1-R,h&&(R-=h/a)):f==="mirror"&&(V=o)),T=H(0,1,R)*a}const v=S?{done:!1,value:u[0]}:V.next(T);r&&(v.value=r(v.value));let{done:A}=v;!S&&c!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&p!==Xe&&(v.value=bt(u,this.options,y,this.speed)),b&&b(v.value),C&&this.finish(),v}then(t,n){return this.finished.then(t,n)}get duration(){return N(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+N(t)}get time(){return N(this.currentTime)}set time(t){var n;t=K(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(E.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=N(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=Oi,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(E.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 qi(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const q=e=>e*180/Math.PI,Ze=e=>{const t=q(Math.atan2(e[1],e[0]));return Je(t)},Yi={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=>q(Math.atan(e[1])),skewY:e=>q(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Je=e=>(e=e%360,e<0&&(e+=360),e),$t=Ze,Gt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_t=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gt,scaleY:_t,scale:e=>(Gt(e)+_t(e))/2,rotateX:e=>Je(q(Math.atan2(e[6],e[5]))),rotateY:e=>Je(q(Math.atan2(-e[2],e[0]))),rotateZ:$t,rotate:$t,skewX:e=>q(Math.atan(e[4])),skewY:e=>q(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qe(e){return e.includes("scale")?1:0}function et(e,t){if(!e||e==="none")return Qe(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Xi,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Yi,i=a}if(!i)return Qe(t);const r=s[t],o=i[1].split(",").map(Ji);return typeof r=="function"?r(o):o[r]}const Zi=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return et(n,t)};function Ji(e){return parseFloat(e.trim())}const ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],re=new Set(ie),Ht=e=>e===se||e===m,Qi=new Set(["x","y","z"]),er=ie.filter(e=>!Qi.has(e));function tr(e){const t=[];return er.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const _={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})=>et(t,"x"),y:(e,{transform:t})=>et(t,"y")};_.translateX=_.x;_.translateY=_.y;const Y=new Set;let tt=!1,nt=!1,st=!1;function Hn(){if(nt){const e=Array.from(Y).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=tr(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)})}nt=!1,tt=!1,Y.forEach(e=>e.complete(st)),Y.clear()}function Un(){Y.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nt=!0)})}function nr(){st=!0,Un(),Hn(),st=!1}class wt{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?(Y.add(this),tt||(tt=!0,L.read(Un),L.resolveKeyframes(Hn))):(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])}qi(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Y.delete(this)}cancel(){this.state==="scheduled"&&(Y.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const sr=e=>e.startsWith("--");function ir(e,t,n){sr(t)?e.style.setProperty(t,n):e.style[t]=n}const rr={};function zn(e,t){const n=bn(e);return()=>rr[t]??n()}const or=zn(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),qn=zn(()=>{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})`,Ut={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 Yn(e,t){if(e)return typeof e=="function"?qn()?$n(e,t):"ease-out":Dn(e)?ce(e):Array.isArray(e)?e.map(n=>Yn(n,t)||Ut.easeOut):Ut[e]}function ar(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=Yn(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 Xn(e){return typeof e=="function"&&"applyToOptions"in e}function ur({type:e,...t}){return Xn(e)&&qn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Zn extends Tt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!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,X(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=ur(t);this.animation=ar(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=bt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):ir(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 n,s,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}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 N(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+N(t)}get time(){return N(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=K(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=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&&or()?(this.animation.timeline=t,ne):n(this)}}const Jn={anticipate:Pn,backInOut:Cn,circInOut:Fn};function cr(e){return e in Jn}function lr(e){typeof e.ease=="string"&&cr(e.ease)&&(e.ease=Jn[e.ease])}const We=10;class fr extends Zn{constructor(t){lr(t),_n(t),super(t),t.startTime!==void 0&&(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 vt({...o,autoplay:!1}),c=Math.max(We,E.now()-this.startTime),l=H(0,We,c-We);n.setWithVelocity(a.sample(Math.max(0,c-l)).value,a.sample(c).value,l),a.stop()}}const zt=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(B.test(e)||e==="0")&&!e.startsWith("url("));function dr(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 hr(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=zt(i,t),a=zt(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:dr(e)||(n==="spring"||Xn(n))&&s}function it(e){e.duration=0,e.type="keyframes"}const pr=new Set(["opacity","clipPath","filter","transform"]),mr=bn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gr(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 mr()&&n&&pr.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const yr=40;class br extends Tt{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 p;super(),this.stop=()=>{var b,y;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=E.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)||wt;this.keyframeResolver=new h(a,(b,y,g)=>this.onKeyframesResolved(b,y,f,!g),c,l,u),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,s,i){var y,g;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=E.now(),hr(t,r,o,a)||(($.instantAnimations||!c)&&(u==null||u(bt(t,s,n))),t[0]=t[t.length-1],it(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>yr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!l&&gr(f),p=(g=(y=f.motionValue)==null?void 0:y.owner)==null?void 0:g.current,b=h?new fr({...f,element:p}):new vt(f);b.finished.then(()=>{this.notifyFinished()}).catch(ne),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}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(),nr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function Qn(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}const Tr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vr(e){const t=Tr.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const wr=4;function es(e,t,n=1){X(n<=wr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=vr(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return gn(o)?parseFloat(o):o}return ht(i)?es(i,t,n+1):i}const Sr={type:"spring",stiffness:500,damping:25,restSpeed:10},xr=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vr={type:"keyframes",duration:.8},Ar={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mr=(e,{keyframes:t})=>t.length>2?Vr:re.has(e)?e.startsWith("scale")?xr(t[1]):Sr:Ar,Cr=e=>e!==null;function Pr(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Cr),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}function ts(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function ns(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?ts(n,e):n}function Fr({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 Or=(e,t,n,s={},i,r)=>o=>{const a=ns(s,e)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-K(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};Fr(a)||Object.assign(u,Mr(e,u)),u.duration&&(u.duration=K(u.duration)),u.repeatDelay&&(u.repeatDelay=K(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(it(u),u.delay===0&&(d=!0)),($.instantAnimations||$.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(d=!0,it(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!r&&t.get()!==void 0){const f=Pr(u.keyframes,a);if(f!==void 0){L.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new vt(u):new br(u)};function qt(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function St(e,t,n,s){if(typeof t=="function"){const[i,r]=qt(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]=qt(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function te(e,t,n){const s=e.getProps();return St(s,t,n!==void 0?n:s.custom,e)}const ss=new Set(["width","height","top","left","right","bottom",...ie]),Yt=30,Dr=e=>!isNaN(parseFloat(e));class Rr{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=E.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=E.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dr(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Sn(!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 vn);const s=this.events[t].add(n);return t==="change"?()=>{s(),L.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=E.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yt);return wn(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 Oe(e,t){return new Rr(e,t)}const rt=e=>Array.isArray(e);function Ir(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oe(n))}function kr(e){return rt(e)?e[e.length-1]||0:e}function Er(e,t){const n=te(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=kr(r[o]);Ir(e,o,a)}}const I=e=>!!(e&&e.getVelocity);function Nr(e){return!!(I(e)&&e.add)}function Br(e,t){const n=e.getValue("willChange");if(Nr(n))return n.add(t);if(!n&&$.WillChange){const s=new $.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function xt(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Lr="framerAppearId",is="data-"+xt(Lr);function Kr(e){return e.props[is]}function jr({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function rs(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=t;const c=e.getDefaultTransition();r=r?ts(r,c):c;const l=r==null?void 0:r.reduceMotion;s&&(r=s);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const h=e.getValue(f,e.latestValues[f]??null),p=a[f];if(p===void 0||d&&jr(d,f))continue;const b={delay:n,...ns(r||{},f)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===y&&!b.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const V=Kr(e);if(V){const v=window.MotionHandoffAnimation(V,f,L);v!==null&&(b.startTime=v,g=!0)}}Br(e,f);const S=l??e.shouldReduceMotion;h.start(Or(f,h,p,S&&ss.has(f)?{type:!1}:b,e,g));const T=h.animation;T&&u.push(T)}if(o){const f=()=>L.update(()=>{o&&Er(e,o)});u.length?Promise.all(u).then(f):f()}return u}function ot(e,t,n={}){var c;const s=te(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(rs(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return Wr(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 Wr(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)+Qn(e.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function $r(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"?te(e,t,n.custom):t;s=Promise.all(rs(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Gr={test:e=>e==="auto",parse:e=>e},os=e=>t=>t.test(e),as=[se,m,ee,G,pi,hi,Gr],Xt=e=>as.find(os(e));function _r(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yn(e):!0}const Hr=new Set(["brightness","contrast","saturate","opacity"]);function Ur(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(pt)||[];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 zr=/\b([a-z-]*)\(.*?\)/gu,at={...B,getAnimatableNone:e=>{const t=e.match(zr);return t?t.map(Ur).join(" "):e}},ut={...B,getAnimatableNone:e=>{const t=B.parse(e);return B.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Zt={...se,transform:Math.round},qr={rotate:G,rotateX:G,rotateY:G,rotateZ:G,scale:xe,scaleX:xe,scaleY:xe,scaleZ:xe,skew:G,skewX:G,skewY:G,distance:m,translateX:m,translateY:m,translateZ:m,x:m,y:m,z:m,perspective:m,transformPerspective:m,opacity:fe,originX:Bt,originY:Bt,originZ:m},Vt={borderWidth:m,borderTopWidth:m,borderRightWidth:m,borderBottomWidth:m,borderLeftWidth:m,borderRadius:m,borderTopLeftRadius:m,borderTopRightRadius:m,borderBottomRightRadius:m,borderBottomLeftRadius:m,width:m,maxWidth:m,height:m,maxHeight:m,top:m,right:m,bottom:m,left:m,inset:m,insetBlock:m,insetBlockStart:m,insetBlockEnd:m,insetInline:m,insetInlineStart:m,insetInlineEnd:m,padding:m,paddingTop:m,paddingRight:m,paddingBottom:m,paddingLeft:m,paddingBlock:m,paddingBlockStart:m,paddingBlockEnd:m,paddingInline:m,paddingInlineStart:m,paddingInlineEnd:m,margin:m,marginTop:m,marginRight:m,marginBottom:m,marginLeft:m,marginBlock:m,marginBlockStart:m,marginBlockEnd:m,marginInline:m,marginInlineStart:m,marginInlineEnd:m,fontSize:m,backgroundPositionX:m,backgroundPositionY:m,...qr,zIndex:Zt,fillOpacity:fe,strokeOpacity:fe,numOctaves:Zt},Yr={...Vt,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:at,WebkitFilter:at,mask:ut,WebkitMask:ut},us=e=>Yr[e],Xr=new Set([at,ut]);function cs(e,t){let n=us(e);return Xr.has(n)||(n=B),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Zr=new Set(["auto","none","0"]);function Jr(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!Zr.has(r)&&de(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=cs(n,i)}class Qr extends wt{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 u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),ht(d))){const f=es(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ss.has(s)||t.length!==2)return;const[i,r]=t,o=Xt(i),a=Xt(r),c=Nt(i),l=Nt(r);if(c!==l&&_[s]){this.needsMeasurement=!0;return}if(o!==a)if(Ht(o)&&Ht(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else _[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||_r(t[i]))&&s.push(i);s.length&&Jr(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=_[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]=_[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()}}const eo=new Set(["opacity","clipPath","filter","transform"]);function to(e,t,n){if(e==null)return[];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).filter(s=>s!=null)}const ls=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function no(e){return qs(e)&&"offsetHeight"in e}const{schedule:so}=Rn(queueMicrotask,!1),io={y:!1};function ro(){return io.y}function fs(e,t){const n=to(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function oo(e){return!(e.pointerType==="touch"||ro())}function ao(e,t,n={}){const[s,i,r]=fs(e,n);return s.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",p)},d=y=>{l&&(l(y),l=void 0),u()},f=y=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,d(y))},h=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}d(y)}},b=y=>{if(!oo(y))return;c=!1;const g=t(o,y);typeof g=="function"&&(l=g,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",b,i),o.addEventListener("pointerdown",h,i)}),r}const ds=(e,t)=>t?e===t?!0:ds(e,t.parentElement):!1,uo=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,co=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lo(e){return co.has(e.tagName)||e.isContentEditable===!0}const Ae=new WeakSet;function Jt(e){return t=>{t.key==="Enter"&&e(t)}}function $e(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fo=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Jt(()=>{if(Ae.has(n))return;$e(n,"down");const i=Jt(()=>{$e(n,"up")}),r=()=>$e(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 Qt(e){return uo(e)&&!0}const en=new WeakSet;function ho(e,t,n={}){const[s,i,r]=fs(e,n),o=a=>{const c=a.currentTarget;if(!Qt(a)||en.has(a))return;Ae.add(c),n.stopPropagation&&en.add(a);const l=t(c,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ae.has(c)&&Ae.delete(c),Qt(h)&&typeof l=="function"&&l(h,{success:p})},d=h=>{u(h,c===window||c===document||n.useGlobalTarget||ds(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),no(a)&&(a.addEventListener("focus",l=>fo(l,i)),!lo(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const po=[...as,F,B],mo=e=>po.find(os(e)),tn=()=>({min:0,max:0}),hs=()=>({x:tn(),y:tn()}),go=new WeakMap;function ke(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function he(e){return typeof e=="string"||Array.isArray(e)}const At=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mt=["initial",...At];function Ee(e){return ke(e.animate)||Mt.some(t=>he(e[t]))}function ps(e){return!!(Ee(e)||e.variants)}function yo(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,Oe(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,Oe(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const ct={current:null},ms={current:!1},bo=typeof window<"u";function To(){if(ms.current=!0,!!bo)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ct.current=e.matches;e.addEventListener("change",t),t()}else ct.current=!1}const nn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let De={};function gs(e){De=e}function vo(){return De}class wo{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=wt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=E.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Ee(n),this.isVariantNode=ps(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&I(p)&&p.set(l[h])}}mount(t){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,go.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ms.current||To(),this.shouldReduceMotion=ct.current),process.env.NODE_ENV!=="production"&&Sn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ue(this.notifyUpdate),Ue(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){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&eo.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,d=new Zn({element:this.current,name:t,keyframes:a,times:c,ease:l,duration:K(u)}),f=o(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const s=re.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&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 De){const n=De[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):hs()}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<nn.length;s++){const i=nn[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=yo(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=Oe(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"&&(gn(s)||yn(s))?s=parseFloat(s):!mo(s)&&B.test(n)&&(s=cs(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=St(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 vn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){so.render(this.render)}}class ys extends wo{constructor(){super(...arguments),this.KeyframeResolver=Qr}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[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}`)}))}}class oe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function So({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function xo(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 Vo(e,t){return So(xo(e.getBoundingClientRect(),t))}const Ao={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mo=ie.length;function Co(e,t,n){let s="",i=!0;for(let r=0;r<Mo;r++){const o=ie[r],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const l=parseFloat(a);c=o.startsWith("scale")?l===1:l===0}if(!c||n){const l=ls(a,Vt[o]);if(!c){i=!1;const u=Ao[o]||o;s+=`${u}(${l}) `}n&&(t[o]=l)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Ct(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(re.has(c)){o=!0;continue}else if(kn(c)){i[c]=l;continue}else{const u=ls(l,Vt[c]);c.startsWith("origin")?(a=!0,r[c]=u):s[c]=u}}if(t.transform||(o||n?s.transform=Co(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}`}}function bs(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 sn(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ue={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(m.test(e))e=parseFloat(e);else return e;const n=sn(e,t.target.x),s=sn(e,t.target.y);return`${n}% ${s}%`}},Po={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=B.parse(e);if(i.length>5)return s;const r=B.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=c;const l=ye(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),r(i)}},Fo={borderRadius:{...ue,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomLeftRadius:ue,borderBottomRightRadius:ue,boxShadow:Po};function Ts(e,{layout:t,layoutId:n}){return re.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fo[e]||e==="opacity")}function Pt(e,t,n){var o;const s=e.style,i=t==null?void 0:t.style,r={};if(!s)return r;for(const a in s)(I(s[a])||i&&I(i[a])||Ts(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function Oo(e){return window.getComputedStyle(e)}class Do extends ys{constructor(){super(...arguments),this.type="html",this.renderInstance=bs}readValueFromInstance(t,n){var s;if(re.has(n))return(s=this.projection)!=null&&s.isProjecting?Qe(n):Zi(t,n);{const i=Oo(t),r=(kn(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Vo(t,n)}build(t,n,s){Ct(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Pt(t,n,s)}}const Ro={offset:"stroke-dashoffset",array:"stroke-dasharray"},Io={offset:"strokeDashoffset",array:"strokeDasharray"};function ko(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?Ro:Io;e[r.offset]=`${-s}`,e[r.array]=`${t} ${n}`}const Eo=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function vs(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(Ct(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);for(const h of Eo)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&ko(d,i,r,o,!1)}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"]),Ss=e=>typeof e=="string"&&e.toLowerCase()==="svg";function No(e,t,n,s){bs(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(ws.has(i)?i:xt(i),t.attrs[i])}function xs(e,t,n){const s=Pt(e,t,n);for(const i in e)if(I(e[i])||I(t[i])){const r=ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}class Bo extends ys{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hs}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(re.has(n)){const s=us(n);return s&&s.default||0}return n=ws.has(n)?n:xt(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return xs(t,n,s)}build(t,n,s){vs(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){No(t,n,s,i)}mount(t){this.isSVGTag=Ss(t.tagName),super.mount(t)}}const Lo=Mt.length;function Vs(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Vs(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=Mt[n],i=e.props[s];(he(i)||i===!1)&&(t[s]=i)}return t}function As(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 Ko=[...At].reverse(),jo=At.length;function Wo(e){return t=>Promise.all(t.map(({animation:n,options:s})=>$r(e,n,s)))}function $o(e){let t=Wo(e),n=rn(),s=!0;const i=c=>(l,u)=>{var f;const d=te(e,u,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...b}=d;l={...l,...b,...p}}return l};function r(c){t=c(e)}function o(c){const{props:l}=e,u=Vs(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<jo;y++){const g=Ko[y],S=n[g],T=l[g]!==void 0?l[g]:u[g],V=he(T),v=g===c?S.isActive:null;v===!1&&(p=y);let A=T===u[g]&&T!==l[g]&&V;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...h},!S.isActive&&v===null||!T&&!S.prevProp||ke(T)||typeof T=="boolean")continue;if(g==="exit"&&S.isActive&&v!==!0){S.prevResolvedValues&&(h={...h,...S.prevResolvedValues});continue}const C=Go(S.prevProp,T);let x=C||g===c&&S.isActive&&!A&&V||y>p&&V,D=!1;const R=Array.isArray(T)?T:[T];let j=R.reduce(i(g),{});v===!1&&(j={});const{prevResolvedValues:be={}}=S,Te={...be,...j},ve=O=>{x=!0,f.has(O)&&(D=!0,f.delete(O)),S.needsAnimating[O]=!0;const P=e.getValue(O);P&&(P.liveStyle=!1)};for(const O in Te){const P=j[O],W=be[O];if(h.hasOwnProperty(O))continue;let Z=!1;rt(P)&&rt(W)?Z=!As(P,W):Z=P!==W,Z?P!=null?ve(O):f.add(O):P!==void 0&&f.has(O)?ve(O):S.protectedKeys[O]=!0}S.prevProp=T,S.prevResolvedValues=j,S.isActive&&(h={...h,...j}),s&&e.blockInitialAnimation&&(x=!1);const we=A&&C;x&&(!we||D)&&d.push(...R.map(O=>{const P={type:g};if(typeof O=="string"&&s&&!we&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,Z=te(W,O);if(W.enteringChildren&&Z){const{delayChildren:Es}=Z.transition||{};P.delay=Qn(W.enteringChildren,e,Es)}}return{animation:O,options:P}}))}if(f.size){const y={};if(typeof l.initial!="boolean"){const g=te(e,Array.isArray(l.initial)?l.initial[0]:l.initial);g&&g.transition&&(y.transition=g.transition)}f.forEach(g=>{const S=e.getBaseTarget(g),T=e.getValue(g);T&&(T.liveStyle=!0),y[g]=S??null}),d.push({animation:y})}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=rn()}}}function Go(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!As(t,e):!1}function U(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rn(){return{animate:U(!0),whileInView:U(),whileHover:U(),whileTap:U(),whileDrag:U(),whileFocus:U(),exit:U()}}function on(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function _o(e){return I(e)?e.get():e}const Ms=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ft=w.createContext({strict:!1}),an={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let un=!1;function Ho(){if(un)return;const e={};for(const t in an)e[t]={isEnabled:n=>an[t].some(s=>!!n[s])};gs(e),un=!0}function Cs(){return Ho(),vo()}function cn(e){const t=Cs();for(const n in e)t[n]={...t[n],...e[n]};gs(t)}function Uo({children:e,features:t,strict:n=!1}){const[,s]=w.useState(!Ge(t)),i=w.useRef(void 0);if(!Ge(t)){const{renderer:r,...o}=t;i.current=r,cn(o)}return w.useEffect(()=>{Ge(t)&&t().then(({renderer:r,...o})=>{cn(o),i.current=r,s(!0)})},[]),k.jsx(Ft.Provider,{value:{renderer:i.current,strict:n},children:e})}function Ge(e){return typeof e=="function"}const zo=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","propagate","ignoreStrict","viewport"]);function Re(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zo.has(e)}let Ps=e=>!Re(e);function qo(e){typeof e=="function"&&(Ps=t=>t.startsWith("on")?!Re(t):e(t))}try{qo(require("@emotion/is-prop-valid").default)}catch{}function Yo(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ps(i)||n===!0&&Re(i)||!t&&!Re(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Ne=w.createContext({});function Xo(e,t){if(Ee(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 Zo(e){const{initial:t,animate:n}=Xo(e,w.useContext(Ne));return w.useMemo(()=>({initial:t,animate:n}),[ln(t),ln(n)])}function ln(e){return Array.isArray(e)?e.join(" "):e}const Ot=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fs(e,t,n){for(const s in t)!I(t[s])&&!Ts(s,n)&&(e[s]=t[s])}function Jo({transformTemplate:e},t){return w.useMemo(()=>{const n=Ot();return Ct(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Qo(e,t){const n=e.style||{},s={};return Fs(s,n,e),Object.assign(s,Jo(e,t)),s}function ea(e,t){const n={},s=Qo(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 Os=()=>({...Ot(),attrs:{}});function ta(e,t,n,s){const i=w.useMemo(()=>{const r=Os();return vs(r,t,Ss(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};Fs(r,e.style,e),i.style={...r,...i.style}}return i}const na=["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 Dt(e){return typeof e!="string"||e.includes("-")?!1:!!(na.indexOf(e)>-1||/[A-Z]/u.test(e))}function sa(e,t,n,{latestValues:s},i,r=!1,o){const c=(o??Dt(e)?ta:ea)(t,s,i,e),l=Yo(t,typeof e=="string",r),u=e!==w.Fragment?{...l,...c,ref:n}:{},{children:d}=t,f=w.useMemo(()=>I(d)?d.get():d,[d]);return w.createElement(e,{...u,children:f})}function ia({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:ra(n,s,i,e),renderState:t()}}function ra(e,t,n,s){const i={},r=s(e,{});for(const f in r)i[f]=_o(r[f]);let{initial:o,animate:a}=e;const c=Ee(e),l=ps(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"&&!ke(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=St(e,f[h]);if(p){const{transitionEnd:b,transition:y,...g}=p;for(const S in g){let T=g[S];if(Array.isArray(T)){const V=u?T.length-1:0;T=T[V]}T!==null&&(i[S]=T)}for(const S in b)i[S]=b[S]}}}return i}const Ds=e=>(t,n)=>{const s=w.useContext(Ne),i=w.useContext(mn),r=()=>ia(e,t,s,i);return n?r():_s(r)},oa=Ds({scrapeMotionValuesFromProps:Pt,createRenderState:Ot}),aa=Ds({scrapeMotionValuesFromProps:xs,createRenderState:Os}),ua=Symbol.for("motionComponentSymbol");function ca(e,t,n){const s=w.useRef(n);w.useInsertionEffect(()=>{s.current=n});const i=w.useRef(null);return w.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r)),t&&(r?t.mount(r):t.unmount());const o=s.current;if(typeof o=="function")if(r){const c=o(r);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[t])}const la=w.createContext({});function fa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function da(e,t,n,s,i,r){var T,V;const{visualElement:o}=w.useContext(Ne),a=w.useContext(Ft),c=w.useContext(mn),l=w.useContext(Ms),u=l.reducedMotion,d=l.skipAnimations,f=w.useRef(null),h=w.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:r}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,b=w.useContext(la);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&ha(f.current,n,i,b);const y=w.useRef(!1);w.useInsertionEffect(()=>{p&&y.current&&p.update(n,c)});const g=n[is],S=w.useRef(!!g&&!((T=window.MotionHandoffIsComplete)!=null&&T.call(window,g))&&((V=window.MotionHasOptimisedAnimation)==null?void 0:V.call(window,g)));return Hs(()=>{h.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),S.current&&p.animationState&&p.animationState.animateChanges())}),w.useEffect(()=>{p&&(!S.current&&p.animationState&&p.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,g)}),S.current=!1),p.enteringChildren=void 0)}),p}function ha(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&&fa(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 pa(e,{forwardMotionProps:t=!1,type:n}={},s,i){const r=n?n==="svg":Dt(e),o=r?aa:oa;function a(l,u){let d;const f={...w.useContext(Ms),...l,layoutId:ma(l)},{isStatic:h}=f,p=Zo(l),b=o(l,h);if(!h&&pn){ga(f,s);const y=ya(f);d=y.MeasureLayout,p.visualElement=da(e,b,f,i,y.ProjectionNode,r)}return k.jsxs(Ne.Provider,{value:p,children:[d&&p.visualElement?k.jsx(d,{visualElement:p.visualElement,...f}):null,sa(e,l,ca(b,p.visualElement,u),b,h,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(a);return c[ua]=e,c}function ma({layoutId:e}){const t=w.useContext(Gs).id;return t&&e!==void 0?t+"-"+e:e}function ga(e,t){w.useContext(Ft).strict,process.env.NODE_ENV}function ya(e){const t=Cs(),{drag:n,layout:s}=t;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const ba=(e,t)=>t.isSVG??Dt(e)?new Bo(t):new Do(t,{allowProjection:e!==w.Fragment});class Ta extends oe{constructor(t){super(t),t.animationState||(t.animationState=$o(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ke(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 va=0;class wa extends oe{constructor(){super(...arguments),this.id=va++}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 Sa={animation:{Feature:Ta},exit:{Feature:wa}};function Is(e){return{point:{x:e.pageX,y:e.pageY}}}function fn(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&&L.postRender(()=>r(t,Is(t)))}class xa extends oe{mount(){const{current:t}=this.node;t&&(this.unmount=ao(t,(n,s)=>(fn(this.node,s,"Start"),i=>fn(this.node,i,"End"))))}unmount(){}}class Va extends oe{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=Ie(on(this.node.current,"focus",()=>this.onFocus()),on(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dn(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&&L.postRender(()=>r(t,Is(t)))}class Aa extends oe{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=ho(t,(i,r)=>(dn(this.node,r,"Start"),(o,{success:a})=>dn(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const lt=new WeakMap,_e=new WeakMap,Ma=e=>{const t=lt.get(e.target);t&&t(e)},Ca=e=>{e.forEach(Ma)};function Pa({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(Ca,{root:e,...t})),s[i]}function Fa(e,t,n){const s=Pa(t);return lt.set(e,n),s.observe(e),()=>{lt.delete(e),s.unobserve(e)}}const Oa={some:0,all:1};class Da extends oe{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:Oa[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 Fa(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 Ia={inView:{Feature:Da},tap:{Feature:Aa},focus:{Feature:Va},hover:{Feature:xa}},ka={renderer:ba,...Sa,...Ia};function Ea(e,t){return pa(e,t)}const Na=Ea("div"),Ba={light:{border:"px",shadow:"2"},dark:{}},ks=w.createContext({groupOpen:!1,setGroupOpen:()=>{}}),La=({open:e,delay:t=600})=>{const n=w.useContext(ks);return w.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}},Ka=({children:e})=>{const[t,n]=w.useState(!1);return k.jsx(ks.Provider,{value:{groupOpen:t,setGroupOpen:n},children:e})},ja=({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:p,collisionBoundary:b,collisionPadding:y,arrowPadding:g,sticky:S,hideWhenDetached:T,skipAnimation:V,label:v,labelProps:A,enabled:C=!0,appearance:x="dark",triggerRef:D,children:R})=>{const[j,be]=Bs.useControllableState({prop:i,onChange:r,defaultProp:s??!1}),{groupOpen:Te}=La({open:!!j,delay:e}),ve=w.Children.toArray(R).some(P=>w.isValidElement(P)?P.props.disabled:!1),we=Te||ve?0:e,Rt=!Te,O=P=>{if(P==="top")return{y:-5};if(P==="bottom")return{y:5};if(P==="left")return{x:-5};if(P==="right")return{x:5}};return k.jsx(Uo,{features:ka,children:k.jsx(ae.Provider,{delayDuration:we,skipDelayDuration:t,disableHoverableContent:n,children:k.jsxs(ae.Root,{open:C===!1?!1:j,onOpenChange:be,children:[k.jsx(ae.Trigger,{asChild:!0,ref:D,children:k.jsx(Ks.RefToTgphRef,{children:R})}),k.jsx(ae.Portal,{children:k.jsx(ae.Content,{"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:c,forceMount:l,side:u,sideOffset:d,align:f,alignOffset:h,avoidCollisions:p,collisionBoundary:b,collisionPadding:y,arrowPadding:g,sticky:S,hideWhenDetached:T,style:{zIndex:"var(--tgph-zIndex-tooltip)"},children:k.jsx(Ls.OverrideAppearance,{appearance:x,asChild:!0,children:k.jsx(js.Stack,{as:Na,className:"tgph",initial:Rt&&!V?{opacity:0,scale:.5,...O(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)"},...A?{labelProps:A}:{},...Ba[x],children:typeof v=="string"?k.jsx(Ws.Text,{as:"span",size:"1",children:v}):v})})})})]})})})};exports.Tooltip=ja;exports.TooltipGroupProvider=Ka;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react/jsx-runtime"),Ns=require("@radix-ui/react-tooltip"),Bs=require("@radix-ui/react-use-controllable-state"),Ls=require("@telegraph/appearance"),Ks=require("@telegraph/helpers"),js=require("@telegraph/layout"),Ws=require("@telegraph/typography"),w=require("react");function $s(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 ae=$s(Ns),Gs=w.createContext({});function _s(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const pn=typeof window<"u",Hs=pn?w.useLayoutEffect:w.useEffect,mn=w.createContext(null);function Us(e,t){e.indexOf(t)===-1&&e.push(t)}function zs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const H=(e,t,n)=>n>t?t:n<e?e:n;function He(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let pe=()=>{},X=()=>{};var hn;typeof process<"u"&&((hn=process.env)==null?void 0:hn.NODE_ENV)!=="production"&&(pe=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(He(t,n))},X=(e,t,n)=>{if(!e)throw new Error(He(t,n))});const $={},gn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qs(e){return typeof e=="object"&&e!==null}const yn=e=>/^0[^.\s]+$/u.test(e);function bn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ne=e=>e,Ys=(e,t)=>n=>t(e(n)),Ie=(...e)=>e.reduce(Ys),Tn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class vn{constructor(){this.subscriptions=[]}add(t){return Us(this.subscriptions,t),()=>zs(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 K=e=>e*1e3,N=e=>e/1e3;function wn(e,t){return t?e*(1e3/t):0}const It=new Set;function Sn(e,t,n){e||It.has(t)||(console.warn(He(t,n)),It.add(t))}const xn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Xs=1e-7,Zs=12;function Js(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=xn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Xs&&++a<Zs);return o}function me(e,t,n,s){if(e===t&&n===s)return ne;const i=r=>Js(r,0,1,e,n);return r=>r===0||r===1?r:xn(i(r),t,s)}const Vn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,An=e=>t=>1-e(1-t),Mn=me(.33,1.53,.69,.99),ft=An(Mn),Cn=Vn(ft),Pn=e=>(e*=2)<1?.5*ft(e):.5*(2-Math.pow(2,-10*(e-1))),dt=e=>1-Math.sin(Math.acos(e)),Qs=An(dt),Fn=Vn(dt),ei=me(.42,0,1,1),ti=me(0,0,.58,1),On=me(.42,0,.58,1),ni=e=>Array.isArray(e)&&typeof e[0]!="number",Dn=e=>Array.isArray(e)&&typeof e[0]=="number",kt={linear:ne,easeIn:ei,easeInOut:On,easeOut:ti,circIn:dt,circInOut:Fn,circOut:Qs,backIn:ft,backInOut:Cn,backOut:Mn,anticipate:Pn},si=e=>typeof e=="string",Et=e=>{if(Dn(e)){X(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(si(e))return X(kt[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),kt[e];return e},Se=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ii(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 p=f&&i?n:s;return d&&o.add(u),p.has(u)||p.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 ri=40;function Rn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Se.reduce((T,V)=>(T[V]=ii(r),T),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=o,b=()=>{const T=$.useManualTiming?i.timestamp:performance.now();n=!1,$.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,ri),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(b))},y=()=>{n=!0,s=!0,i.isProcessing||e(b)};return{schedule:Se.reduce((T,V)=>{const v=o[V];return T[V]=(A,C=!1,x=!1)=>(n||y(),v.schedule(A,C,x)),T},{}),cancel:T=>{for(let V=0;V<Se.length;V++)o[Se[V]].cancel(T)},state:i,steps:o}}const{schedule:L,cancel:Ue,state:Me}=Rn(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let Ve;function oi(){Ve=void 0}const E={now:()=>(Ve===void 0&&E.set(Me.isProcessing||$.useManualTiming?Me.timestamp:performance.now()),Ve),set:e=>{Ve=e,queueMicrotask(oi)}},In=e=>t=>typeof t=="string"&&t.startsWith(e),kn=In("--"),ai=In("var(--"),ht=e=>ai(e)?ui.test(e.split("/*")[0].trim()):!1,ui=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Nt(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const se={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},fe={...se,transform:e=>H(0,1,e)},xe={...se,default:1},le=e=>Math.round(e*1e5)/1e5,pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ci(e){return e==null}const li=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(e,t)=>n=>!!(typeof n=="string"&&li.test(n)&&n.startsWith(e)||t&&!ci(n)&&Object.prototype.hasOwnProperty.call(n,t)),En=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(pt);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},fi=e=>H(0,255,e),Be={...se,transform:e=>Math.round(fi(e))},z={test:mt("rgb","red"),parse:En("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Be.transform(e)+", "+Be.transform(t)+", "+Be.transform(n)+", "+le(fe.transform(s))+")"};function di(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 ze={test:mt("#"),parse:di,transform:z.transform},ge=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),G=ge("deg"),ee=ge("%"),m=ge("px"),hi=ge("vh"),pi=ge("vw"),Bt={...ee,parse:e=>ee.parse(e)/100,transform:e=>ee.transform(e*100)},J={test:mt("hsl","hue"),parse:En("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ee.transform(le(t))+", "+ee.transform(le(n))+", "+le(fe.transform(s))+")"},F={test:e=>z.test(e)||ze.test(e)||J.test(e),parse:e=>z.test(e)?z.parse(e):J.test(e)?J.parse(e):ze.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?z.transform(e):J.transform(e),getAnimatableNone:e=>{const t=F.parse(e);return t.alpha=0,F.transform(t)}},mi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gi(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pt))==null?void 0:t.length)||0)+(((n=e.match(mi))==null?void 0:n.length)||0)>0}const Nn="number",Bn="color",yi="var",bi="var(",Lt="${}",Ti=/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(Ti,c=>(F.test(c)?(s.color.push(r),i.push(Bn),n.push(F.parse(c))):c.startsWith(bi)?(s.var.push(r),i.push(yi),n.push(c)):(s.number.push(r),i.push(Nn),n.push(parseFloat(c))),++r,Lt)).split(Lt);return{values:n,split:a,indexes:s,types:i}}function Ln(e){return de(e).values}function Kn(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===Nn?r+=le(i[o]):a===Bn?r+=F.transform(i[o]):r+=i[o]}return r}}const vi=e=>typeof e=="number"?0:F.test(e)?F.getAnimatableNone(e):e;function wi(e){const t=Ln(e);return Kn(e)(t.map(vi))}const B={test:gi,parse:Ln,createTransformer:Kn,getAnimatableNone:wi};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 Si({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 Ce(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,Ke=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},xi=[ze,z,J],Vi=e=>xi.find(t=>t.test(e));function Kt(e){const t=Vi(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===J&&(n=Si(n)),n}const jt=(e,t)=>{const n=Kt(e),s=Kt(t);if(!n||!s)return Ce(e,t);const i={...n};return r=>(i.red=Ke(n.red,s.red,r),i.green=Ke(n.green,s.green,r),i.blue=Ke(n.blue,s.blue,r),i.alpha=ye(n.alpha,s.alpha,r),z.transform(i))},qe=new Set(["none","hidden"]);function Ai(e,t){return qe.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Mi(e,t){return n=>ye(e,t,n)}function gt(e){return typeof e=="number"?Mi:typeof e=="string"?ht(e)?Ce:F.test(e)?jt:Fi:Array.isArray(e)?jn:typeof e=="object"?F.test(e)?jt:Ci:Ce}function jn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>gt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Ci(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=gt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Pi(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 Fi=(e,t)=>{const n=B.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?qe.has(e)&&!i.values.length||qe.has(t)&&!s.values.length?Ai(e,t):Ie(jn(Pi(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"),Ce(e,t))};function Wn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):gt(e)(e,t)}const Oi=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>L.update(t,n),stop:()=>Ue(t),now:()=>Me.isProcessing?Me.timestamp:E.now()}},$n=(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)})`},Pe=2e4;function yt(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Pe;)t+=n,s=e.next(t);return t>=Pe?1/0:t}function Di(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(yt(s),Pe);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:N(i)}}const Ri=5;function Gn(e,t,n){const s=Math.max(t-Ri,0);return wn(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},je=.001;function Ii({duration:e=M.duration,bounce:t=M.bounce,velocity:n=M.velocity,mass:s=M.mass}){let i,r;pe(e<=K(M.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=H(M.minDamping,M.maxDamping,o),e=H(M.minDuration,M.maxDuration,N(e)),o<1?(i=l=>{const u=l*o,d=u*e,f=u-n,h=Ye(l,o),p=Math.exp(-d);return je-f/h*p},r=l=>{const d=l*o*e,f=d*n+n,h=Math.pow(o,2)*Math.pow(l,2)*e,p=Math.exp(-d),b=Ye(Math.pow(l,2),o);return(-i(l)+je>0?-1:1)*((f-h)*p)/b}):(i=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-je+u*d},r=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const a=5/e,c=Ei(i,r,a);if(e=K(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 ki=12;function Ei(e,t,n){let s=n;for(let i=1;i<ki;i++)s=s-e(s)/t(s);return s}function Ye(e,t){return e*Math.sqrt(1-t*t)}const Ni=["duration","bounce"],Bi=["stiffness","damping","mass"];function Wt(e,t){return t.some(n=>e[n]!==void 0)}function Li(e){let t={velocity:M.velocity,stiffness:M.stiffness,damping:M.damping,mass:M.mass,isResolvedFromDuration:!1,...e};if(!Wt(e,Bi)&&Wt(e,Ni))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*H(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:M.mass,stiffness:i,damping:r}}else{const n=Ii({...e,velocity:0});t={...t,...n,mass:M.mass},t.isResolvedFromDuration=!0}return t}function Fe(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}=Li({...n,velocity:-N(n.velocity||0)}),p=f||0,b=l/(2*Math.sqrt(c*u)),y=o-r,g=N(Math.sqrt(c/u)),S=Math.abs(y)<5;s||(s=S?M.restSpeed.granular:M.restSpeed.default),i||(i=S?M.restDelta.granular:M.restDelta.default);let T;if(b<1){const v=Ye(g,b);T=A=>{const C=Math.exp(-b*g*A);return o-C*((p+b*g*y)/v*Math.sin(v*A)+y*Math.cos(v*A))}}else if(b===1)T=v=>o-Math.exp(-g*v)*(y+(p+g*y)*v);else{const v=g*Math.sqrt(b*b-1);T=A=>{const C=Math.exp(-b*g*A),x=Math.min(v*A,300);return o-C*((p+b*g*y)*Math.sinh(x)+v*y*Math.cosh(x))/v}}const V={calculatedDuration:h&&d||null,next:v=>{const A=T(v);if(h)a.done=v>=d;else{let C=v===0?p:0;b<1&&(C=v===0?K(p):Gn(T,v,A));const x=Math.abs(C)<=s,D=Math.abs(o-A)<=i;a.done=x&&D}return a.value=a.done?o:A,a},toString:()=>{const v=Math.min(yt(V),Pe),A=$n(C=>V.next(v*C).value,v,30);return v+"ms "+A},toTransition:()=>{}};return V}Fe.applyToOptions=e=>{const t=Di(e,100,Fe);return e.ease=t.ease,e.duration=K(t.duration),e.type="keyframes",e};function Xe({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,p=x=>a===void 0?c:c===void 0||Math.abs(a-x)<Math.abs(c-x)?a:c;let b=n*t;const y=d+b,g=o===void 0?y:o(y);g!==y&&(b=g-d);const S=x=>-b*Math.exp(-x/s),T=x=>g+S(x),V=x=>{const D=S(x),R=T(x);f.done=Math.abs(D)<=l,f.value=f.done?g:R};let v,A;const C=x=>{h(f.value)&&(v=x,A=Fe({keyframes:[f.value,p(f.value)],velocity:Gn(T,x,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:x=>{let D=!1;return!A&&v===void 0&&(D=!0,V(x),C(x)),v!==void 0&&x>=v?A.next(x-v):(!D&&V(x),f)}}}function Ki(e,t,n){const s=[],i=n||$.mix||Wn,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=Ie(c,a)}s.push(a)}return s}function ji(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(X(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=Ki(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=Tn(e[d],e[d+1],u);return a[d](f)};return n?u=>l(H(e[0],e[r-1],u)):l}function Wi(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Tn(0,t,s);e.push(ye(n,1,i))}}function $i(e){const t=[0];return Wi(t,e.length-1),t}function Gi(e,t){return e.map(n=>n*t)}function _i(e,t){return e.map(()=>t||On).splice(0,e.length-1)}function Q({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=ni(s)?s.map(Et):Et(s),r={done:!1,value:t[0]},o=Gi(n&&n.length===t.length?n:$i(t),e),a=ji(o,t,{ease:Array.isArray(i)?i:_i(t,i)});return{calculatedDuration:e,next:c=>(r.value=a(c),r.done=c>=e,r)}}const Hi=e=>e!==null;function bt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(Hi),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Ui={decay:Xe,inertia:Xe,tween:Q,keyframes:Q,spring:Fe};function _n(e){typeof e.type=="string"&&(e.type=Ui[e.type])}class Tt{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 zi=e=>e/100;class vt extends Tt{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!==E.now()&&this.tick(E.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;_n(t);const{type:n=Q,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=n||Q;process.env.NODE_ENV!=="production"&&c!==Q&&X(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Q&&typeof a[0]!="number"&&(this.mixKeyframes=Ie(zi,Wn(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=yt(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:p,onUpdate:b,finalKeyframe:y}=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 g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,V=s;if(d){const x=Math.min(this.currentTime,i)/a;let D=Math.floor(x),R=x%1;!R&&x>=1&&(R=1),R===1&&D--,D=Math.min(D,d+1),!!(D%2)&&(f==="reverse"?(R=1-R,h&&(R-=h/a)):f==="mirror"&&(V=o)),T=H(0,1,R)*a}const v=S?{done:!1,value:u[0]}:V.next(T);r&&(v.value=r(v.value));let{done:A}=v;!S&&c!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&p!==Xe&&(v.value=bt(u,this.options,y,this.speed)),b&&b(v.value),C&&this.finish(),v}then(t,n){return this.finished.then(t,n)}get duration(){return N(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+N(t)}get time(){return N(this.currentTime)}set time(t){var n;t=K(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(E.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=N(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=Oi,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(E.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 qi(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const q=e=>e*180/Math.PI,Ze=e=>{const t=q(Math.atan2(e[1],e[0]));return Je(t)},Yi={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=>q(Math.atan(e[1])),skewY:e=>q(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Je=e=>(e=e%360,e<0&&(e+=360),e),$t=Ze,Gt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_t=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gt,scaleY:_t,scale:e=>(Gt(e)+_t(e))/2,rotateX:e=>Je(q(Math.atan2(e[6],e[5]))),rotateY:e=>Je(q(Math.atan2(-e[2],e[0]))),rotateZ:$t,rotate:$t,skewX:e=>q(Math.atan(e[4])),skewY:e=>q(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qe(e){return e.includes("scale")?1:0}function et(e,t){if(!e||e==="none")return Qe(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Xi,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Yi,i=a}if(!i)return Qe(t);const r=s[t],o=i[1].split(",").map(Ji);return typeof r=="function"?r(o):o[r]}const Zi=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return et(n,t)};function Ji(e){return parseFloat(e.trim())}const ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],re=new Set(ie),Ht=e=>e===se||e===m,Qi=new Set(["x","y","z"]),er=ie.filter(e=>!Qi.has(e));function tr(e){const t=[];return er.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const _={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})=>et(t,"x"),y:(e,{transform:t})=>et(t,"y")};_.translateX=_.x;_.translateY=_.y;const Y=new Set;let tt=!1,nt=!1,st=!1;function Hn(){if(nt){const e=Array.from(Y).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=tr(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)})}nt=!1,tt=!1,Y.forEach(e=>e.complete(st)),Y.clear()}function Un(){Y.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nt=!0)})}function nr(){st=!0,Un(),Hn(),st=!1}class wt{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?(Y.add(this),tt||(tt=!0,L.read(Un),L.resolveKeyframes(Hn))):(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])}qi(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Y.delete(this)}cancel(){this.state==="scheduled"&&(Y.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const sr=e=>e.startsWith("--");function ir(e,t,n){sr(t)?e.style.setProperty(t,n):e.style[t]=n}const rr={};function zn(e,t){const n=bn(e);return()=>rr[t]??n()}const or=zn(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),qn=zn(()=>{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})`,Ut={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 Yn(e,t){if(e)return typeof e=="function"?qn()?$n(e,t):"ease-out":Dn(e)?ce(e):Array.isArray(e)?e.map(n=>Yn(n,t)||Ut.easeOut):Ut[e]}function ar(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=Yn(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 Xn(e){return typeof e=="function"&&"applyToOptions"in e}function ur({type:e,...t}){return Xn(e)&&qn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Zn extends Tt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!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,X(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=ur(t);this.animation=ar(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=bt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):ir(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 n,s,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}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 N(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+N(t)}get time(){return N(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=K(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=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&&or()?(this.animation.timeline=t,ne):n(this)}}const Jn={anticipate:Pn,backInOut:Cn,circInOut:Fn};function cr(e){return e in Jn}function lr(e){typeof e.ease=="string"&&cr(e.ease)&&(e.ease=Jn[e.ease])}const We=10;class fr extends Zn{constructor(t){lr(t),_n(t),super(t),t.startTime!==void 0&&(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 vt({...o,autoplay:!1}),c=Math.max(We,E.now()-this.startTime),l=H(0,We,c-We);n.setWithVelocity(a.sample(Math.max(0,c-l)).value,a.sample(c).value,l),a.stop()}}const zt=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(B.test(e)||e==="0")&&!e.startsWith("url("));function dr(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 hr(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=zt(i,t),a=zt(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:dr(e)||(n==="spring"||Xn(n))&&s}function it(e){e.duration=0,e.type="keyframes"}const pr=new Set(["opacity","clipPath","filter","transform"]),mr=bn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gr(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 mr()&&n&&pr.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const yr=40;class br extends Tt{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 p;super(),this.stop=()=>{var b,y;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=E.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)||wt;this.keyframeResolver=new h(a,(b,y,g)=>this.onKeyframesResolved(b,y,f,!g),c,l,u),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,s,i){var y,g;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=E.now(),hr(t,r,o,a)||(($.instantAnimations||!c)&&(u==null||u(bt(t,s,n))),t[0]=t[t.length-1],it(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>yr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!l&&gr(f),p=(g=(y=f.motionValue)==null?void 0:y.owner)==null?void 0:g.current,b=h?new fr({...f,element:p}):new vt(f);b.finished.then(()=>{this.notifyFinished()}).catch(ne),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}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(),nr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function Qn(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}const Tr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vr(e){const t=Tr.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const wr=4;function es(e,t,n=1){X(n<=wr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=vr(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return gn(o)?parseFloat(o):o}return ht(i)?es(i,t,n+1):i}const Sr={type:"spring",stiffness:500,damping:25,restSpeed:10},xr=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vr={type:"keyframes",duration:.8},Ar={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mr=(e,{keyframes:t})=>t.length>2?Vr:re.has(e)?e.startsWith("scale")?xr(t[1]):Sr:Ar,Cr=e=>e!==null;function Pr(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Cr),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}function ts(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function ns(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?ts(n,e):n}function Fr({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 Or=(e,t,n,s={},i,r)=>o=>{const a=ns(s,e)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-K(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};Fr(a)||Object.assign(u,Mr(e,u)),u.duration&&(u.duration=K(u.duration)),u.repeatDelay&&(u.repeatDelay=K(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(it(u),u.delay===0&&(d=!0)),($.instantAnimations||$.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(d=!0,it(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!r&&t.get()!==void 0){const f=Pr(u.keyframes,a);if(f!==void 0){L.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new vt(u):new br(u)};function qt(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function St(e,t,n,s){if(typeof t=="function"){const[i,r]=qt(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]=qt(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function te(e,t,n){const s=e.getProps();return St(s,t,n!==void 0?n:s.custom,e)}const ss=new Set(["width","height","top","left","right","bottom",...ie]),Yt=30,Dr=e=>!isNaN(parseFloat(e));class Rr{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=E.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=E.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dr(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Sn(!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 vn);const s=this.events[t].add(n);return t==="change"?()=>{s(),L.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=E.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yt);return wn(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 Oe(e,t){return new Rr(e,t)}const rt=e=>Array.isArray(e);function Ir(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oe(n))}function kr(e){return rt(e)?e[e.length-1]||0:e}function Er(e,t){const n=te(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=kr(r[o]);Ir(e,o,a)}}const I=e=>!!(e&&e.getVelocity);function Nr(e){return!!(I(e)&&e.add)}function Br(e,t){const n=e.getValue("willChange");if(Nr(n))return n.add(t);if(!n&&$.WillChange){const s=new $.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function xt(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Lr="framerAppearId",is="data-"+xt(Lr);function Kr(e){return e.props[is]}function jr({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function rs(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=t;const c=e.getDefaultTransition();r=r?ts(r,c):c;const l=r==null?void 0:r.reduceMotion;s&&(r=s);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const h=e.getValue(f,e.latestValues[f]??null),p=a[f];if(p===void 0||d&&jr(d,f))continue;const b={delay:n,...ns(r||{},f)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===y&&!b.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const V=Kr(e);if(V){const v=window.MotionHandoffAnimation(V,f,L);v!==null&&(b.startTime=v,g=!0)}}Br(e,f);const S=l??e.shouldReduceMotion;h.start(Or(f,h,p,S&&ss.has(f)?{type:!1}:b,e,g));const T=h.animation;T&&u.push(T)}if(o){const f=()=>L.update(()=>{o&&Er(e,o)});u.length?Promise.all(u).then(f):f()}return u}function ot(e,t,n={}){var c;const s=te(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(rs(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return Wr(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 Wr(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)+Qn(e.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function $r(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"?te(e,t,n.custom):t;s=Promise.all(rs(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Gr={test:e=>e==="auto",parse:e=>e},os=e=>t=>t.test(e),as=[se,m,ee,G,pi,hi,Gr],Xt=e=>as.find(os(e));function _r(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yn(e):!0}const Hr=new Set(["brightness","contrast","saturate","opacity"]);function Ur(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(pt)||[];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 zr=/\b([a-z-]*)\(.*?\)/gu,at={...B,getAnimatableNone:e=>{const t=e.match(zr);return t?t.map(Ur).join(" "):e}},ut={...B,getAnimatableNone:e=>{const t=B.parse(e);return B.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Zt={...se,transform:Math.round},qr={rotate:G,rotateX:G,rotateY:G,rotateZ:G,scale:xe,scaleX:xe,scaleY:xe,scaleZ:xe,skew:G,skewX:G,skewY:G,distance:m,translateX:m,translateY:m,translateZ:m,x:m,y:m,z:m,perspective:m,transformPerspective:m,opacity:fe,originX:Bt,originY:Bt,originZ:m},Vt={borderWidth:m,borderTopWidth:m,borderRightWidth:m,borderBottomWidth:m,borderLeftWidth:m,borderRadius:m,borderTopLeftRadius:m,borderTopRightRadius:m,borderBottomRightRadius:m,borderBottomLeftRadius:m,width:m,maxWidth:m,height:m,maxHeight:m,top:m,right:m,bottom:m,left:m,inset:m,insetBlock:m,insetBlockStart:m,insetBlockEnd:m,insetInline:m,insetInlineStart:m,insetInlineEnd:m,padding:m,paddingTop:m,paddingRight:m,paddingBottom:m,paddingLeft:m,paddingBlock:m,paddingBlockStart:m,paddingBlockEnd:m,paddingInline:m,paddingInlineStart:m,paddingInlineEnd:m,margin:m,marginTop:m,marginRight:m,marginBottom:m,marginLeft:m,marginBlock:m,marginBlockStart:m,marginBlockEnd:m,marginInline:m,marginInlineStart:m,marginInlineEnd:m,fontSize:m,backgroundPositionX:m,backgroundPositionY:m,...qr,zIndex:Zt,fillOpacity:fe,strokeOpacity:fe,numOctaves:Zt},Yr={...Vt,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:at,WebkitFilter:at,mask:ut,WebkitMask:ut},us=e=>Yr[e],Xr=new Set([at,ut]);function cs(e,t){let n=us(e);return Xr.has(n)||(n=B),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Zr=new Set(["auto","none","0"]);function Jr(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!Zr.has(r)&&de(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=cs(n,i)}class Qr extends wt{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 u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),ht(d))){const f=es(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ss.has(s)||t.length!==2)return;const[i,r]=t,o=Xt(i),a=Xt(r),c=Nt(i),l=Nt(r);if(c!==l&&_[s]){this.needsMeasurement=!0;return}if(o!==a)if(Ht(o)&&Ht(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else _[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||_r(t[i]))&&s.push(i);s.length&&Jr(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=_[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]=_[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()}}const eo=new Set(["opacity","clipPath","filter","transform"]);function to(e,t,n){if(e==null)return[];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).filter(s=>s!=null)}const ls=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function no(e){return qs(e)&&"offsetHeight"in e}const{schedule:so}=Rn(queueMicrotask,!1),io={y:!1};function ro(){return io.y}function fs(e,t){const n=to(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function oo(e){return!(e.pointerType==="touch"||ro())}function ao(e,t,n={}){const[s,i,r]=fs(e,n);return s.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",p)},d=y=>{l&&(l(y),l=void 0),u()},f=y=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,d(y))},h=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}d(y)}},b=y=>{if(!oo(y))return;c=!1;const g=t(o,y);typeof g=="function"&&(l=g,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",b,i),o.addEventListener("pointerdown",h,i)}),r}const ds=(e,t)=>t?e===t?!0:ds(e,t.parentElement):!1,uo=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,co=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lo(e){return co.has(e.tagName)||e.isContentEditable===!0}const Ae=new WeakSet;function Jt(e){return t=>{t.key==="Enter"&&e(t)}}function $e(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fo=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Jt(()=>{if(Ae.has(n))return;$e(n,"down");const i=Jt(()=>{$e(n,"up")}),r=()=>$e(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 Qt(e){return uo(e)&&!0}const en=new WeakSet;function ho(e,t,n={}){const[s,i,r]=fs(e,n),o=a=>{const c=a.currentTarget;if(!Qt(a)||en.has(a))return;Ae.add(c),n.stopPropagation&&en.add(a);const l=t(c,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ae.has(c)&&Ae.delete(c),Qt(h)&&typeof l=="function"&&l(h,{success:p})},d=h=>{u(h,c===window||c===document||n.useGlobalTarget||ds(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),no(a)&&(a.addEventListener("focus",l=>fo(l,i)),!lo(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const po=[...as,F,B],mo=e=>po.find(os(e)),tn=()=>({min:0,max:0}),hs=()=>({x:tn(),y:tn()}),go=new WeakMap;function ke(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function he(e){return typeof e=="string"||Array.isArray(e)}const At=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mt=["initial",...At];function Ee(e){return ke(e.animate)||Mt.some(t=>he(e[t]))}function ps(e){return!!(Ee(e)||e.variants)}function yo(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,Oe(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,Oe(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const ct={current:null},ms={current:!1},bo=typeof window<"u";function To(){if(ms.current=!0,!!bo)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ct.current=e.matches;e.addEventListener("change",t),t()}else ct.current=!1}const nn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let De={};function gs(e){De=e}function vo(){return De}class wo{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=wt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=E.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Ee(n),this.isVariantNode=ps(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&I(p)&&p.set(l[h])}}mount(t){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,go.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ms.current||To(),this.shouldReduceMotion=ct.current),process.env.NODE_ENV!=="production"&&Sn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ue(this.notifyUpdate),Ue(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){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&eo.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,d=new Zn({element:this.current,name:t,keyframes:a,times:c,ease:l,duration:K(u)}),f=o(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const s=re.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&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 De){const n=De[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):hs()}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<nn.length;s++){const i=nn[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=yo(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=Oe(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"&&(gn(s)||yn(s))?s=parseFloat(s):!mo(s)&&B.test(n)&&(s=cs(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=St(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 vn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){so.render(this.render)}}class ys extends wo{constructor(){super(...arguments),this.KeyframeResolver=Qr}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[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}`)}))}}class oe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function So({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function xo(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 Vo(e,t){return So(xo(e.getBoundingClientRect(),t))}const Ao={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mo=ie.length;function Co(e,t,n){let s="",i=!0;for(let r=0;r<Mo;r++){const o=ie[r],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const l=parseFloat(a);c=o.startsWith("scale")?l===1:l===0}if(!c||n){const l=ls(a,Vt[o]);if(!c){i=!1;const u=Ao[o]||o;s+=`${u}(${l}) `}n&&(t[o]=l)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Ct(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(re.has(c)){o=!0;continue}else if(kn(c)){i[c]=l;continue}else{const u=ls(l,Vt[c]);c.startsWith("origin")?(a=!0,r[c]=u):s[c]=u}}if(t.transform||(o||n?s.transform=Co(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}`}}function bs(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 sn(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ue={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(m.test(e))e=parseFloat(e);else return e;const n=sn(e,t.target.x),s=sn(e,t.target.y);return`${n}% ${s}%`}},Po={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=B.parse(e);if(i.length>5)return s;const r=B.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=c;const l=ye(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),r(i)}},Fo={borderRadius:{...ue,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomLeftRadius:ue,borderBottomRightRadius:ue,boxShadow:Po};function Ts(e,{layout:t,layoutId:n}){return re.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fo[e]||e==="opacity")}function Pt(e,t,n){var o;const s=e.style,i=t==null?void 0:t.style,r={};if(!s)return r;for(const a in s)(I(s[a])||i&&I(i[a])||Ts(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function Oo(e){return window.getComputedStyle(e)}class Do extends ys{constructor(){super(...arguments),this.type="html",this.renderInstance=bs}readValueFromInstance(t,n){var s;if(re.has(n))return(s=this.projection)!=null&&s.isProjecting?Qe(n):Zi(t,n);{const i=Oo(t),r=(kn(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Vo(t,n)}build(t,n,s){Ct(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Pt(t,n,s)}}const Ro={offset:"stroke-dashoffset",array:"stroke-dasharray"},Io={offset:"strokeDashoffset",array:"strokeDasharray"};function ko(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?Ro:Io;e[r.offset]=`${-s}`,e[r.array]=`${t} ${n}`}const Eo=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function vs(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(Ct(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);for(const h of Eo)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&ko(d,i,r,o,!1)}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"]),Ss=e=>typeof e=="string"&&e.toLowerCase()==="svg";function No(e,t,n,s){bs(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(ws.has(i)?i:xt(i),t.attrs[i])}function xs(e,t,n){const s=Pt(e,t,n);for(const i in e)if(I(e[i])||I(t[i])){const r=ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}class Bo extends ys{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hs}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(re.has(n)){const s=us(n);return s&&s.default||0}return n=ws.has(n)?n:xt(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return xs(t,n,s)}build(t,n,s){vs(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){No(t,n,s,i)}mount(t){this.isSVGTag=Ss(t.tagName),super.mount(t)}}const Lo=Mt.length;function Vs(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Vs(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=Mt[n],i=e.props[s];(he(i)||i===!1)&&(t[s]=i)}return t}function As(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 Ko=[...At].reverse(),jo=At.length;function Wo(e){return t=>Promise.all(t.map(({animation:n,options:s})=>$r(e,n,s)))}function $o(e){let t=Wo(e),n=rn(),s=!0;const i=c=>(l,u)=>{var f;const d=te(e,u,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...b}=d;l={...l,...b,...p}}return l};function r(c){t=c(e)}function o(c){const{props:l}=e,u=Vs(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<jo;y++){const g=Ko[y],S=n[g],T=l[g]!==void 0?l[g]:u[g],V=he(T),v=g===c?S.isActive:null;v===!1&&(p=y);let A=T===u[g]&&T!==l[g]&&V;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...h},!S.isActive&&v===null||!T&&!S.prevProp||ke(T)||typeof T=="boolean")continue;if(g==="exit"&&S.isActive&&v!==!0){S.prevResolvedValues&&(h={...h,...S.prevResolvedValues});continue}const C=Go(S.prevProp,T);let x=C||g===c&&S.isActive&&!A&&V||y>p&&V,D=!1;const R=Array.isArray(T)?T:[T];let j=R.reduce(i(g),{});v===!1&&(j={});const{prevResolvedValues:be={}}=S,Te={...be,...j},ve=O=>{x=!0,f.has(O)&&(D=!0,f.delete(O)),S.needsAnimating[O]=!0;const P=e.getValue(O);P&&(P.liveStyle=!1)};for(const O in Te){const P=j[O],W=be[O];if(h.hasOwnProperty(O))continue;let Z=!1;rt(P)&&rt(W)?Z=!As(P,W):Z=P!==W,Z?P!=null?ve(O):f.add(O):P!==void 0&&f.has(O)?ve(O):S.protectedKeys[O]=!0}S.prevProp=T,S.prevResolvedValues=j,S.isActive&&(h={...h,...j}),s&&e.blockInitialAnimation&&(x=!1);const we=A&&C;x&&(!we||D)&&d.push(...R.map(O=>{const P={type:g};if(typeof O=="string"&&s&&!we&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,Z=te(W,O);if(W.enteringChildren&&Z){const{delayChildren:Es}=Z.transition||{};P.delay=Qn(W.enteringChildren,e,Es)}}return{animation:O,options:P}}))}if(f.size){const y={};if(typeof l.initial!="boolean"){const g=te(e,Array.isArray(l.initial)?l.initial[0]:l.initial);g&&g.transition&&(y.transition=g.transition)}f.forEach(g=>{const S=e.getBaseTarget(g),T=e.getValue(g);T&&(T.liveStyle=!0),y[g]=S??null}),d.push({animation:y})}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=rn()}}}function Go(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!As(t,e):!1}function U(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rn(){return{animate:U(!0),whileInView:U(),whileHover:U(),whileTap:U(),whileDrag:U(),whileFocus:U(),exit:U()}}function on(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function _o(e){return I(e)?e.get():e}const Ms=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ft=w.createContext({strict:!1}),an={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let un=!1;function Ho(){if(un)return;const e={};for(const t in an)e[t]={isEnabled:n=>an[t].some(s=>!!n[s])};gs(e),un=!0}function Cs(){return Ho(),vo()}function cn(e){const t=Cs();for(const n in e)t[n]={...t[n],...e[n]};gs(t)}function Uo({children:e,features:t,strict:n=!1}){const[,s]=w.useState(!Ge(t)),i=w.useRef(void 0);if(!Ge(t)){const{renderer:r,...o}=t;i.current=r,cn(o)}return w.useEffect(()=>{Ge(t)&&t().then(({renderer:r,...o})=>{cn(o),i.current=r,s(!0)})},[]),k.jsx(Ft.Provider,{value:{renderer:i.current,strict:n},children:e})}function Ge(e){return typeof e=="function"}const zo=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","propagate","ignoreStrict","viewport"]);function Re(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zo.has(e)}let Ps=e=>!Re(e);function qo(e){typeof e=="function"&&(Ps=t=>t.startsWith("on")?!Re(t):e(t))}try{qo(require("@emotion/is-prop-valid").default)}catch{}function Yo(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ps(i)||n===!0&&Re(i)||!t&&!Re(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Ne=w.createContext({});function Xo(e,t){if(Ee(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 Zo(e){const{initial:t,animate:n}=Xo(e,w.useContext(Ne));return w.useMemo(()=>({initial:t,animate:n}),[ln(t),ln(n)])}function ln(e){return Array.isArray(e)?e.join(" "):e}const Ot=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fs(e,t,n){for(const s in t)!I(t[s])&&!Ts(s,n)&&(e[s]=t[s])}function Jo({transformTemplate:e},t){return w.useMemo(()=>{const n=Ot();return Ct(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Qo(e,t){const n=e.style||{},s={};return Fs(s,n,e),Object.assign(s,Jo(e,t)),s}function ea(e,t){const n={},s=Qo(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 Os=()=>({...Ot(),attrs:{}});function ta(e,t,n,s){const i=w.useMemo(()=>{const r=Os();return vs(r,t,Ss(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};Fs(r,e.style,e),i.style={...r,...i.style}}return i}const na=["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 Dt(e){return typeof e!="string"||e.includes("-")?!1:!!(na.indexOf(e)>-1||/[A-Z]/u.test(e))}function sa(e,t,n,{latestValues:s},i,r=!1,o){const c=(o??Dt(e)?ta:ea)(t,s,i,e),l=Yo(t,typeof e=="string",r),u=e!==w.Fragment?{...l,...c,ref:n}:{},{children:d}=t,f=w.useMemo(()=>I(d)?d.get():d,[d]);return w.createElement(e,{...u,children:f})}function ia({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:ra(n,s,i,e),renderState:t()}}function ra(e,t,n,s){const i={},r=s(e,{});for(const f in r)i[f]=_o(r[f]);let{initial:o,animate:a}=e;const c=Ee(e),l=ps(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"&&!ke(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=St(e,f[h]);if(p){const{transitionEnd:b,transition:y,...g}=p;for(const S in g){let T=g[S];if(Array.isArray(T)){const V=u?T.length-1:0;T=T[V]}T!==null&&(i[S]=T)}for(const S in b)i[S]=b[S]}}}return i}const Ds=e=>(t,n)=>{const s=w.useContext(Ne),i=w.useContext(mn),r=()=>ia(e,t,s,i);return n?r():_s(r)},oa=Ds({scrapeMotionValuesFromProps:Pt,createRenderState:Ot}),aa=Ds({scrapeMotionValuesFromProps:xs,createRenderState:Os}),ua=Symbol.for("motionComponentSymbol");function ca(e,t,n){const s=w.useRef(n);w.useInsertionEffect(()=>{s.current=n});const i=w.useRef(null);return w.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r)),t&&(r?t.mount(r):t.unmount());const o=s.current;if(typeof o=="function")if(r){const c=o(r);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[t])}const la=w.createContext({});function fa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function da(e,t,n,s,i,r){var T,V;const{visualElement:o}=w.useContext(Ne),a=w.useContext(Ft),c=w.useContext(mn),l=w.useContext(Ms),u=l.reducedMotion,d=l.skipAnimations,f=w.useRef(null),h=w.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:r}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,b=w.useContext(la);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&ha(f.current,n,i,b);const y=w.useRef(!1);w.useInsertionEffect(()=>{p&&y.current&&p.update(n,c)});const g=n[is],S=w.useRef(!!g&&!((T=window.MotionHandoffIsComplete)!=null&&T.call(window,g))&&((V=window.MotionHasOptimisedAnimation)==null?void 0:V.call(window,g)));return Hs(()=>{h.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),S.current&&p.animationState&&p.animationState.animateChanges())}),w.useEffect(()=>{p&&(!S.current&&p.animationState&&p.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,g)}),S.current=!1),p.enteringChildren=void 0)}),p}function ha(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&&fa(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 pa(e,{forwardMotionProps:t=!1,type:n}={},s,i){const r=n?n==="svg":Dt(e),o=r?aa:oa;function a(l,u){let d;const f={...w.useContext(Ms),...l,layoutId:ma(l)},{isStatic:h}=f,p=Zo(l),b=o(l,h);if(!h&&pn){ga(f,s);const y=ya(f);d=y.MeasureLayout,p.visualElement=da(e,b,f,i,y.ProjectionNode,r)}return k.jsxs(Ne.Provider,{value:p,children:[d&&p.visualElement?k.jsx(d,{visualElement:p.visualElement,...f}):null,sa(e,l,ca(b,p.visualElement,u),b,h,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(a);return c[ua]=e,c}function ma({layoutId:e}){const t=w.useContext(Gs).id;return t&&e!==void 0?t+"-"+e:e}function ga(e,t){w.useContext(Ft).strict,process.env.NODE_ENV}function ya(e){const t=Cs(),{drag:n,layout:s}=t;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const ba=(e,t)=>t.isSVG??Dt(e)?new Bo(t):new Do(t,{allowProjection:e!==w.Fragment});class Ta extends oe{constructor(t){super(t),t.animationState||(t.animationState=$o(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ke(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 va=0;class wa extends oe{constructor(){super(...arguments),this.id=va++}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 Sa={animation:{Feature:Ta},exit:{Feature:wa}};function Is(e){return{point:{x:e.pageX,y:e.pageY}}}function fn(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&&L.postRender(()=>r(t,Is(t)))}class xa extends oe{mount(){const{current:t}=this.node;t&&(this.unmount=ao(t,(n,s)=>(fn(this.node,s,"Start"),i=>fn(this.node,i,"End"))))}unmount(){}}class Va extends oe{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=Ie(on(this.node.current,"focus",()=>this.onFocus()),on(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dn(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&&L.postRender(()=>r(t,Is(t)))}class Aa extends oe{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=ho(t,(i,r)=>(dn(this.node,r,"Start"),(o,{success:a})=>dn(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const lt=new WeakMap,_e=new WeakMap,Ma=e=>{const t=lt.get(e.target);t&&t(e)},Ca=e=>{e.forEach(Ma)};function Pa({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(Ca,{root:e,...t})),s[i]}function Fa(e,t,n){const s=Pa(t);return lt.set(e,n),s.observe(e),()=>{lt.delete(e),s.unobserve(e)}}const Oa={some:0,all:1};class Da extends oe{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:Oa[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 Fa(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 Ia={inView:{Feature:Da},tap:{Feature:Aa},focus:{Feature:Va},hover:{Feature:xa}},ka={renderer:ba,...Sa,...Ia};function Ea(e,t){return pa(e,t)}const Na=Ea("div"),Ba={light:{shadow:"2"},dark:{}},ks=w.createContext({groupOpen:!1,setGroupOpen:()=>{}}),La=({open:e,delay:t=600})=>{const n=w.useContext(ks);return w.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}},Ka=({children:e})=>{const[t,n]=w.useState(!1);return k.jsx(ks.Provider,{value:{groupOpen:t,setGroupOpen:n},children:e})},ja=({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:p,collisionBoundary:b,collisionPadding:y,arrowPadding:g,sticky:S,hideWhenDetached:T,skipAnimation:V,label:v,labelProps:A,enabled:C=!0,appearance:x="dark",triggerRef:D,children:R})=>{const[j,be]=Bs.useControllableState({prop:i,onChange:r,defaultProp:s??!1}),{groupOpen:Te}=La({open:!!j,delay:e}),ve=w.Children.toArray(R).some(P=>w.isValidElement(P)?P.props.disabled:!1),we=Te||ve?0:e,Rt=!Te,O=P=>{if(P==="top")return{y:-5};if(P==="bottom")return{y:5};if(P==="left")return{x:-5};if(P==="right")return{x:5}};return k.jsx(Uo,{features:ka,children:k.jsx(ae.Provider,{delayDuration:we,skipDelayDuration:t,disableHoverableContent:n,children:k.jsxs(ae.Root,{open:C===!1?!1:j,onOpenChange:be,children:[k.jsx(ae.Trigger,{asChild:!0,ref:D,children:k.jsx(Ks.RefToTgphRef,{children:R})}),k.jsx(ae.Portal,{children:k.jsx(ae.Content,{"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:c,forceMount:l,side:u,sideOffset:d,align:f,alignOffset:h,avoidCollisions:p,collisionBoundary:b,collisionPadding:y,arrowPadding:g,sticky:S,hideWhenDetached:T,style:{zIndex:"var(--tgph-zIndex-tooltip)"},children:k.jsx(Ls.OverrideAppearance,{appearance:x,asChild:!0,children:k.jsx(js.Stack,{as:Na,className:"tgph",initial:Rt&&!V?{opacity:0,scale:.5,...O(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)"},...A?{labelProps:A}:{},...Ba[x],children:typeof v=="string"?k.jsx(Ws.Text,{as:"span",size:"1",children:v}):v})})})})]})})})};exports.Tooltip=ja;exports.TooltipGroupProvider=Ka;
2
2
  //# sourceMappingURL=index.js.map