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