@telegraph/modal 0.0.86 → 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 +24 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Modal/Modal.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @telegraph/modal
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#524](https://github.com/knocklabs/telegraph/pull/524) [`fd14d50`](https://github.com/knocklabs/telegraph/commit/fd14d509c3f3f76eafc07d08c73e30db79255a2e) Thanks [@kylemcd](https://github.com/kylemcd)! - bump packages to get tokens upgrades
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`fd14d50`](https://github.com/knocklabs/telegraph/commit/fd14d509c3f3f76eafc07d08c73e30db79255a2e)]:
|
|
10
|
+
- @telegraph/button@0.1.1
|
|
11
|
+
- @telegraph/icon@0.2.1
|
|
12
|
+
- @telegraph/layout@0.2.1
|
|
13
|
+
- @telegraph/style-engine@0.1.15
|
|
14
|
+
|
|
15
|
+
## 0.1.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#519](https://github.com/knocklabs/telegraph/pull/519) [`aa0df27`](https://github.com/knocklabs/telegraph/commit/aa0df2714578f411fd7c80ce3610713d6e77d053) Thanks [@ksorathia](https://github.com/ksorathia)! - Standardize spacing and style across primitives.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`aa0df27`](https://github.com/knocklabs/telegraph/commit/aa0df2714578f411fd7c80ce3610713d6e77d053)]:
|
|
24
|
+
- @telegraph/button@0.1.0
|
|
25
|
+
- @telegraph/icon@0.2.0
|
|
26
|
+
|
|
3
27
|
## 0.0.86
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),js=require("@radix-ui/react-dialog"),T=require("react"),Ks=require("react-dom"),Ws=require("@radix-ui/react-focus-scope"),_s=require("@radix-ui/react-portal"),$s=require("@radix-ui/react-visually-hidden"),Us=require("@telegraph/button"),zs=require("@telegraph/helpers"),H=require("@telegraph/layout"),Gs=require("lucide-react");function pe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Q=pe(js),v=pe(T),Hs=pe(Ks),qs=pe(_s),Ys=pe($s);function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Lt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mn(...e){return t=>{let n=!1;const s=e.map(i=>{const r=Lt(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Lt(e[i],null)}}}}function gn(...e){return v.useCallback(mn(...e),e)}function Xs(e){const t=Zs(e),n=v.forwardRef((s,i)=>{const{children:r,...o}=s,a=v.Children.toArray(r),l=a.find(Qs);if(l){const u=l.props.children,c=a.map(d=>d===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:d);return A.jsx(t,{...o,ref:i,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return A.jsx(t,{...o,ref:i,children:r})});return n.displayName=`${e}.Slot`,n}function Zs(e){const t=v.forwardRef((n,s)=>{const{children:i,...r}=n;if(v.isValidElement(i)){const o=ti(i),a=ei(r,i.props);return i.type!==v.Fragment&&(a.ref=s?mn(s,o):o),v.cloneElement(i,a)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Js=Symbol("radix.slottable");function Qs(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Js}function ei(e,t){const n={...t};for(const s in t){const i=e[s],r=t[s];/^on[A-Z]/.test(s)?i&&r?n[s]=(...a)=>{const l=r(...a);return i(...a),l}:i&&(n[s]=i):s==="style"?n[s]={...i,...r}:s==="className"&&(n[s]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function ti(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ni=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yn=ni.reduce((e,t)=>{const n=Xs(`Primitive.${t}`),s=v.forwardRef((i,r)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(l,{...a,ref:r})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function si(e,t){e&&Hs.flushSync(()=>e.dispatchEvent(t))}function ct(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function ii(e,t=globalThis==null?void 0:globalThis.document){const n=ct(e);v.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var ri="DismissableLayer",$e="dismissableLayer.update",oi="dismissableLayer.pointerDownOutside",ai="dismissableLayer.focusOutside",It,bn=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vn=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:r,onInteractOutside:o,onDismiss:a,...l}=e,u=v.useContext(bn),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),g=gn(t,V=>d(V)),y=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(w),C=c?y.indexOf(c):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=p,x=li(V=>{const S=V.target,R=[...u.branches].some(F=>F.contains(S));!P||R||(i==null||i(V),o==null||o(V),V.defaultPrevented||a==null||a())},f),M=fi(V=>{const S=V.target;[...u.branches].some(F=>F.contains(S))||(r==null||r(V),o==null||o(V),V.defaultPrevented||a==null||a())},f);return ii(V=>{C===u.layers.size-1&&(s==null||s(V),!V.defaultPrevented&&a&&(V.preventDefault(),a()))},f),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(It=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),kt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=It)}},[c,f,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),kt())},[c,u]),v.useEffect(()=>{const V=()=>h({});return document.addEventListener($e,V),()=>document.removeEventListener($e,V)},[]),A.jsx(yn.div,{...l,ref:g,style:{pointerEvents:m?P?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,x.onPointerDownCapture)})});vn.displayName=ri;var ci="DismissableLayerBranch",ui=v.forwardRef((e,t)=>{const n=v.useContext(bn),s=v.useRef(null),i=gn(t,s);return v.useEffect(()=>{const r=s.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),A.jsx(yn.div,{...e,ref:i})});ui.displayName=ci;function li(e,t=globalThis==null?void 0:globalThis.document){const n=ct(e),s=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const r=a=>{if(a.target&&!s.current){let l=function(){Tn(oi,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function fi(e,t=globalThis==null?void 0:globalThis.document){const n=ct(e),s=v.useRef(!1);return v.useEffect(()=>{const i=r=>{r.target&&!s.current&&Tn(ai,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function kt(){const e=new CustomEvent($e);document.dispatchEvent(e)}function Tn(e,t,n,{discrete:s}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?si(i,r):i.dispatchEvent(r)}var di=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},hi=v[" useInsertionEffect ".trim().toString()]||di;function pi({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,r,o]=mi({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const c=v.useRef(e!==void 0);v.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${s} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,s])}const u=v.useCallback(c=>{var d;if(a){const f=gi(c)?c(e):c;f!==e&&((d=o.current)==null||d.call(o,f))}else r(c)},[a,e,r,o]);return[l,u]}function mi({defaultProp:e,onChange:t}){const[n,s]=v.useState(e),i=v.useRef(n),r=v.useRef(t);return hi(()=>{r.current=t},[t]),v.useEffect(()=>{var o;i.current!==n&&((o=r.current)==null||o.call(r,n),i.current=n)},[n,i]),[n,s,r]}function gi(e){return typeof e=="function"}const yi=T.createContext({});function bi(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const ut=typeof window<"u",vi=ut?T.useLayoutEffect:T.useEffect,wn=T.createContext(null);function Ti(e,t){e.indexOf(t)===-1&&e.push(t)}function wi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const q=(e,t,n)=>n>t?t:n<e?e:n;let me=()=>{},Y=()=>{};process.env.NODE_ENV!=="production"&&(me=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Y=(e,t)=>{if(!e)throw new Error(t)});const K={},xn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xi(e){return typeof e=="object"&&e!==null}const Sn=e=>/^0[^.\s]+$/u.test(e);function lt(e){let t;return()=>(t===void 0&&(t=e()),t)}const ne=e=>e,Si=(e,t)=>n=>t(e(n)),Pe=(...e)=>e.reduce(Si),Vn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Cn{constructor(){this.subscriptions=[]}add(t){return Ti(this.subscriptions,t),()=>wi(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,j=e=>e/1e3;function An(e,t){return t?e*(1e3/t):0}const Nt=new Set;function Mn(e,t,n){e||Nt.has(t)||(console.warn(t),Nt.add(t))}const Pn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Vi=1e-7,Ci=12;function Ai(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=Pn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Vi&&++a<Ci);return o}function ge(e,t,n,s){if(e===t&&n===s)return ne;const i=r=>Ai(r,0,1,e,n);return r=>r===0||r===1?r:Pn(i(r),t,s)}const En=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Dn=e=>t=>1-e(1-t),Rn=ge(.33,1.53,.69,.99),ft=Dn(Rn),Fn=En(ft),On=e=>(e*=2)<1?.5*ft(e):.5*(2-Math.pow(2,-10*(e-1))),dt=e=>1-Math.sin(Math.acos(e)),Mi=Dn(dt),Ln=En(dt),Pi=ge(.42,0,1,1),Ei=ge(0,0,.58,1),In=ge(.42,0,.58,1),Di=e=>Array.isArray(e)&&typeof e[0]!="number",kn=e=>Array.isArray(e)&&typeof e[0]=="number",Bt={linear:ne,easeIn:Pi,easeInOut:In,easeOut:Ei,circIn:dt,circInOut:Ln,circOut:Mi,backIn:ft,backInOut:Fn,backOut:Rn,anticipate:On},Ri=e=>typeof e=="string",jt=e=>{if(kn(e)){Y(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,s,i]=e;return ge(t,n,s,i)}else if(Ri(e))return Y(Bt[e]!==void 0,`Invalid easing type '${e}'`),Bt[e];return e},be=["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 l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const g=f&&i?n:s;return d&&o.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const Oi=40;function Nn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=be.reduce((m,P)=>(m[P]=Fi(r),m),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:g}=o,y=()=>{const m=K.useManualTiming?i.timestamp:performance.now();n=!1,K.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(m-i.timestamp,Oi),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),g.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},w=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:be.reduce((m,P)=>{const x=o[P];return m[P]=(M,V=!1,S=!1)=>(n||w(),x.schedule(M,V,S)),m},{}),cancel:m=>{for(let P=0;P<be.length;P++)o[be[P]].cancel(m)},state:i,steps:o}}const{schedule:k,cancel:Ue,state:xe}=Nn(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let Te;function Li(){Te=void 0}const I={now:()=>(Te===void 0&&I.set(xe.isProcessing||K.useManualTiming?xe.timestamp:performance.now()),Te),set:e=>{Te=e,queueMicrotask(Li)}},Bn=e=>t=>typeof t=="string"&&t.startsWith(e),jn=Bn("--"),Ii=Bn("var(--"),ht=e=>Ii(e)?ki.test(e.split("/*")[0].trim()):!1,ki=/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=>q(0,1,e)},ve={...se,default:1},ue=e=>Math.round(e*1e5)/1e5,pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ni(e){return e==null}const Bi=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(e,t)=>n=>!!(typeof n=="string"&&Bi.test(n)&&n.startsWith(e)||t&&!Ni(n)&&Object.prototype.hasOwnProperty.call(n,t)),Kn=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(pt);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ji=e=>q(0,255,e),ke={...se,transform:e=>Math.round(ji(e))},$={test:mt("rgb","red"),parse:Kn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ke.transform(e)+", "+ke.transform(t)+", "+ke.transform(n)+", "+ue(le.transform(s))+")"};function Ki(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ze={test:mt("#"),parse:Ki,transform:$.transform},ye=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),W=ye("deg"),ee=ye("%"),b=ye("px"),Wi=ye("vh"),_i=ye("vw"),Kt={...ee,parse:e=>ee.parse(e)/100,transform:e=>ee.transform(e*100)},Z={test:mt("hsl","hue"),parse:Kn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ee.transform(ue(t))+", "+ee.transform(ue(n))+", "+ue(le.transform(s))+")"},D={test:e=>$.test(e)||ze.test(e)||Z.test(e),parse:e=>$.test(e)?$.parse(e):Z.test(e)?Z.parse(e):ze.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$.transform(e):Z.transform(e),getAnimatableNone:e=>{const t=D.parse(e);return t.alpha=0,D.transform(t)}},$i=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ui(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pt))==null?void 0:t.length)||0)+(((n=e.match($i))==null?void 0:n.length)||0)>0}const Wn="number",_n="color",zi="var",Gi="var(",Wt="${}",Hi=/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(Hi,l=>(D.test(l)?(s.color.push(r),i.push(_n),n.push(D.parse(l))):l.startsWith(Gi)?(s.var.push(r),i.push(zi),n.push(l)):(s.number.push(r),i.push(Wn),n.push(parseFloat(l))),++r,Wt)).split(Wt);return{values:n,split:a,indexes:s,types:i}}function $n(e){return fe(e).values}function Un(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===Wn?r+=ue(i[o]):a===_n?r+=D.transform(i[o]):r+=i[o]}return r}}const qi=e=>typeof e=="number"?0:D.test(e)?D.getAnimatableNone(e):e;function Yi(e){const t=$n(e);return Un(e)(t.map(qi))}const ie={test:Ui,parse:$n,createTransformer:Un,getAnimatableNone:Yi};function Ne(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xi({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,l=2*n-a;i=Ne(l,a,e+1/3),r=Ne(l,a,e),o=Ne(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Se(e,t){return n=>n>0?t:e}const Ee=(e,t,n)=>e+(t-e)*n,Be=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Zi=[ze,$,Z],Ji=e=>Zi.find(t=>t.test(e));function _t(e){const t=Ji(e);if(me(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Z&&(n=Xi(n)),n}const $t=(e,t)=>{const n=_t(e),s=_t(t);if(!n||!s)return Se(e,t);const i={...n};return r=>(i.red=Be(n.red,s.red,r),i.green=Be(n.green,s.green,r),i.blue=Be(n.blue,s.blue,r),i.alpha=Ee(n.alpha,s.alpha,r),$.transform(i))},Ge=new Set(["none","hidden"]);function Qi(e,t){return Ge.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function er(e,t){return n=>Ee(e,t,n)}function gt(e){return typeof e=="number"?er:typeof e=="string"?ht(e)?Se:D.test(e)?$t:sr:Array.isArray(e)?zn:typeof e=="object"?D.test(e)?$t:tr:Se}function zn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>gt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function tr(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=gt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function nr(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 sr=(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?Ge.has(e)&&!i.values.length||Ge.has(t)&&!s.values.length?Qi(e,t):Pe(zn(nr(s,i),i.values),n):(me(!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.`),Se(e,t))};function Gn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ee(e,t,n):gt(e)(e,t)}const ir=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>k.update(t,n),stop:()=>Ue(t),now:()=>xe.isProcessing?xe.timestamp:I.now()}},Hn=(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)})`},Ve=2e4;function yt(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ve;)t+=n,s=e.next(t);return t>=Ve?1/0:t}function rr(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(yt(s),Ve);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:j(i)}}const or=5;function qn(e,t,n){const s=Math.max(t-or,0);return An(n-e(s),t-s)}const E={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},je=.001;function ar({duration:e=E.duration,bounce:t=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r;me(e<=N(E.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=q(E.minDamping,E.maxDamping,o),e=q(E.minDuration,E.maxDuration,j(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,h=He(u,o),g=Math.exp(-d);return je-f/h*g},r=u=>{const d=u*o*e,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-d),y=He(Math.pow(u,2),o);return(-i(u)+je>0?-1:1)*((f-h)*g)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-je+c*d},r=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=ur(i,r,a);if(e=N(e),isNaN(l))return{stiffness:E.stiffness,damping:E.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const cr=12;function ur(e,t,n){let s=n;for(let i=1;i<cr;i++)s=s-e(s)/t(s);return s}function He(e,t){return e*Math.sqrt(1-t*t)}const lr=["duration","bounce"],fr=["stiffness","damping","mass"];function Ut(e,t){return t.some(n=>e[n]!==void 0)}function dr(e){let t={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...e};if(!Ut(e,fr)&&Ut(e,lr))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*q(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:E.mass,stiffness:i,damping:r}}else{const n=ar(e);t={...t,...n,mass:E.mass},t.isResolvedFromDuration=!0}return t}function Ce(e=E.visualDuration,t=E.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:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=dr({...n,velocity:-j(n.velocity||0)}),g=f||0,y=u/(2*Math.sqrt(l*c)),w=o-r,p=j(Math.sqrt(l/c)),C=Math.abs(w)<5;s||(s=C?E.restSpeed.granular:E.restSpeed.default),i||(i=C?E.restDelta.granular:E.restDelta.default);let m;if(y<1){const x=He(p,y);m=M=>{const V=Math.exp(-y*p*M);return o-V*((g+y*p*w)/x*Math.sin(x*M)+w*Math.cos(x*M))}}else if(y===1)m=x=>o-Math.exp(-p*x)*(w+(g+p*w)*x);else{const x=p*Math.sqrt(y*y-1);m=M=>{const V=Math.exp(-y*p*M),S=Math.min(x*M,300);return o-V*((g+y*p*w)*Math.sinh(S)+x*w*Math.cosh(S))/x}}const P={calculatedDuration:h&&d||null,next:x=>{const M=m(x);if(h)a.done=x>=d;else{let V=x===0?g:0;y<1&&(V=x===0?N(g):qn(m,x,M));const S=Math.abs(V)<=s,R=Math.abs(o-M)<=i;a.done=S&&R}return a.value=a.done?o:M,a},toString:()=>{const x=Math.min(yt(P),Ve),M=Hn(V=>P.next(x*V).value,x,30);return x+"ms "+M},toTransition:()=>{}};return P}Ce.applyToOptions=e=>{const t=rr(e,100,Ce);return e.ease=t.ease,e.duration=N(t.duration),e.type="keyframes",e};function qe({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=S=>a!==void 0&&S<a||l!==void 0&&S>l,g=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let y=n*t;const w=d+y,p=o===void 0?w:o(w);p!==w&&(y=p-d);const C=S=>-y*Math.exp(-S/s),m=S=>p+C(S),P=S=>{const R=C(S),F=m(S);f.done=Math.abs(R)<=u,f.value=f.done?p:F};let x,M;const V=S=>{h(f.value)&&(x=S,M=Ce({keyframes:[f.value,g(f.value)],velocity:qn(m,S,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:S=>{let R=!1;return!M&&x===void 0&&(R=!0,P(S),V(S)),x!==void 0&&S>=x?M.next(S-x):(!R&&P(S),f)}}}function hr(e,t,n){const s=[],i=n||K.mix||Gn,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||ne:t;a=Pe(l,a)}s.push(a)}return s}function pr(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"),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=hr(t,s,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=Vn(e[d],e[d+1],c);return a[d](f)};return n?c=>u(q(e[0],e[r-1],c)):u}function mr(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Vn(0,t,s);e.push(Ee(n,1,i))}}function gr(e){const t=[0];return mr(t,e.length-1),t}function yr(e,t){return e.map(n=>n*t)}function br(e,t){return e.map(()=>t||In).splice(0,e.length-1)}function J({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Di(s)?s.map(jt):jt(s),r={done:!1,value:t[0]},o=yr(n&&n.length===t.length?n:gr(t),e),a=pr(o,t,{ease:Array.isArray(i)?i:br(t,i)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const vr=e=>e!==null;function bt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(vr),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Tr={decay:qe,inertia:qe,tween:J,keyframes:J,spring:Ce};function Yn(e){typeof e.type=="string"&&(e.type=Tr[e.type])}class vt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const wr=e=>e/100;class Tt extends vt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==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;Yn(t);const{type:n=J,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const l=n||J;process.env.NODE_ENV!=="production"&&l!==J&&Y(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),l!==J&&typeof a[0]!="number"&&(this.mixKeyframes=Pe(wr,Gn(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=yt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}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:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:g,onUpdate:y,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-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,P=s;if(d){const S=Math.min(this.currentTime,i)/a;let R=Math.floor(S),F=S%1;!F&&S>=1&&(F=1),F===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(f==="reverse"?(F=1-F,h&&(F-=h/a)):f==="mirror"&&(P=o)),m=q(0,1,F)*a}const x=C?{done:!1,value:c[0]}:P.next(m);r&&(x.value=r(x.value));let{done:M}=x;!C&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return V&&g!==qe&&(x.value=bt(c,this.options,w,this.speed)),y&&y(x.value),V&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return j(this.calculatedDuration)}get time(){return j(this.currentTime)}set time(t){var n;t=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(I.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=j(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=ir,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 xr(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const U=e=>e*180/Math.PI,Ye=e=>{const t=U(Math.atan2(e[1],e[0]));return Xe(t)},Sr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ye,rotateZ:Ye,skewX:e=>U(Math.atan(e[1])),skewY:e=>U(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xe=e=>(e=e%360,e<0&&(e+=360),e),zt=Ye,Gt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ht=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Vr={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=>Xe(U(Math.atan2(e[6],e[5]))),rotateY:e=>Xe(U(Math.atan2(-e[2],e[0]))),rotateZ:zt,rotate:zt,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 Ze(e){return e.includes("scale")?1:0}function Je(e,t){if(!e||e==="none")return Ze(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Vr,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Sr,i=a}if(!i)return Ze(t);const r=s[t],o=i[1].split(",").map(Ar);return typeof r=="function"?r(o):o[r]}const Cr=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Je(n,t)};function Ar(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),qt=e=>e===se||e===b,Mr=new Set(["x","y","z"]),Pr=re.filter(e=>!Mr.has(e));function Er(e){const t=[];return Pr.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})=>Je(t,"x"),y:(e,{transform:t})=>Je(t,"y")};z.translateX=z.x;z.translateY=z.y;const G=new Set;let Qe=!1,et=!1,tt=!1;function Xn(){if(et){const e=Array.from(G).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Er(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}et=!1,Qe=!1,G.forEach(e=>e.complete(tt)),G.clear()}function Zn(){G.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(et=!0)})}function Dr(){tt=!0,Zn(),Xn(),tt=!1}class wt{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(G.add(this),Qe||(Qe=!0,k.read(Zn),k.resolveKeyframes(Xn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}xr(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),G.delete(this)}cancel(){this.state==="scheduled"&&(G.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rr=e=>e.startsWith("--");function Fr(e,t,n){Rr(t)?e.style.setProperty(t,n):e.style[t]=n}const Or=lt(()=>window.ScrollTimeline!==void 0),Lr={};function Ir(e,t){const n=lt(e);return()=>Lr[t]??n()}const Jn=Ir(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ce=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Yt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ce([0,.65,.55,1]),circOut:ce([.55,0,1,.45]),backIn:ce([.31,.01,.66,-.59]),backOut:ce([.33,1.53,.69,.99])};function Qn(e,t){if(e)return typeof e=="function"?Jn()?Hn(e,t):"ease-out":kn(e)?ce(e):Array.isArray(e)?e.map(n=>Qn(n,t)||Yt.easeOut):Yt[e]}function kr(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Qn(a,i);Array.isArray(d)&&(c.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 u&&(f.pseudoElement=u),e.animate(c,f)}function es(e){return typeof e=="function"&&"applyToOptions"in e}function Nr({type:e,...t}){return es(e)&&Jn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Br extends vt{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:l}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Y(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const u=Nr(t);this.animation=kr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=bt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Fr(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return j(Number(t))}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=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&&Or()?(this.animation.timeline=t,ne):n(this)}}const ts={anticipate:On,backInOut:Fn,circInOut:Ln};function jr(e){return e in ts}function Kr(e){typeof e.ease=="string"&&jr(e.ease)&&(e.ease=ts[e.ease])}const Xt=10;class Wr extends Br{constructor(t){Kr(t),Yn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Tt({...o,autoplay:!1}),l=N(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Xt).value,a.sample(l).value,Xt),a.stop()}}const Zt=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ie.test(e)||e==="0")&&!e.startsWith("url("));function _r(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 $r(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=Zt(i,t),a=Zt(r,t);return me(o===a,`You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`),!o||!a?!1:_r(e)||(n==="spring"||es(n))&&s}function ns(e){return xi(e)&&"offsetHeight"in e}const Ur=new Set(["opacity","clipPath","filter","transform"]),zr=lt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gr(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!ns((u=t==null?void 0:t.owner)==null?void 0:u.current))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return zr()&&n&&Ur.has(n)&&(n!=="transform"||!l)&&!a&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Hr=40;class qr extends vt{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var g;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=I.now();const f={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||wt;this.keyframeResolver=new h(a,(y,w,p)=>this.onKeyframesResolved(y,w,f,!p),l,u,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=I.now(),$r(t,r,o,a)||((K.instantAnimations||!l)&&(c==null||c(bt(t,s,n))),t[0]=t[t.length-1],s.duration=0,s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Hr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!u&&Gr(f)?new Wr({...f,element:f.motionValue.owner.current}):new Tt(f);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(),Dr()),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 Yr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xr(e){const t=Yr.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Zr=4;function ss(e,t,n=1){Y(n<=Zr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[s,i]=Xr(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return xn(o)?parseFloat(o):o}return ht(i)?ss(i,t,n+1):i}function is(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const rs=new Set(["width","height","top","left","right","bottom",...re]),Jr={test:e=>e==="auto",parse:e=>e},os=e=>t=>t.test(e),as=[se,b,ee,W,_i,Wi,Jr],Jt=e=>as.find(os(e));function Qr(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Sn(e):!0}const eo=new Set(["brightness","contrast","saturate","opacity"]);function to(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(pt)||[];if(!s)return e;const i=n.replace(s,"");let r=eo.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const no=/\b([a-z-]*)\(.*?\)/gu,nt={...ie,getAnimatableNone:e=>{const t=e.match(no);return t?t.map(to).join(" "):e}},Qt={...se,transform:Math.round},so={rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:ve,scaleX:ve,scaleY:ve,scaleZ:ve,skew:W,skewX:W,skewY:W,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:le,originX:Kt,originY:Kt,originZ:b},xt={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,radius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,top:b,right:b,bottom:b,left:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,backgroundPositionX:b,backgroundPositionY:b,...so,zIndex:Qt,fillOpacity:le,strokeOpacity:le,numOctaves:Qt},io={...xt,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:nt,WebkitFilter:nt},cs=e=>io[e];function us(e,t){let n=cs(e);return n!==nt&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ro=new Set(["auto","none","0"]);function oo(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!ro.has(r)&&fe(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=us(n,i)}class ao extends wt{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),ht(u))){const c=ss(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!rs.has(s)||t.length!==2)return;const[i,r]=t,o=Jt(i),a=Jt(r);if(o!==a)if(qt(o)&&qt(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}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||Qr(t[i]))&&s.push(i);s.length&&oo(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(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function co(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 ls=(e,t)=>t&&typeof e=="number"?t.transform(e):e,en=30,uo=e=>!isNaN(parseFloat(e));class lo{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{var o,a;const r=I.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=I.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uo(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Mn(!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 Cn);const s=this.events[t].add(n);return t==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>en)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,en);return An(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 Ae(e,t){return new lo(e,t)}const{schedule:fo}=Nn(queueMicrotask,!1),ho={y:!1};function po(){return ho.y}function fs(e,t){const n=co(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function tn(e){return!(e.pointerType==="touch"||po())}function mo(e,t,n={}){const[s,i,r]=fs(e,n),o=a=>{if(!tn(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{tn(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const ds=(e,t)=>t?e===t?!0:ds(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.tabIndex!==-1}const we=new WeakSet;function nn(e){return t=>{t.key==="Enter"&&e(t)}}function Ke(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vo=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=nn(()=>{if(we.has(n))return;Ke(n,"down");const i=nn(()=>{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 sn(e){return go(e)&&!0}function To(e,t,n={}){const[s,i,r]=fs(e,n),o=a=>{const l=a.currentTarget;if(!sn(a))return;we.add(l);const u=t(l,a),c=(h,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),we.has(l)&&we.delete(l),sn(h)&&typeof u=="function"&&u(h,{success:g})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||ds(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ns(a)&&(a.addEventListener("focus",u=>vo(u,i)),!bo(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const L=e=>!!(e&&e.getVelocity),wo=[...as,D,ie],xo=e=>wo.find(os(e)),hs=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),St=T.createContext({strict:!1}),rn={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 rn)te[e]={isEnabled:t=>rn[e].some(n=>!!t[n])};function on(e){for(const t in e)te[t]={...te[t],...e[t]}}function So({children:e,features:t,strict:n=!1}){const[,s]=T.useState(!We(t)),i=T.useRef(void 0);if(!We(t)){const{renderer:r,...o}=t;i.current=r,on(o)}return T.useEffect(()=>{We(t)&&t().then(({renderer:r,...o})=>{on(o),i.current=r,s(!0)})},[]),A.jsx(St.Provider,{value:{renderer:i.current,strict:n},children:e})}function We(e){return typeof e=="function"}const Vo=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Me(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Vo.has(e)}let ps=e=>!Me(e);function Co(e){typeof e=="function"&&(ps=t=>t.startsWith("on")?!Me(t):e(t))}try{Co(require("@emotion/is-prop-valid").default)}catch{}function Ao(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(ps(i)||n===!0&&Me(i)||!t&&!Me(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const De=T.createContext({});function Re(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"],Ct=["initial",...Vt];function Fe(e){return Re(e.animate)||Ct.some(t=>de(e[t]))}function ms(e){return!!(Fe(e)||e.variants)}function Mo(e,t){if(Fe(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 Po(e){const{initial:t,animate:n}=Mo(e,T.useContext(De));return T.useMemo(()=>({initial:t,animate:n}),[an(t),an(n)])}function an(e){return Array.isArray(e)?e.join(" "):e}const Eo=Symbol.for("motionComponentSymbol");function gs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Do(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):gs(n)&&(n.current=s))},[t])}const At=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ro="framerAppearId",ys="data-"+At(Ro),Fo=T.createContext({});function Oo(e,t,n,s,i){var y,w;const{visualElement:r}=T.useContext(De),o=T.useContext(St),a=T.useContext(wn),l=T.useContext(hs).reducedMotion,u=T.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=T.useContext(Fo);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Lo(u.current,n,i,d);const f=T.useRef(!1);T.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[ys],g=T.useRef(!!h&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return vi(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),fo.render(c.render),g.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),g.current=!1))}),c}function Lo(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bs(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&gs(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function bs(e){if(e)return e.options.allowProjection!==!1?e.projection:bs(e.parent)}function Io({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:i}){function r(a,l){let u;const c={...T.useContext(hs),...a,layoutId:ko(a)},{isStatic:d}=c,f=Po(a),h=s(a,d);if(!d&&ut){No(c,e);const g=Bo(c);u=g.MeasureLayout,f.visualElement=Oo(i,h,c,t,g.ProjectionNode)}return A.jsxs(De.Provider,{value:f,children:[u&&f.visualElement?A.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,Do(h,f.visualElement,l),h,d,f.visualElement)]})}r.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=T.forwardRef(r);return o[Eo]=i,o}function ko({layoutId:e}){const t=T.useContext(yi).id;return t&&e!==void 0?t+"-"+e:e}function No(e,t){T.useContext(St).strict,process.env.NODE_ENV}function Bo(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}}const jo={};function vs(e,{layout:t,layoutId:n}){return oe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!jo[e]||e==="opacity")}const Ko={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wo=re.length;function _o(e,t,n){let s="",i=!0;for(let r=0;r<Wo;r++){const o=re[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ls(a,xt[o]);if(!l){i=!1;const c=Ko[o]||o;s+=`${c}(${u}) `}n&&(t[o]=u)}}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 l in t){const u=t[l];if(oe.has(l)){o=!0;continue}else if(jn(l)){i[l]=u;continue}else{const c=ls(u,xt[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(t.transform||(o||n?s.transform=_o(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ts(e,t,n){for(const s in t)!L(t[s])&&!vs(s,n)&&(e[s]=t[s])}function $o({transformTemplate:e},t){return T.useMemo(()=>{const n=Pt();return Mt(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Uo(e,t){const n=e.style||{},s={};return Ts(s,n,e),Object.assign(s,$o(e,t)),s}function zo(e,t){const n={},s=Uo(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 Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ho={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?Go:Ho;e[r.offset]=b.transform(-s);const o=b.transform(t),a=b.transform(n);e[r.array]=`${o} ${a}`}function ws(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Mt(e,a,u),l){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=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&qo(d,i,r,o,!1)}const xs=()=>({...Pt(),attrs:{}}),Ss=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Yo(e,t,n,s){const i=T.useMemo(()=>{const r=xs();return ws(r,t,Ss(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};Ts(r,e.style,e),i.style={...r,...i.style}}return i}const Xo=["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 Et(e){return typeof e!="string"||e.includes("-")?!1:!!(Xo.indexOf(e)>-1||/[A-Z]/u.test(e))}function Zo(e=!1){return(n,s,i,{latestValues:r},o)=>{const l=(Et(n)?Yo:zo)(s,r,o,n),u=Ao(s,typeof n=="string",e),c=n!==T.Fragment?{...u,...l,ref:i}:{},{children:d}=s,f=T.useMemo(()=>L(d)?d.get():d,[d]);return T.createElement(n,{...c,children:f})}}function cn(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Dt(e,t,n,s){if(typeof t=="function"){const[i,r]=cn(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]=cn(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function Jo(e){return L(e)?e.get():e}function Qo({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:ea(n,s,i,e),renderState:t()}}const Vs=e=>(t,n)=>{const s=T.useContext(De),i=T.useContext(wn),r=()=>Qo(e,t,s,i);return n?r():bi(r)};function ea(e,t,n,s){const i={},r=s(e,{});for(const f in r)i[f]=Jo(r[f]);let{initial:o,animate:a}=e;const l=Fe(e),u=ms(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Re(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const g=Dt(e,f[h]);if(g){const{transitionEnd:y,transition:w,...p}=g;for(const C in p){let m=p[C];if(Array.isArray(m)){const P=c?m.length-1:0;m=m[P]}m!==null&&(i[C]=m)}for(const C in y)i[C]=y[C]}}}return i}function Rt(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(L(s[o])||t.style&&L(t.style[o])||vs(o,e)||((r=n==null?void 0:n.getValue(o))==null?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const ta={useVisualState:Vs({scrapeMotionValuesFromProps:Rt,createRenderState:Pt})};function Cs(e,t,n){const s=Rt(e,t,n);for(const i in e)if(L(e[i])||L(t[i])){const r=re.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const na={useVisualState:Vs({scrapeMotionValuesFromProps:Cs,createRenderState:xs})};function sa(e,t){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Et(s)?na:ta,preloadedFeatures:e,useRender:Zo(i),createVisualElement:t,Component:s};return Io(o)}}const ia=sa();function he(e,t,n){const s=e.getProps();return Dt(s,t,n!==void 0?n:s.custom,e)}const st=e=>Array.isArray(e);function ra(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ae(n))}function oa(e){return st(e)?e[e.length-1]||0:e}function aa(e,t){const n=he(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=oa(r[o]);ra(e,o,a)}}function ca(e){return!!(L(e)&&e.add)}function ua(e,t){const n=e.getValue("willChange");if(ca(n))return n.add(t);if(!n&&K.WillChange){const s=new K.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function la(e){return e.props[ys]}const fa=e=>e!==null;function da(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(fa),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}const ha={type:"spring",stiffness:500,damping:25,restSpeed:10},pa=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ma={type:"keyframes",duration:.8},ga={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ya=(e,{keyframes:t})=>t.length>2?ma:oe.has(e)?e.startsWith("scale")?pa(t[1]):ha:ga;function ba({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const va=(e,t,n,s={},i,r)=>o=>{const a=is(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-N(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,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};ba(a)||Object.assign(c,ya(e,c)),c.duration&&(c.duration=N(c.duration)),c.repeatDelay&&(c.repeatDelay=N(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),(K.instantAnimations||K.skipAnimations)&&(d=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!r&&t.get()!==void 0){const f=da(c.keyframes,a);if(f!==void 0){k.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Tt(c):new qr(c)};function Ta({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=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(r=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&Ta(u,c))continue;const h={delay:n,...is(r||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!h.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const p=la(e);if(p){const C=window.MotionHandoffAnimation(p,c,k);C!==null&&(h.startTime=C,y=!0)}}ua(e,c),d.start(va(c,d,f,e.shouldReduceMotion&&rs.has(c)?{type:!1}:h,e,y));const w=d.animation;w&&l.push(w)}return o&&Promise.all(l).then(()=>{k.update(()=>{o&&aa(e,o)})}),l}function it(e,t,n={}){var l;const s=he(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.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?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return wa(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function wa(e,t,n=0,s=0,i=0,r=1,o){const a=[],l=e.variantChildren.size,u=(l-1)*i,c=typeof s=="function",d=c?f=>s(f,l):r===1?(f=0)=>f*i:(f=0)=>u-f*i;return Array.from(e.variantChildren).sort(xa).forEach((f,h)=>{f.notify("AnimationStart",t),a.push(it(f,t,{...o,delay:n+(c?0:s)+d(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(a)}function xa(e,t){return e.sortNodePosition(t)}function Sa(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>it(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=it(e,t,n);else{const i=typeof t=="function"?he(e,t,n.custom):t;s=Promise.all(As(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function Ms(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 Va=Ct.length;function Ps(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ps(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Va;n++){const s=Ct[n],i=e.props[s];(de(i)||i===!1)&&(t[s]=i)}return t}const Ca=[...Vt].reverse(),Aa=Vt.length;function Ma(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Sa(e,n,s)))}function Pa(e){let t=Ma(e),n=un(),s=!0;const i=l=>(u,c)=>{var f;const d=he(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:g,...y}=d;u={...u,...y,...g}}return u};function r(l){t=l(e)}function o(l){const{props:u}=e,c=Ps(e.parent)||{},d=[],f=new Set;let h={},g=1/0;for(let w=0;w<Aa;w++){const p=Ca[w],C=n[p],m=u[p]!==void 0?u[p]:c[p],P=de(m),x=p===l?C.isActive:null;x===!1&&(g=w);let M=m===c[p]&&m!==u[p]&&P;if(M&&s&&e.manuallyAnimateOnMount&&(M=!1),C.protectedKeys={...h},!C.isActive&&x===null||!m&&!C.prevProp||Re(m)||typeof m=="boolean")continue;const V=Ea(C.prevProp,m);let S=V||p===l&&C.isActive&&!M&&P||w>g&&P,R=!1;const F=Array.isArray(m)?m:[m];let X=F.reduce(i(p),{});x===!1&&(X={});const{prevResolvedValues:Ft={}}=C,Bs={...Ft,...X},Ot=O=>{S=!0,f.has(O)&&(R=!0,f.delete(O)),C.needsAnimating[O]=!0;const B=e.getValue(O);B&&(B.liveStyle=!1)};for(const O in Bs){const B=X[O],Oe=Ft[O];if(h.hasOwnProperty(O))continue;let Le=!1;st(B)&&st(Oe)?Le=!Ms(B,Oe):Le=B!==Oe,Le?B!=null?Ot(O):f.add(O):B!==void 0&&f.has(O)?Ot(O):C.protectedKeys[O]=!0}C.prevProp=m,C.prevResolvedValues=X,C.isActive&&(h={...h,...X}),s&&e.blockInitialAnimation&&(S=!1),S&&(!(M&&V)||R)&&d.push(...F.map(O=>({animation:O,options:{type:p}})))}if(f.size){const w={};if(typeof u.initial!="boolean"){const p=he(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(w.transition=p.transition)}f.forEach(p=>{const C=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),w[p]=C??null}),d.push({animation:w})}let y=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=un(),s=!0}}}function Ea(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ms(t,e):!1}function _(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function un(){return{animate:_(!0),whileInView:_(),whileHover:_(),whileTap:_(),whileDrag:_(),whileFocus:_(),exit:_()}}class ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Da extends ae{constructor(t){super(t),t.animationState||(t.animationState=Pa(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Re(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Ra=0;class Fa extends ae{constructor(){super(...arguments),this.id=Ra++}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 Oa={animation:{Feature:Da},exit:{Feature:Fa}};function ln(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Es(e){return{point:{x:e.pageX,y:e.pageY}}}function La({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Ia(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}const fn=()=>({min:0,max:0}),Ds=()=>({x:fn(),y:fn()});function ka(e,t){return La(Ia(e.getBoundingClientRect(),t))}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&&k.postRender(()=>r(t,Es(t)))}class Na extends ae{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 Ba 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=Pe(ln(this.node.current,"focus",()=>this.onFocus()),ln(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&&k.postRender(()=>r(t,Es(t)))}class ja extends ae{mount(){const{current:t}=this.node;t&&(this.unmount=To(t,(n,s)=>(hn(this.node,s,"Start"),(i,{success:r})=>hn(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rt=new WeakMap,_e=new WeakMap,Ka=e=>{const t=rt.get(e.target);t&&t(e)},Wa=e=>{e.forEach(Ka)};function _a({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(Wa,{root:e,...t})),s[i]}function $a(e,t,n){const s=_a(t);return rt.set(e,n),s.observe(e),()=>{rt.delete(e),s.unobserve(e)}}const Ua={some:0,all:1};class za 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:Ua[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return $a(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(Ga(t,n))&&this.startObserver()}unmount(){}}function Ga({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ha={inView:{Feature:za},tap:{Feature:ja},focus:{Feature:Ba},hover:{Feature:Na}},ot={current:null},Rs={current:!1};function qa(){if(Rs.current=!0,!!ut)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ot.current=e.matches;e.addEventListener("change",t),t()}else ot.current=!1}const Ya=new WeakMap;function Xa(e,t,n){for(const s in t){const i=t[s],r=n[s];if(L(i))e.addValue(s,i);else if(L(r))e.addValue(s,Ae(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,Ae(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const pn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Za{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=wt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=I.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,k.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;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.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Fe(n),this.isVariantNode=ms(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&L(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Ya.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Rs.current||qa(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ot.current,process.env.NODE_ENV!=="production"&&Mn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ue(this.notifyUpdate),Ue(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=oe.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in 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):Ds()}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<pn.length;s++){const i=pn[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=Xa(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=Ae(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"&&(xn(s)||Sn(s))?s=parseFloat(s):!xo(s)&&ie.test(n)&&(s=us(t,n)),this.setBaseTarget(t,L(s)?s.get():s)),L(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=Dt(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&&!L(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 Cn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Fs extends Za{constructor(){super(...arguments),this.KeyframeResolver=ao}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;L(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Os(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 Ja(e){return window.getComputedStyle(e)}class Qa extends Fs{constructor(){super(...arguments),this.type="html",this.renderInstance=Os}readValueFromInstance(t,n){var s;if(oe.has(n))return(s=this.projection)!=null&&s.isProjecting?Ze(n):Cr(t,n);{const i=Ja(t),r=(jn(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ka(t,n)}build(t,n,s){Mt(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Rt(t,n,s)}}const Ls=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 ec(e,t,n,s){Os(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Ls.has(i)?i:At(i),t.attrs[i])}class tc extends Fs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ds}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(oe.has(n)){const s=cs(n);return s&&s.default||0}return n=Ls.has(n)?n:At(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Cs(t,n,s)}build(t,n,s){ws(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){ec(t,n,s,i)}mount(t){this.isSVGTag=Ss(t.tagName),super.mount(t)}}const nc=(e,t)=>Et(e)?new tc(t):new Qa(t,{allowProjection:e!==T.Fragment}),sc={renderer:nc,...Oa,...Ha},at=ia("div"),Is=T.createContext({layers:[],setLayers:()=>{},addLayer:()=>{},removeLayer:()=>{},removeTopLayer:()=>{}}),ic=({children:e})=>{const[t,n]=T.useState([]),s=o=>{n(a=>[...a,o])},i=o=>{n(t.filter(a=>a!==o))},r=()=>{const o=t[t.length-1];o&&i(o)};return A.jsx(Is.Provider,{value:{layers:t,setLayers:n,addLayer:s,removeLayer:i,removeTopLayer:r},children:e})},ks=()=>T.useContext(Is),rc=({defaultOpen:e,open:t,onOpenChange:n,...s})=>{const[i,r]=pi({prop:t,onChange:n,defaultProp:e??!1}),o=ks(),a=s.a11yTitle;if(T.useEffect(()=>{!i&&o.layers.includes(a)&&o.removeLayer(a)},[a,o,i]),!!i)return A.jsx(oc,{open:i,onOpenChange:r,...s})},oc=({open:e,onOpenChange:t,a11yTitle:n,a11yDescription:s,children:i,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,...l})=>{var y,w;const u=n,c=ks();T.useEffect(()=>{!c||!e||c.layers.includes(u)||c.addLayer(u)},[u,c,e]);const d=((y=c.layers)==null?void 0:y.indexOf(u))||0,f=((w=c.layers)==null?void 0:w.length)||0,h=d!==0,g=u===c.layers[c.layers.length-1];return A.jsx(So,{features:sc,children:A.jsx(vn,{onEscapeKeyDown:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},onPointerDownOutside:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},children:A.jsxs(Q.Root,{open:e,onOpenChange:p=>{var m;if(((m=c==null?void 0:c.layers)==null?void 0:m.length)>0)return p===!1&&u===c.layers[c.layers.length-1]?(c.removeLayer(u),t(!1)):void 0;t(p)},children:[A.jsxs(Ys.Root,{children:[A.jsx(Q.Title,{children:n}),s&&A.jsx(Q.Description,{children:s})]}),e&&A.jsx(qs.Root,{className:"tgph",children:A.jsx(ac,{layer:d,children:A.jsx(Ws.FocusScope,{trapped:typeof r=="boolean"?r:g,onMountAutoFocus:o,onUnmountAutoFocus:a,asChild:!0,children:A.jsx(zs.RefToTgphRef,{children:A.jsx(H.Stack,{as:at,initial:{top:`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${f-1})`},animate:{top:h?`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${d} )`:"var(--tgph-spacing-16)"},exit:{top:0},transition:{type:"spring",duration:.3,bounce:0},w:"full",justify:"center",style:{position:"fixed",left:0,maxHeight:"calc(100vh - var(--tgph-spacing-32))",maxWidth:"calc(100vw - var(--tgph-spacing-8))",zIndex:`calc(var(--tgph-zIndex-modal) + ${d})`},children:A.jsx(H.Stack,{direction:"column",as:at,animate:{scale:1.02-Math.abs(f-d)*.02,transformOrigin:"center center"},transition:{duration:.2,bounce:0,type:"spring"},maxW:l.maxW??"160",w:l.w??"full",bg:"surface-1",border:"px",rounded:"4",shadow:"3",...l,children:i},`content-${u}`)},`container-${u}`)})})})})]},u)})})},ac=({layer:e,children:t})=>e>0?t:A.jsxs(Q.Overlay,{children:[A.jsx(H.Box,{as:at,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,bounce:0,type:"spring"},bg:"alpha-black-6",w:"full",h:"full",zIndex:"overlay",style:{position:"fixed",cursor:"pointer",inset:"0px"}}),t]}),cc=T.forwardRef(({children:e,...t},n)=>A.jsx(Q.Content,{ref:n,asChild:!0,...t,children:A.jsx(H.Stack,{direction:"column",h:"full",...t,children:e})})),uc=({size:e="1",variant:t="ghost",...n})=>A.jsx(Q.Close,{asChild:!0,children:A.jsx(Us.Button,{icon:{icon:Gs.X,alt:"Close Modal"},variant:t,size:e,...n})}),lc=({style:e,children:t,...n})=>A.jsx(H.Stack,{direction:"column",px:"6",py:"4",style:{overflowY:"auto",...e},...n,children:t}),fc=({children:e,...t})=>A.jsx(H.Stack,{direction:"row",justify:"space-between",align:"center",px:"6",py:"4",borderBottom:"px",...t,children:e}),dc=({children:e,...t})=>A.jsx(H.Stack,{direction:"row",align:"center",justify:"flex-end",gap:"2",px:"6",py:"4",borderTop:"px",...t,children:e}),Ns={};Object.assign(Ns,{Root:rc,Content:cc,Close:uc,Body:lc,Header:fc,Footer:dc});exports.Modal=Ns;exports.ModalStackingProvider=ic;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),js=require("@radix-ui/react-dialog"),T=require("react"),Ks=require("react-dom"),Ws=require("@radix-ui/react-focus-scope"),_s=require("@radix-ui/react-portal"),$s=require("@radix-ui/react-visually-hidden"),Us=require("@telegraph/button"),zs=require("@telegraph/helpers"),H=require("@telegraph/layout"),Gs=require("lucide-react");function pe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Q=pe(js),v=pe(T),Hs=pe(Ks),qs=pe(_s),Ys=pe($s);function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Lt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mn(...e){return t=>{let n=!1;const s=e.map(i=>{const r=Lt(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Lt(e[i],null)}}}}function gn(...e){return v.useCallback(mn(...e),e)}function Xs(e){const t=Zs(e),n=v.forwardRef((s,i)=>{const{children:r,...o}=s,a=v.Children.toArray(r),l=a.find(Qs);if(l){const u=l.props.children,c=a.map(d=>d===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:d);return A.jsx(t,{...o,ref:i,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return A.jsx(t,{...o,ref:i,children:r})});return n.displayName=`${e}.Slot`,n}function Zs(e){const t=v.forwardRef((n,s)=>{const{children:i,...r}=n;if(v.isValidElement(i)){const o=ti(i),a=ei(r,i.props);return i.type!==v.Fragment&&(a.ref=s?mn(s,o):o),v.cloneElement(i,a)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Js=Symbol("radix.slottable");function Qs(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Js}function ei(e,t){const n={...t};for(const s in t){const i=e[s],r=t[s];/^on[A-Z]/.test(s)?i&&r?n[s]=(...a)=>{const l=r(...a);return i(...a),l}:i&&(n[s]=i):s==="style"?n[s]={...i,...r}:s==="className"&&(n[s]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function ti(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ni=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yn=ni.reduce((e,t)=>{const n=Xs(`Primitive.${t}`),s=v.forwardRef((i,r)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(l,{...a,ref:r})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function si(e,t){e&&Hs.flushSync(()=>e.dispatchEvent(t))}function ct(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function ii(e,t=globalThis==null?void 0:globalThis.document){const n=ct(e);v.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var ri="DismissableLayer",$e="dismissableLayer.update",oi="dismissableLayer.pointerDownOutside",ai="dismissableLayer.focusOutside",It,bn=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vn=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:r,onInteractOutside:o,onDismiss:a,...l}=e,u=v.useContext(bn),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),g=gn(t,V=>d(V)),y=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(w),C=c?y.indexOf(c):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=p,x=li(V=>{const S=V.target,R=[...u.branches].some(F=>F.contains(S));!P||R||(i==null||i(V),o==null||o(V),V.defaultPrevented||a==null||a())},f),M=fi(V=>{const S=V.target;[...u.branches].some(F=>F.contains(S))||(r==null||r(V),o==null||o(V),V.defaultPrevented||a==null||a())},f);return ii(V=>{C===u.layers.size-1&&(s==null||s(V),!V.defaultPrevented&&a&&(V.preventDefault(),a()))},f),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(It=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),kt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=It)}},[c,f,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),kt())},[c,u]),v.useEffect(()=>{const V=()=>h({});return document.addEventListener($e,V),()=>document.removeEventListener($e,V)},[]),A.jsx(yn.div,{...l,ref:g,style:{pointerEvents:m?P?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,x.onPointerDownCapture)})});vn.displayName=ri;var ci="DismissableLayerBranch",ui=v.forwardRef((e,t)=>{const n=v.useContext(bn),s=v.useRef(null),i=gn(t,s);return v.useEffect(()=>{const r=s.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),A.jsx(yn.div,{...e,ref:i})});ui.displayName=ci;function li(e,t=globalThis==null?void 0:globalThis.document){const n=ct(e),s=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const r=a=>{if(a.target&&!s.current){let l=function(){Tn(oi,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function fi(e,t=globalThis==null?void 0:globalThis.document){const n=ct(e),s=v.useRef(!1);return v.useEffect(()=>{const i=r=>{r.target&&!s.current&&Tn(ai,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function kt(){const e=new CustomEvent($e);document.dispatchEvent(e)}function Tn(e,t,n,{discrete:s}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?si(i,r):i.dispatchEvent(r)}var di=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},hi=v[" useInsertionEffect ".trim().toString()]||di;function pi({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,r,o]=mi({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const c=v.useRef(e!==void 0);v.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${s} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,s])}const u=v.useCallback(c=>{var d;if(a){const f=gi(c)?c(e):c;f!==e&&((d=o.current)==null||d.call(o,f))}else r(c)},[a,e,r,o]);return[l,u]}function mi({defaultProp:e,onChange:t}){const[n,s]=v.useState(e),i=v.useRef(n),r=v.useRef(t);return hi(()=>{r.current=t},[t]),v.useEffect(()=>{var o;i.current!==n&&((o=r.current)==null||o.call(r,n),i.current=n)},[n,i]),[n,s,r]}function gi(e){return typeof e=="function"}const yi=T.createContext({});function bi(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const ut=typeof window<"u",vi=ut?T.useLayoutEffect:T.useEffect,wn=T.createContext(null);function Ti(e,t){e.indexOf(t)===-1&&e.push(t)}function wi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const q=(e,t,n)=>n>t?t:n<e?e:n;let me=()=>{},Y=()=>{};process.env.NODE_ENV!=="production"&&(me=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Y=(e,t)=>{if(!e)throw new Error(t)});const K={},xn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xi(e){return typeof e=="object"&&e!==null}const Sn=e=>/^0[^.\s]+$/u.test(e);function lt(e){let t;return()=>(t===void 0&&(t=e()),t)}const ne=e=>e,Si=(e,t)=>n=>t(e(n)),Pe=(...e)=>e.reduce(Si),Vn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Cn{constructor(){this.subscriptions=[]}add(t){return Ti(this.subscriptions,t),()=>wi(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,j=e=>e/1e3;function An(e,t){return t?e*(1e3/t):0}const Nt=new Set;function Mn(e,t,n){e||Nt.has(t)||(console.warn(t),Nt.add(t))}const Pn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Vi=1e-7,Ci=12;function Ai(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=Pn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Vi&&++a<Ci);return o}function ge(e,t,n,s){if(e===t&&n===s)return ne;const i=r=>Ai(r,0,1,e,n);return r=>r===0||r===1?r:Pn(i(r),t,s)}const En=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Dn=e=>t=>1-e(1-t),Rn=ge(.33,1.53,.69,.99),ft=Dn(Rn),Fn=En(ft),On=e=>(e*=2)<1?.5*ft(e):.5*(2-Math.pow(2,-10*(e-1))),dt=e=>1-Math.sin(Math.acos(e)),Mi=Dn(dt),Ln=En(dt),Pi=ge(.42,0,1,1),Ei=ge(0,0,.58,1),In=ge(.42,0,.58,1),Di=e=>Array.isArray(e)&&typeof e[0]!="number",kn=e=>Array.isArray(e)&&typeof e[0]=="number",Bt={linear:ne,easeIn:Pi,easeInOut:In,easeOut:Ei,circIn:dt,circInOut:Ln,circOut:Mi,backIn:ft,backInOut:Fn,backOut:Rn,anticipate:On},Ri=e=>typeof e=="string",jt=e=>{if(kn(e)){Y(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,s,i]=e;return ge(t,n,s,i)}else if(Ri(e))return Y(Bt[e]!==void 0,`Invalid easing type '${e}'`),Bt[e];return e},be=["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 l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const g=f&&i?n:s;return d&&o.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const Oi=40;function Nn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=be.reduce((m,P)=>(m[P]=Fi(r),m),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:g}=o,y=()=>{const m=K.useManualTiming?i.timestamp:performance.now();n=!1,K.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(m-i.timestamp,Oi),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),g.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},w=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:be.reduce((m,P)=>{const x=o[P];return m[P]=(M,V=!1,S=!1)=>(n||w(),x.schedule(M,V,S)),m},{}),cancel:m=>{for(let P=0;P<be.length;P++)o[be[P]].cancel(m)},state:i,steps:o}}const{schedule:k,cancel:Ue,state:xe}=Nn(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let Te;function Li(){Te=void 0}const I={now:()=>(Te===void 0&&I.set(xe.isProcessing||K.useManualTiming?xe.timestamp:performance.now()),Te),set:e=>{Te=e,queueMicrotask(Li)}},Bn=e=>t=>typeof t=="string"&&t.startsWith(e),jn=Bn("--"),Ii=Bn("var(--"),ht=e=>Ii(e)?ki.test(e.split("/*")[0].trim()):!1,ki=/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=>q(0,1,e)},ve={...se,default:1},ue=e=>Math.round(e*1e5)/1e5,pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ni(e){return e==null}const Bi=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(e,t)=>n=>!!(typeof n=="string"&&Bi.test(n)&&n.startsWith(e)||t&&!Ni(n)&&Object.prototype.hasOwnProperty.call(n,t)),Kn=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(pt);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ji=e=>q(0,255,e),ke={...se,transform:e=>Math.round(ji(e))},$={test:mt("rgb","red"),parse:Kn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ke.transform(e)+", "+ke.transform(t)+", "+ke.transform(n)+", "+ue(le.transform(s))+")"};function Ki(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ze={test:mt("#"),parse:Ki,transform:$.transform},ye=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),W=ye("deg"),ee=ye("%"),b=ye("px"),Wi=ye("vh"),_i=ye("vw"),Kt={...ee,parse:e=>ee.parse(e)/100,transform:e=>ee.transform(e*100)},Z={test:mt("hsl","hue"),parse:Kn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ee.transform(ue(t))+", "+ee.transform(ue(n))+", "+ue(le.transform(s))+")"},D={test:e=>$.test(e)||ze.test(e)||Z.test(e),parse:e=>$.test(e)?$.parse(e):Z.test(e)?Z.parse(e):ze.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$.transform(e):Z.transform(e),getAnimatableNone:e=>{const t=D.parse(e);return t.alpha=0,D.transform(t)}},$i=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ui(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pt))==null?void 0:t.length)||0)+(((n=e.match($i))==null?void 0:n.length)||0)>0}const Wn="number",_n="color",zi="var",Gi="var(",Wt="${}",Hi=/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(Hi,l=>(D.test(l)?(s.color.push(r),i.push(_n),n.push(D.parse(l))):l.startsWith(Gi)?(s.var.push(r),i.push(zi),n.push(l)):(s.number.push(r),i.push(Wn),n.push(parseFloat(l))),++r,Wt)).split(Wt);return{values:n,split:a,indexes:s,types:i}}function $n(e){return fe(e).values}function Un(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===Wn?r+=ue(i[o]):a===_n?r+=D.transform(i[o]):r+=i[o]}return r}}const qi=e=>typeof e=="number"?0:D.test(e)?D.getAnimatableNone(e):e;function Yi(e){const t=$n(e);return Un(e)(t.map(qi))}const ie={test:Ui,parse:$n,createTransformer:Un,getAnimatableNone:Yi};function Ne(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xi({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,l=2*n-a;i=Ne(l,a,e+1/3),r=Ne(l,a,e),o=Ne(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Se(e,t){return n=>n>0?t:e}const Ee=(e,t,n)=>e+(t-e)*n,Be=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Zi=[ze,$,Z],Ji=e=>Zi.find(t=>t.test(e));function _t(e){const t=Ji(e);if(me(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Z&&(n=Xi(n)),n}const $t=(e,t)=>{const n=_t(e),s=_t(t);if(!n||!s)return Se(e,t);const i={...n};return r=>(i.red=Be(n.red,s.red,r),i.green=Be(n.green,s.green,r),i.blue=Be(n.blue,s.blue,r),i.alpha=Ee(n.alpha,s.alpha,r),$.transform(i))},Ge=new Set(["none","hidden"]);function Qi(e,t){return Ge.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function er(e,t){return n=>Ee(e,t,n)}function gt(e){return typeof e=="number"?er:typeof e=="string"?ht(e)?Se:D.test(e)?$t:sr:Array.isArray(e)?zn:typeof e=="object"?D.test(e)?$t:tr:Se}function zn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>gt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function tr(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=gt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function nr(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 sr=(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?Ge.has(e)&&!i.values.length||Ge.has(t)&&!s.values.length?Qi(e,t):Pe(zn(nr(s,i),i.values),n):(me(!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.`),Se(e,t))};function Gn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ee(e,t,n):gt(e)(e,t)}const ir=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>k.update(t,n),stop:()=>Ue(t),now:()=>xe.isProcessing?xe.timestamp:I.now()}},Hn=(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)})`},Ve=2e4;function yt(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ve;)t+=n,s=e.next(t);return t>=Ve?1/0:t}function rr(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(yt(s),Ve);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:j(i)}}const or=5;function qn(e,t,n){const s=Math.max(t-or,0);return An(n-e(s),t-s)}const E={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},je=.001;function ar({duration:e=E.duration,bounce:t=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r;me(e<=N(E.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=q(E.minDamping,E.maxDamping,o),e=q(E.minDuration,E.maxDuration,j(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,h=He(u,o),g=Math.exp(-d);return je-f/h*g},r=u=>{const d=u*o*e,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-d),y=He(Math.pow(u,2),o);return(-i(u)+je>0?-1:1)*((f-h)*g)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-je+c*d},r=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=ur(i,r,a);if(e=N(e),isNaN(l))return{stiffness:E.stiffness,damping:E.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const cr=12;function ur(e,t,n){let s=n;for(let i=1;i<cr;i++)s=s-e(s)/t(s);return s}function He(e,t){return e*Math.sqrt(1-t*t)}const lr=["duration","bounce"],fr=["stiffness","damping","mass"];function Ut(e,t){return t.some(n=>e[n]!==void 0)}function dr(e){let t={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...e};if(!Ut(e,fr)&&Ut(e,lr))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*q(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:E.mass,stiffness:i,damping:r}}else{const n=ar(e);t={...t,...n,mass:E.mass},t.isResolvedFromDuration=!0}return t}function Ce(e=E.visualDuration,t=E.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:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=dr({...n,velocity:-j(n.velocity||0)}),g=f||0,y=u/(2*Math.sqrt(l*c)),w=o-r,p=j(Math.sqrt(l/c)),C=Math.abs(w)<5;s||(s=C?E.restSpeed.granular:E.restSpeed.default),i||(i=C?E.restDelta.granular:E.restDelta.default);let m;if(y<1){const x=He(p,y);m=M=>{const V=Math.exp(-y*p*M);return o-V*((g+y*p*w)/x*Math.sin(x*M)+w*Math.cos(x*M))}}else if(y===1)m=x=>o-Math.exp(-p*x)*(w+(g+p*w)*x);else{const x=p*Math.sqrt(y*y-1);m=M=>{const V=Math.exp(-y*p*M),S=Math.min(x*M,300);return o-V*((g+y*p*w)*Math.sinh(S)+x*w*Math.cosh(S))/x}}const P={calculatedDuration:h&&d||null,next:x=>{const M=m(x);if(h)a.done=x>=d;else{let V=x===0?g:0;y<1&&(V=x===0?N(g):qn(m,x,M));const S=Math.abs(V)<=s,R=Math.abs(o-M)<=i;a.done=S&&R}return a.value=a.done?o:M,a},toString:()=>{const x=Math.min(yt(P),Ve),M=Hn(V=>P.next(x*V).value,x,30);return x+"ms "+M},toTransition:()=>{}};return P}Ce.applyToOptions=e=>{const t=rr(e,100,Ce);return e.ease=t.ease,e.duration=N(t.duration),e.type="keyframes",e};function qe({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=S=>a!==void 0&&S<a||l!==void 0&&S>l,g=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let y=n*t;const w=d+y,p=o===void 0?w:o(w);p!==w&&(y=p-d);const C=S=>-y*Math.exp(-S/s),m=S=>p+C(S),P=S=>{const R=C(S),F=m(S);f.done=Math.abs(R)<=u,f.value=f.done?p:F};let x,M;const V=S=>{h(f.value)&&(x=S,M=Ce({keyframes:[f.value,g(f.value)],velocity:qn(m,S,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:S=>{let R=!1;return!M&&x===void 0&&(R=!0,P(S),V(S)),x!==void 0&&S>=x?M.next(S-x):(!R&&P(S),f)}}}function hr(e,t,n){const s=[],i=n||K.mix||Gn,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||ne:t;a=Pe(l,a)}s.push(a)}return s}function pr(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"),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=hr(t,s,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=Vn(e[d],e[d+1],c);return a[d](f)};return n?c=>u(q(e[0],e[r-1],c)):u}function mr(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Vn(0,t,s);e.push(Ee(n,1,i))}}function gr(e){const t=[0];return mr(t,e.length-1),t}function yr(e,t){return e.map(n=>n*t)}function br(e,t){return e.map(()=>t||In).splice(0,e.length-1)}function J({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Di(s)?s.map(jt):jt(s),r={done:!1,value:t[0]},o=yr(n&&n.length===t.length?n:gr(t),e),a=pr(o,t,{ease:Array.isArray(i)?i:br(t,i)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const vr=e=>e!==null;function bt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(vr),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Tr={decay:qe,inertia:qe,tween:J,keyframes:J,spring:Ce};function Yn(e){typeof e.type=="string"&&(e.type=Tr[e.type])}class vt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const wr=e=>e/100;class Tt extends vt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==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;Yn(t);const{type:n=J,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const l=n||J;process.env.NODE_ENV!=="production"&&l!==J&&Y(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),l!==J&&typeof a[0]!="number"&&(this.mixKeyframes=Pe(wr,Gn(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=yt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}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:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:g,onUpdate:y,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-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,P=s;if(d){const S=Math.min(this.currentTime,i)/a;let R=Math.floor(S),F=S%1;!F&&S>=1&&(F=1),F===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(f==="reverse"?(F=1-F,h&&(F-=h/a)):f==="mirror"&&(P=o)),m=q(0,1,F)*a}const x=C?{done:!1,value:c[0]}:P.next(m);r&&(x.value=r(x.value));let{done:M}=x;!C&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return V&&g!==qe&&(x.value=bt(c,this.options,w,this.speed)),y&&y(x.value),V&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return j(this.calculatedDuration)}get time(){return j(this.currentTime)}set time(t){var n;t=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(I.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=j(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=ir,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 xr(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const U=e=>e*180/Math.PI,Ye=e=>{const t=U(Math.atan2(e[1],e[0]));return Xe(t)},Sr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ye,rotateZ:Ye,skewX:e=>U(Math.atan(e[1])),skewY:e=>U(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xe=e=>(e=e%360,e<0&&(e+=360),e),zt=Ye,Gt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ht=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Vr={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=>Xe(U(Math.atan2(e[6],e[5]))),rotateY:e=>Xe(U(Math.atan2(-e[2],e[0]))),rotateZ:zt,rotate:zt,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 Ze(e){return e.includes("scale")?1:0}function Je(e,t){if(!e||e==="none")return Ze(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Vr,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Sr,i=a}if(!i)return Ze(t);const r=s[t],o=i[1].split(",").map(Ar);return typeof r=="function"?r(o):o[r]}const Cr=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Je(n,t)};function Ar(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),qt=e=>e===se||e===b,Mr=new Set(["x","y","z"]),Pr=re.filter(e=>!Mr.has(e));function Er(e){const t=[];return Pr.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})=>Je(t,"x"),y:(e,{transform:t})=>Je(t,"y")};z.translateX=z.x;z.translateY=z.y;const G=new Set;let Qe=!1,et=!1,tt=!1;function Xn(){if(et){const e=Array.from(G).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Er(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}et=!1,Qe=!1,G.forEach(e=>e.complete(tt)),G.clear()}function Zn(){G.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(et=!0)})}function Dr(){tt=!0,Zn(),Xn(),tt=!1}class wt{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(G.add(this),Qe||(Qe=!0,k.read(Zn),k.resolveKeyframes(Xn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}xr(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),G.delete(this)}cancel(){this.state==="scheduled"&&(G.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rr=e=>e.startsWith("--");function Fr(e,t,n){Rr(t)?e.style.setProperty(t,n):e.style[t]=n}const Or=lt(()=>window.ScrollTimeline!==void 0),Lr={};function Ir(e,t){const n=lt(e);return()=>Lr[t]??n()}const Jn=Ir(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ce=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Yt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ce([0,.65,.55,1]),circOut:ce([.55,0,1,.45]),backIn:ce([.31,.01,.66,-.59]),backOut:ce([.33,1.53,.69,.99])};function Qn(e,t){if(e)return typeof e=="function"?Jn()?Hn(e,t):"ease-out":kn(e)?ce(e):Array.isArray(e)?e.map(n=>Qn(n,t)||Yt.easeOut):Yt[e]}function kr(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Qn(a,i);Array.isArray(d)&&(c.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 u&&(f.pseudoElement=u),e.animate(c,f)}function es(e){return typeof e=="function"&&"applyToOptions"in e}function Nr({type:e,...t}){return es(e)&&Jn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Br extends vt{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:l}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Y(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const u=Nr(t);this.animation=kr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=bt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Fr(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return j(Number(t))}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=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&&Or()?(this.animation.timeline=t,ne):n(this)}}const ts={anticipate:On,backInOut:Fn,circInOut:Ln};function jr(e){return e in ts}function Kr(e){typeof e.ease=="string"&&jr(e.ease)&&(e.ease=ts[e.ease])}const Xt=10;class Wr extends Br{constructor(t){Kr(t),Yn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Tt({...o,autoplay:!1}),l=N(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Xt).value,a.sample(l).value,Xt),a.stop()}}const Zt=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ie.test(e)||e==="0")&&!e.startsWith("url("));function _r(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 $r(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=Zt(i,t),a=Zt(r,t);return me(o===a,`You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`),!o||!a?!1:_r(e)||(n==="spring"||es(n))&&s}function ns(e){return xi(e)&&"offsetHeight"in e}const Ur=new Set(["opacity","clipPath","filter","transform"]),zr=lt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gr(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!ns((u=t==null?void 0:t.owner)==null?void 0:u.current))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return zr()&&n&&Ur.has(n)&&(n!=="transform"||!l)&&!a&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Hr=40;class qr extends vt{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var g;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=I.now();const f={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||wt;this.keyframeResolver=new h(a,(y,w,p)=>this.onKeyframesResolved(y,w,f,!p),l,u,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=I.now(),$r(t,r,o,a)||((K.instantAnimations||!l)&&(c==null||c(bt(t,s,n))),t[0]=t[t.length-1],s.duration=0,s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Hr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!u&&Gr(f)?new Wr({...f,element:f.motionValue.owner.current}):new Tt(f);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(),Dr()),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 Yr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xr(e){const t=Yr.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Zr=4;function ss(e,t,n=1){Y(n<=Zr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[s,i]=Xr(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return xn(o)?parseFloat(o):o}return ht(i)?ss(i,t,n+1):i}function is(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const rs=new Set(["width","height","top","left","right","bottom",...re]),Jr={test:e=>e==="auto",parse:e=>e},os=e=>t=>t.test(e),as=[se,b,ee,W,_i,Wi,Jr],Jt=e=>as.find(os(e));function Qr(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Sn(e):!0}const eo=new Set(["brightness","contrast","saturate","opacity"]);function to(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(pt)||[];if(!s)return e;const i=n.replace(s,"");let r=eo.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const no=/\b([a-z-]*)\(.*?\)/gu,nt={...ie,getAnimatableNone:e=>{const t=e.match(no);return t?t.map(to).join(" "):e}},Qt={...se,transform:Math.round},so={rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:ve,scaleX:ve,scaleY:ve,scaleZ:ve,skew:W,skewX:W,skewY:W,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:le,originX:Kt,originY:Kt,originZ:b},xt={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,radius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,top:b,right:b,bottom:b,left:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,backgroundPositionX:b,backgroundPositionY:b,...so,zIndex:Qt,fillOpacity:le,strokeOpacity:le,numOctaves:Qt},io={...xt,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:nt,WebkitFilter:nt},cs=e=>io[e];function us(e,t){let n=cs(e);return n!==nt&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ro=new Set(["auto","none","0"]);function oo(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!ro.has(r)&&fe(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=us(n,i)}class ao extends wt{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),ht(u))){const c=ss(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!rs.has(s)||t.length!==2)return;const[i,r]=t,o=Jt(i),a=Jt(r);if(o!==a)if(qt(o)&&qt(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}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||Qr(t[i]))&&s.push(i);s.length&&oo(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(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function co(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 ls=(e,t)=>t&&typeof e=="number"?t.transform(e):e,en=30,uo=e=>!isNaN(parseFloat(e));class lo{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{var o,a;const r=I.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=I.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uo(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Mn(!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 Cn);const s=this.events[t].add(n);return t==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>en)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,en);return An(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 Ae(e,t){return new lo(e,t)}const{schedule:fo}=Nn(queueMicrotask,!1),ho={y:!1};function po(){return ho.y}function fs(e,t){const n=co(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function tn(e){return!(e.pointerType==="touch"||po())}function mo(e,t,n={}){const[s,i,r]=fs(e,n),o=a=>{if(!tn(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{tn(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const ds=(e,t)=>t?e===t?!0:ds(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.tabIndex!==-1}const we=new WeakSet;function nn(e){return t=>{t.key==="Enter"&&e(t)}}function Ke(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vo=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=nn(()=>{if(we.has(n))return;Ke(n,"down");const i=nn(()=>{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 sn(e){return go(e)&&!0}function To(e,t,n={}){const[s,i,r]=fs(e,n),o=a=>{const l=a.currentTarget;if(!sn(a))return;we.add(l);const u=t(l,a),c=(h,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),we.has(l)&&we.delete(l),sn(h)&&typeof u=="function"&&u(h,{success:g})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||ds(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ns(a)&&(a.addEventListener("focus",u=>vo(u,i)),!bo(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const L=e=>!!(e&&e.getVelocity),wo=[...as,D,ie],xo=e=>wo.find(os(e)),hs=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),St=T.createContext({strict:!1}),rn={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 rn)te[e]={isEnabled:t=>rn[e].some(n=>!!t[n])};function on(e){for(const t in e)te[t]={...te[t],...e[t]}}function So({children:e,features:t,strict:n=!1}){const[,s]=T.useState(!We(t)),i=T.useRef(void 0);if(!We(t)){const{renderer:r,...o}=t;i.current=r,on(o)}return T.useEffect(()=>{We(t)&&t().then(({renderer:r,...o})=>{on(o),i.current=r,s(!0)})},[]),A.jsx(St.Provider,{value:{renderer:i.current,strict:n},children:e})}function We(e){return typeof e=="function"}const Vo=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Me(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Vo.has(e)}let ps=e=>!Me(e);function Co(e){typeof e=="function"&&(ps=t=>t.startsWith("on")?!Me(t):e(t))}try{Co(require("@emotion/is-prop-valid").default)}catch{}function Ao(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(ps(i)||n===!0&&Me(i)||!t&&!Me(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const De=T.createContext({});function Re(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"],Ct=["initial",...Vt];function Fe(e){return Re(e.animate)||Ct.some(t=>de(e[t]))}function ms(e){return!!(Fe(e)||e.variants)}function Mo(e,t){if(Fe(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 Po(e){const{initial:t,animate:n}=Mo(e,T.useContext(De));return T.useMemo(()=>({initial:t,animate:n}),[an(t),an(n)])}function an(e){return Array.isArray(e)?e.join(" "):e}const Eo=Symbol.for("motionComponentSymbol");function gs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Do(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):gs(n)&&(n.current=s))},[t])}const At=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ro="framerAppearId",ys="data-"+At(Ro),Fo=T.createContext({});function Oo(e,t,n,s,i){var y,w;const{visualElement:r}=T.useContext(De),o=T.useContext(St),a=T.useContext(wn),l=T.useContext(hs).reducedMotion,u=T.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=T.useContext(Fo);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Lo(u.current,n,i,d);const f=T.useRef(!1);T.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[ys],g=T.useRef(!!h&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return vi(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),fo.render(c.render),g.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),g.current=!1))}),c}function Lo(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bs(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&gs(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function bs(e){if(e)return e.options.allowProjection!==!1?e.projection:bs(e.parent)}function Io({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:i}){function r(a,l){let u;const c={...T.useContext(hs),...a,layoutId:ko(a)},{isStatic:d}=c,f=Po(a),h=s(a,d);if(!d&&ut){No(c,e);const g=Bo(c);u=g.MeasureLayout,f.visualElement=Oo(i,h,c,t,g.ProjectionNode)}return A.jsxs(De.Provider,{value:f,children:[u&&f.visualElement?A.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,Do(h,f.visualElement,l),h,d,f.visualElement)]})}r.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=T.forwardRef(r);return o[Eo]=i,o}function ko({layoutId:e}){const t=T.useContext(yi).id;return t&&e!==void 0?t+"-"+e:e}function No(e,t){T.useContext(St).strict,process.env.NODE_ENV}function Bo(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}}const jo={};function vs(e,{layout:t,layoutId:n}){return oe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!jo[e]||e==="opacity")}const Ko={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wo=re.length;function _o(e,t,n){let s="",i=!0;for(let r=0;r<Wo;r++){const o=re[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ls(a,xt[o]);if(!l){i=!1;const c=Ko[o]||o;s+=`${c}(${u}) `}n&&(t[o]=u)}}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 l in t){const u=t[l];if(oe.has(l)){o=!0;continue}else if(jn(l)){i[l]=u;continue}else{const c=ls(u,xt[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(t.transform||(o||n?s.transform=_o(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ts(e,t,n){for(const s in t)!L(t[s])&&!vs(s,n)&&(e[s]=t[s])}function $o({transformTemplate:e},t){return T.useMemo(()=>{const n=Pt();return Mt(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Uo(e,t){const n=e.style||{},s={};return Ts(s,n,e),Object.assign(s,$o(e,t)),s}function zo(e,t){const n={},s=Uo(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 Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ho={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?Go:Ho;e[r.offset]=b.transform(-s);const o=b.transform(t),a=b.transform(n);e[r.array]=`${o} ${a}`}function ws(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Mt(e,a,u),l){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=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&qo(d,i,r,o,!1)}const xs=()=>({...Pt(),attrs:{}}),Ss=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Yo(e,t,n,s){const i=T.useMemo(()=>{const r=xs();return ws(r,t,Ss(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};Ts(r,e.style,e),i.style={...r,...i.style}}return i}const Xo=["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 Et(e){return typeof e!="string"||e.includes("-")?!1:!!(Xo.indexOf(e)>-1||/[A-Z]/u.test(e))}function Zo(e=!1){return(n,s,i,{latestValues:r},o)=>{const l=(Et(n)?Yo:zo)(s,r,o,n),u=Ao(s,typeof n=="string",e),c=n!==T.Fragment?{...u,...l,ref:i}:{},{children:d}=s,f=T.useMemo(()=>L(d)?d.get():d,[d]);return T.createElement(n,{...c,children:f})}}function cn(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Dt(e,t,n,s){if(typeof t=="function"){const[i,r]=cn(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]=cn(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function Jo(e){return L(e)?e.get():e}function Qo({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:ea(n,s,i,e),renderState:t()}}const Vs=e=>(t,n)=>{const s=T.useContext(De),i=T.useContext(wn),r=()=>Qo(e,t,s,i);return n?r():bi(r)};function ea(e,t,n,s){const i={},r=s(e,{});for(const f in r)i[f]=Jo(r[f]);let{initial:o,animate:a}=e;const l=Fe(e),u=ms(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Re(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const g=Dt(e,f[h]);if(g){const{transitionEnd:y,transition:w,...p}=g;for(const C in p){let m=p[C];if(Array.isArray(m)){const P=c?m.length-1:0;m=m[P]}m!==null&&(i[C]=m)}for(const C in y)i[C]=y[C]}}}return i}function Rt(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(L(s[o])||t.style&&L(t.style[o])||vs(o,e)||((r=n==null?void 0:n.getValue(o))==null?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const ta={useVisualState:Vs({scrapeMotionValuesFromProps:Rt,createRenderState:Pt})};function Cs(e,t,n){const s=Rt(e,t,n);for(const i in e)if(L(e[i])||L(t[i])){const r=re.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const na={useVisualState:Vs({scrapeMotionValuesFromProps:Cs,createRenderState:xs})};function sa(e,t){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Et(s)?na:ta,preloadedFeatures:e,useRender:Zo(i),createVisualElement:t,Component:s};return Io(o)}}const ia=sa();function he(e,t,n){const s=e.getProps();return Dt(s,t,n!==void 0?n:s.custom,e)}const st=e=>Array.isArray(e);function ra(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ae(n))}function oa(e){return st(e)?e[e.length-1]||0:e}function aa(e,t){const n=he(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=oa(r[o]);ra(e,o,a)}}function ca(e){return!!(L(e)&&e.add)}function ua(e,t){const n=e.getValue("willChange");if(ca(n))return n.add(t);if(!n&&K.WillChange){const s=new K.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function la(e){return e.props[ys]}const fa=e=>e!==null;function da(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(fa),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}const ha={type:"spring",stiffness:500,damping:25,restSpeed:10},pa=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ma={type:"keyframes",duration:.8},ga={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ya=(e,{keyframes:t})=>t.length>2?ma:oe.has(e)?e.startsWith("scale")?pa(t[1]):ha:ga;function ba({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const va=(e,t,n,s={},i,r)=>o=>{const a=is(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-N(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,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};ba(a)||Object.assign(c,ya(e,c)),c.duration&&(c.duration=N(c.duration)),c.repeatDelay&&(c.repeatDelay=N(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),(K.instantAnimations||K.skipAnimations)&&(d=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!r&&t.get()!==void 0){const f=da(c.keyframes,a);if(f!==void 0){k.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Tt(c):new qr(c)};function Ta({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=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(r=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&Ta(u,c))continue;const h={delay:n,...is(r||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!h.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const p=la(e);if(p){const C=window.MotionHandoffAnimation(p,c,k);C!==null&&(h.startTime=C,y=!0)}}ua(e,c),d.start(va(c,d,f,e.shouldReduceMotion&&rs.has(c)?{type:!1}:h,e,y));const w=d.animation;w&&l.push(w)}return o&&Promise.all(l).then(()=>{k.update(()=>{o&&aa(e,o)})}),l}function it(e,t,n={}){var l;const s=he(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.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?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return wa(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function wa(e,t,n=0,s=0,i=0,r=1,o){const a=[],l=e.variantChildren.size,u=(l-1)*i,c=typeof s=="function",d=c?f=>s(f,l):r===1?(f=0)=>f*i:(f=0)=>u-f*i;return Array.from(e.variantChildren).sort(xa).forEach((f,h)=>{f.notify("AnimationStart",t),a.push(it(f,t,{...o,delay:n+(c?0:s)+d(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(a)}function xa(e,t){return e.sortNodePosition(t)}function Sa(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>it(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=it(e,t,n);else{const i=typeof t=="function"?he(e,t,n.custom):t;s=Promise.all(As(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function Ms(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 Va=Ct.length;function Ps(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ps(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Va;n++){const s=Ct[n],i=e.props[s];(de(i)||i===!1)&&(t[s]=i)}return t}const Ca=[...Vt].reverse(),Aa=Vt.length;function Ma(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Sa(e,n,s)))}function Pa(e){let t=Ma(e),n=un(),s=!0;const i=l=>(u,c)=>{var f;const d=he(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:g,...y}=d;u={...u,...y,...g}}return u};function r(l){t=l(e)}function o(l){const{props:u}=e,c=Ps(e.parent)||{},d=[],f=new Set;let h={},g=1/0;for(let w=0;w<Aa;w++){const p=Ca[w],C=n[p],m=u[p]!==void 0?u[p]:c[p],P=de(m),x=p===l?C.isActive:null;x===!1&&(g=w);let M=m===c[p]&&m!==u[p]&&P;if(M&&s&&e.manuallyAnimateOnMount&&(M=!1),C.protectedKeys={...h},!C.isActive&&x===null||!m&&!C.prevProp||Re(m)||typeof m=="boolean")continue;const V=Ea(C.prevProp,m);let S=V||p===l&&C.isActive&&!M&&P||w>g&&P,R=!1;const F=Array.isArray(m)?m:[m];let X=F.reduce(i(p),{});x===!1&&(X={});const{prevResolvedValues:Ft={}}=C,Bs={...Ft,...X},Ot=O=>{S=!0,f.has(O)&&(R=!0,f.delete(O)),C.needsAnimating[O]=!0;const B=e.getValue(O);B&&(B.liveStyle=!1)};for(const O in Bs){const B=X[O],Oe=Ft[O];if(h.hasOwnProperty(O))continue;let Le=!1;st(B)&&st(Oe)?Le=!Ms(B,Oe):Le=B!==Oe,Le?B!=null?Ot(O):f.add(O):B!==void 0&&f.has(O)?Ot(O):C.protectedKeys[O]=!0}C.prevProp=m,C.prevResolvedValues=X,C.isActive&&(h={...h,...X}),s&&e.blockInitialAnimation&&(S=!1),S&&(!(M&&V)||R)&&d.push(...F.map(O=>({animation:O,options:{type:p}})))}if(f.size){const w={};if(typeof u.initial!="boolean"){const p=he(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(w.transition=p.transition)}f.forEach(p=>{const C=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),w[p]=C??null}),d.push({animation:w})}let y=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=un(),s=!0}}}function Ea(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ms(t,e):!1}function _(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function un(){return{animate:_(!0),whileInView:_(),whileHover:_(),whileTap:_(),whileDrag:_(),whileFocus:_(),exit:_()}}class ae{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Da extends ae{constructor(t){super(t),t.animationState||(t.animationState=Pa(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Re(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Ra=0;class Fa extends ae{constructor(){super(...arguments),this.id=Ra++}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 Oa={animation:{Feature:Da},exit:{Feature:Fa}};function ln(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Es(e){return{point:{x:e.pageX,y:e.pageY}}}function La({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Ia(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}const fn=()=>({min:0,max:0}),Ds=()=>({x:fn(),y:fn()});function ka(e,t){return La(Ia(e.getBoundingClientRect(),t))}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&&k.postRender(()=>r(t,Es(t)))}class Na extends ae{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 Ba 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=Pe(ln(this.node.current,"focus",()=>this.onFocus()),ln(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&&k.postRender(()=>r(t,Es(t)))}class ja extends ae{mount(){const{current:t}=this.node;t&&(this.unmount=To(t,(n,s)=>(hn(this.node,s,"Start"),(i,{success:r})=>hn(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rt=new WeakMap,_e=new WeakMap,Ka=e=>{const t=rt.get(e.target);t&&t(e)},Wa=e=>{e.forEach(Ka)};function _a({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(Wa,{root:e,...t})),s[i]}function $a(e,t,n){const s=_a(t);return rt.set(e,n),s.observe(e),()=>{rt.delete(e),s.unobserve(e)}}const Ua={some:0,all:1};class za 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:Ua[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return $a(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(Ga(t,n))&&this.startObserver()}unmount(){}}function Ga({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ha={inView:{Feature:za},tap:{Feature:ja},focus:{Feature:Ba},hover:{Feature:Na}},ot={current:null},Rs={current:!1};function qa(){if(Rs.current=!0,!!ut)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ot.current=e.matches;e.addEventListener("change",t),t()}else ot.current=!1}const Ya=new WeakMap;function Xa(e,t,n){for(const s in t){const i=t[s],r=n[s];if(L(i))e.addValue(s,i);else if(L(r))e.addValue(s,Ae(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,Ae(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const pn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Za{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=wt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=I.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,k.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;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.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Fe(n),this.isVariantNode=ms(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&L(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Ya.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Rs.current||qa(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ot.current,process.env.NODE_ENV!=="production"&&Mn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ue(this.notifyUpdate),Ue(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=oe.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in 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):Ds()}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<pn.length;s++){const i=pn[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=Xa(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=Ae(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"&&(xn(s)||Sn(s))?s=parseFloat(s):!xo(s)&&ie.test(n)&&(s=us(t,n)),this.setBaseTarget(t,L(s)?s.get():s)),L(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=Dt(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&&!L(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 Cn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Fs extends Za{constructor(){super(...arguments),this.KeyframeResolver=ao}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;L(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Os(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 Ja(e){return window.getComputedStyle(e)}class Qa extends Fs{constructor(){super(...arguments),this.type="html",this.renderInstance=Os}readValueFromInstance(t,n){var s;if(oe.has(n))return(s=this.projection)!=null&&s.isProjecting?Ze(n):Cr(t,n);{const i=Ja(t),r=(jn(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ka(t,n)}build(t,n,s){Mt(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Rt(t,n,s)}}const Ls=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 ec(e,t,n,s){Os(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Ls.has(i)?i:At(i),t.attrs[i])}class tc extends Fs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ds}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(oe.has(n)){const s=cs(n);return s&&s.default||0}return n=Ls.has(n)?n:At(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Cs(t,n,s)}build(t,n,s){ws(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){ec(t,n,s,i)}mount(t){this.isSVGTag=Ss(t.tagName),super.mount(t)}}const nc=(e,t)=>Et(e)?new tc(t):new Qa(t,{allowProjection:e!==T.Fragment}),sc={renderer:nc,...Oa,...Ha},at=ia("div"),Is=T.createContext({layers:[],setLayers:()=>{},addLayer:()=>{},removeLayer:()=>{},removeTopLayer:()=>{}}),ic=({children:e})=>{const[t,n]=T.useState([]),s=o=>{n(a=>[...a,o])},i=o=>{n(t.filter(a=>a!==o))},r=()=>{const o=t[t.length-1];o&&i(o)};return A.jsx(Is.Provider,{value:{layers:t,setLayers:n,addLayer:s,removeLayer:i,removeTopLayer:r},children:e})},ks=()=>T.useContext(Is),rc=({defaultOpen:e,open:t,onOpenChange:n,...s})=>{const[i,r]=pi({prop:t,onChange:n,defaultProp:e??!1}),o=ks(),a=s.a11yTitle;if(T.useEffect(()=>{!i&&o.layers.includes(a)&&o.removeLayer(a)},[a,o,i]),!!i)return A.jsx(oc,{open:i,onOpenChange:r,...s})},oc=({open:e,onOpenChange:t,a11yTitle:n,a11yDescription:s,children:i,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,...l})=>{var y,w;const u=n,c=ks();T.useEffect(()=>{!c||!e||c.layers.includes(u)||c.addLayer(u)},[u,c,e]);const d=((y=c.layers)==null?void 0:y.indexOf(u))||0,f=((w=c.layers)==null?void 0:w.length)||0,h=d!==0,g=u===c.layers[c.layers.length-1];return A.jsx(So,{features:sc,children:A.jsx(vn,{onEscapeKeyDown:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},onPointerDownOutside:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},children:A.jsxs(Q.Root,{open:e,onOpenChange:p=>{var m;if(((m=c==null?void 0:c.layers)==null?void 0:m.length)>0)return p===!1&&u===c.layers[c.layers.length-1]?(c.removeLayer(u),t(!1)):void 0;t(p)},children:[A.jsxs(Ys.Root,{children:[A.jsx(Q.Title,{children:n}),s&&A.jsx(Q.Description,{children:s})]}),e&&A.jsx(qs.Root,{className:"tgph",children:A.jsx(ac,{layer:d,children:A.jsx(Ws.FocusScope,{trapped:typeof r=="boolean"?r:g,onMountAutoFocus:o,onUnmountAutoFocus:a,asChild:!0,children:A.jsx(zs.RefToTgphRef,{children:A.jsx(H.Stack,{as:at,initial:{top:`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${f-1})`},animate:{top:h?`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${d} )`:"var(--tgph-spacing-16)"},exit:{top:0},transition:{type:"spring",duration:.3,bounce:0},w:"full",justify:"center",style:{position:"fixed",left:0,maxHeight:"calc(100vh - var(--tgph-spacing-32))",maxWidth:"calc(100vw - var(--tgph-spacing-8))",zIndex:`calc(var(--tgph-zIndex-modal) + ${d})`},children:A.jsx(H.Stack,{direction:"column",as:at,animate:{scale:1.02-Math.abs(f-d)*.02,transformOrigin:"center center"},transition:{duration:.2,bounce:0,type:"spring"},maxW:l.maxW??"160",w:l.w??"full",bg:"surface-1",border:"px",borderColor:"gray-8",rounded:"4",shadow:"3",...l,children:i},`content-${u}`)},`container-${u}`)})})})})]},u)})})},ac=({layer:e,children:t})=>e>0?t:A.jsxs(Q.Overlay,{children:[A.jsx(H.Box,{as:at,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,bounce:0,type:"spring"},bg:"alpha-black-6",w:"full",h:"full",zIndex:"overlay",style:{position:"fixed",cursor:"pointer",inset:"0px"}}),t]}),cc=T.forwardRef(({children:e,...t},n)=>A.jsx(Q.Content,{ref:n,asChild:!0,...t,children:A.jsx(H.Stack,{direction:"column",h:"full",...t,children:e})})),uc=({size:e="1",variant:t="ghost",...n})=>A.jsx(Q.Close,{asChild:!0,children:A.jsx(Us.Button,{icon:{icon:Gs.X,alt:"Close Modal"},variant:t,size:e,...n})}),lc=({style:e,children:t,...n})=>A.jsx(H.Stack,{direction:"column",px:"6",py:"4",style:{overflowY:"auto",...e},...n,children:t}),fc=({children:e,...t})=>A.jsx(H.Stack,{direction:"row",justify:"space-between",align:"center",px:"6",py:"4",borderBottom:"px",...t,children:e}),dc=({children:e,...t})=>A.jsx(H.Stack,{direction:"row",align:"center",justify:"flex-end",gap:"2",px:"6",py:"4",borderTop:"px",...t,children:e}),Ns={};Object.assign(Ns,{Root:rc,Content:cc,Close:uc,Body:lc,Header:fc,Footer:dc});exports.Modal=Ns;exports.ModalStackingProvider=ic;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|