@telegraph/tag 0.1.5 → 0.2.1

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