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