prisma-goat 0.8.7 → 0.8.9

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Version
4
4
 
5
- ### 0.8.7
5
+ ### 0.8.9
6
6
 
7
7
  ---
8
8
 
@@ -6163,7 +6163,7 @@ const vs = N(
6163
6163
  secondary: "text-[#1F2937]",
6164
6164
  experiences: "text-white"
6165
6165
  };
6166
- return /* @__PURE__ */ y("nav", { ref: w, ...Q, style: { zIndex: 9999, position: "fixed", top: "0px", left: "0px", right: "0px" }, className: `${G[A]} bg-opacity-75`, children: [
6166
+ return /* @__PURE__ */ y("nav", { ref: w, ...Q, style: { zIndex: 9999, position: "fixed", top: "0px", left: "0px", right: "0px" }, className: `${G[A]} ${A === "experiences" ? "" : "bg-opacity-75"} `, children: [
6167
6167
  /* @__PURE__ */ y("div", { style: { marginLeft: "auto", marginRight: "auto", maxWidth: "80rem", paddingLeft: C ? "0.5rem" : "1.5rem", paddingRight: C ? "0.5rem" : "1.5rem" }, children: [
6168
6168
  (A === "goatData" || A === "secondary") && /* @__PURE__ */ i(
6169
6169
  zg.div,
@@ -5,7 +5,7 @@
5
5
  rounded-md transition duration-300 focus:outline-none focus:ring-2 ${BA[g]} focus:ring-offset-2 text-left`,t===X.link?$[g]:"",t===X.link?g==="secondary"||g==="primary"||g==="darkMagenta"||g==="veryDarkViolet"||g==="success"?"text-custom-red":g==="pikaros"?"text-orange-300":"text-custom-blue":g==="primary"||g==="vividPink"||g==="darkMagenta"||g==="veryDarkViolet"||g==="danger"||g==="warning"||g==="success"||g==="pikaros"?"text-white":"text-custom-blue",t===X.link?"font-semibold":"font-normal"),onClick:()=>{og(X,p),V(!1)},children:X.label},EM))})]},p)}),B?C.jsxs("div",{className:"relative mt-3",children:[C.jsx("div",{className:"ml-3 mt-4",style:{borderBottom:`1px ${TA[g]} solid`}}),C.jsxs("div",{style:{display:"flex"},children:[C.jsx("button",{type:"button",className:`flex rounded-full bg-gray-800 text-sm transition duration-300 focus:outline-none focus:ring-2 ${BA[g]} focus:ring-offset-2 mb-4 ml-3 mt-3`,id:"user-menu-button","aria-haspopup":"true",onClick:vg,children:C.jsx("div",{className:"flex items-center justify-center rounded-full bg-gray-300 text-gray-700 font-bold",style:{width:"30px",height:"30px"},children:B.image?C.jsx("img",{src:B.image,alt:"User avatar",className:"rounded-full object-cover w-full h-full",onError:m=>{m.currentTarget.onerror=null,m.currentTarget.src=""}}):((vw=(HA=B.name)==null?void 0:HA.charAt(0))==null?void 0:vw.toUpperCase())||"?"})}),C.jsx("div",{className:`block w-full px-4 py-4 ${KA[g]} text-left`,children:B.name})]}),D.map((m,p)=>C.jsx("button",{className:R(`block w-full px-4 py-2 text-base ${j[g]}
6
6
  rounded-md transition duration-300 focus:outline-none focus:ring-2 ${BA[g]} focus:ring-offset-2 text-left`,t===m.link?$[g]:"",t===m.link?g==="secondary"||g==="primary"||g==="darkMagenta"||g==="veryDarkViolet"||g==="success"?"text-custom-red":g==="pikaros"?"text-orange-300":"text-custom-blue":g==="primary"||g==="vividPink"||g==="darkMagenta"||g==="veryDarkViolet"||g==="danger"||g==="warning"||g==="success"||g==="pikaros"?"text-white":"text-custom-blue",t===m.link?"font-semibold":"font-normal"),onClick:m.label==="Cerrar sesion"?I:()=>L(m),children:m.label},p))]}):l?C.jsx("button",{type:"button",className:R(`block w-full px-4 py-2 text-base ${j[g]}
7
7
  rounded-md transition duration-300 focus:outline-none focus:ring-2 ${BA[g]} focus:ring-offset-2 text-left`,t==="/login"?$[g]:"",t==="/login"?g==="secondary"||g==="primary"||g==="darkMagenta"||g==="veryDarkViolet"||g==="success"?"text-custom-red":g==="pikaros"?"text-orange-300":"text-custom-blue":g==="primary"||g==="vividPink"||g==="darkMagenta"||g==="veryDarkViolet"||g==="danger"||g==="warning"||g==="success"||g==="pikaros"?"text-white":"text-custom-blue",t==="/login"?"font-semibold":"font-normal"),onClick:()=>{s.push("/login"),V(!1)},children:"Login"}):C.jsx(C.Fragment,{})]}),sg&&C.jsx(Eg,{variant:G,background:a,logoGoatData:c,imgLoading:U,strokeWidth:q})]})});VM.displayName="Navbar";const dM=r.forwardRef(({variant:A="primary",logoGoatData:g="logoRed",imgLoading:B="",strokeWidth:M="10",height:D="",...w},e)=>{const Q={primary:"#1F2937",secondary:"#ededed",vividPink:"#ff0145",darkMagenta:"#770069",veryDarkViolet:"#350053",danger:"#b91c1c",warning:"#f59e0b",success:"#047857"},t={logoRed:mM,logoBlack:eB,logo6:UM,logoMagenta:uM,logoWhite:DB},s={6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",14:"14"};return C.jsxs("div",{ref:e,...w,style:{display:"flex",justifyContent:"center",alignItems:"center",height:D||"100%",minHeight:"260px",position:"relative",width:"100%"},children:[C.jsx("svg",{width:"110",height:"110",viewBox:"0 0 110 110",xmlns:"http://www.w3.org/2000/svg",className:"absolute blink 1s ease-in-out infinite",children:C.jsx("circle",{cx:"55",cy:"55",r:"45",fill:"none",stroke:Q[A],strokeWidth:s[M],strokeDasharray:"314",strokeDashoffset:"314",className:"progress-circle",style:{animation:"progress 1.4s ease-in-out infinite, blink 1s ease-in-out infinite, fade 1.4s ease-in-out infinite"}})}),C.jsx("div",{className:"flex justify-center items-center relative h-[60px] w-[60px] rounded-full",style:{animation:"blink 1s ease-in-out infinite"},children:C.jsx("div",{className:"ml-1",children:C.jsx("img",{src:B&&B.trim()!==""?B:t[g],alt:"logo"})})})]})});dM.displayName="CircularProgress";const qM=r.forwardRef(({list:A=[],listMenu:g=[],variant:B="primary",className:M,logo:D,heightLogo:w,widthLogo:e,activeRoute:Q,router:t,user:s,theme:i,InstallApp:o,variantIndicator:I="primary",backgroundIndicator:n="black",logoGoatDataIndicator:E="logoRed",imgLoadingIndicator:l="",strokeWidthIndicator:G="10",handleLogout:a,toggleTheme:c,toggeInstallApp:U,handleTogge:q,...Y},Z)=>{var Pg,og;const[f,u]=r.useState(!0),[y,V]=r.useState(null),[h,gA]=r.useState(!1),[sg,aA]=r.useState(null),[ig,dA]=r.useState(!1),b=r.useRef(null),x=()=>gA(!h),IA=()=>gA(!1),qA=()=>{q&&q(),u(k=>!k)},vg=(k,L)=>{k.subItems&&k.subItems.length>0?V(nA=>nA===L?-1:L):k.link&&t&&t.push(k.link)},jA=(k,L)=>{V(nA=>nA===L?-1:L),k.link&&t&&t.push(k.link)},rM=k=>{k.link&&t&&(t.push(k.link),IA())};return r.useEffect(()=>{if(typeof window<"u"&&(t!=null&&t.events)){const k=()=>{dA(!0)},L=()=>{dA(!1)};return t.events.on("routeChangeStart",k),t.events.on("routeChangeComplete",L),t.events.on("routeChangeError",L),()=>{t.events.off("routeChangeStart",k),t.events.off("routeChangeComplete",L),t.events.off("routeChangeError",L)}}},[t]),C.jsxs("div",{ref:Z,...Y,style:{width:f?"250px":"70px"},className:R(`fixed top-0 left-0 h-full ${eA[B]} text-white shadow-lg transition-all z-50`,M),children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center mt-4",style:{flexDirection:"column"},children:[C.jsx("img",{alt:"logo",className:"block w-auto lg:hidden",style:{height:w&&w.trim()!==""?w:"40px",width:e&&e.trim()!==""?e:"65px"},src:D&&D.trim()!==""?D:B==="secondary"?cA:YA}),C.jsx("img",{alt:"logo",className:"hidden lg:block",style:{height:w&&w.trim()!==""?w:f?"70px":"",width:e&&e.trim()!==""?e:f?"110px":"40px"},src:D&&D.trim()!==""?D:B==="secondary"?f?cA:eB:f?YA:DB}),(!D||D.trim()==="")&&C.jsx("div",{className:`${KA[B]} ${f?"":"lock w-auto lg:hidden"}`,style:{fontSize:f?"12px":"8px",letterSpacing:"4px"},children:"DATA"})]}),C.jsx("button",{onClick:qA,className:`absolute -right-3 transform -translate-y-1/2 p-1 rounded-full shadow-md ${Mt[B]} focus:outline-none`,children:f?C.jsx(Xw,{size:20}):C.jsx(Sw,{size:20})}),C.jsx("div",{style:{marginLeft:"20px",marginRight:"20px",border:`1px ${TA[B]} solid`,marginTop:"14px"}}),C.jsxs("div",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column",height:"75vh"},children:[C.jsx("div",{className:"flex flex-col items-start p-4 space-y-4 mt-7",children:A.map((k,L)=>{var nA;return C.jsxs("div",{className:"w-full relative group",children:[C.jsxs("button",{type:"button",className:R(`flex items-center justify-start w-full ${f?"px-4":""} ${f?"py-2":""} text-sm cursor-pointer rounded-md transition duration-300 focus:outline-none focus:ring-2 focus:ring-offset-2`,j[B],BA[B],Q===k.link||(nA=k.subItems)!=null&&nA.some(S=>S.link===Q)?$[B]:"",Q===k.link?B==="secondary"||B==="primary"||B==="darkMagenta"||B==="veryDarkViolet"||B==="success"?"text-custom-red":B==="pikaros"?"text-orange-300":"text-custom-blue":B==="primary"||B==="vividPink"||B==="darkMagenta"||B==="veryDarkViolet"||B==="danger"||B==="warning"||B==="success"||B==="pikaros"?"text-white":"text-custom-blue",Q===k.link?"font-semibold":"font-normal"),onClick:()=>{vg(k,L)},onMouseEnter:()=>aA(L),onMouseLeave:()=>aA(null),children:[(k==null?void 0:k.icon)&&C.jsx("div",{className:`flex ${f?"":"py-2"}`,style:{marginRight:f?"12px":"0px",marginLeft:f?"0px":"6px"},children:C.jsx(k.icon,{className:"w-6 h-6"})}),C.jsx("span",{className:`${f?"block":"hidden"}`,children:k.label})]}),sg===L&&k.description&&k.description.trim()!==""&&!f&&C.jsxs("div",{style:{border:`1px ${TA[B]} solid`,width:"240px"},className:R("absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 opacity-0 group-hover:opacity-100 rounded-md text-xs px-4 py-2 shadow-lg",f?"left-full ml-2":"left-full ml-2 translate-x-2 group-hover:translate-x-4",KA[B],eA[B]),children:[k.image&&k.image.trim()!==""&&C.jsxs("div",{className:"relative w-full h-24 mb-2",children:[C.jsx("img",{src:k.image,alt:"Tooltip Image",className:"object-cover w-full h-full rounded-t-md opacity-75 hover:opacity-100 transition-opacity duration-300"}),C.jsx("div",{className:"absolute bottom-0 w-full h-8 bg-gradient-to-t from-white/80 to-transparent"})]}),C.jsx("div",{className:"absolute top-1/2 left-0 transform -translate-y-1/2 -ml-2 w-0 h-0 border-t-4 border-r-4 border-b-4 border-transparent border-t-gray-800"}),k.description]}),k.subItems&&k.subItems.length>0&&y===L&&(f?C.jsx("div",{className:"pl-4 py-4",children:k.subItems.map((S,HA)=>C.jsx("button",{className:R(`block w-full px-4 py-1 text-sm ${j[B]}
8
- rounded-md transition duration-300 focus:outline-none focus:ring-2 ${BA[B]} focus:ring-offset-2 text-left`,Q===S.link?$[B]:"",Q===S.link?B==="secondary"||B==="primary"||B==="darkMagenta"||B==="veryDarkViolet"||B==="success"?"text-custom-red":B==="pikaros"?"text-orange-300":"text-custom-blue":B==="primary"||B==="vividPink"||B==="darkMagenta"||B==="veryDarkViolet"||B==="danger"||B==="warning"||B==="success"||B==="pikaros"?"text-white":"text-custom-blue",Q===S.link?"font-semibold":"font-normal"),onClick:()=>{jA(S,L)},children:S.label},HA))}):C.jsx("div",{style:{zIndex:"999"},className:`absolute left-0 mt-2 w-48 ${eA[B]} ${rg[B]} rounded-md shadow-lg ring-4 ring-black ring-opacity-5`,role:"menu",children:k.subItems.map((S,HA)=>C.jsx("div",{className:R(`block px-4 py-2 text-sm cursor-pointer ${eA[B]}e`,j[B]&&`${j[B]}`,Q===S.link?$[B]:"",Q===S.link?B==="secondary"||B==="primary"||B==="darkMagenta"||B==="veryDarkViolet"||B==="success"?"text-custom-red":B==="pikaros"?"text-orange-300":"text-custom-blue":B==="primary"||B==="vividPink"||B==="darkMagenta"||B==="veryDarkViolet"||B==="danger"||B==="warning"||B==="success"||B==="pikaros"?"text-white":"text-custom-blue",Q===S.link?"font-semibold":"font-normal"),onClick:()=>{jA(S,L)},children:S.label},HA))}))]},L)})}),s&&C.jsxs("div",{className:"relative ml-3",children:[C.jsxs("div",{id:"user-menu-button",style:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:x,children:[C.jsx("button",{type:"button",className:`flex rounded-full bg-gray-800 text-sm transition duration-300 focus:outline-none focus:ring-2 ${BA[B]} focus:ring-offset-2 mb-4 ml-3 mt-3`,"aria-haspopup":"true",children:C.jsx("div",{className:"flex items-center justify-center rounded-full bg-gray-300 text-gray-700 font-bold",style:{width:"28px",height:"28px"},children:s.image?C.jsx("img",{src:s.image,alt:"User avatar",className:"rounded-full object-cover w-full h-full",onError:k=>{k.currentTarget.onerror=null,k.currentTarget.src=""}}):((og=(Pg=s.name)==null?void 0:Pg.charAt(0))==null?void 0:og.toUpperCase())||"?"})}),C.jsx("div",{className:`block w-full px-4 py-4 ${KA[B]} text-left ${f?"block":"hidden"}`,children:s.name}),C.jsx("div",{className:`mr-2 ${f?"block":"hidden"}`,children:C.jsx(Bt,{size:20,color:TA[B]})})]}),h&&C.jsx("div",{ref:b,className:`absolute right-0 ${f?"left-56":"left-14"} bottom-8 mt-2 w-48 ${eA[B]} ${rg[B]} rounded-md shadow-lg ring-4 ring-black ring-opacity-5`,role:"menu",children:g.map((k,L)=>C.jsx("div",{className:R("block px-4 py-2 text-sm cursor-pointer",j[B]&&`${j[B]}`,Q===k.link?$[B]:"",Q===k.link?B==="secondary"||B==="primary"||B==="darkMagenta"||B==="veryDarkViolet"||B==="success"?"text-custom-red":B==="pikaros"?"text-orange-300":"text-custom-blue":B==="primary"||B==="vividPink"||B==="darkMagenta"||B==="veryDarkViolet"||B==="danger"||B==="warning"||B==="success"||B==="pikaros"?"text-white":"text-custom-blue",Q===k.link?"font-semibold":"font-normal"),onClick:k.label==="Cerrar sesion"?a:()=>{rM(k)},children:k.label},L))}),C.jsxs("div",{style:{display:"flex",gap:"12px",padding:"0px 20px 0px 10px",flexDirection:f?"row":"column",alignItems:"center"},children:[o&&C.jsx(ZM,{variant:B,onClick:U}),i&&C.jsx(fM,{variant:B,toggleTheme:c})]})]})]}),ig&&C.jsx(Eg,{variant:I,background:n,logoGoatData:E,imgLoading:l,strokeWidth:G})]})});qM.displayName="Sidebar";const kM=({children:A,href:g,Viewport:B,colorButton:M,setIsOpen:D,routerApp:w=!1,open:e=!1,handleOpen:Q,handleRouter:t})=>{const s=r.useRef(null),[i,o]=r.useState(M);r.useEffect(()=>{const n=()=>{const E=document.getElementById(g.slice(1));if(E){const l=E.getBoundingClientRect(),G=l.top>=0&&l.bottom<=window.innerHeight;o(G?B:M)}};return n(),window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}},[g,B,M]);const I=()=>{const n=document.getElementById(g.slice(1));n&&(n.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{const E=n.getBoundingClientRect(),l=E.top>=0&&E.bottom<=window.innerHeight;o(l?B:M),D(!1)},300))};return C.jsx("button",{className:"group",onClick:w?t:e?Q:I,ref:s,style:{display:"block",padding:"8px 12px",borderRadius:"6px",fontSize:"14px",color:i,background:"transparent",opacity:.7,textDecoration:"none",cursor:"pointer",letterSpacing:"3px",fontWeight:"800"},"aria-current":"page",title:`Enlace a ${g}`,rel:"noopener noreferrer",children:A})},KM=r.createContext({});function pM(A){const g=r.useRef(null);return g.current===null&&(g.current=A()),g.current}const tB=r.createContext(null),hM=r.createContext({transformPagePoint:A=>A,isStatic:!1,reducedMotion:"never"});function wt(A=!0){const g=r.useContext(tB);if(g===null)return[!0,null];const{isPresent:B,onExitComplete:M,register:D}=g,w=r.useId();r.useEffect(()=>{A&&D(w)},[A]);const e=r.useCallback(()=>A&&M&&M(w),[w,M,A]);return!B&&M?[!1,e]:[!0]}const QB=typeof window<"u",RM=QB?r.useLayoutEffect:r.useEffect,N=A=>A;let pA=N,wA=N;process.env.NODE_ENV!=="production"&&(pA=(A,g)=>{!A&&typeof console<"u"&&console.warn(g)},wA=(A,g)=>{if(!A)throw new Error(g)});function CB(A){let g;return()=>(g===void 0&&(g=A()),g)}const hA=(A,g,B)=>{const M=g-A;return M===0?1:(B-A)/M},tA=A=>A*1e3,iA=A=>A/1e3,tt={skipAnimations:!1,useManualTiming:!1};function Qt(A){let g=new Set,B=new Set,M=!1,D=!1;const w=new WeakSet;let e={delta:0,timestamp:0,isProcessing:!1};function Q(s){w.has(s)&&(t.schedule(s),A()),s(e)}const t={schedule:(s,i=!1,o=!1)=>{const n=o&&M?g:B;return i&&w.add(s),n.has(s)||n.add(s),s},cancel:s=>{B.delete(s),w.delete(s)},process:s=>{if(e=s,M){D=!0;return}M=!0,[g,B]=[B,g],g.forEach(Q),g.clear(),M=!1,D&&(D=!1,t.process(s))}};return t}const lg=["read","resolveKeyframes","update","preRender","render","postRender"],Ct=40;function JM(A,g){let B=!1,M=!0;const D={delta:0,timestamp:0,isProcessing:!1},w=()=>B=!0,e=lg.reduce((a,c)=>(a[c]=Qt(w),a),{}),{read:Q,resolveKeyframes:t,update:s,preRender:i,render:o,postRender:I}=e,n=()=>{const a=performance.now();B=!1,D.delta=M?1e3/60:Math.max(Math.min(a-D.timestamp,Ct),1),D.timestamp=a,D.isProcessing=!0,Q.process(D),t.process(D),s.process(D),i.process(D),o.process(D),I.process(D),D.isProcessing=!1,B&&g&&(M=!1,A(n))},E=()=>{B=!0,M=!0,D.isProcessing||A(n)};return{schedule:lg.reduce((a,c)=>{const U=e[c];return a[c]=(q,Y=!1,Z=!1)=>(B||E(),U.schedule(q,Y,Z)),a},{}),cancel:a=>{for(let c=0;c<lg.length;c++)e[lg[c]].cancel(a)},state:D,steps:e}}const{schedule:J,cancel:rA,state:O,steps:sB}=JM(typeof requestAnimationFrame<"u"?requestAnimationFrame:N,!0),zM=r.createContext({strict:!1}),vM={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"]},RA={};for(const A in vM)RA[A]={isEnabled:g=>vM[A].some(B=>!!g[B])};function st(A){for(const g in A)RA[g]={...RA[g],...A[g]}}const it=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 Gg(A){return A.startsWith("while")||A.startsWith("drag")&&A!=="draggable"||A.startsWith("layout")||A.startsWith("onTap")||A.startsWith("onPan")||A.startsWith("onLayout")||it.has(A)}let PM=A=>!Gg(A);function ot(A){A&&(PM=g=>g.startsWith("on")?!Gg(g):A(g))}try{ot(require("@emotion/is-prop-valid").default)}catch{}function It(A,g,B){const M={};for(const D in A)D==="values"&&typeof A.values=="object"||(PM(D)||B===!0&&Gg(D)||!g&&!Gg(D)||A.draggable&&D.startsWith("onDrag"))&&(M[D]=A[D]);return M}const LM=new Set;function ag(A,g,B){A||LM.has(g)||(console.warn(g),LM.add(g))}function nt(A){if(typeof Proxy>"u")return A;const g=new Map,B=(...M)=>(process.env.NODE_ENV!=="production"&&ag(!1,"motion() is deprecated. Use motion.create() instead."),A(...M));return new Proxy(B,{get:(M,D)=>D==="create"?A:(g.has(D)||g.set(D,A(D)),g.get(D))})}const cg=r.createContext({});function SA(A){return typeof A=="string"||Array.isArray(A)}function Yg(A){return A!==null&&typeof A=="object"&&typeof A.start=="function"}const iB=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oB=["initial",...iB];function yg(A){return Yg(A.animate)||oB.some(g=>SA(A[g]))}function FM(A){return!!(yg(A)||A.variants)}function rt(A,g){if(yg(A)){const{initial:B,animate:M}=A;return{initial:B===!1||SA(B)?B:void 0,animate:SA(M)?M:void 0}}return A.inherit!==!1?g:{}}function Et(A){const{initial:g,animate:B}=rt(A,r.useContext(cg));return r.useMemo(()=>({initial:g,animate:B}),[bM(g),bM(B)])}function bM(A){return Array.isArray(A)?A.join(" "):A}const lt=Symbol.for("motionComponentSymbol");function JA(A){return A&&typeof A=="object"&&Object.prototype.hasOwnProperty.call(A,"current")}function Gt(A,g,B){return r.useCallback(M=>{M&&A.onMount&&A.onMount(M),g&&(M?g.mount(M):g.unmount()),B&&(typeof B=="function"?B(M):JA(B)&&(B.current=M))},[g])}const IB=A=>A.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OM="data-"+IB("framerAppearId"),{schedule:nB,cancel:Pi}=JM(queueMicrotask,!1),jM=r.createContext({});function at(A,g,B,M,D){var w,e;const{visualElement:Q}=r.useContext(cg),t=r.useContext(zM),s=r.useContext(tB),i=r.useContext(hM).reducedMotion,o=r.useRef(null);M=M||t.renderer,!o.current&&M&&(o.current=M(A,{visualState:g,parent:Q,props:B,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:i}));const I=o.current,n=r.useContext(jM);I&&!I.projection&&D&&(I.type==="html"||I.type==="svg")&&ct(o.current,B,D,n);const E=r.useRef(!1);r.useInsertionEffect(()=>{I&&E.current&&I.update(B,s)});const l=B[OM],G=r.useRef(!!l&&!(!((w=window.MotionHandoffIsComplete)===null||w===void 0)&&w.call(window,l))&&((e=window.MotionHasOptimisedAnimation)===null||e===void 0?void 0:e.call(window,l)));return RM(()=>{I&&(E.current=!0,window.MotionIsMounted=!0,I.updateFeatures(),nB.render(I.render),G.current&&I.animationState&&I.animationState.animateChanges())}),r.useEffect(()=>{I&&(!G.current&&I.animationState&&I.animationState.animateChanges(),G.current&&(queueMicrotask(()=>{var a;(a=window.MotionHandoffMarkAsComplete)===null||a===void 0||a.call(window,l)}),G.current=!1))}),I}function ct(A,g,B,M){const{layoutId:D,layout:w,drag:e,dragConstraints:Q,layoutScroll:t,layoutRoot:s}=g;A.projection=new B(A.latestValues,g["data-framer-portal-id"]?void 0:HM(A.parent)),A.projection.setOptions({layoutId:D,layout:w,alwaysMeasureLayout:!!e||Q&&JA(Q),visualElement:A,animationType:typeof w=="string"?w:"both",initialPromotionConfig:M,layoutScroll:t,layoutRoot:s})}function HM(A){if(A)return A.options.allowProjection!==!1?A.projection:HM(A.parent)}function Yt({preloadedFeatures:A,createVisualElement:g,useRender:B,useVisualState:M,Component:D}){var w,e;A&&st(A);function Q(s,i){let o;const I={...r.useContext(hM),...s,layoutId:yt(s)},{isStatic:n}=I,E=Et(s),l=M(s,n);if(!n&&QB){ut(I,A);const G=mt(I);o=G.MeasureLayout,E.visualElement=at(D,l,I,g,G.ProjectionNode)}return C.jsxs(cg.Provider,{value:E,children:[o&&E.visualElement?C.jsx(o,{visualElement:E.visualElement,...I}):null,B(D,s,Gt(l,E.visualElement,i),l,n,E.visualElement)]})}Q.displayName=`motion.${typeof D=="string"?D:`create(${(e=(w=D.displayName)!==null&&w!==void 0?w:D.name)!==null&&e!==void 0?e:""})`}`;const t=r.forwardRef(Q);return t[lt]=D,t}function yt({layoutId:A}){const g=r.useContext(KM).id;return g&&A!==void 0?g+"-"+A:A}function ut(A,g){const B=r.useContext(zM).strict;if(process.env.NODE_ENV!=="production"&&g&&B){const M="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";A.ignoreStrict?pA(!1,M):wA(!1,M)}}function mt(A){const{drag:g,layout:B}=RA;if(!g&&!B)return{};const M={...g,...B};return{MeasureLayout:g!=null&&g.isEnabled(A)||B!=null&&B.isEnabled(A)?M.MeasureLayout:void 0,ProjectionNode:M.ProjectionNode}}const Ut=["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 rB(A){return typeof A!="string"||A.includes("-")?!1:!!(Ut.indexOf(A)>-1||/[A-Z]/u.test(A))}function TM(A){const g=[{},{}];return A==null||A.values.forEach((B,M)=>{g[0][M]=B.get(),g[1][M]=B.getVelocity()}),g}function EB(A,g,B,M){if(typeof g=="function"){const[D,w]=TM(M);g=g(B!==void 0?B:A.custom,D,w)}if(typeof g=="string"&&(g=A.variants&&A.variants[g]),typeof g=="function"){const[D,w]=TM(M);g=g(B!==void 0?B:A.custom,D,w)}return g}const lB=A=>Array.isArray(A),ft=A=>!!(A&&typeof A=="object"&&A.mix&&A.toValue),Zt=A=>lB(A)?A[A.length-1]||0:A,H=A=>!!(A&&A.getVelocity);function ug(A){const g=H(A)?A.get():A;return ft(g)?g.toValue():g}function Vt({scrapeMotionValuesFromProps:A,createRenderState:g,onUpdate:B},M,D,w){const e={latestValues:dt(M,D,w,A),renderState:g()};return B&&(e.onMount=Q=>B({props:M,current:Q,...e}),e.onUpdate=Q=>B(Q)),e}const SM=A=>(g,B)=>{const M=r.useContext(cg),D=r.useContext(tB),w=()=>Vt(A,g,M,D);return B?w():pM(w)};function dt(A,g,B,M){const D={},w=M(A,{});for(const I in w)D[I]=ug(w[I]);let{initial:e,animate:Q}=A;const t=yg(A),s=FM(A);g&&s&&!t&&A.inherit!==!1&&(e===void 0&&(e=g.initial),Q===void 0&&(Q=g.animate));let i=B?B.initial===!1:!1;i=i||e===!1;const o=i?Q:e;if(o&&typeof o!="boolean"&&!Yg(o)){const I=Array.isArray(o)?o:[o];for(let n=0;n<I.length;n++){const E=EB(A,I[n]);if(E){const{transitionEnd:l,transition:G,...a}=E;for(const c in a){let U=a[c];if(Array.isArray(U)){const q=i?U.length-1:0;U=U[q]}U!==null&&(D[c]=U)}for(const c in l)D[c]=l[c]}}}return D}const zA=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yA=new Set(zA),XM=A=>g=>typeof g=="string"&&g.startsWith(A),NM=XM("--"),qt=XM("var(--"),GB=A=>qt(A)?kt.test(A.split("/*")[0].trim()):!1,kt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xM=(A,g)=>g&&typeof A=="number"?g.transform(A):A,oA=(A,g,B)=>B>g?g:B<A?A:B,vA={test:A=>typeof A=="number",parse:parseFloat,transform:A=>A},XA={...vA,transform:A=>oA(0,1,A)},mg={...vA,default:1},NA=A=>({test:g=>typeof g=="string"&&g.endsWith(A)&&g.split(" ").length===1,parse:parseFloat,transform:g=>`${g}${A}`}),EA=NA("deg"),QA=NA("%"),d=NA("px"),Kt=NA("vh"),pt=NA("vw"),WM={...QA,parse:A=>QA.parse(A)/100,transform:A=>QA.transform(A*100)},ht={borderWidth:d,borderTopWidth:d,borderRightWidth:d,borderBottomWidth:d,borderLeftWidth:d,borderRadius:d,radius:d,borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,width:d,maxWidth:d,height:d,maxHeight:d,top:d,right:d,bottom:d,left:d,padding:d,paddingTop:d,paddingRight:d,paddingBottom:d,paddingLeft:d,margin:d,marginTop:d,marginRight:d,marginBottom:d,marginLeft:d,backgroundPositionX:d,backgroundPositionY:d},Rt={rotate:EA,rotateX:EA,rotateY:EA,rotateZ:EA,scale:mg,scaleX:mg,scaleY:mg,scaleZ:mg,skew:EA,skewX:EA,skewY:EA,distance:d,translateX:d,translateY:d,translateZ:d,x:d,y:d,z:d,perspective:d,transformPerspective:d,opacity:XA,originX:WM,originY:WM,originZ:d},$M={...vA,transform:Math.round},aB={...ht,...Rt,zIndex:$M,size:d,fillOpacity:XA,strokeOpacity:XA,numOctaves:$M},Jt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zt=zA.length;function vt(A,g,B){let M="",D=!0;for(let w=0;w<zt;w++){const e=zA[w],Q=A[e];if(Q===void 0)continue;let t=!0;if(typeof Q=="number"?t=Q===(e.startsWith("scale")?1:0):t=parseFloat(Q)===0,!t||B){const s=xM(Q,aB[e]);if(!t){D=!1;const i=Jt[e]||e;M+=`${i}(${s}) `}B&&(g[e]=s)}}return M=M.trim(),B?M=B(g,D?"":M):D&&(M="none"),M}function cB(A,g,B){const{style:M,vars:D,transformOrigin:w}=A;let e=!1,Q=!1;for(const t in g){const s=g[t];if(yA.has(t)){e=!0;continue}else if(NM(t)){D[t]=s;continue}else{const i=xM(s,aB[t]);t.startsWith("origin")?(Q=!0,w[t]=i):M[t]=i}}if(g.transform||(e||B?M.transform=vt(g,A.transform,B):M.transform&&(M.transform="none")),Q){const{originX:t="50%",originY:s="50%",originZ:i=0}=w;M.transformOrigin=`${t} ${s} ${i}`}}const Pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lt={offset:"strokeDashoffset",array:"strokeDasharray"};function Ft(A,g,B=1,M=0,D=!0){A.pathLength=1;const w=D?Pt:Lt;A[w.offset]=d.transform(-M);const e=d.transform(g),Q=d.transform(B);A[w.array]=`${e} ${Q}`}function _M(A,g,B){return typeof A=="string"?A:d.transform(g+B*A)}function bt(A,g,B){const M=_M(g,A.x,A.width),D=_M(B,A.y,A.height);return`${M} ${D}`}function YB(A,{attrX:g,attrY:B,attrScale:M,originX:D,originY:w,pathLength:e,pathSpacing:Q=1,pathOffset:t=0,...s},i,o){if(cB(A,s,o),i){A.style.viewBox&&(A.attrs.viewBox=A.style.viewBox);return}A.attrs=A.style,A.style={};const{attrs:I,style:n,dimensions:E}=A;I.transform&&(E&&(n.transform=I.transform),delete I.transform),E&&(D!==void 0||w!==void 0||n.transform)&&(n.transformOrigin=bt(E,D!==void 0?D:.5,w!==void 0?w:.5)),g!==void 0&&(I.x=g),B!==void 0&&(I.y=B),M!==void 0&&(I.scale=M),e!==void 0&&Ft(I,e,Q,t,!1)}const yB=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),AD=()=>({...yB(),attrs:{}}),uB=A=>typeof A=="string"&&A.toLowerCase()==="svg";function gD(A,{style:g,vars:B},M,D){Object.assign(A.style,g,D&&D.getProjectionStyles(M));for(const w in B)A.style.setProperty(w,B[w])}const BD=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 MD(A,g,B,M){gD(A,g,void 0,M);for(const D in g.attrs)A.setAttribute(BD.has(D)?D:IB(D),g.attrs[D])}const Ug={};function Ot(A){Object.assign(Ug,A)}function DD(A,{layout:g,layoutId:B}){return yA.has(A)||A.startsWith("origin")||(g||B!==void 0)&&(!!Ug[A]||A==="opacity")}function mB(A,g,B){var M;const{style:D}=A,w={};for(const e in D)(H(D[e])||g.style&&H(g.style[e])||DD(e,A)||((M=B==null?void 0:B.getValue(e))===null||M===void 0?void 0:M.liveStyle)!==void 0)&&(w[e]=D[e]);return w}function eD(A,g,B){const M=mB(A,g,B);for(const D in A)if(H(A[D])||H(g[D])){const w=zA.indexOf(D)!==-1?"attr"+D.charAt(0).toUpperCase()+D.substring(1):D;M[w]=A[D]}return M}function jt(A,g){try{g.dimensions=typeof A.getBBox=="function"?A.getBBox():A.getBoundingClientRect()}catch{g.dimensions={x:0,y:0,width:0,height:0}}}const wD=["x","y","width","height","cx","cy","r"],Ht={useVisualState:SM({scrapeMotionValuesFromProps:eD,createRenderState:AD,onUpdate:({props:A,prevProps:g,current:B,renderState:M,latestValues:D})=>{if(!B)return;let w=!!A.drag;if(!w){for(const Q in D)if(yA.has(Q)){w=!0;break}}if(!w)return;let e=!g;if(g)for(let Q=0;Q<wD.length;Q++){const t=wD[Q];A[t]!==g[t]&&(e=!0)}e&&J.read(()=>{jt(B,M),J.render(()=>{YB(M,D,uB(B.tagName),A.transformTemplate),MD(B,M)})})}})},Tt={useVisualState:SM({scrapeMotionValuesFromProps:mB,createRenderState:yB})};function tD(A,g,B){for(const M in g)!H(g[M])&&!DD(M,B)&&(A[M]=g[M])}function St({transformTemplate:A},g){return r.useMemo(()=>{const B=yB();return cB(B,g,A),Object.assign({},B.vars,B.style)},[g])}function Xt(A,g){const B=A.style||{},M={};return tD(M,B,A),Object.assign(M,St(A,g)),M}function Nt(A,g){const B={},M=Xt(A,g);return A.drag&&A.dragListener!==!1&&(B.draggable=!1,M.userSelect=M.WebkitUserSelect=M.WebkitTouchCallout="none",M.touchAction=A.drag===!0?"none":`pan-${A.drag==="x"?"y":"x"}`),A.tabIndex===void 0&&(A.onTap||A.onTapStart||A.whileTap)&&(B.tabIndex=0),B.style=M,B}function xt(A,g,B,M){const D=r.useMemo(()=>{const w=AD();return YB(w,g,uB(M),A.transformTemplate),{...w.attrs,style:{...w.style}}},[g]);if(A.style){const w={};tD(w,A.style,A),D.style={...w,...D.style}}return D}function Wt(A=!1){return(B,M,D,{latestValues:w},e)=>{const t=(rB(B)?xt:Nt)(M,w,e,B),s=It(M,typeof B=="string",A),i=B!==r.Fragment?{...s,...t,ref:D}:{},{children:o}=M,I=r.useMemo(()=>H(o)?o.get():o,[o]);return r.createElement(B,{...i,children:I})}}function $t(A,g){return function(M,{forwardMotionProps:D}={forwardMotionProps:!1}){const e={...rB(M)?Ht:Tt,preloadedFeatures:A,useRender:Wt(D),createVisualElement:g,Component:M};return Yt(e)}}function QD(A,g){if(!Array.isArray(g))return!1;const B=g.length;if(B!==A.length)return!1;for(let M=0;M<B;M++)if(g[M]!==A[M])return!1;return!0}function fg(A,g,B){const M=A.getProps();return EB(M,g,B!==void 0?B:M.custom,A)}const _t=CB(()=>window.ScrollTimeline!==void 0);class AQ{constructor(g){this.stop=()=>this.runAll("stop"),this.animations=g.filter(Boolean)}get finished(){return Promise.all(this.animations.map(g=>"finished"in g?g.finished:g))}getAll(g){return this.animations[0][g]}setAll(g,B){for(let M=0;M<this.animations.length;M++)this.animations[M][g]=B}attachTimeline(g,B){const M=this.animations.map(D=>{if(_t()&&D.attachTimeline)return D.attachTimeline(g);if(typeof B=="function")return B(D)});return()=>{M.forEach((D,w)=>{D&&D(),this.animations[w].stop()})}}get time(){return this.getAll("time")}set time(g){this.setAll("time",g)}get speed(){return this.getAll("speed")}set speed(g){this.setAll("speed",g)}get startTime(){return this.getAll("startTime")}get duration(){let g=0;for(let B=0;B<this.animations.length;B++)g=Math.max(g,this.animations[B].duration);return g}runAll(g){this.animations.forEach(B=>B[g]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class gQ extends AQ{then(g,B){return Promise.all(this.animations).then(g).catch(B)}}function UB(A,g){return A?A[g]||A.default||A:void 0}const fB=2e4;function CD(A){let g=0;const B=50;let M=A.next(g);for(;!M.done&&g<fB;)g+=B,M=A.next(g);return g>=fB?1/0:g}function ZB(A){return typeof A=="function"}function sD(A,g){A.timeline=g,A.onfinish=null}const VB=A=>Array.isArray(A)&&typeof A[0]=="number",BQ={linearEasing:void 0};function MQ(A,g){const B=CB(A);return()=>{var M;return(M=BQ[g])!==null&&M!==void 0?M:B()}}const Zg=MQ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),iD=(A,g,B=10)=>{let M="";const D=Math.max(Math.round(g/B),2);for(let w=0;w<D;w++)M+=A(hA(0,D-1,w))+", ";return`linear(${M.substring(0,M.length-2)})`};function oD(A){return!!(typeof A=="function"&&Zg()||!A||typeof A=="string"&&(A in dB||Zg())||VB(A)||Array.isArray(A)&&A.every(oD))}const xA=([A,g,B,M])=>`cubic-bezier(${A}, ${g}, ${B}, ${M})`,dB={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xA([0,.65,.55,1]),circOut:xA([.55,0,1,.45]),backIn:xA([.31,.01,.66,-.59]),backOut:xA([.33,1.53,.69,.99])};function ID(A,g){if(A)return typeof A=="function"&&Zg()?iD(A,g):VB(A)?xA(A):Array.isArray(A)?A.map(B=>ID(B,g)||dB.easeOut):dB[A]}const MA={x:!1,y:!1};function nD(){return MA.x||MA.y}function rD(A,g,B){var M;if(A instanceof Element)return[A];if(typeof A=="string"){let D=document;const w=(M=void 0)!==null&&M!==void 0?M:D.querySelectorAll(A);return w?Array.from(w):[]}return Array.from(A)}function ED(A,g){const B=rD(A),M=new AbortController,D={passive:!0,...g,signal:M.signal};return[B,D,()=>M.abort()]}function lD(A){return!(A.pointerType==="touch"||nD())}function DQ(A,g,B={}){const[M,D,w]=ED(A,B),e=Q=>{if(!lD(Q))return;const{target:t}=Q,s=g(t,Q);if(typeof s!="function"||!t)return;const i=o=>{lD(o)&&(s(o),t.removeEventListener("pointerleave",i))};t.addEventListener("pointerleave",i,D)};return M.forEach(Q=>{Q.addEventListener("pointerenter",e,D)}),w}const GD=(A,g)=>g?A===g?!0:GD(A,g.parentElement):!1,qB=A=>A.pointerType==="mouse"?typeof A.button!="number"||A.button<=0:A.isPrimary!==!1,eQ=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wQ(A){return eQ.has(A.tagName)||A.tabIndex!==-1}const WA=new WeakSet;function aD(A){return g=>{g.key==="Enter"&&A(g)}}function kB(A,g){A.dispatchEvent(new PointerEvent("pointer"+g,{isPrimary:!0,bubbles:!0}))}const tQ=(A,g)=>{const B=A.currentTarget;if(!B)return;const M=aD(()=>{if(WA.has(B))return;kB(B,"down");const D=aD(()=>{kB(B,"up")}),w=()=>kB(B,"cancel");B.addEventListener("keyup",D,g),B.addEventListener("blur",w,g)});B.addEventListener("keydown",M,g),B.addEventListener("blur",()=>B.removeEventListener("keydown",M),g)};function cD(A){return qB(A)&&!nD()}function QQ(A,g,B={}){const[M,D,w]=ED(A,B),e=Q=>{const t=Q.currentTarget;if(!cD(Q)||WA.has(t))return;WA.add(t);const s=g(t,Q),i=(n,E)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",I),!(!cD(n)||!WA.has(t))&&(WA.delete(t),typeof s=="function"&&s(n,{success:E}))},o=n=>{i(n,B.useGlobalTarget||GD(t,n.target))},I=n=>{i(n,!1)};window.addEventListener("pointerup",o,D),window.addEventListener("pointercancel",I,D)};return M.forEach(Q=>{!wQ(Q)&&Q.getAttribute("tabindex")===null&&(Q.tabIndex=0),(B.useGlobalTarget?window:Q).addEventListener("pointerdown",e,D),Q.addEventListener("focus",s=>tQ(s,D),D)}),w}function CQ(A){return A==="x"||A==="y"?MA[A]?null:(MA[A]=!0,()=>{MA[A]=!1}):MA.x||MA.y?null:(MA.x=MA.y=!0,()=>{MA.x=MA.y=!1})}const YD=new Set(["width","height","top","left","right","bottom",...zA]);let Vg;function sQ(){Vg=void 0}const CA={now:()=>(Vg===void 0&&CA.set(O.isProcessing||tt.useManualTiming?O.timestamp:performance.now()),Vg),set:A=>{Vg=A,queueMicrotask(sQ)}};function KB(A,g){A.indexOf(g)===-1&&A.push(g)}function pB(A,g){const B=A.indexOf(g);B>-1&&A.splice(B,1)}class hB{constructor(){this.subscriptions=[]}add(g){return KB(this.subscriptions,g),()=>pB(this.subscriptions,g)}notify(g,B,M){const D=this.subscriptions.length;if(D)if(D===1)this.subscriptions[0](g,B,M);else for(let w=0;w<D;w++){const e=this.subscriptions[w];e&&e(g,B,M)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function yD(A,g){return g?A*(1e3/g):0}const uD=30,iQ=A=>!isNaN(parseFloat(A));class oQ{constructor(g,B={}){this.version="12.0.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(M,D=!0)=>{const w=CA.now();this.updatedAt!==w&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(M),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),D&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(g),this.owner=B.owner}setCurrent(g){this.current=g,this.updatedAt=CA.now(),this.canTrackVelocity===null&&g!==void 0&&(this.canTrackVelocity=iQ(this.current))}setPrevFrameValue(g=this.current){this.prevFrameValue=g,this.prevUpdatedAt=this.updatedAt}onChange(g){return process.env.NODE_ENV!=="production"&&ag(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",g)}on(g,B){this.events[g]||(this.events[g]=new hB);const M=this.events[g].add(B);return g==="change"?()=>{M(),J.read(()=>{this.events.change.getSize()||this.stop()})}:M}clearListeners(){for(const g in this.events)this.events[g].clear()}attach(g,B){this.passiveEffect=g,this.stopPassiveEffect=B}set(g,B=!0){!B||!this.passiveEffect?this.updateAndNotify(g,B):this.passiveEffect(g,this.updateAndNotify)}setWithVelocity(g,B,M){this.set(B),this.prev=void 0,this.prevFrameValue=g,this.prevUpdatedAt=this.updatedAt-M}jump(g,B=!0){this.updateAndNotify(g),this.prev=g,this.prevUpdatedAt=this.prevFrameValue=void 0,B&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const g=CA.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||g-this.updatedAt>uD)return 0;const B=Math.min(this.updatedAt-this.prevUpdatedAt,uD);return yD(parseFloat(this.current)-parseFloat(this.prevFrameValue),B)}start(g){return this.stop(),new Promise(B=>{this.hasAnimated=!0,this.animation=g(B),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $A(A,g){return new oQ(A,g)}function IQ(A,g,B){A.hasValue(g)?A.getValue(g).set(B):A.addValue(g,$A(B))}function RB(A,g){const B=fg(A,g);let{transitionEnd:M={},transition:D={},...w}=B||{};w={...w,...M};for(const e in w){const Q=Zt(w[e]);IQ(A,e,Q)}}function nQ(A){return!!(H(A)&&A.add)}function JB(A,g){const B=A.getValue("willChange");if(nQ(B))return B.add(g)}function mD(A){return A.props[OM]}const UD=(A,g,B)=>(((1-3*B+3*g)*A+(3*B-6*g))*A+3*g)*A,rQ=1e-7,EQ=12;function lQ(A,g,B,M,D){let w,e,Q=0;do e=g+(B-g)/2,w=UD(e,M,D)-A,w>0?B=e:g=e;while(Math.abs(w)>rQ&&++Q<EQ);return e}function _A(A,g,B,M){if(A===g&&B===M)return N;const D=w=>lQ(w,0,1,A,B);return w=>w===0||w===1?w:UD(D(w),g,M)}const fD=A=>g=>g<=.5?A(2*g)/2:(2-A(2*(1-g)))/2,ZD=A=>g=>1-A(1-g),VD=_A(.33,1.53,.69,.99),zB=ZD(VD),dD=fD(zB),qD=A=>(A*=2)<1?.5*zB(A):.5*(2-Math.pow(2,-10*(A-1))),vB=A=>1-Math.sin(Math.acos(A)),kD=ZD(vB),KD=fD(vB),pD=A=>/^0[^.\s]+$/u.test(A);function GQ(A){return typeof A=="number"?A===0:A!==null?A==="none"||A==="0"||pD(A):!0}const Ag=A=>Math.round(A*1e5)/1e5,PB=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aQ(A){return A==null}const cQ=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,LB=(A,g)=>B=>!!(typeof B=="string"&&cQ.test(B)&&B.startsWith(A)||g&&!aQ(B)&&Object.prototype.hasOwnProperty.call(B,g)),hD=(A,g,B)=>M=>{if(typeof M!="string")return M;const[D,w,e,Q]=M.match(PB);return{[A]:parseFloat(D),[g]:parseFloat(w),[B]:parseFloat(e),alpha:Q!==void 0?parseFloat(Q):1}},YQ=A=>oA(0,255,A),FB={...vA,transform:A=>Math.round(YQ(A))},uA={test:LB("rgb","red"),parse:hD("red","green","blue"),transform:({red:A,green:g,blue:B,alpha:M=1})=>"rgba("+FB.transform(A)+", "+FB.transform(g)+", "+FB.transform(B)+", "+Ag(XA.transform(M))+")"};function yQ(A){let g="",B="",M="",D="";return A.length>5?(g=A.substring(1,3),B=A.substring(3,5),M=A.substring(5,7),D=A.substring(7,9)):(g=A.substring(1,2),B=A.substring(2,3),M=A.substring(3,4),D=A.substring(4,5),g+=g,B+=B,M+=M,D+=D),{red:parseInt(g,16),green:parseInt(B,16),blue:parseInt(M,16),alpha:D?parseInt(D,16)/255:1}}const bB={test:LB("#"),parse:yQ,transform:uA.transform},PA={test:LB("hsl","hue"),parse:hD("hue","saturation","lightness"),transform:({hue:A,saturation:g,lightness:B,alpha:M=1})=>"hsla("+Math.round(A)+", "+QA.transform(Ag(g))+", "+QA.transform(Ag(B))+", "+Ag(XA.transform(M))+")"},T={test:A=>uA.test(A)||bB.test(A)||PA.test(A),parse:A=>uA.test(A)?uA.parse(A):PA.test(A)?PA.parse(A):bB.parse(A),transform:A=>typeof A=="string"?A:A.hasOwnProperty("red")?uA.transform(A):PA.transform(A)},uQ=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mQ(A){var g,B;return isNaN(A)&&typeof A=="string"&&(((g=A.match(PB))===null||g===void 0?void 0:g.length)||0)+(((B=A.match(uQ))===null||B===void 0?void 0:B.length)||0)>0}const RD="number",JD="color",UQ="var",fQ="var(",zD="${}",ZQ=/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 gg(A){const g=A.toString(),B=[],M={color:[],number:[],var:[]},D=[];let w=0;const Q=g.replace(ZQ,t=>(T.test(t)?(M.color.push(w),D.push(JD),B.push(T.parse(t))):t.startsWith(fQ)?(M.var.push(w),D.push(UQ),B.push(t)):(M.number.push(w),D.push(RD),B.push(parseFloat(t))),++w,zD)).split(zD);return{values:B,split:Q,indexes:M,types:D}}function vD(A){return gg(A).values}function PD(A){const{split:g,types:B}=gg(A),M=g.length;return D=>{let w="";for(let e=0;e<M;e++)if(w+=g[e],D[e]!==void 0){const Q=B[e];Q===RD?w+=Ag(D[e]):Q===JD?w+=T.transform(D[e]):w+=D[e]}return w}}const VQ=A=>typeof A=="number"?0:A;function dQ(A){const g=vD(A);return PD(A)(g.map(VQ))}const lA={test:mQ,parse:vD,createTransformer:PD,getAnimatableNone:dQ},qQ=new Set(["brightness","contrast","saturate","opacity"]);function kQ(A){const[g,B]=A.slice(0,-1).split("(");if(g==="drop-shadow")return A;const[M]=B.match(PB)||[];if(!M)return A;const D=B.replace(M,"");let w=qQ.has(g)?1:0;return M!==B&&(w*=100),g+"("+w+D+")"}const KQ=/\b([a-z-]*)\(.*?\)/gu,OB={...lA,getAnimatableNone:A=>{const g=A.match(KQ);return g?g.map(kQ).join(" "):A}},pQ={...aB,color:T,backgroundColor:T,outlineColor:T,fill:T,stroke:T,borderColor:T,borderTopColor:T,borderRightColor:T,borderBottomColor:T,borderLeftColor:T,filter:OB,WebkitFilter:OB},jB=A=>pQ[A];function LD(A,g){let B=jB(A);return B!==OB&&(B=lA),B.getAnimatableNone?B.getAnimatableNone(g):void 0}const hQ=new Set(["auto","none","0"]);function RQ(A,g,B){let M=0,D;for(;M<A.length&&!D;){const w=A[M];typeof w=="string"&&!hQ.has(w)&&gg(w).values.length&&(D=A[M]),M++}if(D&&B)for(const w of g)A[w]=LD(B,D)}const FD=A=>A===vA||A===d,bD=(A,g)=>parseFloat(A.split(", ")[g]),OD=(A,g)=>(B,{transform:M})=>{if(M==="none"||!M)return 0;const D=M.match(/^matrix3d\((.+)\)$/u);if(D)return bD(D[1],g);{const w=M.match(/^matrix\((.+)\)$/u);return w?bD(w[1],A):0}},JQ=new Set(["x","y","z"]),zQ=zA.filter(A=>!JQ.has(A));function vQ(A){const g=[];return zQ.forEach(B=>{const M=A.getValue(B);M!==void 0&&(g.push([B,M.get()]),M.set(B.startsWith("scale")?1:0))}),g}const LA={width:({x:A},{paddingLeft:g="0",paddingRight:B="0"})=>A.max-A.min-parseFloat(g)-parseFloat(B),height:({y:A},{paddingTop:g="0",paddingBottom:B="0"})=>A.max-A.min-parseFloat(g)-parseFloat(B),top:(A,{top:g})=>parseFloat(g),left:(A,{left:g})=>parseFloat(g),bottom:({y:A},{top:g})=>parseFloat(g)+(A.max-A.min),right:({x:A},{left:g})=>parseFloat(g)+(A.max-A.min),x:OD(4,13),y:OD(5,14)};LA.translateX=LA.x,LA.translateY=LA.y;const mA=new Set;let HB=!1,TB=!1;function jD(){if(TB){const A=Array.from(mA).filter(M=>M.needsMeasurement),g=new Set(A.map(M=>M.element)),B=new Map;g.forEach(M=>{const D=vQ(M);D.length&&(B.set(M,D),M.render())}),A.forEach(M=>M.measureInitialState()),g.forEach(M=>{M.render();const D=B.get(M);D&&D.forEach(([w,e])=>{var Q;(Q=M.getValue(w))===null||Q===void 0||Q.set(e)})}),A.forEach(M=>M.measureEndState()),A.forEach(M=>{M.suspendedScrollY!==void 0&&window.scrollTo(0,M.suspendedScrollY)})}TB=!1,HB=!1,mA.forEach(A=>A.complete()),mA.clear()}function HD(){mA.forEach(A=>{A.readKeyframes(),A.needsMeasurement&&(TB=!0)})}function PQ(){HD(),jD()}class SB{constructor(g,B,M,D,w,e=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...g],this.onComplete=B,this.name=M,this.motionValue=D,this.element=w,this.isAsync=e}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mA.add(this),HB||(HB=!0,J.read(HD),J.resolveKeyframes(jD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:g,name:B,element:M,motionValue:D}=this;for(let w=0;w<g.length;w++)if(g[w]===null)if(w===0){const e=D==null?void 0:D.get(),Q=g[g.length-1];if(e!==void 0)g[0]=e;else if(M&&B){const t=M.readValue(B,Q);t!=null&&(g[0]=t)}g[0]===void 0&&(g[0]=Q),D&&e===void 0&&D.set(g[0])}else g[w]=g[w-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),mA.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,mA.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const TD=A=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(A),LQ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function FQ(A){const g=LQ.exec(A);if(!g)return[,];const[,B,M,D]=g;return[`--${B??M}`,D]}const bQ=4;function SD(A,g,B=1){wA(B<=bQ,`Max CSS variable fallback depth detected in property "${A}". This may indicate a circular fallback dependency.`);const[M,D]=FQ(A);if(!M)return;const w=window.getComputedStyle(g).getPropertyValue(M);if(w){const e=w.trim();return TD(e)?parseFloat(e):e}return GB(D)?SD(D,g,B+1):D}const XD=A=>g=>g.test(A),ND=[vA,d,QA,EA,pt,Kt,{test:A=>A==="auto",parse:A=>A}],xD=A=>ND.find(XD(A));class WD extends SB{constructor(g,B,M,D,w){super(g,B,M,D,w,!0)}readKeyframes(){const{unresolvedKeyframes:g,element:B,name:M}=this;if(!B||!B.current)return;super.readKeyframes();for(let t=0;t<g.length;t++){let s=g[t];if(typeof s=="string"&&(s=s.trim(),GB(s))){const i=SD(s,B.current);i!==void 0&&(g[t]=i),t===g.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!YD.has(M)||g.length!==2)return;const[D,w]=g,e=xD(D),Q=xD(w);if(e!==Q)if(FD(e)&&FD(Q))for(let t=0;t<g.length;t++){const s=g[t];typeof s=="string"&&(g[t]=parseFloat(s))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:g,name:B}=this,M=[];for(let D=0;D<g.length;D++)GQ(g[D])&&M.push(D);M.length&&RQ(g,M,B)}measureInitialState(){const{element:g,unresolvedKeyframes:B,name:M}=this;if(!g||!g.current)return;M==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=LA[M](g.measureViewportBox(),window.getComputedStyle(g.current)),B[0]=this.measuredOrigin;const D=B[B.length-1];D!==void 0&&g.getValue(M,D).jump(D,!1)}measureEndState(){var g;const{element:B,name:M,unresolvedKeyframes:D}=this;if(!B||!B.current)return;const w=B.getValue(M);w&&w.jump(this.measuredOrigin,!1);const e=D.length-1,Q=D[e];D[e]=LA[M](B.measureViewportBox(),window.getComputedStyle(B.current)),Q!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=Q),!((g=this.removedTransforms)===null||g===void 0)&&g.length&&this.removedTransforms.forEach(([t,s])=>{B.getValue(t).set(s)}),this.resolveNoneKeyframes()}}const $D=(A,g)=>g==="zIndex"?!1:!!(typeof A=="number"||Array.isArray(A)||typeof A=="string"&&(lA.test(A)||A==="0")&&!A.startsWith("url("));function OQ(A){const g=A[0];if(A.length===1)return!0;for(let B=0;B<A.length;B++)if(A[B]!==g)return!0}function jQ(A,g,B,M){const D=A[0];if(D===null)return!1;if(g==="display"||g==="visibility")return!0;const w=A[A.length-1],e=$D(D,g),Q=$D(w,g);return pA(e===Q,`You are trying to animate ${g} from "${D}" to "${w}". ${D} is not an animatable value - to enable this animation set ${D} to a value animatable to ${w} via the \`style\` property.`),!e||!Q?!1:OQ(A)||(B==="spring"||ZB(B))&&M}const HQ=A=>A!==null;function dg(A,{repeat:g,repeatType:B="loop"},M){const D=A.filter(HQ),w=g&&B!=="loop"&&g%2===1?0:D.length-1;return!w||M===void 0?D[w]:M}const TQ=40;class _D{constructor({autoplay:g=!0,delay:B=0,type:M="keyframes",repeat:D=0,repeatDelay:w=0,repeatType:e="loop",...Q}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=CA.now(),this.options={autoplay:g,delay:B,type:M,repeat:D,repeatDelay:w,repeatType:e,...Q},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>TQ?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PQ(),this._resolved}onKeyframesResolved(g,B){this.resolvedAt=CA.now(),this.hasAttemptedResolve=!0;const{name:M,type:D,velocity:w,delay:e,onComplete:Q,onUpdate:t,isGenerator:s}=this.options;if(!s&&!jQ(g,M,D,w))if(e)this.options.duration=0;else{t&&t(dg(g,this.options,B)),Q&&Q(),this.resolveFinishedPromise();return}const i=this.initPlayback(g,B);i!==!1&&(this._resolved={keyframes:g,finalKeyframe:B,...i},this.onPostResolved())}onPostResolved(){}then(g,B){return this.currentFinishedPromise.then(g,B)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(g=>{this.resolveFinishedPromise=g})}}const v=(A,g,B)=>A+(g-A)*B;function XB(A,g,B){return B<0&&(B+=1),B>1&&(B-=1),B<1/6?A+(g-A)*6*B:B<1/2?g:B<2/3?A+(g-A)*(2/3-B)*6:A}function SQ({hue:A,saturation:g,lightness:B,alpha:M}){A/=360,g/=100,B/=100;let D=0,w=0,e=0;if(!g)D=w=e=B;else{const Q=B<.5?B*(1+g):B+g-B*g,t=2*B-Q;D=XB(t,Q,A+1/3),w=XB(t,Q,A),e=XB(t,Q,A-1/3)}return{red:Math.round(D*255),green:Math.round(w*255),blue:Math.round(e*255),alpha:M}}function qg(A,g){return B=>B>0?g:A}const NB=(A,g,B)=>{const M=A*A,D=B*(g*g-M)+M;return D<0?0:Math.sqrt(D)},XQ=[bB,uA,PA],NQ=A=>XQ.find(g=>g.test(A));function Ae(A){const g=NQ(A);if(pA(!!g,`'${A}' is not an animatable color. Use the equivalent color code instead.`),!g)return!1;let B=g.parse(A);return g===PA&&(B=SQ(B)),B}const ge=(A,g)=>{const B=Ae(A),M=Ae(g);if(!B||!M)return qg(A,g);const D={...B};return w=>(D.red=NB(B.red,M.red,w),D.green=NB(B.green,M.green,w),D.blue=NB(B.blue,M.blue,w),D.alpha=v(B.alpha,M.alpha,w),uA.transform(D))},xQ=(A,g)=>B=>g(A(B)),Bg=(...A)=>A.reduce(xQ),xB=new Set(["none","hidden"]);function WQ(A,g){return xB.has(A)?B=>B<=0?A:g:B=>B>=1?g:A}function $Q(A,g){return B=>v(A,g,B)}function WB(A){return typeof A=="number"?$Q:typeof A=="string"?GB(A)?qg:T.test(A)?ge:gC:Array.isArray(A)?Be:typeof A=="object"?T.test(A)?ge:_Q:qg}function Be(A,g){const B=[...A],M=B.length,D=A.map((w,e)=>WB(w)(w,g[e]));return w=>{for(let e=0;e<M;e++)B[e]=D[e](w);return B}}function _Q(A,g){const B={...A,...g},M={};for(const D in B)A[D]!==void 0&&g[D]!==void 0&&(M[D]=WB(A[D])(A[D],g[D]));return D=>{for(const w in M)B[w]=M[w](D);return B}}function AC(A,g){var B;const M=[],D={color:0,var:0,number:0};for(let w=0;w<g.values.length;w++){const e=g.types[w],Q=A.indexes[e][D[e]],t=(B=A.values[Q])!==null&&B!==void 0?B:0;M[w]=t,D[e]++}return M}const gC=(A,g)=>{const B=lA.createTransformer(g),M=gg(A),D=gg(g);return M.indexes.var.length===D.indexes.var.length&&M.indexes.color.length===D.indexes.color.length&&M.indexes.number.length>=D.indexes.number.length?xB.has(A)&&!D.values.length||xB.has(g)&&!M.values.length?WQ(A,g):Bg(Be(AC(M,D),D.values),B):(pA(!0,`Complex values '${A}' and '${g}' 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.`),qg(A,g))};function Me(A,g,B){return typeof A=="number"&&typeof g=="number"&&typeof B=="number"?v(A,g,B):WB(A)(A,g)}const BC=5;function De(A,g,B){const M=Math.max(g-BC,0);return yD(B-A(M),g-M)}const P={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},ee=.001;function MC({duration:A=P.duration,bounce:g=P.bounce,velocity:B=P.velocity,mass:M=P.mass}){let D,w;pA(A<=tA(P.maxDuration),"Spring duration must be 10 seconds or less");let e=1-g;e=oA(P.minDamping,P.maxDamping,e),A=oA(P.minDuration,P.maxDuration,iA(A)),e<1?(D=s=>{const i=s*e,o=i*A,I=i-B,n=$B(s,e),E=Math.exp(-o);return ee-I/n*E},w=s=>{const o=s*e*A,I=o*B+B,n=Math.pow(e,2)*Math.pow(s,2)*A,E=Math.exp(-o),l=$B(Math.pow(s,2),e);return(-D(s)+ee>0?-1:1)*((I-n)*E)/l}):(D=s=>{const i=Math.exp(-s*A),o=(s-B)*A+1;return-.001+i*o},w=s=>{const i=Math.exp(-s*A),o=(B-s)*(A*A);return i*o});const Q=5/A,t=eC(D,w,Q);if(A=tA(A),isNaN(t))return{stiffness:P.stiffness,damping:P.damping,duration:A};{const s=Math.pow(t,2)*M;return{stiffness:s,damping:e*2*Math.sqrt(M*s),duration:A}}}const DC=12;function eC(A,g,B){let M=B;for(let D=1;D<DC;D++)M=M-A(M)/g(M);return M}function $B(A,g){return A*Math.sqrt(1-g*g)}const wC=["duration","bounce"],tC=["stiffness","damping","mass"];function we(A,g){return g.some(B=>A[B]!==void 0)}function QC(A){let g={velocity:P.velocity,stiffness:P.stiffness,damping:P.damping,mass:P.mass,isResolvedFromDuration:!1,...A};if(!we(A,tC)&&we(A,wC))if(A.visualDuration){const B=A.visualDuration,M=2*Math.PI/(B*1.2),D=M*M,w=2*oA(.05,1,1-(A.bounce||0))*Math.sqrt(D);g={...g,mass:P.mass,stiffness:D,damping:w}}else{const B=MC(A);g={...g,...B,mass:P.mass},g.isResolvedFromDuration=!0}return g}function te(A=P.visualDuration,g=P.bounce){const B=typeof A!="object"?{visualDuration:A,keyframes:[0,1],bounce:g}:A;let{restSpeed:M,restDelta:D}=B;const w=B.keyframes[0],e=B.keyframes[B.keyframes.length-1],Q={done:!1,value:w},{stiffness:t,damping:s,mass:i,duration:o,velocity:I,isResolvedFromDuration:n}=QC({...B,velocity:-iA(B.velocity||0)}),E=I||0,l=s/(2*Math.sqrt(t*i)),G=e-w,a=iA(Math.sqrt(t/i)),c=Math.abs(G)<5;M||(M=c?P.restSpeed.granular:P.restSpeed.default),D||(D=c?P.restDelta.granular:P.restDelta.default);let U;if(l<1){const Y=$B(a,l);U=Z=>{const f=Math.exp(-l*a*Z);return e-f*((E+l*a*G)/Y*Math.sin(Y*Z)+G*Math.cos(Y*Z))}}else if(l===1)U=Y=>e-Math.exp(-a*Y)*(G+(E+a*G)*Y);else{const Y=a*Math.sqrt(l*l-1);U=Z=>{const f=Math.exp(-l*a*Z),u=Math.min(Y*Z,300);return e-f*((E+l*a*G)*Math.sinh(u)+Y*G*Math.cosh(u))/Y}}const q={calculatedDuration:n&&o||null,next:Y=>{const Z=U(Y);if(n)Q.done=Y>=o;else{let f=0;l<1&&(f=Y===0?tA(E):De(U,Y,Z));const u=Math.abs(f)<=M,y=Math.abs(e-Z)<=D;Q.done=u&&y}return Q.value=Q.done?e:Z,Q},toString:()=>{const Y=Math.min(CD(q),fB),Z=iD(f=>q.next(Y*f).value,Y,30);return Y+"ms "+Z}};return q}function Qe({keyframes:A,velocity:g=0,power:B=.8,timeConstant:M=325,bounceDamping:D=10,bounceStiffness:w=500,modifyTarget:e,min:Q,max:t,restDelta:s=.5,restSpeed:i}){const o=A[0],I={done:!1,value:o},n=u=>Q!==void 0&&u<Q||t!==void 0&&u>t,E=u=>Q===void 0?t:t===void 0||Math.abs(Q-u)<Math.abs(t-u)?Q:t;let l=B*g;const G=o+l,a=e===void 0?G:e(G);a!==G&&(l=a-o);const c=u=>-l*Math.exp(-u/M),U=u=>a+c(u),q=u=>{const y=c(u),V=U(u);I.done=Math.abs(y)<=s,I.value=I.done?a:V};let Y,Z;const f=u=>{n(I.value)&&(Y=u,Z=te({keyframes:[I.value,E(I.value)],velocity:De(U,u,I.value),damping:D,stiffness:w,restDelta:s,restSpeed:i}))};return f(0),{calculatedDuration:null,next:u=>{let y=!1;return!Z&&Y===void 0&&(y=!0,q(u),f(u)),Y!==void 0&&u>=Y?Z.next(u-Y):(!y&&q(u),I)}}}const CC=_A(.42,0,1,1),sC=_A(0,0,.58,1),Ce=_A(.42,0,.58,1),iC=A=>Array.isArray(A)&&typeof A[0]!="number",se={linear:N,easeIn:CC,easeInOut:Ce,easeOut:sC,circIn:vB,circInOut:KD,circOut:kD,backIn:zB,backInOut:dD,backOut:VD,anticipate:qD},ie=A=>{if(VB(A)){wA(A.length===4,"Cubic bezier arrays must contain four numerical values.");const[g,B,M,D]=A;return _A(g,B,M,D)}else if(typeof A=="string")return wA(se[A]!==void 0,`Invalid easing type '${A}'`),se[A];return A};function oC(A,g,B){const M=[],D=B||Me,w=A.length-1;for(let e=0;e<w;e++){let Q=D(A[e],A[e+1]);if(g){const t=Array.isArray(g)?g[e]||N:g;Q=Bg(t,Q)}M.push(Q)}return M}function IC(A,g,{clamp:B=!0,ease:M,mixer:D}={}){const w=A.length;if(wA(w===g.length,"Both input and output ranges must be the same length"),w===1)return()=>g[0];if(w===2&&g[0]===g[1])return()=>g[1];const e=A[0]===A[1];A[0]>A[w-1]&&(A=[...A].reverse(),g=[...g].reverse());const Q=oC(g,M,D),t=Q.length,s=i=>{if(e&&i<A[0])return g[0];let o=0;if(t>1)for(;o<A.length-2&&!(i<A[o+1]);o++);const I=hA(A[o],A[o+1],i);return Q[o](I)};return B?i=>s(oA(A[0],A[w-1],i)):s}function nC(A,g){const B=A[A.length-1];for(let M=1;M<=g;M++){const D=hA(0,g,M);A.push(v(B,1,D))}}function rC(A){const g=[0];return nC(g,A.length-1),g}function EC(A,g){return A.map(B=>B*g)}function lC(A,g){return A.map(()=>g||Ce).splice(0,A.length-1)}function kg({duration:A=300,keyframes:g,times:B,ease:M="easeInOut"}){const D=iC(M)?M.map(ie):ie(M),w={done:!1,value:g[0]},e=EC(B&&B.length===g.length?B:rC(g),A),Q=IC(e,g,{ease:Array.isArray(D)?D:lC(g,D)});return{calculatedDuration:A,next:t=>(w.value=Q(t),w.done=t>=A,w)}}const GC=A=>{const g=({timestamp:B})=>A(B);return{start:()=>J.update(g,!0),stop:()=>rA(g),now:()=>O.isProcessing?O.timestamp:CA.now()}},aC={decay:Qe,inertia:Qe,tween:kg,keyframes:kg,spring:te},cC=A=>A/100;class _B extends _D{constructor(g){super(g),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:B,motionValue:M,element:D,keyframes:w}=this.options,e=(D==null?void 0:D.KeyframeResolver)||SB,Q=(t,s)=>this.onKeyframesResolved(t,s);this.resolver=new e(w,Q,B,M,D),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(g){const{type:B="keyframes",repeat:M=0,repeatDelay:D=0,repeatType:w,velocity:e=0}=this.options,Q=ZB(B)?B:aC[B]||kg;let t,s;Q!==kg&&typeof g[0]!="number"&&(process.env.NODE_ENV!=="production"&&wA(g.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${g}`),t=Bg(cC,Me(g[0],g[1])),g=[0,100]);const i=Q({...this.options,keyframes:g});w==="mirror"&&(s=Q({...this.options,keyframes:[...g].reverse(),velocity:-e})),i.calculatedDuration===null&&(i.calculatedDuration=CD(i));const{calculatedDuration:o}=i,I=o+D,n=I*(M+1)-D;return{generator:i,mirroredGenerator:s,mapPercentToKeyframes:t,calculatedDuration:o,resolvedDuration:I,totalDuration:n}}onPostResolved(){const{autoplay:g=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!g?this.pause():this.state=this.pendingPlayState}tick(g,B=!1){const{resolved:M}=this;if(!M){const{keyframes:u}=this.options;return{done:!0,value:u[u.length-1]}}const{finalKeyframe:D,generator:w,mirroredGenerator:e,mapPercentToKeyframes:Q,keyframes:t,calculatedDuration:s,totalDuration:i,resolvedDuration:o}=M;if(this.startTime===null)return w.next(0);const{delay:I,repeat:n,repeatType:E,repeatDelay:l,onUpdate:G}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,g):this.speed<0&&(this.startTime=Math.min(g-i/this.speed,this.startTime)),B?this.currentTime=g:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(g-this.startTime)*this.speed;const a=this.currentTime-I*(this.speed>=0?1:-1),c=this.speed>=0?a<0:a>i;this.currentTime=Math.max(a,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let U=this.currentTime,q=w;if(n){const u=Math.min(this.currentTime,i)/o;let y=Math.floor(u),V=u%1;!V&&u>=1&&(V=1),V===1&&y--,y=Math.min(y,n+1),!!(y%2)&&(E==="reverse"?(V=1-V,l&&(V-=l/o)):E==="mirror"&&(q=e)),U=oA(0,1,V)*o}const Y=c?{done:!1,value:t[0]}:q.next(U);Q&&(Y.value=Q(Y.value));let{done:Z}=Y;!c&&s!==null&&(Z=this.speed>=0?this.currentTime>=i:this.currentTime<=0);const f=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Z);return f&&D!==void 0&&(Y.value=dg(t,this.options,D)),G&&G(Y.value),f&&this.finish(),Y}get duration(){const{resolved:g}=this;return g?iA(g.calculatedDuration):0}get time(){return iA(this.currentTime)}set time(g){g=tA(g),this.currentTime=g,this.holdTime!==null||this.speed===0?this.holdTime=g:this.driver&&(this.startTime=this.driver.now()-g/this.speed)}get speed(){return this.playbackSpeed}set speed(g){const B=this.playbackSpeed!==g;this.playbackSpeed=g,B&&(this.time=iA(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:g=GC,onPlay:B,startTime:M}=this.options;this.driver||(this.driver=g(w=>this.tick(w))),B&&B();const D=this.driver.now();this.holdTime!==null?this.startTime=D-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=D):this.startTime=M??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var g;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(g=this.currentTime)!==null&&g!==void 0?g:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:g}=this.options;g&&g()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(g){return this.startTime=0,this.tick(g,!0)}}const YC=new Set(["opacity","clipPath","filter","transform"]);function yC(A,g,B,{delay:M=0,duration:D=300,repeat:w=0,repeatType:e="loop",ease:Q="easeInOut",times:t}={}){const s={[g]:B};t&&(s.offset=t);const i=ID(Q,D);return Array.isArray(i)&&(s.easing=i),A.animate(s,{delay:M,duration:D,easing:Array.isArray(i)?"linear":i,fill:"both",iterations:w+1,direction:e==="reverse"?"alternate":"normal"})}const uC=CB(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Kg=10,mC=2e4;function UC(A){return ZB(A.type)||A.type==="spring"||!oD(A.ease)}function fC(A,g){const B=new _B({...g,keyframes:A,repeat:0,delay:0,isGenerator:!0});let M={done:!1,value:A[0]};const D=[];let w=0;for(;!M.done&&w<mC;)M=B.sample(w),D.push(M.value),w+=Kg;return{times:void 0,keyframes:D,duration:w-Kg,ease:"linear"}}const oe={anticipate:qD,backInOut:dD,circInOut:KD};function ZC(A){return A in oe}class Ie extends _D{constructor(g){super(g);const{name:B,motionValue:M,element:D,keyframes:w}=this.options;this.resolver=new WD(w,(e,Q)=>this.onKeyframesResolved(e,Q),B,M,D),this.resolver.scheduleResolve()}initPlayback(g,B){let{duration:M=300,times:D,ease:w,type:e,motionValue:Q,name:t,startTime:s}=this.options;if(!Q.owner||!Q.owner.current)return!1;if(typeof w=="string"&&Zg()&&ZC(w)&&(w=oe[w]),UC(this.options)){const{onComplete:o,onUpdate:I,motionValue:n,element:E,...l}=this.options,G=fC(g,l);g=G.keyframes,g.length===1&&(g[1]=g[0]),M=G.duration,D=G.times,w=G.ease,e="keyframes"}const i=yC(Q.owner.current,t,g,{...this.options,duration:M,times:D,ease:w});return i.startTime=s??this.calcStartTime(),this.pendingTimeline?(sD(i,this.pendingTimeline),this.pendingTimeline=void 0):i.onfinish=()=>{const{onComplete:o}=this.options;Q.set(dg(g,this.options,B)),o&&o(),this.cancel(),this.resolveFinishedPromise()},{animation:i,duration:M,times:D,type:e,ease:w,keyframes:g}}get duration(){const{resolved:g}=this;if(!g)return 0;const{duration:B}=g;return iA(B)}get time(){const{resolved:g}=this;if(!g)return 0;const{animation:B}=g;return iA(B.currentTime||0)}set time(g){const{resolved:B}=this;if(!B)return;const{animation:M}=B;M.currentTime=tA(g)}get speed(){const{resolved:g}=this;if(!g)return 1;const{animation:B}=g;return B.playbackRate}set speed(g){const{resolved:B}=this;if(!B)return;const{animation:M}=B;M.playbackRate=g}get state(){const{resolved:g}=this;if(!g)return"idle";const{animation:B}=g;return B.playState}get startTime(){const{resolved:g}=this;if(!g)return null;const{animation:B}=g;return B.startTime}attachTimeline(g){if(!this._resolved)this.pendingTimeline=g;else{const{resolved:B}=this;if(!B)return N;const{animation:M}=B;sD(M,g)}return N}play(){if(this.isStopped)return;const{resolved:g}=this;if(!g)return;const{animation:B}=g;B.playState==="finished"&&this.updateFinishedPromise(),B.play()}pause(){const{resolved:g}=this;if(!g)return;const{animation:B}=g;B.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:g}=this;if(!g)return;const{animation:B,keyframes:M,duration:D,type:w,ease:e,times:Q}=g;if(B.playState==="idle"||B.playState==="finished")return;if(this.time){const{motionValue:s,onUpdate:i,onComplete:o,element:I,...n}=this.options,E=new _B({...n,keyframes:M,duration:D,type:w,ease:e,times:Q,isGenerator:!0}),l=tA(this.time);s.setWithVelocity(E.sample(l-Kg).value,E.sample(l).value,Kg)}const{onStop:t}=this.options;t&&t(),this.cancel()}complete(){const{resolved:g}=this;g&&g.animation.finish()}cancel(){const{resolved:g}=this;g&&g.animation.cancel()}static supports(g){const{motionValue:B,name:M,repeatDelay:D,repeatType:w,damping:e,type:Q}=g;if(!B||!B.owner||!(B.owner.current instanceof HTMLElement))return!1;const{onUpdate:t,transformTemplate:s}=B.owner.getProps();return uC()&&M&&YC.has(M)&&!t&&!s&&!D&&w!=="mirror"&&e!==0&&Q!=="inertia"}}const VC={type:"spring",stiffness:500,damping:25,restSpeed:10},dC=A=>({type:"spring",stiffness:550,damping:A===0?2*Math.sqrt(550):30,restSpeed:10}),qC={type:"keyframes",duration:.8},kC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KC=(A,{keyframes:g})=>g.length>2?qC:yA.has(A)?A.startsWith("scale")?dC(g[1]):VC:kC;function pC({when:A,delay:g,delayChildren:B,staggerChildren:M,staggerDirection:D,repeat:w,repeatType:e,repeatDelay:Q,from:t,elapsed:s,...i}){return!!Object.keys(i).length}const AM=(A,g,B,M={},D,w)=>e=>{const Q=UB(M,A)||{},t=Q.delay||M.delay||0;let{elapsed:s=0}=M;s=s-tA(t);let i={keyframes:Array.isArray(B)?B:[null,B],ease:"easeOut",velocity:g.getVelocity(),...Q,delay:-s,onUpdate:I=>{g.set(I),Q.onUpdate&&Q.onUpdate(I)},onComplete:()=>{e(),Q.onComplete&&Q.onComplete()},name:A,motionValue:g,element:w?void 0:D};pC(Q)||(i={...i,...KC(A,i)}),i.duration&&(i.duration=tA(i.duration)),i.repeatDelay&&(i.repeatDelay=tA(i.repeatDelay)),i.from!==void 0&&(i.keyframes[0]=i.from);let o=!1;if((i.type===!1||i.duration===0&&!i.repeatDelay)&&(i.duration=0,i.delay===0&&(o=!0)),o&&!w&&g.get()!==void 0){const I=dg(i.keyframes,Q);if(I!==void 0)return J.update(()=>{i.onUpdate(I),i.onComplete()}),new gQ([])}return!w&&Ie.supports(i)?new Ie(i):new _B(i)};function hC({protectedKeys:A,needsAnimating:g},B){const M=A.hasOwnProperty(B)&&g[B]!==!0;return g[B]=!1,M}function ne(A,g,{delay:B=0,transitionOverride:M,type:D}={}){var w;let{transition:e=A.getDefaultTransition(),transitionEnd:Q,...t}=g;M&&(e=M);const s=[],i=D&&A.animationState&&A.animationState.getState()[D];for(const o in t){const I=A.getValue(o,(w=A.latestValues[o])!==null&&w!==void 0?w:null),n=t[o];if(n===void 0||i&&hC(i,o))continue;const E={delay:B,...UB(e||{},o)};let l=!1;if(window.MotionHandoffAnimation){const a=mD(A);if(a){const c=window.MotionHandoffAnimation(a,o,J);c!==null&&(E.startTime=c,l=!0)}}JB(A,o),I.start(AM(o,I,n,A.shouldReduceMotion&&YD.has(o)?{type:!1}:E,A,l));const G=I.animation;G&&s.push(G)}return Q&&Promise.all(s).then(()=>{J.update(()=>{Q&&RB(A,Q)})}),s}function gM(A,g,B={}){var M;const D=fg(A,g,B.type==="exit"?(M=A.presenceContext)===null||M===void 0?void 0:M.custom:void 0);let{transition:w=A.getDefaultTransition()||{}}=D||{};B.transitionOverride&&(w=B.transitionOverride);const e=D?()=>Promise.all(ne(A,D,B)):()=>Promise.resolve(),Q=A.variantChildren&&A.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:I}=w;return RC(A,g,i+s,o,I,B)}:()=>Promise.resolve(),{when:t}=w;if(t){const[s,i]=t==="beforeChildren"?[e,Q]:[Q,e];return s().then(()=>i())}else return Promise.all([e(),Q(B.delay)])}function RC(A,g,B=0,M=0,D=1,w){const e=[],Q=(A.variantChildren.size-1)*M,t=D===1?(s=0)=>s*M:(s=0)=>Q-s*M;return Array.from(A.variantChildren).sort(JC).forEach((s,i)=>{s.notify("AnimationStart",g),e.push(gM(s,g,{...w,delay:B+t(i)}).then(()=>s.notify("AnimationComplete",g)))}),Promise.all(e)}function JC(A,g){return A.sortNodePosition(g)}function re(A,g,B={}){A.notify("AnimationStart",g);let M;if(Array.isArray(g)){const D=g.map(w=>gM(A,w,B));M=Promise.all(D)}else if(typeof g=="string")M=gM(A,g,B);else{const D=typeof g=="function"?fg(A,g,B.custom):g;M=Promise.all(ne(A,D,B))}return M.then(()=>{A.notify("AnimationComplete",g)})}const zC=oB.length;function Ee(A){if(!A)return;if(!A.isControllingVariants){const B=A.parent?Ee(A.parent)||{}:{};return A.props.initial!==void 0&&(B.initial=A.props.initial),B}const g={};for(let B=0;B<zC;B++){const M=oB[B],D=A.props[M];(SA(D)||D===!1)&&(g[M]=D)}return g}const vC=[...iB].reverse(),PC=iB.length;function LC(A){return g=>Promise.all(g.map(({animation:B,options:M})=>re(A,B,M)))}function FC(A){let g=LC(A),B=le(),M=!0;const D=t=>(s,i)=>{var o;const I=fg(A,i,t==="exit"?(o=A.presenceContext)===null||o===void 0?void 0:o.custom:void 0);if(I){const{transition:n,transitionEnd:E,...l}=I;s={...s,...l,...E}}return s};function w(t){g=t(A)}function e(t){const{props:s}=A,i=Ee(A.parent)||{},o=[],I=new Set;let n={},E=1/0;for(let G=0;G<PC;G++){const a=vC[G],c=B[a],U=s[a]!==void 0?s[a]:i[a],q=SA(U),Y=a===t?c.isActive:null;Y===!1&&(E=G);let Z=U===i[a]&&U!==s[a]&&q;if(Z&&M&&A.manuallyAnimateOnMount&&(Z=!1),c.protectedKeys={...n},!c.isActive&&Y===null||!U&&!c.prevProp||Yg(U)||typeof U=="boolean")continue;const f=bC(c.prevProp,U);let u=f||a===t&&c.isActive&&!Z&&q||G>E&&q,y=!1;const V=Array.isArray(U)?U:[U];let h=V.reduce(D(a),{});Y===!1&&(h={});const{prevResolvedValues:gA={}}=c,sg={...gA,...h},aA=b=>{u=!0,I.has(b)&&(y=!0,I.delete(b)),c.needsAnimating[b]=!0;const x=A.getValue(b);x&&(x.liveStyle=!1)};for(const b in sg){const x=h[b],IA=gA[b];if(n.hasOwnProperty(b))continue;let qA=!1;lB(x)&&lB(IA)?qA=!QD(x,IA):qA=x!==IA,qA?x!=null?aA(b):I.add(b):x!==void 0&&I.has(b)?aA(b):c.protectedKeys[b]=!0}c.prevProp=U,c.prevResolvedValues=h,c.isActive&&(n={...n,...h}),M&&A.blockInitialAnimation&&(u=!1),u&&(!(Z&&f)||y)&&o.push(...V.map(b=>({animation:b,options:{type:a}})))}if(I.size){const G={};I.forEach(a=>{const c=A.getBaseTarget(a),U=A.getValue(a);U&&(U.liveStyle=!0),G[a]=c??null}),o.push({animation:G})}let l=!!o.length;return M&&(s.initial===!1||s.initial===s.animate)&&!A.manuallyAnimateOnMount&&(l=!1),M=!1,l?g(o):Promise.resolve()}function Q(t,s){var i;if(B[t].isActive===s)return Promise.resolve();(i=A.variantChildren)===null||i===void 0||i.forEach(I=>{var n;return(n=I.animationState)===null||n===void 0?void 0:n.setActive(t,s)}),B[t].isActive=s;const o=e(t);for(const I in B)B[I].protectedKeys={};return o}return{animateChanges:e,setActive:Q,setAnimateFunction:w,getState:()=>B,reset:()=>{B=le(),M=!0}}}function bC(A,g){return typeof g=="string"?g!==A:Array.isArray(g)?!QD(g,A):!1}function UA(A=!1){return{isActive:A,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function le(){return{animate:UA(!0),whileInView:UA(),whileHover:UA(),whileTap:UA(),whileDrag:UA(),whileFocus:UA(),exit:UA()}}class GA{constructor(g){this.isMounted=!1,this.node=g}update(){}}class OC extends GA{constructor(g){super(g),g.animationState||(g.animationState=FC(g))}updateAnimationControlsSubscription(){const{animate:g}=this.node.getProps();Yg(g)&&(this.unmountControls=g.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:g}=this.node.getProps(),{animate:B}=this.node.prevProps||{};g!==B&&this.updateAnimationControlsSubscription()}unmount(){var g;this.node.animationState.reset(),(g=this.unmountControls)===null||g===void 0||g.call(this)}}let jC=0;class HC extends GA{constructor(){super(...arguments),this.id=jC++}update(){if(!this.node.presenceContext)return;const{isPresent:g,onExitComplete:B}=this.node.presenceContext,{isPresent:M}=this.node.prevPresenceContext||{};if(!this.node.animationState||g===M)return;const D=this.node.animationState.setActive("exit",!g);B&&!g&&D.then(()=>B(this.id))}mount(){const{register:g}=this.node.presenceContext||{};g&&(this.unmount=g(this.id))}unmount(){}}const TC={animation:{Feature:OC},exit:{Feature:HC}};function Mg(A,g,B,M={passive:!0}){return A.addEventListener(g,B,M),()=>A.removeEventListener(g,B)}function Dg(A){return{point:{x:A.pageX,y:A.pageY}}}const SC=A=>g=>qB(g)&&A(g,Dg(g));function eg(A,g,B,M){return Mg(A,g,SC(B),M)}const Ge=(A,g)=>Math.abs(A-g);function XC(A,g){const B=Ge(A.x,g.x),M=Ge(A.y,g.y);return Math.sqrt(B**2+M**2)}class ae{constructor(g,B,{transformPagePoint:M,contextWindow:D,dragSnapToOrigin:w=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const o=MM(this.lastMoveEventInfo,this.history),I=this.startEvent!==null,n=XC(o.offset,{x:0,y:0})>=3;if(!I&&!n)return;const{point:E}=o,{timestamp:l}=O;this.history.push({...E,timestamp:l});const{onStart:G,onMove:a}=this.handlers;I||(G&&G(this.lastMoveEvent,o),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,o)},this.handlePointerMove=(o,I)=>{this.lastMoveEvent=o,this.lastMoveEventInfo=BM(I,this.transformPagePoint),J.update(this.updatePoint,!0)},this.handlePointerUp=(o,I)=>{this.end();const{onEnd:n,onSessionEnd:E,resumeAnimation:l}=this.handlers;if(this.dragSnapToOrigin&&l&&l(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const G=MM(o.type==="pointercancel"?this.lastMoveEventInfo:BM(I,this.transformPagePoint),this.history);this.startEvent&&n&&n(o,G),E&&E(o,G)},!qB(g))return;this.dragSnapToOrigin=w,this.handlers=B,this.transformPagePoint=M,this.contextWindow=D||window;const e=Dg(g),Q=BM(e,this.transformPagePoint),{point:t}=Q,{timestamp:s}=O;this.history=[{...t,timestamp:s}];const{onSessionStart:i}=B;i&&i(g,MM(Q,this.history)),this.removeListeners=Bg(eg(this.contextWindow,"pointermove",this.handlePointerMove),eg(this.contextWindow,"pointerup",this.handlePointerUp),eg(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(g){this.handlers=g}end(){this.removeListeners&&this.removeListeners(),rA(this.updatePoint)}}function BM(A,g){return g?{point:g(A.point)}:A}function ce(A,g){return{x:A.x-g.x,y:A.y-g.y}}function MM({point:A},g){return{point:A,delta:ce(A,Ye(g)),offset:ce(A,NC(g)),velocity:xC(g,.1)}}function NC(A){return A[0]}function Ye(A){return A[A.length-1]}function xC(A,g){if(A.length<2)return{x:0,y:0};let B=A.length-1,M=null;const D=Ye(A);for(;B>=0&&(M=A[B],!(D.timestamp-M.timestamp>tA(g)));)B--;if(!M)return{x:0,y:0};const w=iA(D.timestamp-M.timestamp);if(w===0)return{x:0,y:0};const e={x:(D.x-M.x)/w,y:(D.y-M.y)/w};return e.x===1/0&&(e.x=0),e.y===1/0&&(e.y=0),e}const ye=1e-4,WC=1-ye,$C=1+ye,ue=.01,_C=0-ue,As=0+ue;function W(A){return A.max-A.min}function gs(A,g,B){return Math.abs(A-g)<=B}function me(A,g,B,M=.5){A.origin=M,A.originPoint=v(g.min,g.max,A.origin),A.scale=W(B)/W(g),A.translate=v(B.min,B.max,A.origin)-A.originPoint,(A.scale>=WC&&A.scale<=$C||isNaN(A.scale))&&(A.scale=1),(A.translate>=_C&&A.translate<=As||isNaN(A.translate))&&(A.translate=0)}function wg(A,g,B,M){me(A.x,g.x,B.x,M?M.originX:void 0),me(A.y,g.y,B.y,M?M.originY:void 0)}function Ue(A,g,B){A.min=B.min+g.min,A.max=A.min+W(g)}function Bs(A,g,B){Ue(A.x,g.x,B.x),Ue(A.y,g.y,B.y)}function fe(A,g,B){A.min=g.min-B.min,A.max=A.min+W(g)}function tg(A,g,B){fe(A.x,g.x,B.x),fe(A.y,g.y,B.y)}function Ms(A,{min:g,max:B},M){return g!==void 0&&A<g?A=M?v(g,A,M.min):Math.max(A,g):B!==void 0&&A>B&&(A=M?v(B,A,M.max):Math.min(A,B)),A}function Ze(A,g,B){return{min:g!==void 0?A.min+g:void 0,max:B!==void 0?A.max+B-(A.max-A.min):void 0}}function Ds(A,{top:g,left:B,bottom:M,right:D}){return{x:Ze(A.x,B,D),y:Ze(A.y,g,M)}}function Ve(A,g){let B=g.min-A.min,M=g.max-A.max;return g.max-g.min<A.max-A.min&&([B,M]=[M,B]),{min:B,max:M}}function es(A,g){return{x:Ve(A.x,g.x),y:Ve(A.y,g.y)}}function ws(A,g){let B=.5;const M=W(A),D=W(g);return D>M?B=hA(g.min,g.max-M,A.min):M>D&&(B=hA(A.min,A.max-D,g.min)),oA(0,1,B)}function ts(A,g){const B={};return g.min!==void 0&&(B.min=g.min-A.min),g.max!==void 0&&(B.max=g.max-A.min),B}const DM=.35;function Qs(A=DM){return A===!1?A=0:A===!0&&(A=DM),{x:de(A,"left","right"),y:de(A,"top","bottom")}}function de(A,g,B){return{min:qe(A,g),max:qe(A,B)}}function qe(A,g){return typeof A=="number"?A:A[g]||0}const ke=()=>({translate:0,scale:1,origin:0,originPoint:0}),FA=()=>({x:ke(),y:ke()}),Ke=()=>({min:0,max:0}),F=()=>({x:Ke(),y:Ke()});function _(A){return[A("x"),A("y")]}function pe({top:A,left:g,right:B,bottom:M}){return{x:{min:g,max:B},y:{min:A,max:M}}}function Cs({x:A,y:g}){return{top:g.min,right:A.max,bottom:g.max,left:A.min}}function ss(A,g){if(!g)return A;const B=g({x:A.left,y:A.top}),M=g({x:A.right,y:A.bottom});return{top:B.y,left:B.x,bottom:M.y,right:M.x}}function eM(A){return A===void 0||A===1}function wM({scale:A,scaleX:g,scaleY:B}){return!eM(A)||!eM(g)||!eM(B)}function fA(A){return wM(A)||he(A)||A.z||A.rotate||A.rotateX||A.rotateY||A.skewX||A.skewY}function he(A){return Re(A.x)||Re(A.y)}function Re(A){return A&&A!=="0%"}function pg(A,g,B){const M=A-B,D=g*M;return B+D}function Je(A,g,B,M,D){return D!==void 0&&(A=pg(A,D,M)),pg(A,B,M)+g}function tM(A,g=0,B=1,M,D){A.min=Je(A.min,g,B,M,D),A.max=Je(A.max,g,B,M,D)}function ze(A,{x:g,y:B}){tM(A.x,g.translate,g.scale,g.originPoint),tM(A.y,B.translate,B.scale,B.originPoint)}const ve=.999999999999,Pe=1.0000000000001;function is(A,g,B,M=!1){const D=B.length;if(!D)return;g.x=g.y=1;let w,e;for(let Q=0;Q<D;Q++){w=B[Q],e=w.projectionDelta;const{visualElement:t}=w.options;t&&t.props.style&&t.props.style.display==="contents"||(M&&w.options.layoutScroll&&w.scroll&&w!==w.root&&OA(A,{x:-w.scroll.offset.x,y:-w.scroll.offset.y}),e&&(g.x*=e.x.scale,g.y*=e.y.scale,ze(A,e)),M&&fA(w.latestValues)&&OA(A,w.latestValues))}g.x<Pe&&g.x>ve&&(g.x=1),g.y<Pe&&g.y>ve&&(g.y=1)}function bA(A,g){A.min=A.min+g,A.max=A.max+g}function Le(A,g,B,M,D=.5){const w=v(A.min,A.max,D);tM(A,g,B,w,M)}function OA(A,g){Le(A.x,g.x,g.scaleX,g.scale,g.originX),Le(A.y,g.y,g.scaleY,g.scale,g.originY)}function Fe(A,g){return pe(ss(A.getBoundingClientRect(),g))}function os(A,g,B){const M=Fe(A,B),{scroll:D}=g;return D&&(bA(M.x,D.offset.x),bA(M.y,D.offset.y)),M}const be=({current:A})=>A?A.ownerDocument.defaultView:null,Is=new WeakMap;class ns{constructor(g){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=F(),this.visualElement=g}start(g,{snapToCursor:B=!1}={}){const{presenceContext:M}=this.visualElement;if(M&&M.isPresent===!1)return;const D=i=>{const{dragSnapToOrigin:o}=this.getProps();o?this.pauseAnimation():this.stopAnimation(),B&&this.snapToCursor(Dg(i).point)},w=(i,o)=>{const{drag:I,dragPropagation:n,onDragStart:E}=this.getProps();if(I&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=CQ(I),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_(G=>{let a=this.getAxisMotionValue(G).get()||0;if(QA.test(a)){const{projection:c}=this.visualElement;if(c&&c.layout){const U=c.layout.layoutBox[G];U&&(a=W(U)*(parseFloat(a)/100))}}this.originPoint[G]=a}),E&&J.postRender(()=>E(i,o)),JB(this.visualElement,"transform");const{animationState:l}=this.visualElement;l&&l.setActive("whileDrag",!0)},e=(i,o)=>{const{dragPropagation:I,dragDirectionLock:n,onDirectionLock:E,onDrag:l}=this.getProps();if(!I&&!this.openDragLock)return;const{offset:G}=o;if(n&&this.currentDirection===null){this.currentDirection=rs(G),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",o.point,G),this.updateAxis("y",o.point,G),this.visualElement.render(),l&&l(i,o)},Q=(i,o)=>this.stop(i,o),t=()=>_(i=>{var o;return this.getAnimationState(i)==="paused"&&((o=this.getAxisMotionValue(i).animation)===null||o===void 0?void 0:o.play())}),{dragSnapToOrigin:s}=this.getProps();this.panSession=new ae(g,{onSessionStart:D,onStart:w,onMove:e,onSessionEnd:Q,resumeAnimation:t},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:be(this.visualElement)})}stop(g,B){const M=this.isDragging;if(this.cancel(),!M)return;const{velocity:D}=B;this.startAnimation(D);const{onDragEnd:w}=this.getProps();w&&J.postRender(()=>w(g,B))}cancel(){this.isDragging=!1;const{projection:g,animationState:B}=this.visualElement;g&&(g.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:M}=this.getProps();!M&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),B&&B.setActive("whileDrag",!1)}updateAxis(g,B,M){const{drag:D}=this.getProps();if(!M||!hg(g,D,this.currentDirection))return;const w=this.getAxisMotionValue(g);let e=this.originPoint[g]+M[g];this.constraints&&this.constraints[g]&&(e=Ms(e,this.constraints[g],this.elastic[g])),w.set(e)}resolveConstraints(){var g;const{dragConstraints:B,dragElastic:M}=this.getProps(),D=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(g=this.visualElement.projection)===null||g===void 0?void 0:g.layout,w=this.constraints;B&&JA(B)?this.constraints||(this.constraints=this.resolveRefConstraints()):B&&D?this.constraints=Ds(D.layoutBox,B):this.constraints=!1,this.elastic=Qs(M),w!==this.constraints&&D&&this.constraints&&!this.hasMutatedConstraints&&_(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ts(D.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:g,onMeasureDragConstraints:B}=this.getProps();if(!g||!JA(g))return!1;const M=g.current;wA(M!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:D}=this.visualElement;if(!D||!D.layout)return!1;const w=os(M,D.root,this.visualElement.getTransformPagePoint());let e=es(D.layout.layoutBox,w);if(B){const Q=B(Cs(e));this.hasMutatedConstraints=!!Q,Q&&(e=pe(Q))}return e}startAnimation(g){const{drag:B,dragMomentum:M,dragElastic:D,dragTransition:w,dragSnapToOrigin:e,onDragTransitionEnd:Q}=this.getProps(),t=this.constraints||{},s=_(i=>{if(!hg(i,B,this.currentDirection))return;let o=t[i]||{};e&&(o={min:0,max:0});const I=D?200:1e6,n=D?40:1e7,E={type:"inertia",velocity:M?g[i]:0,bounceStiffness:I,bounceDamping:n,timeConstant:750,restDelta:1,restSpeed:10,...w,...o};return this.startAxisValueAnimation(i,E)});return Promise.all(s).then(Q)}startAxisValueAnimation(g,B){const M=this.getAxisMotionValue(g);return JB(this.visualElement,g),M.start(AM(g,M,0,B,this.visualElement,!1))}stopAnimation(){_(g=>this.getAxisMotionValue(g).stop())}pauseAnimation(){_(g=>{var B;return(B=this.getAxisMotionValue(g).animation)===null||B===void 0?void 0:B.pause()})}getAnimationState(g){var B;return(B=this.getAxisMotionValue(g).animation)===null||B===void 0?void 0:B.state}getAxisMotionValue(g){const B=`_drag${g.toUpperCase()}`,M=this.visualElement.getProps(),D=M[B];return D||this.visualElement.getValue(g,(M.initial?M.initial[g]:void 0)||0)}snapToCursor(g){_(B=>{const{drag:M}=this.getProps();if(!hg(B,M,this.currentDirection))return;const{projection:D}=this.visualElement,w=this.getAxisMotionValue(B);if(D&&D.layout){const{min:e,max:Q}=D.layout.layoutBox[B];w.set(g[B]-v(e,Q,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:g,dragConstraints:B}=this.getProps(),{projection:M}=this.visualElement;if(!JA(B)||!M||!this.constraints)return;this.stopAnimation();const D={x:0,y:0};_(e=>{const Q=this.getAxisMotionValue(e);if(Q&&this.constraints!==!1){const t=Q.get();D[e]=ws({min:t,max:t},this.constraints[e])}});const{transformTemplate:w}=this.visualElement.getProps();this.visualElement.current.style.transform=w?w({},""):"none",M.root&&M.root.updateScroll(),M.updateLayout(),this.resolveConstraints(),_(e=>{if(!hg(e,g,null))return;const Q=this.getAxisMotionValue(e),{min:t,max:s}=this.constraints[e];Q.set(v(t,s,D[e]))})}addListeners(){if(!this.visualElement.current)return;Is.set(this.visualElement,this);const g=this.visualElement.current,B=eg(g,"pointerdown",t=>{const{drag:s,dragListener:i=!0}=this.getProps();s&&i&&this.start(t)}),M=()=>{const{dragConstraints:t}=this.getProps();JA(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:D}=this.visualElement,w=D.addEventListener("measure",M);D&&!D.layout&&(D.root&&D.root.updateScroll(),D.updateLayout()),J.read(M);const e=Mg(window,"resize",()=>this.scalePositionWithinConstraints()),Q=D.addEventListener("didUpdate",({delta:t,hasLayoutChanged:s})=>{this.isDragging&&s&&(_(i=>{const o=this.getAxisMotionValue(i);o&&(this.originPoint[i]+=t[i].translate,o.set(o.get()+t[i].translate))}),this.visualElement.render())});return()=>{e(),B(),w(),Q&&Q()}}getProps(){const g=this.visualElement.getProps(),{drag:B=!1,dragDirectionLock:M=!1,dragPropagation:D=!1,dragConstraints:w=!1,dragElastic:e=DM,dragMomentum:Q=!0}=g;return{...g,drag:B,dragDirectionLock:M,dragPropagation:D,dragConstraints:w,dragElastic:e,dragMomentum:Q}}}function hg(A,g,B){return(g===!0||g===A)&&(B===null||B===A)}function rs(A,g=10){let B=null;return Math.abs(A.y)>g?B="y":Math.abs(A.x)>g&&(B="x"),B}class Es extends GA{constructor(g){super(g),this.removeGroupControls=N,this.removeListeners=N,this.controls=new ns(g)}mount(){const{dragControls:g}=this.node.getProps();g&&(this.removeGroupControls=g.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||N}unmount(){this.removeGroupControls(),this.removeListeners()}}const Oe=A=>(g,B)=>{A&&J.postRender(()=>A(g,B))};class ls extends GA{constructor(){super(...arguments),this.removePointerDownListener=N}onPointerDown(g){this.session=new ae(g,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:be(this.node)})}createPanHandlers(){const{onPanSessionStart:g,onPanStart:B,onPan:M,onPanEnd:D}=this.node.getProps();return{onSessionStart:Oe(g),onStart:Oe(B),onMove:M,onEnd:(w,e)=>{delete this.session,D&&J.postRender(()=>D(w,e))}}}mount(){this.removePointerDownListener=eg(this.node.current,"pointerdown",g=>this.onPointerDown(g))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Rg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function je(A,g){return g.max===g.min?0:A/(g.max-g.min)*100}const Qg={correct:(A,g)=>{if(!g.target)return A;if(typeof A=="string")if(d.test(A))A=parseFloat(A);else return A;const B=je(A,g.target.x),M=je(A,g.target.y);return`${B}% ${M}%`}},Gs={correct:(A,{treeScale:g,projectionDelta:B})=>{const M=A,D=lA.parse(A);if(D.length>5)return M;const w=lA.createTransformer(A),e=typeof D[0]!="number"?1:0,Q=B.x.scale*g.x,t=B.y.scale*g.y;D[0+e]/=Q,D[1+e]/=t;const s=v(Q,t,.5);return typeof D[2+e]=="number"&&(D[2+e]/=s),typeof D[3+e]=="number"&&(D[3+e]/=s),w(D)}};class as extends r.Component{componentDidMount(){const{visualElement:g,layoutGroup:B,switchLayoutGroup:M,layoutId:D}=this.props,{projection:w}=g;Ot(cs),w&&(B.group&&B.group.add(w),M&&M.register&&D&&M.register(w),w.root.didUpdate(),w.addEventListener("animationComplete",()=>{this.safeToRemove()}),w.setOptions({...w.options,onExitComplete:()=>this.safeToRemove()})),Rg.hasEverUpdated=!0}getSnapshotBeforeUpdate(g){const{layoutDependency:B,visualElement:M,drag:D,isPresent:w}=this.props,e=M.projection;return e&&(e.isPresent=w,D||g.layoutDependency!==B||B===void 0?e.willUpdate():this.safeToRemove(),g.isPresent!==w&&(w?e.promote():e.relegate()||J.postRender(()=>{const Q=e.getStack();(!Q||!Q.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:g}=this.props.visualElement;g&&(g.root.didUpdate(),nB.postRender(()=>{!g.currentAnimation&&g.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:g,layoutGroup:B,switchLayoutGroup:M}=this.props,{projection:D}=g;D&&(D.scheduleCheckAfterUnmount(),B&&B.group&&B.group.remove(D),M&&M.deregister&&M.deregister(D))}safeToRemove(){const{safeToRemove:g}=this.props;g&&g()}render(){return null}}function He(A){const[g,B]=wt(),M=r.useContext(KM);return C.jsx(as,{...A,layoutGroup:M,switchLayoutGroup:r.useContext(jM),isPresent:g,safeToRemove:B})}const cs={borderRadius:{...Qg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qg,borderTopRightRadius:Qg,borderBottomLeftRadius:Qg,borderBottomRightRadius:Qg,boxShadow:Gs};function Ys(A,g,B){const M=H(A)?A:$A(A);return M.start(AM("",M,g,B)),M.animation}function ys(A){return A instanceof SVGElement&&A.tagName!=="svg"}const us=(A,g)=>A.depth-g.depth;class ms{constructor(){this.children=[],this.isDirty=!1}add(g){KB(this.children,g),this.isDirty=!0}remove(g){pB(this.children,g),this.isDirty=!0}forEach(g){this.isDirty&&this.children.sort(us),this.isDirty=!1,this.children.forEach(g)}}function Us(A,g){const B=CA.now(),M=({timestamp:D})=>{const w=D-B;w>=g&&(rA(M),A(w-g))};return J.read(M,!0),()=>rA(M)}const Te=["TopLeft","TopRight","BottomLeft","BottomRight"],fs=Te.length,Se=A=>typeof A=="string"?parseFloat(A):A,Xe=A=>typeof A=="number"||d.test(A);function Zs(A,g,B,M,D,w){D?(A.opacity=v(0,B.opacity!==void 0?B.opacity:1,Vs(M)),A.opacityExit=v(g.opacity!==void 0?g.opacity:1,0,ds(M))):w&&(A.opacity=v(g.opacity!==void 0?g.opacity:1,B.opacity!==void 0?B.opacity:1,M));for(let e=0;e<fs;e++){const Q=`border${Te[e]}Radius`;let t=Ne(g,Q),s=Ne(B,Q);if(t===void 0&&s===void 0)continue;t||(t=0),s||(s=0),t===0||s===0||Xe(t)===Xe(s)?(A[Q]=Math.max(v(Se(t),Se(s),M),0),(QA.test(s)||QA.test(t))&&(A[Q]+="%")):A[Q]=s}(g.rotate||B.rotate)&&(A.rotate=v(g.rotate||0,B.rotate||0,M))}function Ne(A,g){return A[g]!==void 0?A[g]:A.borderRadius}const Vs=xe(0,.5,kD),ds=xe(.5,.95,N);function xe(A,g,B){return M=>M<A?0:M>g?1:B(hA(A,g,M))}function We(A,g){A.min=g.min,A.max=g.max}function AA(A,g){We(A.x,g.x),We(A.y,g.y)}function $e(A,g){A.translate=g.translate,A.scale=g.scale,A.originPoint=g.originPoint,A.origin=g.origin}function _e(A,g,B,M,D){return A-=g,A=pg(A,1/B,M),D!==void 0&&(A=pg(A,1/D,M)),A}function qs(A,g=0,B=1,M=.5,D,w=A,e=A){if(QA.test(g)&&(g=parseFloat(g),g=v(e.min,e.max,g/100)-e.min),typeof g!="number")return;let Q=v(w.min,w.max,M);A===w&&(Q-=g),A.min=_e(A.min,g,B,Q,D),A.max=_e(A.max,g,B,Q,D)}function Aw(A,g,[B,M,D],w,e){qs(A,g[B],g[M],g[D],g.scale,w,e)}const ks=["x","scaleX","originX"],Ks=["y","scaleY","originY"];function gw(A,g,B,M){Aw(A.x,g,ks,B?B.x:void 0,M?M.x:void 0),Aw(A.y,g,Ks,B?B.y:void 0,M?M.y:void 0)}function Bw(A){return A.translate===0&&A.scale===1}function Mw(A){return Bw(A.x)&&Bw(A.y)}function Dw(A,g){return A.min===g.min&&A.max===g.max}function ps(A,g){return Dw(A.x,g.x)&&Dw(A.y,g.y)}function ew(A,g){return Math.round(A.min)===Math.round(g.min)&&Math.round(A.max)===Math.round(g.max)}function ww(A,g){return ew(A.x,g.x)&&ew(A.y,g.y)}function tw(A){return W(A.x)/W(A.y)}function Qw(A,g){return A.translate===g.translate&&A.scale===g.scale&&A.originPoint===g.originPoint}class hs{constructor(){this.members=[]}add(g){KB(this.members,g),g.scheduleRender()}remove(g){if(pB(this.members,g),g===this.prevLead&&(this.prevLead=void 0),g===this.lead){const B=this.members[this.members.length-1];B&&this.promote(B)}}relegate(g){const B=this.members.findIndex(D=>g===D);if(B===0)return!1;let M;for(let D=B;D>=0;D--){const w=this.members[D];if(w.isPresent!==!1){M=w;break}}return M?(this.promote(M),!0):!1}promote(g,B){const M=this.lead;if(g!==M&&(this.prevLead=M,this.lead=g,g.show(),M)){M.instance&&M.scheduleRender(),g.scheduleRender(),g.resumeFrom=M,B&&(g.resumeFrom.preserveOpacity=!0),M.snapshot&&(g.snapshot=M.snapshot,g.snapshot.latestValues=M.animationValues||M.latestValues),g.root&&g.root.isUpdating&&(g.isLayoutDirty=!0);const{crossfade:D}=g.options;D===!1&&M.hide()}}exitAnimationComplete(){this.members.forEach(g=>{const{options:B,resumingFrom:M}=g;B.onExitComplete&&B.onExitComplete(),M&&M.options.onExitComplete&&M.options.onExitComplete()})}scheduleRender(){this.members.forEach(g=>{g.instance&&g.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Rs(A,g,B){let M="";const D=A.x.translate/g.x,w=A.y.translate/g.y,e=(B==null?void 0:B.z)||0;if((D||w||e)&&(M=`translate3d(${D}px, ${w}px, ${e}px) `),(g.x!==1||g.y!==1)&&(M+=`scale(${1/g.x}, ${1/g.y}) `),B){const{transformPerspective:s,rotate:i,rotateX:o,rotateY:I,skewX:n,skewY:E}=B;s&&(M=`perspective(${s}px) ${M}`),i&&(M+=`rotate(${i}deg) `),o&&(M+=`rotateX(${o}deg) `),I&&(M+=`rotateY(${I}deg) `),n&&(M+=`skewX(${n}deg) `),E&&(M+=`skewY(${E}deg) `)}const Q=A.x.scale*g.x,t=A.y.scale*g.y;return(Q!==1||t!==1)&&(M+=`scale(${Q}, ${t})`),M||"none"}const ZA={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Cg=typeof window<"u"&&window.MotionDebug!==void 0,QM=["","X","Y","Z"],Js={visibility:"hidden"},Cw=1e3;let zs=0;function CM(A,g,B,M){const{latestValues:D}=g;D[A]&&(B[A]=D[A],g.setStaticValue(A,0),M&&(M[A]=0))}function sw(A){if(A.hasCheckedOptimisedAppear=!0,A.root===A)return;const{visualElement:g}=A.options;if(!g)return;const B=mD(g);if(window.MotionHasOptimisedAnimation(B,"transform")){const{layout:D,layoutId:w}=A.options;window.MotionCancelOptimisedAnimation(B,"transform",J,!(D||w))}const{parent:M}=A;M&&!M.hasCheckedOptimisedAppear&&sw(M)}function iw({attachResizeListener:A,defaultParent:g,measureScroll:B,checkIsScrollRoot:M,resetTransform:D}){return class{constructor(e={},Q=g==null?void 0:g()){this.id=zs++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Cg&&(ZA.totalNodes=ZA.resolvedTargetDeltas=ZA.recalculatedProjection=0),this.nodes.forEach(Ls),this.nodes.forEach(Hs),this.nodes.forEach(Ts),this.nodes.forEach(Fs),Cg&&window.MotionDebug.record(ZA)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=Q?Q.root||Q:this,this.path=Q?[...Q.path,Q]:[],this.parent=Q,this.depth=Q?Q.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ms)}addEventListener(e,Q){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new hB),this.eventHandlers.get(e).add(Q)}notifyListeners(e,...Q){const t=this.eventHandlers.get(e);t&&t.notify(...Q)}hasListeners(e){return this.eventHandlers.has(e)}mount(e,Q=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ys(e),this.instance=e;const{layoutId:t,layout:s,visualElement:i}=this.options;if(i&&!i.current&&i.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),Q&&(s||t)&&(this.isLayoutDirty=!0),A){let o;const I=()=>this.root.updateBlockedByResize=!1;A(e,()=>{this.root.updateBlockedByResize=!0,o&&o(),o=Us(I,250),Rg.hasAnimatedSinceResize&&(Rg.hasAnimatedSinceResize=!1,this.nodes.forEach(Iw))})}t&&this.root.registerSharedNode(t,this),this.options.animate!==!1&&i&&(t||s)&&this.addEventListener("didUpdate",({delta:o,hasLayoutChanged:I,hasRelativeLayoutChanged:n,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const l=this.options.transition||i.getDefaultTransition()||Ws,{onLayoutAnimationStart:G,onLayoutAnimationComplete:a}=i.getProps(),c=!this.targetLayout||!ww(this.targetLayout,E),U=!I&&n;if(this.options.layoutRoot||this.resumeFrom||U||I&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(o,U);const q={...UB(l,"layout"),onPlay:G,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(q.delay=0,q.type=!1),this.startAnimation(q)}else I||Iw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,rA(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ss),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const o=this.path[i];o.shouldResetTransform=!0,o.updateScroll("snapshot"),o.options.layoutRoot&&o.willUpdate(!1)}const{layoutId:Q,layout:t}=this.options;if(Q===void 0&&!t)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ow);return}this.isUpdating||this.nodes.forEach(Os),this.isUpdating=!1,this.nodes.forEach(js),this.nodes.forEach(vs),this.nodes.forEach(Ps),this.clearAllSnapshots();const Q=CA.now();O.delta=oA(0,1e3/60,Q-O.timestamp),O.timestamp=Q,O.isProcessing=!0,sB.update.process(O),sB.preRender.process(O),sB.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nB.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bs),this.sharedNodes.forEach(Xs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,J.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){J.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:Q}=this.options;Q&&Q.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let Q=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(Q=!1),Q){const t=M(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:B(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!D)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,Q=this.projectionDelta&&!Mw(this.projectionDelta),t=this.getTransformTemplate(),s=t?t(this.latestValues,""):void 0,i=s!==this.prevTransformTemplateValue;e&&(Q||fA(this.latestValues)||i)&&(D(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const Q=this.measurePageBox();let t=this.removeElementScroll(Q);return e&&(t=this.removeTransform(t)),$s(t),{animationId:this.root.animationId,measuredBox:Q,layoutBox:t,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:Q}=this.options;if(!Q)return F();const t=Q.measureViewportBox();if(!(((e=this.scroll)===null||e===void 0?void 0:e.wasRoot)||this.path.some(_s))){const{scroll:i}=this.root;i&&(bA(t.x,i.offset.x),bA(t.y,i.offset.y))}return t}removeElementScroll(e){var Q;const t=F();if(AA(t,e),!((Q=this.scroll)===null||Q===void 0)&&Q.wasRoot)return t;for(let s=0;s<this.path.length;s++){const i=this.path[s],{scroll:o,options:I}=i;i!==this.root&&o&&I.layoutScroll&&(o.wasRoot&&AA(t,e),bA(t.x,o.offset.x),bA(t.y,o.offset.y))}return t}applyTransform(e,Q=!1){const t=F();AA(t,e);for(let s=0;s<this.path.length;s++){const i=this.path[s];!Q&&i.options.layoutScroll&&i.scroll&&i!==i.root&&OA(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),fA(i.latestValues)&&OA(t,i.latestValues)}return fA(this.latestValues)&&OA(t,this.latestValues),t}removeTransform(e){const Q=F();AA(Q,e);for(let t=0;t<this.path.length;t++){const s=this.path[t];if(!s.instance||!fA(s.latestValues))continue;wM(s.latestValues)&&s.updateSnapshot();const i=F(),o=s.measurePageBox();AA(i,o),gw(Q,s.latestValues,s.snapshot?s.snapshot.layoutBox:void 0,i)}return fA(this.latestValues)&&gw(Q,this.latestValues),Q}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade!==void 0?e.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var Q;const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const s=!!this.resumingFrom||this!==t;if(!(e||s&&this.isSharedProjectionDirty||this.isProjectionDirty||!((Q=this.parent)===null||Q===void 0)&&Q.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:I}=this.options;if(!(!this.layout||!(o||I))){if(this.resolvedRelativeTargetAt=O.timestamp,!this.targetDelta&&!this.relativeTarget){const n=this.getClosestProjectingParent();n&&n.layout&&this.animationProgress!==1?(this.relativeParent=n,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),tg(this.relativeTargetOrigin,this.layout.layoutBox,n.layout.layoutBox),AA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bs(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):AA(this.target,this.layout.layoutBox),ze(this.target,this.targetDelta)):AA(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const n=this.getClosestProjectingParent();n&&!!n.resumingFrom==!!this.resumingFrom&&!n.options.layoutScroll&&n.target&&this.animationProgress!==1?(this.relativeParent=n,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),tg(this.relativeTargetOrigin,this.target,n.target),AA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Cg&&ZA.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||wM(this.parent.latestValues)||he(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const Q=this.getLead(),t=!!this.resumingFrom||this!==Q;let s=!0;if((this.isProjectionDirty||!((e=this.parent)===null||e===void 0)&&e.isProjectionDirty)&&(s=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===O.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||o))return;AA(this.layoutCorrected,this.layout.layoutBox);const I=this.treeScale.x,n=this.treeScale.y;is(this.layoutCorrected,this.treeScale,this.path,t),Q.layout&&!Q.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(Q.target=Q.layout.layoutBox,Q.targetWithTransforms=F());const{target:E}=Q;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($e(this.prevProjectionDelta.x,this.projectionDelta.x),$e(this.prevProjectionDelta.y,this.projectionDelta.y)),wg(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==I||this.treeScale.y!==n||!Qw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),Cg&&ZA.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var Q;if((Q=this.options.visualElement)===null||Q===void 0||Q.scheduleRender(),e){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=FA(),this.projectionDelta=FA(),this.projectionDeltaWithTransform=FA()}setAnimationOrigin(e,Q=!1){const t=this.snapshot,s=t?t.latestValues:{},i={...this.latestValues},o=FA();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!Q;const I=F(),n=t?t.source:void 0,E=this.layout?this.layout.source:void 0,l=n!==E,G=this.getStack(),a=!G||G.members.length<=1,c=!!(l&&!a&&this.options.crossfade===!0&&!this.path.some(xs));this.animationProgress=0;let U;this.mixTargetDelta=q=>{const Y=q/1e3;nw(o.x,e.x,Y),nw(o.y,e.y,Y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tg(I,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ns(this.relativeTarget,this.relativeTargetOrigin,I,Y),U&&ps(this.relativeTarget,U)&&(this.isProjectionDirty=!1),U||(U=F()),AA(U,this.relativeTarget)),l&&(this.animationValues=i,Zs(i,s,this.latestValues,Y,c,a)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(rA(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=J.update(()=>{Rg.hasAnimatedSinceResize=!0,this.currentAnimation=Ys(0,Cw,{...e,onUpdate:Q=>{this.mixTargetDelta(Q),e.onUpdate&&e.onUpdate(Q)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Cw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:Q,target:t,layout:s,latestValues:i}=e;if(!(!Q||!t||!s)){if(this!==e&&this.layout&&s&&aw(this.options.animationType,this.layout.layoutBox,s.layoutBox)){t=this.target||F();const o=W(this.layout.layoutBox.x);t.x.min=e.target.x.min,t.x.max=t.x.min+o;const I=W(this.layout.layoutBox.y);t.y.min=e.target.y.min,t.y.max=t.y.min+I}AA(Q,t),OA(Q,i),wg(this.projectionDeltaWithTransform,this.layoutCorrected,Q,i)}}registerSharedNode(e,Q){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hs),this.sharedNodes.get(e).add(Q);const s=Q.options.initialPromotionConfig;Q.promote({transition:s?s.transition:void 0,preserveFollowOpacity:s&&s.shouldPreserveFollowOpacity?s.shouldPreserveFollowOpacity(Q):void 0})}isLead(){const e=this.getStack();return e?e.lead===this:!0}getLead(){var e;const{layoutId:Q}=this.options;return Q?((e=this.getStack())===null||e===void 0?void 0:e.lead)||this:this}getPrevLead(){var e;const{layoutId:Q}=this.options;return Q?(e=this.getStack())===null||e===void 0?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:Q,preserveFollowOpacity:t}={}){const s=this.getStack();s&&s.promote(this,t),e&&(this.projectionDelta=void 0,this.needsReset=!0),Q&&this.setOptions({transition:Q})}relegate(){const e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let Q=!1;const{latestValues:t}=e;if((t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY)&&(Q=!0),!Q)return;const s={};t.z&&CM("z",e,s,this.animationValues);for(let i=0;i<QM.length;i++)CM(`rotate${QM[i]}`,e,s,this.animationValues),CM(`skew${QM[i]}`,e,s,this.animationValues);e.render();for(const i in s)e.setStaticValue(i,s[i]),this.animationValues&&(this.animationValues[i]=s[i]);e.scheduleRender()}getProjectionStyles(e){var Q,t;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Js;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=ug(e==null?void 0:e.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const l={};return this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=ug(e==null?void 0:e.pointerEvents)||""),this.hasProjected&&!fA(this.latestValues)&&(l.transform=i?i({},""):"none",this.hasProjected=!1),l}const I=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=Rs(this.projectionDeltaWithTransform,this.treeScale,I),i&&(s.transform=i(I,s.transform));const{x:n,y:E}=this.projectionDelta;s.transformOrigin=`${n.origin*100}% ${E.origin*100}% 0`,o.animationValues?s.opacity=o===this?(t=(Q=I.opacity)!==null&&Q!==void 0?Q:this.latestValues.opacity)!==null&&t!==void 0?t:1:this.preserveOpacity?this.latestValues.opacity:I.opacityExit:s.opacity=o===this?I.opacity!==void 0?I.opacity:"":I.opacityExit!==void 0?I.opacityExit:0;for(const l in Ug){if(I[l]===void 0)continue;const{correct:G,applyTo:a}=Ug[l],c=s.transform==="none"?I[l]:G(I[l],o);if(a){const U=a.length;for(let q=0;q<U;q++)s[a[q]]=c}else s[l]=c}return this.options.layoutId&&(s.pointerEvents=o===this?ug(e==null?void 0:e.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var Q;return(Q=e.currentAnimation)===null||Q===void 0?void 0:Q.stop()}),this.root.nodes.forEach(ow),this.root.sharedNodes.clear()}}}function vs(A){A.updateLayout()}function Ps(A){var g;const B=((g=A.resumeFrom)===null||g===void 0?void 0:g.snapshot)||A.snapshot;if(A.isLead()&&A.layout&&B&&A.hasListeners("didUpdate")){const{layoutBox:M,measuredBox:D}=A.layout,{animationType:w}=A.options,e=B.source!==A.layout.source;w==="size"?_(o=>{const I=e?B.measuredBox[o]:B.layoutBox[o],n=W(I);I.min=M[o].min,I.max=I.min+n}):aw(w,B.layoutBox,M)&&_(o=>{const I=e?B.measuredBox[o]:B.layoutBox[o],n=W(M[o]);I.max=I.min+n,A.relativeTarget&&!A.currentAnimation&&(A.isProjectionDirty=!0,A.relativeTarget[o].max=A.relativeTarget[o].min+n)});const Q=FA();wg(Q,M,B.layoutBox);const t=FA();e?wg(t,A.applyTransform(D,!0),B.measuredBox):wg(t,M,B.layoutBox);const s=!Mw(Q);let i=!1;if(!A.resumeFrom){const o=A.getClosestProjectingParent();if(o&&!o.resumeFrom){const{snapshot:I,layout:n}=o;if(I&&n){const E=F();tg(E,B.layoutBox,I.layoutBox);const l=F();tg(l,M,n.layoutBox),ww(E,l)||(i=!0),o.options.layoutRoot&&(A.relativeTarget=l,A.relativeTargetOrigin=E,A.relativeParent=o)}}}A.notifyListeners("didUpdate",{layout:M,snapshot:B,delta:t,layoutDelta:Q,hasLayoutChanged:s,hasRelativeLayoutChanged:i})}else if(A.isLead()){const{onExitComplete:M}=A.options;M&&M()}A.options.transition=void 0}function Ls(A){Cg&&ZA.totalNodes++,A.parent&&(A.isProjecting()||(A.isProjectionDirty=A.parent.isProjectionDirty),A.isSharedProjectionDirty||(A.isSharedProjectionDirty=!!(A.isProjectionDirty||A.parent.isProjectionDirty||A.parent.isSharedProjectionDirty)),A.isTransformDirty||(A.isTransformDirty=A.parent.isTransformDirty))}function Fs(A){A.isProjectionDirty=A.isSharedProjectionDirty=A.isTransformDirty=!1}function bs(A){A.clearSnapshot()}function ow(A){A.clearMeasurements()}function Os(A){A.isLayoutDirty=!1}function js(A){const{visualElement:g}=A.options;g&&g.getProps().onBeforeLayoutMeasure&&g.notify("BeforeLayoutMeasure"),A.resetTransform()}function Iw(A){A.finishAnimation(),A.targetDelta=A.relativeTarget=A.target=void 0,A.isProjectionDirty=!0}function Hs(A){A.resolveTargetDelta()}function Ts(A){A.calcProjection()}function Ss(A){A.resetSkewAndRotation()}function Xs(A){A.removeLeadSnapshot()}function nw(A,g,B){A.translate=v(g.translate,0,B),A.scale=v(g.scale,1,B),A.origin=g.origin,A.originPoint=g.originPoint}function rw(A,g,B,M){A.min=v(g.min,B.min,M),A.max=v(g.max,B.max,M)}function Ns(A,g,B,M){rw(A.x,g.x,B.x,M),rw(A.y,g.y,B.y,M)}function xs(A){return A.animationValues&&A.animationValues.opacityExit!==void 0}const Ws={duration:.45,ease:[.4,0,.1,1]},Ew=A=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(A),lw=Ew("applewebkit/")&&!Ew("chrome/")?Math.round:N;function Gw(A){A.min=lw(A.min),A.max=lw(A.max)}function $s(A){Gw(A.x),Gw(A.y)}function aw(A,g,B){return A==="position"||A==="preserve-aspect"&&!gs(tw(g),tw(B),.2)}function _s(A){var g;return A!==A.root&&((g=A.scroll)===null||g===void 0?void 0:g.wasRoot)}const Ai=iw({attachResizeListener:(A,g)=>Mg(A,"resize",g),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),sM={current:void 0},cw=iw({measureScroll:A=>({x:A.scrollLeft,y:A.scrollTop}),defaultParent:()=>{if(!sM.current){const A=new Ai({});A.mount(window),A.setOptions({layoutScroll:!0}),sM.current=A}return sM.current},resetTransform:(A,g)=>{A.style.transform=g!==void 0?g:"none"},checkIsScrollRoot:A=>window.getComputedStyle(A).position==="fixed"}),gi={pan:{Feature:ls},drag:{Feature:Es,ProjectionNode:cw,MeasureLayout:He}};function Yw(A,g,B){const{props:M}=A;A.animationState&&M.whileHover&&A.animationState.setActive("whileHover",B==="Start");const D="onHover"+B,w=M[D];w&&J.postRender(()=>w(g,Dg(g)))}class Bi extends GA{mount(){const{current:g}=this.node;g&&(this.unmount=DQ(g,(B,M)=>(Yw(this.node,M,"Start"),D=>Yw(this.node,D,"End"))))}unmount(){}}class Mi extends GA{constructor(){super(...arguments),this.isActive=!1}onFocus(){let g=!1;try{g=this.node.current.matches(":focus-visible")}catch{g=!0}!g||!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=Bg(Mg(this.node.current,"focus",()=>this.onFocus()),Mg(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yw(A,g,B){const{props:M}=A;A.animationState&&M.whileTap&&A.animationState.setActive("whileTap",B==="Start");const D="onTap"+(B==="End"?"":B),w=M[D];w&&J.postRender(()=>w(g,Dg(g)))}class Di extends GA{mount(){const{current:g}=this.node;g&&(this.unmount=QQ(g,(B,M)=>(yw(this.node,M,"Start"),(D,{success:w})=>yw(this.node,D,w?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const iM=new WeakMap,oM=new WeakMap,ei=A=>{const g=iM.get(A.target);g&&g(A)},wi=A=>{A.forEach(ei)};function ti({root:A,...g}){const B=A||document;oM.has(B)||oM.set(B,{});const M=oM.get(B),D=JSON.stringify(g);return M[D]||(M[D]=new IntersectionObserver(wi,{root:A,...g})),M[D]}function Qi(A,g,B){const M=ti(g);return iM.set(A,B),M.observe(A),()=>{iM.delete(A),M.unobserve(A)}}const Ci={some:0,all:1};class si extends GA{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:g={}}=this.node.getProps(),{root:B,margin:M,amount:D="some",once:w}=g,e={root:B?B.current:void 0,rootMargin:M,threshold:typeof D=="number"?D:Ci[D]},Q=t=>{const{isIntersecting:s}=t;if(this.isInView===s||(this.isInView=s,w&&!s&&this.hasEnteredView))return;s&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",s);const{onViewportEnter:i,onViewportLeave:o}=this.node.getProps(),I=s?i:o;I&&I(t)};return Qi(this.node.current,e,Q)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:g,prevProps:B}=this.node;["amount","margin","root"].some(ii(g,B))&&this.startObserver()}unmount(){}}function ii({viewport:A={}},{viewport:g={}}={}){return B=>A[B]!==g[B]}const oi={inView:{Feature:si},tap:{Feature:Di},focus:{Feature:Mi},hover:{Feature:Bi}},Ii={layout:{ProjectionNode:cw,MeasureLayout:He}},IM={current:null},uw={current:!1};function ni(){if(uw.current=!0,!!QB)if(window.matchMedia){const A=window.matchMedia("(prefers-reduced-motion)"),g=()=>IM.current=A.matches;A.addListener(g),g()}else IM.current=!1}const ri=[...ND,T,lA],Ei=A=>ri.find(XD(A)),mw=new WeakMap;function li(A,g,B){for(const M in g){const D=g[M],w=B[M];if(H(D))A.addValue(M,D),process.env.NODE_ENV==="development"&&ag(D.version==="12.0.3",`Attempting to mix Motion versions ${D.version} with 12.0.3 may not work as expected.`);else if(H(w))A.addValue(M,$A(D,{owner:A}));else if(w!==D)if(A.hasValue(M)){const e=A.getValue(M);e.liveStyle===!0?e.jump(D):e.hasAnimated||e.set(D)}else{const e=A.getStaticValue(M);A.addValue(M,$A(e!==void 0?e:D,{owner:A}))}}for(const M in B)g[M]===void 0&&A.removeValue(M);return g}const Uw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Gi{scrapeMotionValuesFromProps(g,B,M){return{}}constructor({parent:g,props:B,presenceContext:M,reducedMotionConfig:D,blockInitialAnimation:w,visualState:e},Q={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=SB,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 n=CA.now();this.renderScheduledAt<n&&(this.renderScheduledAt=n,J.render(this.render,!1,!0))};const{latestValues:t,renderState:s,onUpdate:i}=e;this.onUpdate=i,this.latestValues=t,this.baseTarget={...t},this.initialValues=B.initial?{...t}:{},this.renderState=s,this.parent=g,this.props=B,this.presenceContext=M,this.depth=g?g.depth+1:0,this.reducedMotionConfig=D,this.options=Q,this.blockInitialAnimation=!!w,this.isControllingVariants=yg(B),this.isVariantNode=FM(B),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(g&&g.current);const{willChange:o,...I}=this.scrapeMotionValuesFromProps(B,{},this);for(const n in I){const E=I[n];t[n]!==void 0&&H(E)&&E.set(t[n],!1)}}mount(g){this.current=g,mw.set(g,this),this.projection&&!this.projection.instance&&this.projection.mount(g),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((B,M)=>this.bindToMotionValue(M,B)),uw.current||ni(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:IM.current,process.env.NODE_ENV!=="production"&&ag(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(){mw.delete(this.current),this.projection&&this.projection.unmount(),rA(this.notifyUpdate),rA(this.render),this.valueSubscriptions.forEach(g=>g()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const g in this.events)this.events[g].clear();for(const g in this.features){const B=this.features[g];B&&(B.unmount(),B.isMounted=!1)}this.current=null}bindToMotionValue(g,B){this.valueSubscriptions.has(g)&&this.valueSubscriptions.get(g)();const M=yA.has(g),D=B.on("change",Q=>{this.latestValues[g]=Q,this.props.onUpdate&&J.preRender(this.notifyUpdate),M&&this.projection&&(this.projection.isTransformDirty=!0)}),w=B.on("renderRequest",this.scheduleRender);let e;window.MotionCheckAppearSync&&(e=window.MotionCheckAppearSync(this,g,B)),this.valueSubscriptions.set(g,()=>{D(),w(),e&&e(),B.owner&&B.stop()})}sortNodePosition(g){return!this.current||!this.sortInstanceNodePosition||this.type!==g.type?0:this.sortInstanceNodePosition(this.current,g.current)}updateFeatures(){let g="animation";for(g in RA){const B=RA[g];if(!B)continue;const{isEnabled:M,Feature:D}=B;if(!this.features[g]&&D&&M(this.props)&&(this.features[g]=new D(this)),this.features[g]){const w=this.features[g];w.isMounted?w.update():(w.mount(),w.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(g){return this.latestValues[g]}setStaticValue(g,B){this.latestValues[g]=B}update(g,B){(g.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=g,this.prevPresenceContext=this.presenceContext,this.presenceContext=B;for(let M=0;M<Uw.length;M++){const D=Uw[M];this.propEventSubscriptions[D]&&(this.propEventSubscriptions[D](),delete this.propEventSubscriptions[D]);const w="on"+D,e=g[w];e&&(this.propEventSubscriptions[D]=this.on(D,e))}this.prevMotionValues=li(this,this.scrapeMotionValuesFromProps(g,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(g){return this.props.variants?this.props.variants[g]: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(g){const B=this.getClosestVariantNode();if(B)return B.variantChildren&&B.variantChildren.add(g),()=>B.variantChildren.delete(g)}addValue(g,B){const M=this.values.get(g);B!==M&&(M&&this.removeValue(g),this.bindToMotionValue(g,B),this.values.set(g,B),this.latestValues[g]=B.get())}removeValue(g){this.values.delete(g);const B=this.valueSubscriptions.get(g);B&&(B(),this.valueSubscriptions.delete(g)),delete this.latestValues[g],this.removeValueFromRenderState(g,this.renderState)}hasValue(g){return this.values.has(g)}getValue(g,B){if(this.props.values&&this.props.values[g])return this.props.values[g];let M=this.values.get(g);return M===void 0&&B!==void 0&&(M=$A(B===null?void 0:B,{owner:this}),this.addValue(g,M)),M}readValue(g,B){var M;let D=this.latestValues[g]!==void 0||!this.current?this.latestValues[g]:(M=this.getBaseTargetFromProps(this.props,g))!==null&&M!==void 0?M:this.readValueFromInstance(this.current,g,this.options);return D!=null&&(typeof D=="string"&&(TD(D)||pD(D))?D=parseFloat(D):!Ei(D)&&lA.test(B)&&(D=LD(g,B)),this.setBaseTarget(g,H(D)?D.get():D)),H(D)?D.get():D}setBaseTarget(g,B){this.baseTarget[g]=B}getBaseTarget(g){var B;const{initial:M}=this.props;let D;if(typeof M=="string"||typeof M=="object"){const e=EB(this.props,M,(B=this.presenceContext)===null||B===void 0?void 0:B.custom);e&&(D=e[g])}if(M&&D!==void 0)return D;const w=this.getBaseTargetFromProps(this.props,g);return w!==void 0&&!H(w)?w:this.initialValues[g]!==void 0&&D===void 0?void 0:this.baseTarget[g]}on(g,B){return this.events[g]||(this.events[g]=new hB),this.events[g].add(B)}notify(g,...B){this.events[g]&&this.events[g].notify(...B)}}class fw extends Gi{constructor(){super(...arguments),this.KeyframeResolver=WD}sortInstanceNodePosition(g,B){return g.compareDocumentPosition(B)&2?1:-1}getBaseTargetFromProps(g,B){return g.style?g.style[B]:void 0}removeValueFromRenderState(g,{vars:B,style:M}){delete B[g],delete M[g]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:g}=this.props;H(g)&&(this.childSubscription=g.on("change",B=>{this.current&&(this.current.textContent=`${B}`)}))}}function ai(A){return window.getComputedStyle(A)}class ci extends fw{constructor(){super(...arguments),this.type="html",this.renderInstance=gD}readValueFromInstance(g,B){if(yA.has(B)){const M=jB(B);return M&&M.default||0}else{const M=ai(g),D=(NM(B)?M.getPropertyValue(B):M[B])||0;return typeof D=="string"?D.trim():D}}measureInstanceViewportBox(g,{transformPagePoint:B}){return Fe(g,B)}build(g,B,M){cB(g,B,M.transformTemplate)}scrapeMotionValuesFromProps(g,B,M){return mB(g,B,M)}}class Yi extends fw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(g,B){return g[B]}readValueFromInstance(g,B){if(yA.has(B)){const M=jB(B);return M&&M.default||0}return B=BD.has(B)?B:IB(B),g.getAttribute(B)}scrapeMotionValuesFromProps(g,B,M){return eD(g,B,M)}build(g,B,M){YB(g,B,this.isSVGTag,M.transformTemplate)}renderInstance(g,B,M,D){MD(g,B,M,D)}mount(g){this.isSVGTag=uB(g.tagName),super.mount(g)}}const yi=(A,g)=>rB(A)?new Yi(g):new ci(g,{allowProjection:A!==r.Fragment}),ui=$t({...TC,...oi,...gi,...Ii},yi),Jg=nt(ui);function mi(A){A.values.forEach(g=>g.stop())}function nM(A,g){[...g].reverse().forEach(M=>{const D=A.getVariant(M);D&&RB(A,D),A.variantChildren&&A.variantChildren.forEach(w=>{nM(w,g)})})}function Ui(A,g){if(Array.isArray(g))return nM(A,g);if(typeof g=="string")return nM(A,[g]);RB(A,g)}function fi(){let A=!1;const g=new Set,B={subscribe(M){return g.add(M),()=>void g.delete(M)},start(M,D){wA(A,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const w=[];return g.forEach(e=>{w.push(re(e,M,{transitionOverride:D}))}),Promise.all(w)},set(M){return wA(A,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),g.forEach(D=>{Ui(D,M)})},stop(){g.forEach(M=>{mi(M)})},mount(){return A=!0,()=>{A=!1,B.stop()}}};return B}function Zi(){const A=pM(fi);return RM(A.mount,[]),A}const zg=Zi,Vi={some:0,all:1};function di(A,g,{root:B,margin:M,amount:D="some"}={}){const w=rD(A),e=new WeakMap,Q=s=>{s.forEach(i=>{const o=e.get(i.target);if(i.isIntersecting!==!!o)if(i.isIntersecting){const I=g(i.target,i);typeof I=="function"?e.set(i.target,I):t.unobserve(i.target)}else typeof o=="function"&&(o(i),e.delete(i.target))})},t=new IntersectionObserver(Q,{root:B,rootMargin:M,threshold:typeof D=="number"?D:Vi[D]});return w.forEach(s=>t.observe(s)),()=>t.disconnect()}function Zw(A,{root:g,margin:B,amount:M,once:D=!1}={}){const[w,e]=r.useState(!1);return r.useEffect(()=>{if(!A.current||D&&w)return;const Q=()=>(e(!0),D?void 0:()=>e(!1)),t={root:g&&g.current||void 0,margin:B,amount:M};return di(A.current,Q,t)},[g,A,B,D,M]),w}const Vw=r.forwardRef(({variant:A="goatData",items:g=[],logo:B,heightLogo:M="40px",widthLogo:D="65px",router:w,handleOpenItem:e,...Q},t)=>{const s=wB(),[i,o]=r.useState(!1),[I,n]=r.useState(void 0),[E]=r.useState(""),l=g.reduce((Z,f)=>(Z[f.refId]=r.useRef(null),Z),{}),G=()=>o(!i);r.useEffect(()=>{g.forEach(f=>{const u=l[f.refId];if(u!=null&&u.current){const y=V=>{const h=V.target;n(h.getBoundingClientRect())};u.current.addEventListener("mouseenter",y)}});const Z=l[E];return Z!=null&&Z.current&&n(Z.current.getBoundingClientRect()),()=>{g.forEach(f=>{const u=l[f.refId];u!=null&&u.current&&u.current.removeEventListener("mouseenter",()=>{})})}},[E,g,l]),r.useEffect(()=>{const Z=window.matchMedia("(min-width: 640px)"),f=()=>{Z.matches&&i&&o(!1)};return Z.addEventListener("change",f),()=>{Z.removeEventListener("change",f)}},[i]);const a={goatData:"bg-zinc-900",secondary:"bg-[#ededed]",experiences:"bg-[#FFFFFF]"},c={goatData:"#9a6d79",secondary:"#1f2937e7",experiences:"#6BC1E4"},U={goatData:"#ff0145",secondary:"#ff0145",experiences:"#1f2937e7"},q={goatData:"white",secondary:"#1F2937",experiences:"#000000"},Y={goatData:"text-white",secondary:"text-[#1F2937]",experiences:"text-white"};return C.jsxs("nav",{ref:t,...Q,style:{zIndex:9999,position:"fixed",top:"0px",left:"0px",right:"0px"},className:`${a[A]} bg-opacity-75`,children:[C.jsxs("div",{style:{marginLeft:"auto",marginRight:"auto",maxWidth:"80rem",paddingLeft:s?"0.5rem":"1.5rem",paddingRight:s?"0.5rem":"1.5rem"},children:[(A==="goatData"||A==="secondary")&&C.jsx(Jg.div,{style:{background:c[A],position:"absolute",opacity:.4,borderRadius:"0.25rem"},className:"z-20 pointer-events-none",animate:{top:(I==null?void 0:I.top)||0,left:(I==null?void 0:I.left)||0,width:(I==null?void 0:I.width)||0,height:(I==null?void 0:I.height)||0}}),C.jsxs("div",{style:{position:"relative",display:"flex",height:"4rem",alignItems:"center",justifyContent:"space-between"},children:[C.jsx("div",{style:{position:"absolute",top:"0px",bottom:"0px",left:A==="experiences"?"auto":"0px",right:A==="experiences"?"0px":"auto",display:s?"flex":"none",alignItems:"center"},children:C.jsx("button",{className:`menu ${i?A==="secondary"?"openedark":A==="experiences"?"openeExperiences":"opened":""}`,onClick:G,"aria-label":"Main Menu",children:C.jsxs("svg",{width:"45",height:"45",viewBox:"0 0 100 100",style:{fill:"#f9f8f8 !important"},children:[C.jsx("path",{className:A==="secondary"?"linedark linedark1":A==="experiences"?"lineExperiences lineExperiences1":"line line1",d:"M 20,29.000046 H 80.000231 C 80.000231,29.000046 94.498839,28.817352 94.532987,66.711331 94.543142,77.980673 90.966081,81.670246 85.259173,81.668997 79.552261,81.667751 75.000211,74.999942 75.000211,74.999942 L 25.000021,25.000058"}),C.jsx("path",{className:A==="secondary"?"linedark linedark2":A==="experiences"?"lineExperiences lineExperiences2":"line line2",d:"M 20,50 H 80"}),C.jsx("path",{className:A==="secondary"?"linedark linedark3":A==="experiences"?"lineExperiences lineExperiences3":"line line3",d:"M 20,70.999954 H 80.000231 C 80.000231,70.999954 94.498839,71.182648 94.532987,33.288669 94.543142,22.019327 90.966081,18.329754 85.259173,18.331003 79.552261,18.332249 75.000211,25.000058 75.000211,25.000058 L 25.000021,74.999942"})]})})}),C.jsxs("div",{style:{display:"flex",flex:A==="experiences"&&s?"":"1 1 0%",alignItems:"center",justifyContent:s?"center":A==="experiences"?"flex-end":"stretch"},children:[C.jsx("div",{className:"flex flex-shrink-0 items-center",style:{paddingLeft:A==="experiences"?"20px":""},children:C.jsxs("div",{className:"flex flex-col items-center lg:ml-[120px] ml-0",children:[C.jsx("img",{className:`${s?"hidden":"block"}`,style:{height:M&&M.trim()!==""?M:"40px",width:D&&D.trim()!==""?D:"65px"},src:B&&B.trim()!==""?B:A==="secondary"?cA:YA,alt:"Logo"}),C.jsx("img",{className:`${s?"block":"hidden"}`,style:{height:M&&M.trim()!==""?M:"40px",width:D&&D.trim()!==""?D:"65px"},src:B&&B.trim()!==""?B:A==="secondary"?cA:YA,alt:"Logo"}),(!B||B.trim()==="")&&C.jsx("div",{className:`text-[10px] ${Y[A]} tracking-[4px]`,children:"DATA"})]})}),C.jsx("div",{style:{display:s?"none":"block",flexGrow:1,marginLeft:"1.5rem"},children:C.jsx("nav",{style:{display:"flex",justifyContent:"flex-end"},children:C.jsx("ul",{className:"flex space-x-4",children:g.map(({label:Z,href:f,refId:u,open:y,routerApp:V,link:h})=>C.jsx("li",{children:C.jsx(kM,{href:f,Viewport:U[A],colorButton:q[A],setIsOpen:o,open:y,routerApp:V,handleOpen:e,handleRouter:()=>{w.push(h)},children:C.jsx("div",{id:u,ref:l[u],className:`
8
+ rounded-md transition duration-300 focus:outline-none focus:ring-2 ${BA[B]} focus:ring-offset-2 text-left`,Q===S.link?$[B]:"",Q===S.link?B==="secondary"||B==="primary"||B==="darkMagenta"||B==="veryDarkViolet"||B==="success"?"text-custom-red":B==="pikaros"?"text-orange-300":"text-custom-blue":B==="primary"||B==="vividPink"||B==="darkMagenta"||B==="veryDarkViolet"||B==="danger"||B==="warning"||B==="success"||B==="pikaros"?"text-white":"text-custom-blue",Q===S.link?"font-semibold":"font-normal"),onClick:()=>{jA(S,L)},children:S.label},HA))}):C.jsx("div",{style:{zIndex:"999"},className:`absolute left-0 mt-2 w-48 ${eA[B]} ${rg[B]} rounded-md shadow-lg ring-4 ring-black ring-opacity-5`,role:"menu",children:k.subItems.map((S,HA)=>C.jsx("div",{className:R(`block px-4 py-2 text-sm cursor-pointer ${eA[B]}e`,j[B]&&`${j[B]}`,Q===S.link?$[B]:"",Q===S.link?B==="secondary"||B==="primary"||B==="darkMagenta"||B==="veryDarkViolet"||B==="success"?"text-custom-red":B==="pikaros"?"text-orange-300":"text-custom-blue":B==="primary"||B==="vividPink"||B==="darkMagenta"||B==="veryDarkViolet"||B==="danger"||B==="warning"||B==="success"||B==="pikaros"?"text-white":"text-custom-blue",Q===S.link?"font-semibold":"font-normal"),onClick:()=>{jA(S,L)},children:S.label},HA))}))]},L)})}),s&&C.jsxs("div",{className:"relative ml-3",children:[C.jsxs("div",{id:"user-menu-button",style:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:x,children:[C.jsx("button",{type:"button",className:`flex rounded-full bg-gray-800 text-sm transition duration-300 focus:outline-none focus:ring-2 ${BA[B]} focus:ring-offset-2 mb-4 ml-3 mt-3`,"aria-haspopup":"true",children:C.jsx("div",{className:"flex items-center justify-center rounded-full bg-gray-300 text-gray-700 font-bold",style:{width:"28px",height:"28px"},children:s.image?C.jsx("img",{src:s.image,alt:"User avatar",className:"rounded-full object-cover w-full h-full",onError:k=>{k.currentTarget.onerror=null,k.currentTarget.src=""}}):((og=(Pg=s.name)==null?void 0:Pg.charAt(0))==null?void 0:og.toUpperCase())||"?"})}),C.jsx("div",{className:`block w-full px-4 py-4 ${KA[B]} text-left ${f?"block":"hidden"}`,children:s.name}),C.jsx("div",{className:`mr-2 ${f?"block":"hidden"}`,children:C.jsx(Bt,{size:20,color:TA[B]})})]}),h&&C.jsx("div",{ref:b,className:`absolute right-0 ${f?"left-56":"left-14"} bottom-8 mt-2 w-48 ${eA[B]} ${rg[B]} rounded-md shadow-lg ring-4 ring-black ring-opacity-5`,role:"menu",children:g.map((k,L)=>C.jsx("div",{className:R("block px-4 py-2 text-sm cursor-pointer",j[B]&&`${j[B]}`,Q===k.link?$[B]:"",Q===k.link?B==="secondary"||B==="primary"||B==="darkMagenta"||B==="veryDarkViolet"||B==="success"?"text-custom-red":B==="pikaros"?"text-orange-300":"text-custom-blue":B==="primary"||B==="vividPink"||B==="darkMagenta"||B==="veryDarkViolet"||B==="danger"||B==="warning"||B==="success"||B==="pikaros"?"text-white":"text-custom-blue",Q===k.link?"font-semibold":"font-normal"),onClick:k.label==="Cerrar sesion"?a:()=>{rM(k)},children:k.label},L))}),C.jsxs("div",{style:{display:"flex",gap:"12px",padding:"0px 20px 0px 10px",flexDirection:f?"row":"column",alignItems:"center"},children:[o&&C.jsx(ZM,{variant:B,onClick:U}),i&&C.jsx(fM,{variant:B,toggleTheme:c})]})]})]}),ig&&C.jsx(Eg,{variant:I,background:n,logoGoatData:E,imgLoading:l,strokeWidth:G})]})});qM.displayName="Sidebar";const kM=({children:A,href:g,Viewport:B,colorButton:M,setIsOpen:D,routerApp:w=!1,open:e=!1,handleOpen:Q,handleRouter:t})=>{const s=r.useRef(null),[i,o]=r.useState(M);r.useEffect(()=>{const n=()=>{const E=document.getElementById(g.slice(1));if(E){const l=E.getBoundingClientRect(),G=l.top>=0&&l.bottom<=window.innerHeight;o(G?B:M)}};return n(),window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}},[g,B,M]);const I=()=>{const n=document.getElementById(g.slice(1));n&&(n.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{const E=n.getBoundingClientRect(),l=E.top>=0&&E.bottom<=window.innerHeight;o(l?B:M),D(!1)},300))};return C.jsx("button",{className:"group",onClick:w?t:e?Q:I,ref:s,style:{display:"block",padding:"8px 12px",borderRadius:"6px",fontSize:"14px",color:i,background:"transparent",opacity:.7,textDecoration:"none",cursor:"pointer",letterSpacing:"3px",fontWeight:"800"},"aria-current":"page",title:`Enlace a ${g}`,rel:"noopener noreferrer",children:A})},KM=r.createContext({});function pM(A){const g=r.useRef(null);return g.current===null&&(g.current=A()),g.current}const tB=r.createContext(null),hM=r.createContext({transformPagePoint:A=>A,isStatic:!1,reducedMotion:"never"});function wt(A=!0){const g=r.useContext(tB);if(g===null)return[!0,null];const{isPresent:B,onExitComplete:M,register:D}=g,w=r.useId();r.useEffect(()=>{A&&D(w)},[A]);const e=r.useCallback(()=>A&&M&&M(w),[w,M,A]);return!B&&M?[!1,e]:[!0]}const QB=typeof window<"u",RM=QB?r.useLayoutEffect:r.useEffect,N=A=>A;let pA=N,wA=N;process.env.NODE_ENV!=="production"&&(pA=(A,g)=>{!A&&typeof console<"u"&&console.warn(g)},wA=(A,g)=>{if(!A)throw new Error(g)});function CB(A){let g;return()=>(g===void 0&&(g=A()),g)}const hA=(A,g,B)=>{const M=g-A;return M===0?1:(B-A)/M},tA=A=>A*1e3,iA=A=>A/1e3,tt={skipAnimations:!1,useManualTiming:!1};function Qt(A){let g=new Set,B=new Set,M=!1,D=!1;const w=new WeakSet;let e={delta:0,timestamp:0,isProcessing:!1};function Q(s){w.has(s)&&(t.schedule(s),A()),s(e)}const t={schedule:(s,i=!1,o=!1)=>{const n=o&&M?g:B;return i&&w.add(s),n.has(s)||n.add(s),s},cancel:s=>{B.delete(s),w.delete(s)},process:s=>{if(e=s,M){D=!0;return}M=!0,[g,B]=[B,g],g.forEach(Q),g.clear(),M=!1,D&&(D=!1,t.process(s))}};return t}const lg=["read","resolveKeyframes","update","preRender","render","postRender"],Ct=40;function JM(A,g){let B=!1,M=!0;const D={delta:0,timestamp:0,isProcessing:!1},w=()=>B=!0,e=lg.reduce((a,c)=>(a[c]=Qt(w),a),{}),{read:Q,resolveKeyframes:t,update:s,preRender:i,render:o,postRender:I}=e,n=()=>{const a=performance.now();B=!1,D.delta=M?1e3/60:Math.max(Math.min(a-D.timestamp,Ct),1),D.timestamp=a,D.isProcessing=!0,Q.process(D),t.process(D),s.process(D),i.process(D),o.process(D),I.process(D),D.isProcessing=!1,B&&g&&(M=!1,A(n))},E=()=>{B=!0,M=!0,D.isProcessing||A(n)};return{schedule:lg.reduce((a,c)=>{const U=e[c];return a[c]=(q,Y=!1,Z=!1)=>(B||E(),U.schedule(q,Y,Z)),a},{}),cancel:a=>{for(let c=0;c<lg.length;c++)e[lg[c]].cancel(a)},state:D,steps:e}}const{schedule:J,cancel:rA,state:O,steps:sB}=JM(typeof requestAnimationFrame<"u"?requestAnimationFrame:N,!0),zM=r.createContext({strict:!1}),vM={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"]},RA={};for(const A in vM)RA[A]={isEnabled:g=>vM[A].some(B=>!!g[B])};function st(A){for(const g in A)RA[g]={...RA[g],...A[g]}}const it=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 Gg(A){return A.startsWith("while")||A.startsWith("drag")&&A!=="draggable"||A.startsWith("layout")||A.startsWith("onTap")||A.startsWith("onPan")||A.startsWith("onLayout")||it.has(A)}let PM=A=>!Gg(A);function ot(A){A&&(PM=g=>g.startsWith("on")?!Gg(g):A(g))}try{ot(require("@emotion/is-prop-valid").default)}catch{}function It(A,g,B){const M={};for(const D in A)D==="values"&&typeof A.values=="object"||(PM(D)||B===!0&&Gg(D)||!g&&!Gg(D)||A.draggable&&D.startsWith("onDrag"))&&(M[D]=A[D]);return M}const LM=new Set;function ag(A,g,B){A||LM.has(g)||(console.warn(g),LM.add(g))}function nt(A){if(typeof Proxy>"u")return A;const g=new Map,B=(...M)=>(process.env.NODE_ENV!=="production"&&ag(!1,"motion() is deprecated. Use motion.create() instead."),A(...M));return new Proxy(B,{get:(M,D)=>D==="create"?A:(g.has(D)||g.set(D,A(D)),g.get(D))})}const cg=r.createContext({});function SA(A){return typeof A=="string"||Array.isArray(A)}function Yg(A){return A!==null&&typeof A=="object"&&typeof A.start=="function"}const iB=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oB=["initial",...iB];function yg(A){return Yg(A.animate)||oB.some(g=>SA(A[g]))}function FM(A){return!!(yg(A)||A.variants)}function rt(A,g){if(yg(A)){const{initial:B,animate:M}=A;return{initial:B===!1||SA(B)?B:void 0,animate:SA(M)?M:void 0}}return A.inherit!==!1?g:{}}function Et(A){const{initial:g,animate:B}=rt(A,r.useContext(cg));return r.useMemo(()=>({initial:g,animate:B}),[bM(g),bM(B)])}function bM(A){return Array.isArray(A)?A.join(" "):A}const lt=Symbol.for("motionComponentSymbol");function JA(A){return A&&typeof A=="object"&&Object.prototype.hasOwnProperty.call(A,"current")}function Gt(A,g,B){return r.useCallback(M=>{M&&A.onMount&&A.onMount(M),g&&(M?g.mount(M):g.unmount()),B&&(typeof B=="function"?B(M):JA(B)&&(B.current=M))},[g])}const IB=A=>A.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OM="data-"+IB("framerAppearId"),{schedule:nB,cancel:Pi}=JM(queueMicrotask,!1),jM=r.createContext({});function at(A,g,B,M,D){var w,e;const{visualElement:Q}=r.useContext(cg),t=r.useContext(zM),s=r.useContext(tB),i=r.useContext(hM).reducedMotion,o=r.useRef(null);M=M||t.renderer,!o.current&&M&&(o.current=M(A,{visualState:g,parent:Q,props:B,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:i}));const I=o.current,n=r.useContext(jM);I&&!I.projection&&D&&(I.type==="html"||I.type==="svg")&&ct(o.current,B,D,n);const E=r.useRef(!1);r.useInsertionEffect(()=>{I&&E.current&&I.update(B,s)});const l=B[OM],G=r.useRef(!!l&&!(!((w=window.MotionHandoffIsComplete)===null||w===void 0)&&w.call(window,l))&&((e=window.MotionHasOptimisedAnimation)===null||e===void 0?void 0:e.call(window,l)));return RM(()=>{I&&(E.current=!0,window.MotionIsMounted=!0,I.updateFeatures(),nB.render(I.render),G.current&&I.animationState&&I.animationState.animateChanges())}),r.useEffect(()=>{I&&(!G.current&&I.animationState&&I.animationState.animateChanges(),G.current&&(queueMicrotask(()=>{var a;(a=window.MotionHandoffMarkAsComplete)===null||a===void 0||a.call(window,l)}),G.current=!1))}),I}function ct(A,g,B,M){const{layoutId:D,layout:w,drag:e,dragConstraints:Q,layoutScroll:t,layoutRoot:s}=g;A.projection=new B(A.latestValues,g["data-framer-portal-id"]?void 0:HM(A.parent)),A.projection.setOptions({layoutId:D,layout:w,alwaysMeasureLayout:!!e||Q&&JA(Q),visualElement:A,animationType:typeof w=="string"?w:"both",initialPromotionConfig:M,layoutScroll:t,layoutRoot:s})}function HM(A){if(A)return A.options.allowProjection!==!1?A.projection:HM(A.parent)}function Yt({preloadedFeatures:A,createVisualElement:g,useRender:B,useVisualState:M,Component:D}){var w,e;A&&st(A);function Q(s,i){let o;const I={...r.useContext(hM),...s,layoutId:yt(s)},{isStatic:n}=I,E=Et(s),l=M(s,n);if(!n&&QB){ut(I,A);const G=mt(I);o=G.MeasureLayout,E.visualElement=at(D,l,I,g,G.ProjectionNode)}return C.jsxs(cg.Provider,{value:E,children:[o&&E.visualElement?C.jsx(o,{visualElement:E.visualElement,...I}):null,B(D,s,Gt(l,E.visualElement,i),l,n,E.visualElement)]})}Q.displayName=`motion.${typeof D=="string"?D:`create(${(e=(w=D.displayName)!==null&&w!==void 0?w:D.name)!==null&&e!==void 0?e:""})`}`;const t=r.forwardRef(Q);return t[lt]=D,t}function yt({layoutId:A}){const g=r.useContext(KM).id;return g&&A!==void 0?g+"-"+A:A}function ut(A,g){const B=r.useContext(zM).strict;if(process.env.NODE_ENV!=="production"&&g&&B){const M="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";A.ignoreStrict?pA(!1,M):wA(!1,M)}}function mt(A){const{drag:g,layout:B}=RA;if(!g&&!B)return{};const M={...g,...B};return{MeasureLayout:g!=null&&g.isEnabled(A)||B!=null&&B.isEnabled(A)?M.MeasureLayout:void 0,ProjectionNode:M.ProjectionNode}}const Ut=["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 rB(A){return typeof A!="string"||A.includes("-")?!1:!!(Ut.indexOf(A)>-1||/[A-Z]/u.test(A))}function TM(A){const g=[{},{}];return A==null||A.values.forEach((B,M)=>{g[0][M]=B.get(),g[1][M]=B.getVelocity()}),g}function EB(A,g,B,M){if(typeof g=="function"){const[D,w]=TM(M);g=g(B!==void 0?B:A.custom,D,w)}if(typeof g=="string"&&(g=A.variants&&A.variants[g]),typeof g=="function"){const[D,w]=TM(M);g=g(B!==void 0?B:A.custom,D,w)}return g}const lB=A=>Array.isArray(A),ft=A=>!!(A&&typeof A=="object"&&A.mix&&A.toValue),Zt=A=>lB(A)?A[A.length-1]||0:A,H=A=>!!(A&&A.getVelocity);function ug(A){const g=H(A)?A.get():A;return ft(g)?g.toValue():g}function Vt({scrapeMotionValuesFromProps:A,createRenderState:g,onUpdate:B},M,D,w){const e={latestValues:dt(M,D,w,A),renderState:g()};return B&&(e.onMount=Q=>B({props:M,current:Q,...e}),e.onUpdate=Q=>B(Q)),e}const SM=A=>(g,B)=>{const M=r.useContext(cg),D=r.useContext(tB),w=()=>Vt(A,g,M,D);return B?w():pM(w)};function dt(A,g,B,M){const D={},w=M(A,{});for(const I in w)D[I]=ug(w[I]);let{initial:e,animate:Q}=A;const t=yg(A),s=FM(A);g&&s&&!t&&A.inherit!==!1&&(e===void 0&&(e=g.initial),Q===void 0&&(Q=g.animate));let i=B?B.initial===!1:!1;i=i||e===!1;const o=i?Q:e;if(o&&typeof o!="boolean"&&!Yg(o)){const I=Array.isArray(o)?o:[o];for(let n=0;n<I.length;n++){const E=EB(A,I[n]);if(E){const{transitionEnd:l,transition:G,...a}=E;for(const c in a){let U=a[c];if(Array.isArray(U)){const q=i?U.length-1:0;U=U[q]}U!==null&&(D[c]=U)}for(const c in l)D[c]=l[c]}}}return D}const zA=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yA=new Set(zA),XM=A=>g=>typeof g=="string"&&g.startsWith(A),NM=XM("--"),qt=XM("var(--"),GB=A=>qt(A)?kt.test(A.split("/*")[0].trim()):!1,kt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xM=(A,g)=>g&&typeof A=="number"?g.transform(A):A,oA=(A,g,B)=>B>g?g:B<A?A:B,vA={test:A=>typeof A=="number",parse:parseFloat,transform:A=>A},XA={...vA,transform:A=>oA(0,1,A)},mg={...vA,default:1},NA=A=>({test:g=>typeof g=="string"&&g.endsWith(A)&&g.split(" ").length===1,parse:parseFloat,transform:g=>`${g}${A}`}),EA=NA("deg"),QA=NA("%"),d=NA("px"),Kt=NA("vh"),pt=NA("vw"),WM={...QA,parse:A=>QA.parse(A)/100,transform:A=>QA.transform(A*100)},ht={borderWidth:d,borderTopWidth:d,borderRightWidth:d,borderBottomWidth:d,borderLeftWidth:d,borderRadius:d,radius:d,borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,width:d,maxWidth:d,height:d,maxHeight:d,top:d,right:d,bottom:d,left:d,padding:d,paddingTop:d,paddingRight:d,paddingBottom:d,paddingLeft:d,margin:d,marginTop:d,marginRight:d,marginBottom:d,marginLeft:d,backgroundPositionX:d,backgroundPositionY:d},Rt={rotate:EA,rotateX:EA,rotateY:EA,rotateZ:EA,scale:mg,scaleX:mg,scaleY:mg,scaleZ:mg,skew:EA,skewX:EA,skewY:EA,distance:d,translateX:d,translateY:d,translateZ:d,x:d,y:d,z:d,perspective:d,transformPerspective:d,opacity:XA,originX:WM,originY:WM,originZ:d},$M={...vA,transform:Math.round},aB={...ht,...Rt,zIndex:$M,size:d,fillOpacity:XA,strokeOpacity:XA,numOctaves:$M},Jt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zt=zA.length;function vt(A,g,B){let M="",D=!0;for(let w=0;w<zt;w++){const e=zA[w],Q=A[e];if(Q===void 0)continue;let t=!0;if(typeof Q=="number"?t=Q===(e.startsWith("scale")?1:0):t=parseFloat(Q)===0,!t||B){const s=xM(Q,aB[e]);if(!t){D=!1;const i=Jt[e]||e;M+=`${i}(${s}) `}B&&(g[e]=s)}}return M=M.trim(),B?M=B(g,D?"":M):D&&(M="none"),M}function cB(A,g,B){const{style:M,vars:D,transformOrigin:w}=A;let e=!1,Q=!1;for(const t in g){const s=g[t];if(yA.has(t)){e=!0;continue}else if(NM(t)){D[t]=s;continue}else{const i=xM(s,aB[t]);t.startsWith("origin")?(Q=!0,w[t]=i):M[t]=i}}if(g.transform||(e||B?M.transform=vt(g,A.transform,B):M.transform&&(M.transform="none")),Q){const{originX:t="50%",originY:s="50%",originZ:i=0}=w;M.transformOrigin=`${t} ${s} ${i}`}}const Pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lt={offset:"strokeDashoffset",array:"strokeDasharray"};function Ft(A,g,B=1,M=0,D=!0){A.pathLength=1;const w=D?Pt:Lt;A[w.offset]=d.transform(-M);const e=d.transform(g),Q=d.transform(B);A[w.array]=`${e} ${Q}`}function _M(A,g,B){return typeof A=="string"?A:d.transform(g+B*A)}function bt(A,g,B){const M=_M(g,A.x,A.width),D=_M(B,A.y,A.height);return`${M} ${D}`}function YB(A,{attrX:g,attrY:B,attrScale:M,originX:D,originY:w,pathLength:e,pathSpacing:Q=1,pathOffset:t=0,...s},i,o){if(cB(A,s,o),i){A.style.viewBox&&(A.attrs.viewBox=A.style.viewBox);return}A.attrs=A.style,A.style={};const{attrs:I,style:n,dimensions:E}=A;I.transform&&(E&&(n.transform=I.transform),delete I.transform),E&&(D!==void 0||w!==void 0||n.transform)&&(n.transformOrigin=bt(E,D!==void 0?D:.5,w!==void 0?w:.5)),g!==void 0&&(I.x=g),B!==void 0&&(I.y=B),M!==void 0&&(I.scale=M),e!==void 0&&Ft(I,e,Q,t,!1)}const yB=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),AD=()=>({...yB(),attrs:{}}),uB=A=>typeof A=="string"&&A.toLowerCase()==="svg";function gD(A,{style:g,vars:B},M,D){Object.assign(A.style,g,D&&D.getProjectionStyles(M));for(const w in B)A.style.setProperty(w,B[w])}const BD=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 MD(A,g,B,M){gD(A,g,void 0,M);for(const D in g.attrs)A.setAttribute(BD.has(D)?D:IB(D),g.attrs[D])}const Ug={};function Ot(A){Object.assign(Ug,A)}function DD(A,{layout:g,layoutId:B}){return yA.has(A)||A.startsWith("origin")||(g||B!==void 0)&&(!!Ug[A]||A==="opacity")}function mB(A,g,B){var M;const{style:D}=A,w={};for(const e in D)(H(D[e])||g.style&&H(g.style[e])||DD(e,A)||((M=B==null?void 0:B.getValue(e))===null||M===void 0?void 0:M.liveStyle)!==void 0)&&(w[e]=D[e]);return w}function eD(A,g,B){const M=mB(A,g,B);for(const D in A)if(H(A[D])||H(g[D])){const w=zA.indexOf(D)!==-1?"attr"+D.charAt(0).toUpperCase()+D.substring(1):D;M[w]=A[D]}return M}function jt(A,g){try{g.dimensions=typeof A.getBBox=="function"?A.getBBox():A.getBoundingClientRect()}catch{g.dimensions={x:0,y:0,width:0,height:0}}}const wD=["x","y","width","height","cx","cy","r"],Ht={useVisualState:SM({scrapeMotionValuesFromProps:eD,createRenderState:AD,onUpdate:({props:A,prevProps:g,current:B,renderState:M,latestValues:D})=>{if(!B)return;let w=!!A.drag;if(!w){for(const Q in D)if(yA.has(Q)){w=!0;break}}if(!w)return;let e=!g;if(g)for(let Q=0;Q<wD.length;Q++){const t=wD[Q];A[t]!==g[t]&&(e=!0)}e&&J.read(()=>{jt(B,M),J.render(()=>{YB(M,D,uB(B.tagName),A.transformTemplate),MD(B,M)})})}})},Tt={useVisualState:SM({scrapeMotionValuesFromProps:mB,createRenderState:yB})};function tD(A,g,B){for(const M in g)!H(g[M])&&!DD(M,B)&&(A[M]=g[M])}function St({transformTemplate:A},g){return r.useMemo(()=>{const B=yB();return cB(B,g,A),Object.assign({},B.vars,B.style)},[g])}function Xt(A,g){const B=A.style||{},M={};return tD(M,B,A),Object.assign(M,St(A,g)),M}function Nt(A,g){const B={},M=Xt(A,g);return A.drag&&A.dragListener!==!1&&(B.draggable=!1,M.userSelect=M.WebkitUserSelect=M.WebkitTouchCallout="none",M.touchAction=A.drag===!0?"none":`pan-${A.drag==="x"?"y":"x"}`),A.tabIndex===void 0&&(A.onTap||A.onTapStart||A.whileTap)&&(B.tabIndex=0),B.style=M,B}function xt(A,g,B,M){const D=r.useMemo(()=>{const w=AD();return YB(w,g,uB(M),A.transformTemplate),{...w.attrs,style:{...w.style}}},[g]);if(A.style){const w={};tD(w,A.style,A),D.style={...w,...D.style}}return D}function Wt(A=!1){return(B,M,D,{latestValues:w},e)=>{const t=(rB(B)?xt:Nt)(M,w,e,B),s=It(M,typeof B=="string",A),i=B!==r.Fragment?{...s,...t,ref:D}:{},{children:o}=M,I=r.useMemo(()=>H(o)?o.get():o,[o]);return r.createElement(B,{...i,children:I})}}function $t(A,g){return function(M,{forwardMotionProps:D}={forwardMotionProps:!1}){const e={...rB(M)?Ht:Tt,preloadedFeatures:A,useRender:Wt(D),createVisualElement:g,Component:M};return Yt(e)}}function QD(A,g){if(!Array.isArray(g))return!1;const B=g.length;if(B!==A.length)return!1;for(let M=0;M<B;M++)if(g[M]!==A[M])return!1;return!0}function fg(A,g,B){const M=A.getProps();return EB(M,g,B!==void 0?B:M.custom,A)}const _t=CB(()=>window.ScrollTimeline!==void 0);class AQ{constructor(g){this.stop=()=>this.runAll("stop"),this.animations=g.filter(Boolean)}get finished(){return Promise.all(this.animations.map(g=>"finished"in g?g.finished:g))}getAll(g){return this.animations[0][g]}setAll(g,B){for(let M=0;M<this.animations.length;M++)this.animations[M][g]=B}attachTimeline(g,B){const M=this.animations.map(D=>{if(_t()&&D.attachTimeline)return D.attachTimeline(g);if(typeof B=="function")return B(D)});return()=>{M.forEach((D,w)=>{D&&D(),this.animations[w].stop()})}}get time(){return this.getAll("time")}set time(g){this.setAll("time",g)}get speed(){return this.getAll("speed")}set speed(g){this.setAll("speed",g)}get startTime(){return this.getAll("startTime")}get duration(){let g=0;for(let B=0;B<this.animations.length;B++)g=Math.max(g,this.animations[B].duration);return g}runAll(g){this.animations.forEach(B=>B[g]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class gQ extends AQ{then(g,B){return Promise.all(this.animations).then(g).catch(B)}}function UB(A,g){return A?A[g]||A.default||A:void 0}const fB=2e4;function CD(A){let g=0;const B=50;let M=A.next(g);for(;!M.done&&g<fB;)g+=B,M=A.next(g);return g>=fB?1/0:g}function ZB(A){return typeof A=="function"}function sD(A,g){A.timeline=g,A.onfinish=null}const VB=A=>Array.isArray(A)&&typeof A[0]=="number",BQ={linearEasing:void 0};function MQ(A,g){const B=CB(A);return()=>{var M;return(M=BQ[g])!==null&&M!==void 0?M:B()}}const Zg=MQ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),iD=(A,g,B=10)=>{let M="";const D=Math.max(Math.round(g/B),2);for(let w=0;w<D;w++)M+=A(hA(0,D-1,w))+", ";return`linear(${M.substring(0,M.length-2)})`};function oD(A){return!!(typeof A=="function"&&Zg()||!A||typeof A=="string"&&(A in dB||Zg())||VB(A)||Array.isArray(A)&&A.every(oD))}const xA=([A,g,B,M])=>`cubic-bezier(${A}, ${g}, ${B}, ${M})`,dB={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xA([0,.65,.55,1]),circOut:xA([.55,0,1,.45]),backIn:xA([.31,.01,.66,-.59]),backOut:xA([.33,1.53,.69,.99])};function ID(A,g){if(A)return typeof A=="function"&&Zg()?iD(A,g):VB(A)?xA(A):Array.isArray(A)?A.map(B=>ID(B,g)||dB.easeOut):dB[A]}const MA={x:!1,y:!1};function nD(){return MA.x||MA.y}function rD(A,g,B){var M;if(A instanceof Element)return[A];if(typeof A=="string"){let D=document;const w=(M=void 0)!==null&&M!==void 0?M:D.querySelectorAll(A);return w?Array.from(w):[]}return Array.from(A)}function ED(A,g){const B=rD(A),M=new AbortController,D={passive:!0,...g,signal:M.signal};return[B,D,()=>M.abort()]}function lD(A){return!(A.pointerType==="touch"||nD())}function DQ(A,g,B={}){const[M,D,w]=ED(A,B),e=Q=>{if(!lD(Q))return;const{target:t}=Q,s=g(t,Q);if(typeof s!="function"||!t)return;const i=o=>{lD(o)&&(s(o),t.removeEventListener("pointerleave",i))};t.addEventListener("pointerleave",i,D)};return M.forEach(Q=>{Q.addEventListener("pointerenter",e,D)}),w}const GD=(A,g)=>g?A===g?!0:GD(A,g.parentElement):!1,qB=A=>A.pointerType==="mouse"?typeof A.button!="number"||A.button<=0:A.isPrimary!==!1,eQ=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wQ(A){return eQ.has(A.tagName)||A.tabIndex!==-1}const WA=new WeakSet;function aD(A){return g=>{g.key==="Enter"&&A(g)}}function kB(A,g){A.dispatchEvent(new PointerEvent("pointer"+g,{isPrimary:!0,bubbles:!0}))}const tQ=(A,g)=>{const B=A.currentTarget;if(!B)return;const M=aD(()=>{if(WA.has(B))return;kB(B,"down");const D=aD(()=>{kB(B,"up")}),w=()=>kB(B,"cancel");B.addEventListener("keyup",D,g),B.addEventListener("blur",w,g)});B.addEventListener("keydown",M,g),B.addEventListener("blur",()=>B.removeEventListener("keydown",M),g)};function cD(A){return qB(A)&&!nD()}function QQ(A,g,B={}){const[M,D,w]=ED(A,B),e=Q=>{const t=Q.currentTarget;if(!cD(Q)||WA.has(t))return;WA.add(t);const s=g(t,Q),i=(n,E)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",I),!(!cD(n)||!WA.has(t))&&(WA.delete(t),typeof s=="function"&&s(n,{success:E}))},o=n=>{i(n,B.useGlobalTarget||GD(t,n.target))},I=n=>{i(n,!1)};window.addEventListener("pointerup",o,D),window.addEventListener("pointercancel",I,D)};return M.forEach(Q=>{!wQ(Q)&&Q.getAttribute("tabindex")===null&&(Q.tabIndex=0),(B.useGlobalTarget?window:Q).addEventListener("pointerdown",e,D),Q.addEventListener("focus",s=>tQ(s,D),D)}),w}function CQ(A){return A==="x"||A==="y"?MA[A]?null:(MA[A]=!0,()=>{MA[A]=!1}):MA.x||MA.y?null:(MA.x=MA.y=!0,()=>{MA.x=MA.y=!1})}const YD=new Set(["width","height","top","left","right","bottom",...zA]);let Vg;function sQ(){Vg=void 0}const CA={now:()=>(Vg===void 0&&CA.set(O.isProcessing||tt.useManualTiming?O.timestamp:performance.now()),Vg),set:A=>{Vg=A,queueMicrotask(sQ)}};function KB(A,g){A.indexOf(g)===-1&&A.push(g)}function pB(A,g){const B=A.indexOf(g);B>-1&&A.splice(B,1)}class hB{constructor(){this.subscriptions=[]}add(g){return KB(this.subscriptions,g),()=>pB(this.subscriptions,g)}notify(g,B,M){const D=this.subscriptions.length;if(D)if(D===1)this.subscriptions[0](g,B,M);else for(let w=0;w<D;w++){const e=this.subscriptions[w];e&&e(g,B,M)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function yD(A,g){return g?A*(1e3/g):0}const uD=30,iQ=A=>!isNaN(parseFloat(A));class oQ{constructor(g,B={}){this.version="12.0.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(M,D=!0)=>{const w=CA.now();this.updatedAt!==w&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(M),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),D&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(g),this.owner=B.owner}setCurrent(g){this.current=g,this.updatedAt=CA.now(),this.canTrackVelocity===null&&g!==void 0&&(this.canTrackVelocity=iQ(this.current))}setPrevFrameValue(g=this.current){this.prevFrameValue=g,this.prevUpdatedAt=this.updatedAt}onChange(g){return process.env.NODE_ENV!=="production"&&ag(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",g)}on(g,B){this.events[g]||(this.events[g]=new hB);const M=this.events[g].add(B);return g==="change"?()=>{M(),J.read(()=>{this.events.change.getSize()||this.stop()})}:M}clearListeners(){for(const g in this.events)this.events[g].clear()}attach(g,B){this.passiveEffect=g,this.stopPassiveEffect=B}set(g,B=!0){!B||!this.passiveEffect?this.updateAndNotify(g,B):this.passiveEffect(g,this.updateAndNotify)}setWithVelocity(g,B,M){this.set(B),this.prev=void 0,this.prevFrameValue=g,this.prevUpdatedAt=this.updatedAt-M}jump(g,B=!0){this.updateAndNotify(g),this.prev=g,this.prevUpdatedAt=this.prevFrameValue=void 0,B&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const g=CA.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||g-this.updatedAt>uD)return 0;const B=Math.min(this.updatedAt-this.prevUpdatedAt,uD);return yD(parseFloat(this.current)-parseFloat(this.prevFrameValue),B)}start(g){return this.stop(),new Promise(B=>{this.hasAnimated=!0,this.animation=g(B),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $A(A,g){return new oQ(A,g)}function IQ(A,g,B){A.hasValue(g)?A.getValue(g).set(B):A.addValue(g,$A(B))}function RB(A,g){const B=fg(A,g);let{transitionEnd:M={},transition:D={},...w}=B||{};w={...w,...M};for(const e in w){const Q=Zt(w[e]);IQ(A,e,Q)}}function nQ(A){return!!(H(A)&&A.add)}function JB(A,g){const B=A.getValue("willChange");if(nQ(B))return B.add(g)}function mD(A){return A.props[OM]}const UD=(A,g,B)=>(((1-3*B+3*g)*A+(3*B-6*g))*A+3*g)*A,rQ=1e-7,EQ=12;function lQ(A,g,B,M,D){let w,e,Q=0;do e=g+(B-g)/2,w=UD(e,M,D)-A,w>0?B=e:g=e;while(Math.abs(w)>rQ&&++Q<EQ);return e}function _A(A,g,B,M){if(A===g&&B===M)return N;const D=w=>lQ(w,0,1,A,B);return w=>w===0||w===1?w:UD(D(w),g,M)}const fD=A=>g=>g<=.5?A(2*g)/2:(2-A(2*(1-g)))/2,ZD=A=>g=>1-A(1-g),VD=_A(.33,1.53,.69,.99),zB=ZD(VD),dD=fD(zB),qD=A=>(A*=2)<1?.5*zB(A):.5*(2-Math.pow(2,-10*(A-1))),vB=A=>1-Math.sin(Math.acos(A)),kD=ZD(vB),KD=fD(vB),pD=A=>/^0[^.\s]+$/u.test(A);function GQ(A){return typeof A=="number"?A===0:A!==null?A==="none"||A==="0"||pD(A):!0}const Ag=A=>Math.round(A*1e5)/1e5,PB=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aQ(A){return A==null}const cQ=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,LB=(A,g)=>B=>!!(typeof B=="string"&&cQ.test(B)&&B.startsWith(A)||g&&!aQ(B)&&Object.prototype.hasOwnProperty.call(B,g)),hD=(A,g,B)=>M=>{if(typeof M!="string")return M;const[D,w,e,Q]=M.match(PB);return{[A]:parseFloat(D),[g]:parseFloat(w),[B]:parseFloat(e),alpha:Q!==void 0?parseFloat(Q):1}},YQ=A=>oA(0,255,A),FB={...vA,transform:A=>Math.round(YQ(A))},uA={test:LB("rgb","red"),parse:hD("red","green","blue"),transform:({red:A,green:g,blue:B,alpha:M=1})=>"rgba("+FB.transform(A)+", "+FB.transform(g)+", "+FB.transform(B)+", "+Ag(XA.transform(M))+")"};function yQ(A){let g="",B="",M="",D="";return A.length>5?(g=A.substring(1,3),B=A.substring(3,5),M=A.substring(5,7),D=A.substring(7,9)):(g=A.substring(1,2),B=A.substring(2,3),M=A.substring(3,4),D=A.substring(4,5),g+=g,B+=B,M+=M,D+=D),{red:parseInt(g,16),green:parseInt(B,16),blue:parseInt(M,16),alpha:D?parseInt(D,16)/255:1}}const bB={test:LB("#"),parse:yQ,transform:uA.transform},PA={test:LB("hsl","hue"),parse:hD("hue","saturation","lightness"),transform:({hue:A,saturation:g,lightness:B,alpha:M=1})=>"hsla("+Math.round(A)+", "+QA.transform(Ag(g))+", "+QA.transform(Ag(B))+", "+Ag(XA.transform(M))+")"},T={test:A=>uA.test(A)||bB.test(A)||PA.test(A),parse:A=>uA.test(A)?uA.parse(A):PA.test(A)?PA.parse(A):bB.parse(A),transform:A=>typeof A=="string"?A:A.hasOwnProperty("red")?uA.transform(A):PA.transform(A)},uQ=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mQ(A){var g,B;return isNaN(A)&&typeof A=="string"&&(((g=A.match(PB))===null||g===void 0?void 0:g.length)||0)+(((B=A.match(uQ))===null||B===void 0?void 0:B.length)||0)>0}const RD="number",JD="color",UQ="var",fQ="var(",zD="${}",ZQ=/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 gg(A){const g=A.toString(),B=[],M={color:[],number:[],var:[]},D=[];let w=0;const Q=g.replace(ZQ,t=>(T.test(t)?(M.color.push(w),D.push(JD),B.push(T.parse(t))):t.startsWith(fQ)?(M.var.push(w),D.push(UQ),B.push(t)):(M.number.push(w),D.push(RD),B.push(parseFloat(t))),++w,zD)).split(zD);return{values:B,split:Q,indexes:M,types:D}}function vD(A){return gg(A).values}function PD(A){const{split:g,types:B}=gg(A),M=g.length;return D=>{let w="";for(let e=0;e<M;e++)if(w+=g[e],D[e]!==void 0){const Q=B[e];Q===RD?w+=Ag(D[e]):Q===JD?w+=T.transform(D[e]):w+=D[e]}return w}}const VQ=A=>typeof A=="number"?0:A;function dQ(A){const g=vD(A);return PD(A)(g.map(VQ))}const lA={test:mQ,parse:vD,createTransformer:PD,getAnimatableNone:dQ},qQ=new Set(["brightness","contrast","saturate","opacity"]);function kQ(A){const[g,B]=A.slice(0,-1).split("(");if(g==="drop-shadow")return A;const[M]=B.match(PB)||[];if(!M)return A;const D=B.replace(M,"");let w=qQ.has(g)?1:0;return M!==B&&(w*=100),g+"("+w+D+")"}const KQ=/\b([a-z-]*)\(.*?\)/gu,OB={...lA,getAnimatableNone:A=>{const g=A.match(KQ);return g?g.map(kQ).join(" "):A}},pQ={...aB,color:T,backgroundColor:T,outlineColor:T,fill:T,stroke:T,borderColor:T,borderTopColor:T,borderRightColor:T,borderBottomColor:T,borderLeftColor:T,filter:OB,WebkitFilter:OB},jB=A=>pQ[A];function LD(A,g){let B=jB(A);return B!==OB&&(B=lA),B.getAnimatableNone?B.getAnimatableNone(g):void 0}const hQ=new Set(["auto","none","0"]);function RQ(A,g,B){let M=0,D;for(;M<A.length&&!D;){const w=A[M];typeof w=="string"&&!hQ.has(w)&&gg(w).values.length&&(D=A[M]),M++}if(D&&B)for(const w of g)A[w]=LD(B,D)}const FD=A=>A===vA||A===d,bD=(A,g)=>parseFloat(A.split(", ")[g]),OD=(A,g)=>(B,{transform:M})=>{if(M==="none"||!M)return 0;const D=M.match(/^matrix3d\((.+)\)$/u);if(D)return bD(D[1],g);{const w=M.match(/^matrix\((.+)\)$/u);return w?bD(w[1],A):0}},JQ=new Set(["x","y","z"]),zQ=zA.filter(A=>!JQ.has(A));function vQ(A){const g=[];return zQ.forEach(B=>{const M=A.getValue(B);M!==void 0&&(g.push([B,M.get()]),M.set(B.startsWith("scale")?1:0))}),g}const LA={width:({x:A},{paddingLeft:g="0",paddingRight:B="0"})=>A.max-A.min-parseFloat(g)-parseFloat(B),height:({y:A},{paddingTop:g="0",paddingBottom:B="0"})=>A.max-A.min-parseFloat(g)-parseFloat(B),top:(A,{top:g})=>parseFloat(g),left:(A,{left:g})=>parseFloat(g),bottom:({y:A},{top:g})=>parseFloat(g)+(A.max-A.min),right:({x:A},{left:g})=>parseFloat(g)+(A.max-A.min),x:OD(4,13),y:OD(5,14)};LA.translateX=LA.x,LA.translateY=LA.y;const mA=new Set;let HB=!1,TB=!1;function jD(){if(TB){const A=Array.from(mA).filter(M=>M.needsMeasurement),g=new Set(A.map(M=>M.element)),B=new Map;g.forEach(M=>{const D=vQ(M);D.length&&(B.set(M,D),M.render())}),A.forEach(M=>M.measureInitialState()),g.forEach(M=>{M.render();const D=B.get(M);D&&D.forEach(([w,e])=>{var Q;(Q=M.getValue(w))===null||Q===void 0||Q.set(e)})}),A.forEach(M=>M.measureEndState()),A.forEach(M=>{M.suspendedScrollY!==void 0&&window.scrollTo(0,M.suspendedScrollY)})}TB=!1,HB=!1,mA.forEach(A=>A.complete()),mA.clear()}function HD(){mA.forEach(A=>{A.readKeyframes(),A.needsMeasurement&&(TB=!0)})}function PQ(){HD(),jD()}class SB{constructor(g,B,M,D,w,e=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...g],this.onComplete=B,this.name=M,this.motionValue=D,this.element=w,this.isAsync=e}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mA.add(this),HB||(HB=!0,J.read(HD),J.resolveKeyframes(jD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:g,name:B,element:M,motionValue:D}=this;for(let w=0;w<g.length;w++)if(g[w]===null)if(w===0){const e=D==null?void 0:D.get(),Q=g[g.length-1];if(e!==void 0)g[0]=e;else if(M&&B){const t=M.readValue(B,Q);t!=null&&(g[0]=t)}g[0]===void 0&&(g[0]=Q),D&&e===void 0&&D.set(g[0])}else g[w]=g[w-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),mA.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,mA.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const TD=A=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(A),LQ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function FQ(A){const g=LQ.exec(A);if(!g)return[,];const[,B,M,D]=g;return[`--${B??M}`,D]}const bQ=4;function SD(A,g,B=1){wA(B<=bQ,`Max CSS variable fallback depth detected in property "${A}". This may indicate a circular fallback dependency.`);const[M,D]=FQ(A);if(!M)return;const w=window.getComputedStyle(g).getPropertyValue(M);if(w){const e=w.trim();return TD(e)?parseFloat(e):e}return GB(D)?SD(D,g,B+1):D}const XD=A=>g=>g.test(A),ND=[vA,d,QA,EA,pt,Kt,{test:A=>A==="auto",parse:A=>A}],xD=A=>ND.find(XD(A));class WD extends SB{constructor(g,B,M,D,w){super(g,B,M,D,w,!0)}readKeyframes(){const{unresolvedKeyframes:g,element:B,name:M}=this;if(!B||!B.current)return;super.readKeyframes();for(let t=0;t<g.length;t++){let s=g[t];if(typeof s=="string"&&(s=s.trim(),GB(s))){const i=SD(s,B.current);i!==void 0&&(g[t]=i),t===g.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!YD.has(M)||g.length!==2)return;const[D,w]=g,e=xD(D),Q=xD(w);if(e!==Q)if(FD(e)&&FD(Q))for(let t=0;t<g.length;t++){const s=g[t];typeof s=="string"&&(g[t]=parseFloat(s))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:g,name:B}=this,M=[];for(let D=0;D<g.length;D++)GQ(g[D])&&M.push(D);M.length&&RQ(g,M,B)}measureInitialState(){const{element:g,unresolvedKeyframes:B,name:M}=this;if(!g||!g.current)return;M==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=LA[M](g.measureViewportBox(),window.getComputedStyle(g.current)),B[0]=this.measuredOrigin;const D=B[B.length-1];D!==void 0&&g.getValue(M,D).jump(D,!1)}measureEndState(){var g;const{element:B,name:M,unresolvedKeyframes:D}=this;if(!B||!B.current)return;const w=B.getValue(M);w&&w.jump(this.measuredOrigin,!1);const e=D.length-1,Q=D[e];D[e]=LA[M](B.measureViewportBox(),window.getComputedStyle(B.current)),Q!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=Q),!((g=this.removedTransforms)===null||g===void 0)&&g.length&&this.removedTransforms.forEach(([t,s])=>{B.getValue(t).set(s)}),this.resolveNoneKeyframes()}}const $D=(A,g)=>g==="zIndex"?!1:!!(typeof A=="number"||Array.isArray(A)||typeof A=="string"&&(lA.test(A)||A==="0")&&!A.startsWith("url("));function OQ(A){const g=A[0];if(A.length===1)return!0;for(let B=0;B<A.length;B++)if(A[B]!==g)return!0}function jQ(A,g,B,M){const D=A[0];if(D===null)return!1;if(g==="display"||g==="visibility")return!0;const w=A[A.length-1],e=$D(D,g),Q=$D(w,g);return pA(e===Q,`You are trying to animate ${g} from "${D}" to "${w}". ${D} is not an animatable value - to enable this animation set ${D} to a value animatable to ${w} via the \`style\` property.`),!e||!Q?!1:OQ(A)||(B==="spring"||ZB(B))&&M}const HQ=A=>A!==null;function dg(A,{repeat:g,repeatType:B="loop"},M){const D=A.filter(HQ),w=g&&B!=="loop"&&g%2===1?0:D.length-1;return!w||M===void 0?D[w]:M}const TQ=40;class _D{constructor({autoplay:g=!0,delay:B=0,type:M="keyframes",repeat:D=0,repeatDelay:w=0,repeatType:e="loop",...Q}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=CA.now(),this.options={autoplay:g,delay:B,type:M,repeat:D,repeatDelay:w,repeatType:e,...Q},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>TQ?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PQ(),this._resolved}onKeyframesResolved(g,B){this.resolvedAt=CA.now(),this.hasAttemptedResolve=!0;const{name:M,type:D,velocity:w,delay:e,onComplete:Q,onUpdate:t,isGenerator:s}=this.options;if(!s&&!jQ(g,M,D,w))if(e)this.options.duration=0;else{t&&t(dg(g,this.options,B)),Q&&Q(),this.resolveFinishedPromise();return}const i=this.initPlayback(g,B);i!==!1&&(this._resolved={keyframes:g,finalKeyframe:B,...i},this.onPostResolved())}onPostResolved(){}then(g,B){return this.currentFinishedPromise.then(g,B)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(g=>{this.resolveFinishedPromise=g})}}const v=(A,g,B)=>A+(g-A)*B;function XB(A,g,B){return B<0&&(B+=1),B>1&&(B-=1),B<1/6?A+(g-A)*6*B:B<1/2?g:B<2/3?A+(g-A)*(2/3-B)*6:A}function SQ({hue:A,saturation:g,lightness:B,alpha:M}){A/=360,g/=100,B/=100;let D=0,w=0,e=0;if(!g)D=w=e=B;else{const Q=B<.5?B*(1+g):B+g-B*g,t=2*B-Q;D=XB(t,Q,A+1/3),w=XB(t,Q,A),e=XB(t,Q,A-1/3)}return{red:Math.round(D*255),green:Math.round(w*255),blue:Math.round(e*255),alpha:M}}function qg(A,g){return B=>B>0?g:A}const NB=(A,g,B)=>{const M=A*A,D=B*(g*g-M)+M;return D<0?0:Math.sqrt(D)},XQ=[bB,uA,PA],NQ=A=>XQ.find(g=>g.test(A));function Ae(A){const g=NQ(A);if(pA(!!g,`'${A}' is not an animatable color. Use the equivalent color code instead.`),!g)return!1;let B=g.parse(A);return g===PA&&(B=SQ(B)),B}const ge=(A,g)=>{const B=Ae(A),M=Ae(g);if(!B||!M)return qg(A,g);const D={...B};return w=>(D.red=NB(B.red,M.red,w),D.green=NB(B.green,M.green,w),D.blue=NB(B.blue,M.blue,w),D.alpha=v(B.alpha,M.alpha,w),uA.transform(D))},xQ=(A,g)=>B=>g(A(B)),Bg=(...A)=>A.reduce(xQ),xB=new Set(["none","hidden"]);function WQ(A,g){return xB.has(A)?B=>B<=0?A:g:B=>B>=1?g:A}function $Q(A,g){return B=>v(A,g,B)}function WB(A){return typeof A=="number"?$Q:typeof A=="string"?GB(A)?qg:T.test(A)?ge:gC:Array.isArray(A)?Be:typeof A=="object"?T.test(A)?ge:_Q:qg}function Be(A,g){const B=[...A],M=B.length,D=A.map((w,e)=>WB(w)(w,g[e]));return w=>{for(let e=0;e<M;e++)B[e]=D[e](w);return B}}function _Q(A,g){const B={...A,...g},M={};for(const D in B)A[D]!==void 0&&g[D]!==void 0&&(M[D]=WB(A[D])(A[D],g[D]));return D=>{for(const w in M)B[w]=M[w](D);return B}}function AC(A,g){var B;const M=[],D={color:0,var:0,number:0};for(let w=0;w<g.values.length;w++){const e=g.types[w],Q=A.indexes[e][D[e]],t=(B=A.values[Q])!==null&&B!==void 0?B:0;M[w]=t,D[e]++}return M}const gC=(A,g)=>{const B=lA.createTransformer(g),M=gg(A),D=gg(g);return M.indexes.var.length===D.indexes.var.length&&M.indexes.color.length===D.indexes.color.length&&M.indexes.number.length>=D.indexes.number.length?xB.has(A)&&!D.values.length||xB.has(g)&&!M.values.length?WQ(A,g):Bg(Be(AC(M,D),D.values),B):(pA(!0,`Complex values '${A}' and '${g}' 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.`),qg(A,g))};function Me(A,g,B){return typeof A=="number"&&typeof g=="number"&&typeof B=="number"?v(A,g,B):WB(A)(A,g)}const BC=5;function De(A,g,B){const M=Math.max(g-BC,0);return yD(B-A(M),g-M)}const P={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},ee=.001;function MC({duration:A=P.duration,bounce:g=P.bounce,velocity:B=P.velocity,mass:M=P.mass}){let D,w;pA(A<=tA(P.maxDuration),"Spring duration must be 10 seconds or less");let e=1-g;e=oA(P.minDamping,P.maxDamping,e),A=oA(P.minDuration,P.maxDuration,iA(A)),e<1?(D=s=>{const i=s*e,o=i*A,I=i-B,n=$B(s,e),E=Math.exp(-o);return ee-I/n*E},w=s=>{const o=s*e*A,I=o*B+B,n=Math.pow(e,2)*Math.pow(s,2)*A,E=Math.exp(-o),l=$B(Math.pow(s,2),e);return(-D(s)+ee>0?-1:1)*((I-n)*E)/l}):(D=s=>{const i=Math.exp(-s*A),o=(s-B)*A+1;return-.001+i*o},w=s=>{const i=Math.exp(-s*A),o=(B-s)*(A*A);return i*o});const Q=5/A,t=eC(D,w,Q);if(A=tA(A),isNaN(t))return{stiffness:P.stiffness,damping:P.damping,duration:A};{const s=Math.pow(t,2)*M;return{stiffness:s,damping:e*2*Math.sqrt(M*s),duration:A}}}const DC=12;function eC(A,g,B){let M=B;for(let D=1;D<DC;D++)M=M-A(M)/g(M);return M}function $B(A,g){return A*Math.sqrt(1-g*g)}const wC=["duration","bounce"],tC=["stiffness","damping","mass"];function we(A,g){return g.some(B=>A[B]!==void 0)}function QC(A){let g={velocity:P.velocity,stiffness:P.stiffness,damping:P.damping,mass:P.mass,isResolvedFromDuration:!1,...A};if(!we(A,tC)&&we(A,wC))if(A.visualDuration){const B=A.visualDuration,M=2*Math.PI/(B*1.2),D=M*M,w=2*oA(.05,1,1-(A.bounce||0))*Math.sqrt(D);g={...g,mass:P.mass,stiffness:D,damping:w}}else{const B=MC(A);g={...g,...B,mass:P.mass},g.isResolvedFromDuration=!0}return g}function te(A=P.visualDuration,g=P.bounce){const B=typeof A!="object"?{visualDuration:A,keyframes:[0,1],bounce:g}:A;let{restSpeed:M,restDelta:D}=B;const w=B.keyframes[0],e=B.keyframes[B.keyframes.length-1],Q={done:!1,value:w},{stiffness:t,damping:s,mass:i,duration:o,velocity:I,isResolvedFromDuration:n}=QC({...B,velocity:-iA(B.velocity||0)}),E=I||0,l=s/(2*Math.sqrt(t*i)),G=e-w,a=iA(Math.sqrt(t/i)),c=Math.abs(G)<5;M||(M=c?P.restSpeed.granular:P.restSpeed.default),D||(D=c?P.restDelta.granular:P.restDelta.default);let U;if(l<1){const Y=$B(a,l);U=Z=>{const f=Math.exp(-l*a*Z);return e-f*((E+l*a*G)/Y*Math.sin(Y*Z)+G*Math.cos(Y*Z))}}else if(l===1)U=Y=>e-Math.exp(-a*Y)*(G+(E+a*G)*Y);else{const Y=a*Math.sqrt(l*l-1);U=Z=>{const f=Math.exp(-l*a*Z),u=Math.min(Y*Z,300);return e-f*((E+l*a*G)*Math.sinh(u)+Y*G*Math.cosh(u))/Y}}const q={calculatedDuration:n&&o||null,next:Y=>{const Z=U(Y);if(n)Q.done=Y>=o;else{let f=0;l<1&&(f=Y===0?tA(E):De(U,Y,Z));const u=Math.abs(f)<=M,y=Math.abs(e-Z)<=D;Q.done=u&&y}return Q.value=Q.done?e:Z,Q},toString:()=>{const Y=Math.min(CD(q),fB),Z=iD(f=>q.next(Y*f).value,Y,30);return Y+"ms "+Z}};return q}function Qe({keyframes:A,velocity:g=0,power:B=.8,timeConstant:M=325,bounceDamping:D=10,bounceStiffness:w=500,modifyTarget:e,min:Q,max:t,restDelta:s=.5,restSpeed:i}){const o=A[0],I={done:!1,value:o},n=u=>Q!==void 0&&u<Q||t!==void 0&&u>t,E=u=>Q===void 0?t:t===void 0||Math.abs(Q-u)<Math.abs(t-u)?Q:t;let l=B*g;const G=o+l,a=e===void 0?G:e(G);a!==G&&(l=a-o);const c=u=>-l*Math.exp(-u/M),U=u=>a+c(u),q=u=>{const y=c(u),V=U(u);I.done=Math.abs(y)<=s,I.value=I.done?a:V};let Y,Z;const f=u=>{n(I.value)&&(Y=u,Z=te({keyframes:[I.value,E(I.value)],velocity:De(U,u,I.value),damping:D,stiffness:w,restDelta:s,restSpeed:i}))};return f(0),{calculatedDuration:null,next:u=>{let y=!1;return!Z&&Y===void 0&&(y=!0,q(u),f(u)),Y!==void 0&&u>=Y?Z.next(u-Y):(!y&&q(u),I)}}}const CC=_A(.42,0,1,1),sC=_A(0,0,.58,1),Ce=_A(.42,0,.58,1),iC=A=>Array.isArray(A)&&typeof A[0]!="number",se={linear:N,easeIn:CC,easeInOut:Ce,easeOut:sC,circIn:vB,circInOut:KD,circOut:kD,backIn:zB,backInOut:dD,backOut:VD,anticipate:qD},ie=A=>{if(VB(A)){wA(A.length===4,"Cubic bezier arrays must contain four numerical values.");const[g,B,M,D]=A;return _A(g,B,M,D)}else if(typeof A=="string")return wA(se[A]!==void 0,`Invalid easing type '${A}'`),se[A];return A};function oC(A,g,B){const M=[],D=B||Me,w=A.length-1;for(let e=0;e<w;e++){let Q=D(A[e],A[e+1]);if(g){const t=Array.isArray(g)?g[e]||N:g;Q=Bg(t,Q)}M.push(Q)}return M}function IC(A,g,{clamp:B=!0,ease:M,mixer:D}={}){const w=A.length;if(wA(w===g.length,"Both input and output ranges must be the same length"),w===1)return()=>g[0];if(w===2&&g[0]===g[1])return()=>g[1];const e=A[0]===A[1];A[0]>A[w-1]&&(A=[...A].reverse(),g=[...g].reverse());const Q=oC(g,M,D),t=Q.length,s=i=>{if(e&&i<A[0])return g[0];let o=0;if(t>1)for(;o<A.length-2&&!(i<A[o+1]);o++);const I=hA(A[o],A[o+1],i);return Q[o](I)};return B?i=>s(oA(A[0],A[w-1],i)):s}function nC(A,g){const B=A[A.length-1];for(let M=1;M<=g;M++){const D=hA(0,g,M);A.push(v(B,1,D))}}function rC(A){const g=[0];return nC(g,A.length-1),g}function EC(A,g){return A.map(B=>B*g)}function lC(A,g){return A.map(()=>g||Ce).splice(0,A.length-1)}function kg({duration:A=300,keyframes:g,times:B,ease:M="easeInOut"}){const D=iC(M)?M.map(ie):ie(M),w={done:!1,value:g[0]},e=EC(B&&B.length===g.length?B:rC(g),A),Q=IC(e,g,{ease:Array.isArray(D)?D:lC(g,D)});return{calculatedDuration:A,next:t=>(w.value=Q(t),w.done=t>=A,w)}}const GC=A=>{const g=({timestamp:B})=>A(B);return{start:()=>J.update(g,!0),stop:()=>rA(g),now:()=>O.isProcessing?O.timestamp:CA.now()}},aC={decay:Qe,inertia:Qe,tween:kg,keyframes:kg,spring:te},cC=A=>A/100;class _B extends _D{constructor(g){super(g),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:B,motionValue:M,element:D,keyframes:w}=this.options,e=(D==null?void 0:D.KeyframeResolver)||SB,Q=(t,s)=>this.onKeyframesResolved(t,s);this.resolver=new e(w,Q,B,M,D),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(g){const{type:B="keyframes",repeat:M=0,repeatDelay:D=0,repeatType:w,velocity:e=0}=this.options,Q=ZB(B)?B:aC[B]||kg;let t,s;Q!==kg&&typeof g[0]!="number"&&(process.env.NODE_ENV!=="production"&&wA(g.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${g}`),t=Bg(cC,Me(g[0],g[1])),g=[0,100]);const i=Q({...this.options,keyframes:g});w==="mirror"&&(s=Q({...this.options,keyframes:[...g].reverse(),velocity:-e})),i.calculatedDuration===null&&(i.calculatedDuration=CD(i));const{calculatedDuration:o}=i,I=o+D,n=I*(M+1)-D;return{generator:i,mirroredGenerator:s,mapPercentToKeyframes:t,calculatedDuration:o,resolvedDuration:I,totalDuration:n}}onPostResolved(){const{autoplay:g=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!g?this.pause():this.state=this.pendingPlayState}tick(g,B=!1){const{resolved:M}=this;if(!M){const{keyframes:u}=this.options;return{done:!0,value:u[u.length-1]}}const{finalKeyframe:D,generator:w,mirroredGenerator:e,mapPercentToKeyframes:Q,keyframes:t,calculatedDuration:s,totalDuration:i,resolvedDuration:o}=M;if(this.startTime===null)return w.next(0);const{delay:I,repeat:n,repeatType:E,repeatDelay:l,onUpdate:G}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,g):this.speed<0&&(this.startTime=Math.min(g-i/this.speed,this.startTime)),B?this.currentTime=g:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(g-this.startTime)*this.speed;const a=this.currentTime-I*(this.speed>=0?1:-1),c=this.speed>=0?a<0:a>i;this.currentTime=Math.max(a,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let U=this.currentTime,q=w;if(n){const u=Math.min(this.currentTime,i)/o;let y=Math.floor(u),V=u%1;!V&&u>=1&&(V=1),V===1&&y--,y=Math.min(y,n+1),!!(y%2)&&(E==="reverse"?(V=1-V,l&&(V-=l/o)):E==="mirror"&&(q=e)),U=oA(0,1,V)*o}const Y=c?{done:!1,value:t[0]}:q.next(U);Q&&(Y.value=Q(Y.value));let{done:Z}=Y;!c&&s!==null&&(Z=this.speed>=0?this.currentTime>=i:this.currentTime<=0);const f=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Z);return f&&D!==void 0&&(Y.value=dg(t,this.options,D)),G&&G(Y.value),f&&this.finish(),Y}get duration(){const{resolved:g}=this;return g?iA(g.calculatedDuration):0}get time(){return iA(this.currentTime)}set time(g){g=tA(g),this.currentTime=g,this.holdTime!==null||this.speed===0?this.holdTime=g:this.driver&&(this.startTime=this.driver.now()-g/this.speed)}get speed(){return this.playbackSpeed}set speed(g){const B=this.playbackSpeed!==g;this.playbackSpeed=g,B&&(this.time=iA(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:g=GC,onPlay:B,startTime:M}=this.options;this.driver||(this.driver=g(w=>this.tick(w))),B&&B();const D=this.driver.now();this.holdTime!==null?this.startTime=D-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=D):this.startTime=M??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var g;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(g=this.currentTime)!==null&&g!==void 0?g:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:g}=this.options;g&&g()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(g){return this.startTime=0,this.tick(g,!0)}}const YC=new Set(["opacity","clipPath","filter","transform"]);function yC(A,g,B,{delay:M=0,duration:D=300,repeat:w=0,repeatType:e="loop",ease:Q="easeInOut",times:t}={}){const s={[g]:B};t&&(s.offset=t);const i=ID(Q,D);return Array.isArray(i)&&(s.easing=i),A.animate(s,{delay:M,duration:D,easing:Array.isArray(i)?"linear":i,fill:"both",iterations:w+1,direction:e==="reverse"?"alternate":"normal"})}const uC=CB(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Kg=10,mC=2e4;function UC(A){return ZB(A.type)||A.type==="spring"||!oD(A.ease)}function fC(A,g){const B=new _B({...g,keyframes:A,repeat:0,delay:0,isGenerator:!0});let M={done:!1,value:A[0]};const D=[];let w=0;for(;!M.done&&w<mC;)M=B.sample(w),D.push(M.value),w+=Kg;return{times:void 0,keyframes:D,duration:w-Kg,ease:"linear"}}const oe={anticipate:qD,backInOut:dD,circInOut:KD};function ZC(A){return A in oe}class Ie extends _D{constructor(g){super(g);const{name:B,motionValue:M,element:D,keyframes:w}=this.options;this.resolver=new WD(w,(e,Q)=>this.onKeyframesResolved(e,Q),B,M,D),this.resolver.scheduleResolve()}initPlayback(g,B){let{duration:M=300,times:D,ease:w,type:e,motionValue:Q,name:t,startTime:s}=this.options;if(!Q.owner||!Q.owner.current)return!1;if(typeof w=="string"&&Zg()&&ZC(w)&&(w=oe[w]),UC(this.options)){const{onComplete:o,onUpdate:I,motionValue:n,element:E,...l}=this.options,G=fC(g,l);g=G.keyframes,g.length===1&&(g[1]=g[0]),M=G.duration,D=G.times,w=G.ease,e="keyframes"}const i=yC(Q.owner.current,t,g,{...this.options,duration:M,times:D,ease:w});return i.startTime=s??this.calcStartTime(),this.pendingTimeline?(sD(i,this.pendingTimeline),this.pendingTimeline=void 0):i.onfinish=()=>{const{onComplete:o}=this.options;Q.set(dg(g,this.options,B)),o&&o(),this.cancel(),this.resolveFinishedPromise()},{animation:i,duration:M,times:D,type:e,ease:w,keyframes:g}}get duration(){const{resolved:g}=this;if(!g)return 0;const{duration:B}=g;return iA(B)}get time(){const{resolved:g}=this;if(!g)return 0;const{animation:B}=g;return iA(B.currentTime||0)}set time(g){const{resolved:B}=this;if(!B)return;const{animation:M}=B;M.currentTime=tA(g)}get speed(){const{resolved:g}=this;if(!g)return 1;const{animation:B}=g;return B.playbackRate}set speed(g){const{resolved:B}=this;if(!B)return;const{animation:M}=B;M.playbackRate=g}get state(){const{resolved:g}=this;if(!g)return"idle";const{animation:B}=g;return B.playState}get startTime(){const{resolved:g}=this;if(!g)return null;const{animation:B}=g;return B.startTime}attachTimeline(g){if(!this._resolved)this.pendingTimeline=g;else{const{resolved:B}=this;if(!B)return N;const{animation:M}=B;sD(M,g)}return N}play(){if(this.isStopped)return;const{resolved:g}=this;if(!g)return;const{animation:B}=g;B.playState==="finished"&&this.updateFinishedPromise(),B.play()}pause(){const{resolved:g}=this;if(!g)return;const{animation:B}=g;B.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:g}=this;if(!g)return;const{animation:B,keyframes:M,duration:D,type:w,ease:e,times:Q}=g;if(B.playState==="idle"||B.playState==="finished")return;if(this.time){const{motionValue:s,onUpdate:i,onComplete:o,element:I,...n}=this.options,E=new _B({...n,keyframes:M,duration:D,type:w,ease:e,times:Q,isGenerator:!0}),l=tA(this.time);s.setWithVelocity(E.sample(l-Kg).value,E.sample(l).value,Kg)}const{onStop:t}=this.options;t&&t(),this.cancel()}complete(){const{resolved:g}=this;g&&g.animation.finish()}cancel(){const{resolved:g}=this;g&&g.animation.cancel()}static supports(g){const{motionValue:B,name:M,repeatDelay:D,repeatType:w,damping:e,type:Q}=g;if(!B||!B.owner||!(B.owner.current instanceof HTMLElement))return!1;const{onUpdate:t,transformTemplate:s}=B.owner.getProps();return uC()&&M&&YC.has(M)&&!t&&!s&&!D&&w!=="mirror"&&e!==0&&Q!=="inertia"}}const VC={type:"spring",stiffness:500,damping:25,restSpeed:10},dC=A=>({type:"spring",stiffness:550,damping:A===0?2*Math.sqrt(550):30,restSpeed:10}),qC={type:"keyframes",duration:.8},kC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KC=(A,{keyframes:g})=>g.length>2?qC:yA.has(A)?A.startsWith("scale")?dC(g[1]):VC:kC;function pC({when:A,delay:g,delayChildren:B,staggerChildren:M,staggerDirection:D,repeat:w,repeatType:e,repeatDelay:Q,from:t,elapsed:s,...i}){return!!Object.keys(i).length}const AM=(A,g,B,M={},D,w)=>e=>{const Q=UB(M,A)||{},t=Q.delay||M.delay||0;let{elapsed:s=0}=M;s=s-tA(t);let i={keyframes:Array.isArray(B)?B:[null,B],ease:"easeOut",velocity:g.getVelocity(),...Q,delay:-s,onUpdate:I=>{g.set(I),Q.onUpdate&&Q.onUpdate(I)},onComplete:()=>{e(),Q.onComplete&&Q.onComplete()},name:A,motionValue:g,element:w?void 0:D};pC(Q)||(i={...i,...KC(A,i)}),i.duration&&(i.duration=tA(i.duration)),i.repeatDelay&&(i.repeatDelay=tA(i.repeatDelay)),i.from!==void 0&&(i.keyframes[0]=i.from);let o=!1;if((i.type===!1||i.duration===0&&!i.repeatDelay)&&(i.duration=0,i.delay===0&&(o=!0)),o&&!w&&g.get()!==void 0){const I=dg(i.keyframes,Q);if(I!==void 0)return J.update(()=>{i.onUpdate(I),i.onComplete()}),new gQ([])}return!w&&Ie.supports(i)?new Ie(i):new _B(i)};function hC({protectedKeys:A,needsAnimating:g},B){const M=A.hasOwnProperty(B)&&g[B]!==!0;return g[B]=!1,M}function ne(A,g,{delay:B=0,transitionOverride:M,type:D}={}){var w;let{transition:e=A.getDefaultTransition(),transitionEnd:Q,...t}=g;M&&(e=M);const s=[],i=D&&A.animationState&&A.animationState.getState()[D];for(const o in t){const I=A.getValue(o,(w=A.latestValues[o])!==null&&w!==void 0?w:null),n=t[o];if(n===void 0||i&&hC(i,o))continue;const E={delay:B,...UB(e||{},o)};let l=!1;if(window.MotionHandoffAnimation){const a=mD(A);if(a){const c=window.MotionHandoffAnimation(a,o,J);c!==null&&(E.startTime=c,l=!0)}}JB(A,o),I.start(AM(o,I,n,A.shouldReduceMotion&&YD.has(o)?{type:!1}:E,A,l));const G=I.animation;G&&s.push(G)}return Q&&Promise.all(s).then(()=>{J.update(()=>{Q&&RB(A,Q)})}),s}function gM(A,g,B={}){var M;const D=fg(A,g,B.type==="exit"?(M=A.presenceContext)===null||M===void 0?void 0:M.custom:void 0);let{transition:w=A.getDefaultTransition()||{}}=D||{};B.transitionOverride&&(w=B.transitionOverride);const e=D?()=>Promise.all(ne(A,D,B)):()=>Promise.resolve(),Q=A.variantChildren&&A.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:I}=w;return RC(A,g,i+s,o,I,B)}:()=>Promise.resolve(),{when:t}=w;if(t){const[s,i]=t==="beforeChildren"?[e,Q]:[Q,e];return s().then(()=>i())}else return Promise.all([e(),Q(B.delay)])}function RC(A,g,B=0,M=0,D=1,w){const e=[],Q=(A.variantChildren.size-1)*M,t=D===1?(s=0)=>s*M:(s=0)=>Q-s*M;return Array.from(A.variantChildren).sort(JC).forEach((s,i)=>{s.notify("AnimationStart",g),e.push(gM(s,g,{...w,delay:B+t(i)}).then(()=>s.notify("AnimationComplete",g)))}),Promise.all(e)}function JC(A,g){return A.sortNodePosition(g)}function re(A,g,B={}){A.notify("AnimationStart",g);let M;if(Array.isArray(g)){const D=g.map(w=>gM(A,w,B));M=Promise.all(D)}else if(typeof g=="string")M=gM(A,g,B);else{const D=typeof g=="function"?fg(A,g,B.custom):g;M=Promise.all(ne(A,D,B))}return M.then(()=>{A.notify("AnimationComplete",g)})}const zC=oB.length;function Ee(A){if(!A)return;if(!A.isControllingVariants){const B=A.parent?Ee(A.parent)||{}:{};return A.props.initial!==void 0&&(B.initial=A.props.initial),B}const g={};for(let B=0;B<zC;B++){const M=oB[B],D=A.props[M];(SA(D)||D===!1)&&(g[M]=D)}return g}const vC=[...iB].reverse(),PC=iB.length;function LC(A){return g=>Promise.all(g.map(({animation:B,options:M})=>re(A,B,M)))}function FC(A){let g=LC(A),B=le(),M=!0;const D=t=>(s,i)=>{var o;const I=fg(A,i,t==="exit"?(o=A.presenceContext)===null||o===void 0?void 0:o.custom:void 0);if(I){const{transition:n,transitionEnd:E,...l}=I;s={...s,...l,...E}}return s};function w(t){g=t(A)}function e(t){const{props:s}=A,i=Ee(A.parent)||{},o=[],I=new Set;let n={},E=1/0;for(let G=0;G<PC;G++){const a=vC[G],c=B[a],U=s[a]!==void 0?s[a]:i[a],q=SA(U),Y=a===t?c.isActive:null;Y===!1&&(E=G);let Z=U===i[a]&&U!==s[a]&&q;if(Z&&M&&A.manuallyAnimateOnMount&&(Z=!1),c.protectedKeys={...n},!c.isActive&&Y===null||!U&&!c.prevProp||Yg(U)||typeof U=="boolean")continue;const f=bC(c.prevProp,U);let u=f||a===t&&c.isActive&&!Z&&q||G>E&&q,y=!1;const V=Array.isArray(U)?U:[U];let h=V.reduce(D(a),{});Y===!1&&(h={});const{prevResolvedValues:gA={}}=c,sg={...gA,...h},aA=b=>{u=!0,I.has(b)&&(y=!0,I.delete(b)),c.needsAnimating[b]=!0;const x=A.getValue(b);x&&(x.liveStyle=!1)};for(const b in sg){const x=h[b],IA=gA[b];if(n.hasOwnProperty(b))continue;let qA=!1;lB(x)&&lB(IA)?qA=!QD(x,IA):qA=x!==IA,qA?x!=null?aA(b):I.add(b):x!==void 0&&I.has(b)?aA(b):c.protectedKeys[b]=!0}c.prevProp=U,c.prevResolvedValues=h,c.isActive&&(n={...n,...h}),M&&A.blockInitialAnimation&&(u=!1),u&&(!(Z&&f)||y)&&o.push(...V.map(b=>({animation:b,options:{type:a}})))}if(I.size){const G={};I.forEach(a=>{const c=A.getBaseTarget(a),U=A.getValue(a);U&&(U.liveStyle=!0),G[a]=c??null}),o.push({animation:G})}let l=!!o.length;return M&&(s.initial===!1||s.initial===s.animate)&&!A.manuallyAnimateOnMount&&(l=!1),M=!1,l?g(o):Promise.resolve()}function Q(t,s){var i;if(B[t].isActive===s)return Promise.resolve();(i=A.variantChildren)===null||i===void 0||i.forEach(I=>{var n;return(n=I.animationState)===null||n===void 0?void 0:n.setActive(t,s)}),B[t].isActive=s;const o=e(t);for(const I in B)B[I].protectedKeys={};return o}return{animateChanges:e,setActive:Q,setAnimateFunction:w,getState:()=>B,reset:()=>{B=le(),M=!0}}}function bC(A,g){return typeof g=="string"?g!==A:Array.isArray(g)?!QD(g,A):!1}function UA(A=!1){return{isActive:A,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function le(){return{animate:UA(!0),whileInView:UA(),whileHover:UA(),whileTap:UA(),whileDrag:UA(),whileFocus:UA(),exit:UA()}}class GA{constructor(g){this.isMounted=!1,this.node=g}update(){}}class OC extends GA{constructor(g){super(g),g.animationState||(g.animationState=FC(g))}updateAnimationControlsSubscription(){const{animate:g}=this.node.getProps();Yg(g)&&(this.unmountControls=g.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:g}=this.node.getProps(),{animate:B}=this.node.prevProps||{};g!==B&&this.updateAnimationControlsSubscription()}unmount(){var g;this.node.animationState.reset(),(g=this.unmountControls)===null||g===void 0||g.call(this)}}let jC=0;class HC extends GA{constructor(){super(...arguments),this.id=jC++}update(){if(!this.node.presenceContext)return;const{isPresent:g,onExitComplete:B}=this.node.presenceContext,{isPresent:M}=this.node.prevPresenceContext||{};if(!this.node.animationState||g===M)return;const D=this.node.animationState.setActive("exit",!g);B&&!g&&D.then(()=>B(this.id))}mount(){const{register:g}=this.node.presenceContext||{};g&&(this.unmount=g(this.id))}unmount(){}}const TC={animation:{Feature:OC},exit:{Feature:HC}};function Mg(A,g,B,M={passive:!0}){return A.addEventListener(g,B,M),()=>A.removeEventListener(g,B)}function Dg(A){return{point:{x:A.pageX,y:A.pageY}}}const SC=A=>g=>qB(g)&&A(g,Dg(g));function eg(A,g,B,M){return Mg(A,g,SC(B),M)}const Ge=(A,g)=>Math.abs(A-g);function XC(A,g){const B=Ge(A.x,g.x),M=Ge(A.y,g.y);return Math.sqrt(B**2+M**2)}class ae{constructor(g,B,{transformPagePoint:M,contextWindow:D,dragSnapToOrigin:w=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const o=MM(this.lastMoveEventInfo,this.history),I=this.startEvent!==null,n=XC(o.offset,{x:0,y:0})>=3;if(!I&&!n)return;const{point:E}=o,{timestamp:l}=O;this.history.push({...E,timestamp:l});const{onStart:G,onMove:a}=this.handlers;I||(G&&G(this.lastMoveEvent,o),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,o)},this.handlePointerMove=(o,I)=>{this.lastMoveEvent=o,this.lastMoveEventInfo=BM(I,this.transformPagePoint),J.update(this.updatePoint,!0)},this.handlePointerUp=(o,I)=>{this.end();const{onEnd:n,onSessionEnd:E,resumeAnimation:l}=this.handlers;if(this.dragSnapToOrigin&&l&&l(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const G=MM(o.type==="pointercancel"?this.lastMoveEventInfo:BM(I,this.transformPagePoint),this.history);this.startEvent&&n&&n(o,G),E&&E(o,G)},!qB(g))return;this.dragSnapToOrigin=w,this.handlers=B,this.transformPagePoint=M,this.contextWindow=D||window;const e=Dg(g),Q=BM(e,this.transformPagePoint),{point:t}=Q,{timestamp:s}=O;this.history=[{...t,timestamp:s}];const{onSessionStart:i}=B;i&&i(g,MM(Q,this.history)),this.removeListeners=Bg(eg(this.contextWindow,"pointermove",this.handlePointerMove),eg(this.contextWindow,"pointerup",this.handlePointerUp),eg(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(g){this.handlers=g}end(){this.removeListeners&&this.removeListeners(),rA(this.updatePoint)}}function BM(A,g){return g?{point:g(A.point)}:A}function ce(A,g){return{x:A.x-g.x,y:A.y-g.y}}function MM({point:A},g){return{point:A,delta:ce(A,Ye(g)),offset:ce(A,NC(g)),velocity:xC(g,.1)}}function NC(A){return A[0]}function Ye(A){return A[A.length-1]}function xC(A,g){if(A.length<2)return{x:0,y:0};let B=A.length-1,M=null;const D=Ye(A);for(;B>=0&&(M=A[B],!(D.timestamp-M.timestamp>tA(g)));)B--;if(!M)return{x:0,y:0};const w=iA(D.timestamp-M.timestamp);if(w===0)return{x:0,y:0};const e={x:(D.x-M.x)/w,y:(D.y-M.y)/w};return e.x===1/0&&(e.x=0),e.y===1/0&&(e.y=0),e}const ye=1e-4,WC=1-ye,$C=1+ye,ue=.01,_C=0-ue,As=0+ue;function W(A){return A.max-A.min}function gs(A,g,B){return Math.abs(A-g)<=B}function me(A,g,B,M=.5){A.origin=M,A.originPoint=v(g.min,g.max,A.origin),A.scale=W(B)/W(g),A.translate=v(B.min,B.max,A.origin)-A.originPoint,(A.scale>=WC&&A.scale<=$C||isNaN(A.scale))&&(A.scale=1),(A.translate>=_C&&A.translate<=As||isNaN(A.translate))&&(A.translate=0)}function wg(A,g,B,M){me(A.x,g.x,B.x,M?M.originX:void 0),me(A.y,g.y,B.y,M?M.originY:void 0)}function Ue(A,g,B){A.min=B.min+g.min,A.max=A.min+W(g)}function Bs(A,g,B){Ue(A.x,g.x,B.x),Ue(A.y,g.y,B.y)}function fe(A,g,B){A.min=g.min-B.min,A.max=A.min+W(g)}function tg(A,g,B){fe(A.x,g.x,B.x),fe(A.y,g.y,B.y)}function Ms(A,{min:g,max:B},M){return g!==void 0&&A<g?A=M?v(g,A,M.min):Math.max(A,g):B!==void 0&&A>B&&(A=M?v(B,A,M.max):Math.min(A,B)),A}function Ze(A,g,B){return{min:g!==void 0?A.min+g:void 0,max:B!==void 0?A.max+B-(A.max-A.min):void 0}}function Ds(A,{top:g,left:B,bottom:M,right:D}){return{x:Ze(A.x,B,D),y:Ze(A.y,g,M)}}function Ve(A,g){let B=g.min-A.min,M=g.max-A.max;return g.max-g.min<A.max-A.min&&([B,M]=[M,B]),{min:B,max:M}}function es(A,g){return{x:Ve(A.x,g.x),y:Ve(A.y,g.y)}}function ws(A,g){let B=.5;const M=W(A),D=W(g);return D>M?B=hA(g.min,g.max-M,A.min):M>D&&(B=hA(A.min,A.max-D,g.min)),oA(0,1,B)}function ts(A,g){const B={};return g.min!==void 0&&(B.min=g.min-A.min),g.max!==void 0&&(B.max=g.max-A.min),B}const DM=.35;function Qs(A=DM){return A===!1?A=0:A===!0&&(A=DM),{x:de(A,"left","right"),y:de(A,"top","bottom")}}function de(A,g,B){return{min:qe(A,g),max:qe(A,B)}}function qe(A,g){return typeof A=="number"?A:A[g]||0}const ke=()=>({translate:0,scale:1,origin:0,originPoint:0}),FA=()=>({x:ke(),y:ke()}),Ke=()=>({min:0,max:0}),F=()=>({x:Ke(),y:Ke()});function _(A){return[A("x"),A("y")]}function pe({top:A,left:g,right:B,bottom:M}){return{x:{min:g,max:B},y:{min:A,max:M}}}function Cs({x:A,y:g}){return{top:g.min,right:A.max,bottom:g.max,left:A.min}}function ss(A,g){if(!g)return A;const B=g({x:A.left,y:A.top}),M=g({x:A.right,y:A.bottom});return{top:B.y,left:B.x,bottom:M.y,right:M.x}}function eM(A){return A===void 0||A===1}function wM({scale:A,scaleX:g,scaleY:B}){return!eM(A)||!eM(g)||!eM(B)}function fA(A){return wM(A)||he(A)||A.z||A.rotate||A.rotateX||A.rotateY||A.skewX||A.skewY}function he(A){return Re(A.x)||Re(A.y)}function Re(A){return A&&A!=="0%"}function pg(A,g,B){const M=A-B,D=g*M;return B+D}function Je(A,g,B,M,D){return D!==void 0&&(A=pg(A,D,M)),pg(A,B,M)+g}function tM(A,g=0,B=1,M,D){A.min=Je(A.min,g,B,M,D),A.max=Je(A.max,g,B,M,D)}function ze(A,{x:g,y:B}){tM(A.x,g.translate,g.scale,g.originPoint),tM(A.y,B.translate,B.scale,B.originPoint)}const ve=.999999999999,Pe=1.0000000000001;function is(A,g,B,M=!1){const D=B.length;if(!D)return;g.x=g.y=1;let w,e;for(let Q=0;Q<D;Q++){w=B[Q],e=w.projectionDelta;const{visualElement:t}=w.options;t&&t.props.style&&t.props.style.display==="contents"||(M&&w.options.layoutScroll&&w.scroll&&w!==w.root&&OA(A,{x:-w.scroll.offset.x,y:-w.scroll.offset.y}),e&&(g.x*=e.x.scale,g.y*=e.y.scale,ze(A,e)),M&&fA(w.latestValues)&&OA(A,w.latestValues))}g.x<Pe&&g.x>ve&&(g.x=1),g.y<Pe&&g.y>ve&&(g.y=1)}function bA(A,g){A.min=A.min+g,A.max=A.max+g}function Le(A,g,B,M,D=.5){const w=v(A.min,A.max,D);tM(A,g,B,w,M)}function OA(A,g){Le(A.x,g.x,g.scaleX,g.scale,g.originX),Le(A.y,g.y,g.scaleY,g.scale,g.originY)}function Fe(A,g){return pe(ss(A.getBoundingClientRect(),g))}function os(A,g,B){const M=Fe(A,B),{scroll:D}=g;return D&&(bA(M.x,D.offset.x),bA(M.y,D.offset.y)),M}const be=({current:A})=>A?A.ownerDocument.defaultView:null,Is=new WeakMap;class ns{constructor(g){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=F(),this.visualElement=g}start(g,{snapToCursor:B=!1}={}){const{presenceContext:M}=this.visualElement;if(M&&M.isPresent===!1)return;const D=i=>{const{dragSnapToOrigin:o}=this.getProps();o?this.pauseAnimation():this.stopAnimation(),B&&this.snapToCursor(Dg(i).point)},w=(i,o)=>{const{drag:I,dragPropagation:n,onDragStart:E}=this.getProps();if(I&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=CQ(I),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_(G=>{let a=this.getAxisMotionValue(G).get()||0;if(QA.test(a)){const{projection:c}=this.visualElement;if(c&&c.layout){const U=c.layout.layoutBox[G];U&&(a=W(U)*(parseFloat(a)/100))}}this.originPoint[G]=a}),E&&J.postRender(()=>E(i,o)),JB(this.visualElement,"transform");const{animationState:l}=this.visualElement;l&&l.setActive("whileDrag",!0)},e=(i,o)=>{const{dragPropagation:I,dragDirectionLock:n,onDirectionLock:E,onDrag:l}=this.getProps();if(!I&&!this.openDragLock)return;const{offset:G}=o;if(n&&this.currentDirection===null){this.currentDirection=rs(G),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",o.point,G),this.updateAxis("y",o.point,G),this.visualElement.render(),l&&l(i,o)},Q=(i,o)=>this.stop(i,o),t=()=>_(i=>{var o;return this.getAnimationState(i)==="paused"&&((o=this.getAxisMotionValue(i).animation)===null||o===void 0?void 0:o.play())}),{dragSnapToOrigin:s}=this.getProps();this.panSession=new ae(g,{onSessionStart:D,onStart:w,onMove:e,onSessionEnd:Q,resumeAnimation:t},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:be(this.visualElement)})}stop(g,B){const M=this.isDragging;if(this.cancel(),!M)return;const{velocity:D}=B;this.startAnimation(D);const{onDragEnd:w}=this.getProps();w&&J.postRender(()=>w(g,B))}cancel(){this.isDragging=!1;const{projection:g,animationState:B}=this.visualElement;g&&(g.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:M}=this.getProps();!M&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),B&&B.setActive("whileDrag",!1)}updateAxis(g,B,M){const{drag:D}=this.getProps();if(!M||!hg(g,D,this.currentDirection))return;const w=this.getAxisMotionValue(g);let e=this.originPoint[g]+M[g];this.constraints&&this.constraints[g]&&(e=Ms(e,this.constraints[g],this.elastic[g])),w.set(e)}resolveConstraints(){var g;const{dragConstraints:B,dragElastic:M}=this.getProps(),D=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(g=this.visualElement.projection)===null||g===void 0?void 0:g.layout,w=this.constraints;B&&JA(B)?this.constraints||(this.constraints=this.resolveRefConstraints()):B&&D?this.constraints=Ds(D.layoutBox,B):this.constraints=!1,this.elastic=Qs(M),w!==this.constraints&&D&&this.constraints&&!this.hasMutatedConstraints&&_(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ts(D.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:g,onMeasureDragConstraints:B}=this.getProps();if(!g||!JA(g))return!1;const M=g.current;wA(M!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:D}=this.visualElement;if(!D||!D.layout)return!1;const w=os(M,D.root,this.visualElement.getTransformPagePoint());let e=es(D.layout.layoutBox,w);if(B){const Q=B(Cs(e));this.hasMutatedConstraints=!!Q,Q&&(e=pe(Q))}return e}startAnimation(g){const{drag:B,dragMomentum:M,dragElastic:D,dragTransition:w,dragSnapToOrigin:e,onDragTransitionEnd:Q}=this.getProps(),t=this.constraints||{},s=_(i=>{if(!hg(i,B,this.currentDirection))return;let o=t[i]||{};e&&(o={min:0,max:0});const I=D?200:1e6,n=D?40:1e7,E={type:"inertia",velocity:M?g[i]:0,bounceStiffness:I,bounceDamping:n,timeConstant:750,restDelta:1,restSpeed:10,...w,...o};return this.startAxisValueAnimation(i,E)});return Promise.all(s).then(Q)}startAxisValueAnimation(g,B){const M=this.getAxisMotionValue(g);return JB(this.visualElement,g),M.start(AM(g,M,0,B,this.visualElement,!1))}stopAnimation(){_(g=>this.getAxisMotionValue(g).stop())}pauseAnimation(){_(g=>{var B;return(B=this.getAxisMotionValue(g).animation)===null||B===void 0?void 0:B.pause()})}getAnimationState(g){var B;return(B=this.getAxisMotionValue(g).animation)===null||B===void 0?void 0:B.state}getAxisMotionValue(g){const B=`_drag${g.toUpperCase()}`,M=this.visualElement.getProps(),D=M[B];return D||this.visualElement.getValue(g,(M.initial?M.initial[g]:void 0)||0)}snapToCursor(g){_(B=>{const{drag:M}=this.getProps();if(!hg(B,M,this.currentDirection))return;const{projection:D}=this.visualElement,w=this.getAxisMotionValue(B);if(D&&D.layout){const{min:e,max:Q}=D.layout.layoutBox[B];w.set(g[B]-v(e,Q,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:g,dragConstraints:B}=this.getProps(),{projection:M}=this.visualElement;if(!JA(B)||!M||!this.constraints)return;this.stopAnimation();const D={x:0,y:0};_(e=>{const Q=this.getAxisMotionValue(e);if(Q&&this.constraints!==!1){const t=Q.get();D[e]=ws({min:t,max:t},this.constraints[e])}});const{transformTemplate:w}=this.visualElement.getProps();this.visualElement.current.style.transform=w?w({},""):"none",M.root&&M.root.updateScroll(),M.updateLayout(),this.resolveConstraints(),_(e=>{if(!hg(e,g,null))return;const Q=this.getAxisMotionValue(e),{min:t,max:s}=this.constraints[e];Q.set(v(t,s,D[e]))})}addListeners(){if(!this.visualElement.current)return;Is.set(this.visualElement,this);const g=this.visualElement.current,B=eg(g,"pointerdown",t=>{const{drag:s,dragListener:i=!0}=this.getProps();s&&i&&this.start(t)}),M=()=>{const{dragConstraints:t}=this.getProps();JA(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:D}=this.visualElement,w=D.addEventListener("measure",M);D&&!D.layout&&(D.root&&D.root.updateScroll(),D.updateLayout()),J.read(M);const e=Mg(window,"resize",()=>this.scalePositionWithinConstraints()),Q=D.addEventListener("didUpdate",({delta:t,hasLayoutChanged:s})=>{this.isDragging&&s&&(_(i=>{const o=this.getAxisMotionValue(i);o&&(this.originPoint[i]+=t[i].translate,o.set(o.get()+t[i].translate))}),this.visualElement.render())});return()=>{e(),B(),w(),Q&&Q()}}getProps(){const g=this.visualElement.getProps(),{drag:B=!1,dragDirectionLock:M=!1,dragPropagation:D=!1,dragConstraints:w=!1,dragElastic:e=DM,dragMomentum:Q=!0}=g;return{...g,drag:B,dragDirectionLock:M,dragPropagation:D,dragConstraints:w,dragElastic:e,dragMomentum:Q}}}function hg(A,g,B){return(g===!0||g===A)&&(B===null||B===A)}function rs(A,g=10){let B=null;return Math.abs(A.y)>g?B="y":Math.abs(A.x)>g&&(B="x"),B}class Es extends GA{constructor(g){super(g),this.removeGroupControls=N,this.removeListeners=N,this.controls=new ns(g)}mount(){const{dragControls:g}=this.node.getProps();g&&(this.removeGroupControls=g.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||N}unmount(){this.removeGroupControls(),this.removeListeners()}}const Oe=A=>(g,B)=>{A&&J.postRender(()=>A(g,B))};class ls extends GA{constructor(){super(...arguments),this.removePointerDownListener=N}onPointerDown(g){this.session=new ae(g,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:be(this.node)})}createPanHandlers(){const{onPanSessionStart:g,onPanStart:B,onPan:M,onPanEnd:D}=this.node.getProps();return{onSessionStart:Oe(g),onStart:Oe(B),onMove:M,onEnd:(w,e)=>{delete this.session,D&&J.postRender(()=>D(w,e))}}}mount(){this.removePointerDownListener=eg(this.node.current,"pointerdown",g=>this.onPointerDown(g))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Rg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function je(A,g){return g.max===g.min?0:A/(g.max-g.min)*100}const Qg={correct:(A,g)=>{if(!g.target)return A;if(typeof A=="string")if(d.test(A))A=parseFloat(A);else return A;const B=je(A,g.target.x),M=je(A,g.target.y);return`${B}% ${M}%`}},Gs={correct:(A,{treeScale:g,projectionDelta:B})=>{const M=A,D=lA.parse(A);if(D.length>5)return M;const w=lA.createTransformer(A),e=typeof D[0]!="number"?1:0,Q=B.x.scale*g.x,t=B.y.scale*g.y;D[0+e]/=Q,D[1+e]/=t;const s=v(Q,t,.5);return typeof D[2+e]=="number"&&(D[2+e]/=s),typeof D[3+e]=="number"&&(D[3+e]/=s),w(D)}};class as extends r.Component{componentDidMount(){const{visualElement:g,layoutGroup:B,switchLayoutGroup:M,layoutId:D}=this.props,{projection:w}=g;Ot(cs),w&&(B.group&&B.group.add(w),M&&M.register&&D&&M.register(w),w.root.didUpdate(),w.addEventListener("animationComplete",()=>{this.safeToRemove()}),w.setOptions({...w.options,onExitComplete:()=>this.safeToRemove()})),Rg.hasEverUpdated=!0}getSnapshotBeforeUpdate(g){const{layoutDependency:B,visualElement:M,drag:D,isPresent:w}=this.props,e=M.projection;return e&&(e.isPresent=w,D||g.layoutDependency!==B||B===void 0?e.willUpdate():this.safeToRemove(),g.isPresent!==w&&(w?e.promote():e.relegate()||J.postRender(()=>{const Q=e.getStack();(!Q||!Q.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:g}=this.props.visualElement;g&&(g.root.didUpdate(),nB.postRender(()=>{!g.currentAnimation&&g.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:g,layoutGroup:B,switchLayoutGroup:M}=this.props,{projection:D}=g;D&&(D.scheduleCheckAfterUnmount(),B&&B.group&&B.group.remove(D),M&&M.deregister&&M.deregister(D))}safeToRemove(){const{safeToRemove:g}=this.props;g&&g()}render(){return null}}function He(A){const[g,B]=wt(),M=r.useContext(KM);return C.jsx(as,{...A,layoutGroup:M,switchLayoutGroup:r.useContext(jM),isPresent:g,safeToRemove:B})}const cs={borderRadius:{...Qg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qg,borderTopRightRadius:Qg,borderBottomLeftRadius:Qg,borderBottomRightRadius:Qg,boxShadow:Gs};function Ys(A,g,B){const M=H(A)?A:$A(A);return M.start(AM("",M,g,B)),M.animation}function ys(A){return A instanceof SVGElement&&A.tagName!=="svg"}const us=(A,g)=>A.depth-g.depth;class ms{constructor(){this.children=[],this.isDirty=!1}add(g){KB(this.children,g),this.isDirty=!0}remove(g){pB(this.children,g),this.isDirty=!0}forEach(g){this.isDirty&&this.children.sort(us),this.isDirty=!1,this.children.forEach(g)}}function Us(A,g){const B=CA.now(),M=({timestamp:D})=>{const w=D-B;w>=g&&(rA(M),A(w-g))};return J.read(M,!0),()=>rA(M)}const Te=["TopLeft","TopRight","BottomLeft","BottomRight"],fs=Te.length,Se=A=>typeof A=="string"?parseFloat(A):A,Xe=A=>typeof A=="number"||d.test(A);function Zs(A,g,B,M,D,w){D?(A.opacity=v(0,B.opacity!==void 0?B.opacity:1,Vs(M)),A.opacityExit=v(g.opacity!==void 0?g.opacity:1,0,ds(M))):w&&(A.opacity=v(g.opacity!==void 0?g.opacity:1,B.opacity!==void 0?B.opacity:1,M));for(let e=0;e<fs;e++){const Q=`border${Te[e]}Radius`;let t=Ne(g,Q),s=Ne(B,Q);if(t===void 0&&s===void 0)continue;t||(t=0),s||(s=0),t===0||s===0||Xe(t)===Xe(s)?(A[Q]=Math.max(v(Se(t),Se(s),M),0),(QA.test(s)||QA.test(t))&&(A[Q]+="%")):A[Q]=s}(g.rotate||B.rotate)&&(A.rotate=v(g.rotate||0,B.rotate||0,M))}function Ne(A,g){return A[g]!==void 0?A[g]:A.borderRadius}const Vs=xe(0,.5,kD),ds=xe(.5,.95,N);function xe(A,g,B){return M=>M<A?0:M>g?1:B(hA(A,g,M))}function We(A,g){A.min=g.min,A.max=g.max}function AA(A,g){We(A.x,g.x),We(A.y,g.y)}function $e(A,g){A.translate=g.translate,A.scale=g.scale,A.originPoint=g.originPoint,A.origin=g.origin}function _e(A,g,B,M,D){return A-=g,A=pg(A,1/B,M),D!==void 0&&(A=pg(A,1/D,M)),A}function qs(A,g=0,B=1,M=.5,D,w=A,e=A){if(QA.test(g)&&(g=parseFloat(g),g=v(e.min,e.max,g/100)-e.min),typeof g!="number")return;let Q=v(w.min,w.max,M);A===w&&(Q-=g),A.min=_e(A.min,g,B,Q,D),A.max=_e(A.max,g,B,Q,D)}function Aw(A,g,[B,M,D],w,e){qs(A,g[B],g[M],g[D],g.scale,w,e)}const ks=["x","scaleX","originX"],Ks=["y","scaleY","originY"];function gw(A,g,B,M){Aw(A.x,g,ks,B?B.x:void 0,M?M.x:void 0),Aw(A.y,g,Ks,B?B.y:void 0,M?M.y:void 0)}function Bw(A){return A.translate===0&&A.scale===1}function Mw(A){return Bw(A.x)&&Bw(A.y)}function Dw(A,g){return A.min===g.min&&A.max===g.max}function ps(A,g){return Dw(A.x,g.x)&&Dw(A.y,g.y)}function ew(A,g){return Math.round(A.min)===Math.round(g.min)&&Math.round(A.max)===Math.round(g.max)}function ww(A,g){return ew(A.x,g.x)&&ew(A.y,g.y)}function tw(A){return W(A.x)/W(A.y)}function Qw(A,g){return A.translate===g.translate&&A.scale===g.scale&&A.originPoint===g.originPoint}class hs{constructor(){this.members=[]}add(g){KB(this.members,g),g.scheduleRender()}remove(g){if(pB(this.members,g),g===this.prevLead&&(this.prevLead=void 0),g===this.lead){const B=this.members[this.members.length-1];B&&this.promote(B)}}relegate(g){const B=this.members.findIndex(D=>g===D);if(B===0)return!1;let M;for(let D=B;D>=0;D--){const w=this.members[D];if(w.isPresent!==!1){M=w;break}}return M?(this.promote(M),!0):!1}promote(g,B){const M=this.lead;if(g!==M&&(this.prevLead=M,this.lead=g,g.show(),M)){M.instance&&M.scheduleRender(),g.scheduleRender(),g.resumeFrom=M,B&&(g.resumeFrom.preserveOpacity=!0),M.snapshot&&(g.snapshot=M.snapshot,g.snapshot.latestValues=M.animationValues||M.latestValues),g.root&&g.root.isUpdating&&(g.isLayoutDirty=!0);const{crossfade:D}=g.options;D===!1&&M.hide()}}exitAnimationComplete(){this.members.forEach(g=>{const{options:B,resumingFrom:M}=g;B.onExitComplete&&B.onExitComplete(),M&&M.options.onExitComplete&&M.options.onExitComplete()})}scheduleRender(){this.members.forEach(g=>{g.instance&&g.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Rs(A,g,B){let M="";const D=A.x.translate/g.x,w=A.y.translate/g.y,e=(B==null?void 0:B.z)||0;if((D||w||e)&&(M=`translate3d(${D}px, ${w}px, ${e}px) `),(g.x!==1||g.y!==1)&&(M+=`scale(${1/g.x}, ${1/g.y}) `),B){const{transformPerspective:s,rotate:i,rotateX:o,rotateY:I,skewX:n,skewY:E}=B;s&&(M=`perspective(${s}px) ${M}`),i&&(M+=`rotate(${i}deg) `),o&&(M+=`rotateX(${o}deg) `),I&&(M+=`rotateY(${I}deg) `),n&&(M+=`skewX(${n}deg) `),E&&(M+=`skewY(${E}deg) `)}const Q=A.x.scale*g.x,t=A.y.scale*g.y;return(Q!==1||t!==1)&&(M+=`scale(${Q}, ${t})`),M||"none"}const ZA={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Cg=typeof window<"u"&&window.MotionDebug!==void 0,QM=["","X","Y","Z"],Js={visibility:"hidden"},Cw=1e3;let zs=0;function CM(A,g,B,M){const{latestValues:D}=g;D[A]&&(B[A]=D[A],g.setStaticValue(A,0),M&&(M[A]=0))}function sw(A){if(A.hasCheckedOptimisedAppear=!0,A.root===A)return;const{visualElement:g}=A.options;if(!g)return;const B=mD(g);if(window.MotionHasOptimisedAnimation(B,"transform")){const{layout:D,layoutId:w}=A.options;window.MotionCancelOptimisedAnimation(B,"transform",J,!(D||w))}const{parent:M}=A;M&&!M.hasCheckedOptimisedAppear&&sw(M)}function iw({attachResizeListener:A,defaultParent:g,measureScroll:B,checkIsScrollRoot:M,resetTransform:D}){return class{constructor(e={},Q=g==null?void 0:g()){this.id=zs++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Cg&&(ZA.totalNodes=ZA.resolvedTargetDeltas=ZA.recalculatedProjection=0),this.nodes.forEach(Ls),this.nodes.forEach(Hs),this.nodes.forEach(Ts),this.nodes.forEach(Fs),Cg&&window.MotionDebug.record(ZA)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=Q?Q.root||Q:this,this.path=Q?[...Q.path,Q]:[],this.parent=Q,this.depth=Q?Q.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ms)}addEventListener(e,Q){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new hB),this.eventHandlers.get(e).add(Q)}notifyListeners(e,...Q){const t=this.eventHandlers.get(e);t&&t.notify(...Q)}hasListeners(e){return this.eventHandlers.has(e)}mount(e,Q=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ys(e),this.instance=e;const{layoutId:t,layout:s,visualElement:i}=this.options;if(i&&!i.current&&i.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),Q&&(s||t)&&(this.isLayoutDirty=!0),A){let o;const I=()=>this.root.updateBlockedByResize=!1;A(e,()=>{this.root.updateBlockedByResize=!0,o&&o(),o=Us(I,250),Rg.hasAnimatedSinceResize&&(Rg.hasAnimatedSinceResize=!1,this.nodes.forEach(Iw))})}t&&this.root.registerSharedNode(t,this),this.options.animate!==!1&&i&&(t||s)&&this.addEventListener("didUpdate",({delta:o,hasLayoutChanged:I,hasRelativeLayoutChanged:n,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const l=this.options.transition||i.getDefaultTransition()||Ws,{onLayoutAnimationStart:G,onLayoutAnimationComplete:a}=i.getProps(),c=!this.targetLayout||!ww(this.targetLayout,E),U=!I&&n;if(this.options.layoutRoot||this.resumeFrom||U||I&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(o,U);const q={...UB(l,"layout"),onPlay:G,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(q.delay=0,q.type=!1),this.startAnimation(q)}else I||Iw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,rA(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ss),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const o=this.path[i];o.shouldResetTransform=!0,o.updateScroll("snapshot"),o.options.layoutRoot&&o.willUpdate(!1)}const{layoutId:Q,layout:t}=this.options;if(Q===void 0&&!t)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ow);return}this.isUpdating||this.nodes.forEach(Os),this.isUpdating=!1,this.nodes.forEach(js),this.nodes.forEach(vs),this.nodes.forEach(Ps),this.clearAllSnapshots();const Q=CA.now();O.delta=oA(0,1e3/60,Q-O.timestamp),O.timestamp=Q,O.isProcessing=!0,sB.update.process(O),sB.preRender.process(O),sB.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nB.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bs),this.sharedNodes.forEach(Xs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,J.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){J.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:Q}=this.options;Q&&Q.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let Q=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(Q=!1),Q){const t=M(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:B(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!D)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,Q=this.projectionDelta&&!Mw(this.projectionDelta),t=this.getTransformTemplate(),s=t?t(this.latestValues,""):void 0,i=s!==this.prevTransformTemplateValue;e&&(Q||fA(this.latestValues)||i)&&(D(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const Q=this.measurePageBox();let t=this.removeElementScroll(Q);return e&&(t=this.removeTransform(t)),$s(t),{animationId:this.root.animationId,measuredBox:Q,layoutBox:t,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:Q}=this.options;if(!Q)return F();const t=Q.measureViewportBox();if(!(((e=this.scroll)===null||e===void 0?void 0:e.wasRoot)||this.path.some(_s))){const{scroll:i}=this.root;i&&(bA(t.x,i.offset.x),bA(t.y,i.offset.y))}return t}removeElementScroll(e){var Q;const t=F();if(AA(t,e),!((Q=this.scroll)===null||Q===void 0)&&Q.wasRoot)return t;for(let s=0;s<this.path.length;s++){const i=this.path[s],{scroll:o,options:I}=i;i!==this.root&&o&&I.layoutScroll&&(o.wasRoot&&AA(t,e),bA(t.x,o.offset.x),bA(t.y,o.offset.y))}return t}applyTransform(e,Q=!1){const t=F();AA(t,e);for(let s=0;s<this.path.length;s++){const i=this.path[s];!Q&&i.options.layoutScroll&&i.scroll&&i!==i.root&&OA(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),fA(i.latestValues)&&OA(t,i.latestValues)}return fA(this.latestValues)&&OA(t,this.latestValues),t}removeTransform(e){const Q=F();AA(Q,e);for(let t=0;t<this.path.length;t++){const s=this.path[t];if(!s.instance||!fA(s.latestValues))continue;wM(s.latestValues)&&s.updateSnapshot();const i=F(),o=s.measurePageBox();AA(i,o),gw(Q,s.latestValues,s.snapshot?s.snapshot.layoutBox:void 0,i)}return fA(this.latestValues)&&gw(Q,this.latestValues),Q}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade!==void 0?e.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var Q;const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const s=!!this.resumingFrom||this!==t;if(!(e||s&&this.isSharedProjectionDirty||this.isProjectionDirty||!((Q=this.parent)===null||Q===void 0)&&Q.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:I}=this.options;if(!(!this.layout||!(o||I))){if(this.resolvedRelativeTargetAt=O.timestamp,!this.targetDelta&&!this.relativeTarget){const n=this.getClosestProjectingParent();n&&n.layout&&this.animationProgress!==1?(this.relativeParent=n,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),tg(this.relativeTargetOrigin,this.layout.layoutBox,n.layout.layoutBox),AA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bs(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):AA(this.target,this.layout.layoutBox),ze(this.target,this.targetDelta)):AA(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const n=this.getClosestProjectingParent();n&&!!n.resumingFrom==!!this.resumingFrom&&!n.options.layoutScroll&&n.target&&this.animationProgress!==1?(this.relativeParent=n,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),tg(this.relativeTargetOrigin,this.target,n.target),AA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Cg&&ZA.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||wM(this.parent.latestValues)||he(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const Q=this.getLead(),t=!!this.resumingFrom||this!==Q;let s=!0;if((this.isProjectionDirty||!((e=this.parent)===null||e===void 0)&&e.isProjectionDirty)&&(s=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===O.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||o))return;AA(this.layoutCorrected,this.layout.layoutBox);const I=this.treeScale.x,n=this.treeScale.y;is(this.layoutCorrected,this.treeScale,this.path,t),Q.layout&&!Q.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(Q.target=Q.layout.layoutBox,Q.targetWithTransforms=F());const{target:E}=Q;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($e(this.prevProjectionDelta.x,this.projectionDelta.x),$e(this.prevProjectionDelta.y,this.projectionDelta.y)),wg(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==I||this.treeScale.y!==n||!Qw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),Cg&&ZA.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var Q;if((Q=this.options.visualElement)===null||Q===void 0||Q.scheduleRender(),e){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=FA(),this.projectionDelta=FA(),this.projectionDeltaWithTransform=FA()}setAnimationOrigin(e,Q=!1){const t=this.snapshot,s=t?t.latestValues:{},i={...this.latestValues},o=FA();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!Q;const I=F(),n=t?t.source:void 0,E=this.layout?this.layout.source:void 0,l=n!==E,G=this.getStack(),a=!G||G.members.length<=1,c=!!(l&&!a&&this.options.crossfade===!0&&!this.path.some(xs));this.animationProgress=0;let U;this.mixTargetDelta=q=>{const Y=q/1e3;nw(o.x,e.x,Y),nw(o.y,e.y,Y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tg(I,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ns(this.relativeTarget,this.relativeTargetOrigin,I,Y),U&&ps(this.relativeTarget,U)&&(this.isProjectionDirty=!1),U||(U=F()),AA(U,this.relativeTarget)),l&&(this.animationValues=i,Zs(i,s,this.latestValues,Y,c,a)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(rA(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=J.update(()=>{Rg.hasAnimatedSinceResize=!0,this.currentAnimation=Ys(0,Cw,{...e,onUpdate:Q=>{this.mixTargetDelta(Q),e.onUpdate&&e.onUpdate(Q)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Cw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:Q,target:t,layout:s,latestValues:i}=e;if(!(!Q||!t||!s)){if(this!==e&&this.layout&&s&&aw(this.options.animationType,this.layout.layoutBox,s.layoutBox)){t=this.target||F();const o=W(this.layout.layoutBox.x);t.x.min=e.target.x.min,t.x.max=t.x.min+o;const I=W(this.layout.layoutBox.y);t.y.min=e.target.y.min,t.y.max=t.y.min+I}AA(Q,t),OA(Q,i),wg(this.projectionDeltaWithTransform,this.layoutCorrected,Q,i)}}registerSharedNode(e,Q){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hs),this.sharedNodes.get(e).add(Q);const s=Q.options.initialPromotionConfig;Q.promote({transition:s?s.transition:void 0,preserveFollowOpacity:s&&s.shouldPreserveFollowOpacity?s.shouldPreserveFollowOpacity(Q):void 0})}isLead(){const e=this.getStack();return e?e.lead===this:!0}getLead(){var e;const{layoutId:Q}=this.options;return Q?((e=this.getStack())===null||e===void 0?void 0:e.lead)||this:this}getPrevLead(){var e;const{layoutId:Q}=this.options;return Q?(e=this.getStack())===null||e===void 0?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:Q,preserveFollowOpacity:t}={}){const s=this.getStack();s&&s.promote(this,t),e&&(this.projectionDelta=void 0,this.needsReset=!0),Q&&this.setOptions({transition:Q})}relegate(){const e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let Q=!1;const{latestValues:t}=e;if((t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY)&&(Q=!0),!Q)return;const s={};t.z&&CM("z",e,s,this.animationValues);for(let i=0;i<QM.length;i++)CM(`rotate${QM[i]}`,e,s,this.animationValues),CM(`skew${QM[i]}`,e,s,this.animationValues);e.render();for(const i in s)e.setStaticValue(i,s[i]),this.animationValues&&(this.animationValues[i]=s[i]);e.scheduleRender()}getProjectionStyles(e){var Q,t;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Js;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=ug(e==null?void 0:e.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const l={};return this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=ug(e==null?void 0:e.pointerEvents)||""),this.hasProjected&&!fA(this.latestValues)&&(l.transform=i?i({},""):"none",this.hasProjected=!1),l}const I=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=Rs(this.projectionDeltaWithTransform,this.treeScale,I),i&&(s.transform=i(I,s.transform));const{x:n,y:E}=this.projectionDelta;s.transformOrigin=`${n.origin*100}% ${E.origin*100}% 0`,o.animationValues?s.opacity=o===this?(t=(Q=I.opacity)!==null&&Q!==void 0?Q:this.latestValues.opacity)!==null&&t!==void 0?t:1:this.preserveOpacity?this.latestValues.opacity:I.opacityExit:s.opacity=o===this?I.opacity!==void 0?I.opacity:"":I.opacityExit!==void 0?I.opacityExit:0;for(const l in Ug){if(I[l]===void 0)continue;const{correct:G,applyTo:a}=Ug[l],c=s.transform==="none"?I[l]:G(I[l],o);if(a){const U=a.length;for(let q=0;q<U;q++)s[a[q]]=c}else s[l]=c}return this.options.layoutId&&(s.pointerEvents=o===this?ug(e==null?void 0:e.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var Q;return(Q=e.currentAnimation)===null||Q===void 0?void 0:Q.stop()}),this.root.nodes.forEach(ow),this.root.sharedNodes.clear()}}}function vs(A){A.updateLayout()}function Ps(A){var g;const B=((g=A.resumeFrom)===null||g===void 0?void 0:g.snapshot)||A.snapshot;if(A.isLead()&&A.layout&&B&&A.hasListeners("didUpdate")){const{layoutBox:M,measuredBox:D}=A.layout,{animationType:w}=A.options,e=B.source!==A.layout.source;w==="size"?_(o=>{const I=e?B.measuredBox[o]:B.layoutBox[o],n=W(I);I.min=M[o].min,I.max=I.min+n}):aw(w,B.layoutBox,M)&&_(o=>{const I=e?B.measuredBox[o]:B.layoutBox[o],n=W(M[o]);I.max=I.min+n,A.relativeTarget&&!A.currentAnimation&&(A.isProjectionDirty=!0,A.relativeTarget[o].max=A.relativeTarget[o].min+n)});const Q=FA();wg(Q,M,B.layoutBox);const t=FA();e?wg(t,A.applyTransform(D,!0),B.measuredBox):wg(t,M,B.layoutBox);const s=!Mw(Q);let i=!1;if(!A.resumeFrom){const o=A.getClosestProjectingParent();if(o&&!o.resumeFrom){const{snapshot:I,layout:n}=o;if(I&&n){const E=F();tg(E,B.layoutBox,I.layoutBox);const l=F();tg(l,M,n.layoutBox),ww(E,l)||(i=!0),o.options.layoutRoot&&(A.relativeTarget=l,A.relativeTargetOrigin=E,A.relativeParent=o)}}}A.notifyListeners("didUpdate",{layout:M,snapshot:B,delta:t,layoutDelta:Q,hasLayoutChanged:s,hasRelativeLayoutChanged:i})}else if(A.isLead()){const{onExitComplete:M}=A.options;M&&M()}A.options.transition=void 0}function Ls(A){Cg&&ZA.totalNodes++,A.parent&&(A.isProjecting()||(A.isProjectionDirty=A.parent.isProjectionDirty),A.isSharedProjectionDirty||(A.isSharedProjectionDirty=!!(A.isProjectionDirty||A.parent.isProjectionDirty||A.parent.isSharedProjectionDirty)),A.isTransformDirty||(A.isTransformDirty=A.parent.isTransformDirty))}function Fs(A){A.isProjectionDirty=A.isSharedProjectionDirty=A.isTransformDirty=!1}function bs(A){A.clearSnapshot()}function ow(A){A.clearMeasurements()}function Os(A){A.isLayoutDirty=!1}function js(A){const{visualElement:g}=A.options;g&&g.getProps().onBeforeLayoutMeasure&&g.notify("BeforeLayoutMeasure"),A.resetTransform()}function Iw(A){A.finishAnimation(),A.targetDelta=A.relativeTarget=A.target=void 0,A.isProjectionDirty=!0}function Hs(A){A.resolveTargetDelta()}function Ts(A){A.calcProjection()}function Ss(A){A.resetSkewAndRotation()}function Xs(A){A.removeLeadSnapshot()}function nw(A,g,B){A.translate=v(g.translate,0,B),A.scale=v(g.scale,1,B),A.origin=g.origin,A.originPoint=g.originPoint}function rw(A,g,B,M){A.min=v(g.min,B.min,M),A.max=v(g.max,B.max,M)}function Ns(A,g,B,M){rw(A.x,g.x,B.x,M),rw(A.y,g.y,B.y,M)}function xs(A){return A.animationValues&&A.animationValues.opacityExit!==void 0}const Ws={duration:.45,ease:[.4,0,.1,1]},Ew=A=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(A),lw=Ew("applewebkit/")&&!Ew("chrome/")?Math.round:N;function Gw(A){A.min=lw(A.min),A.max=lw(A.max)}function $s(A){Gw(A.x),Gw(A.y)}function aw(A,g,B){return A==="position"||A==="preserve-aspect"&&!gs(tw(g),tw(B),.2)}function _s(A){var g;return A!==A.root&&((g=A.scroll)===null||g===void 0?void 0:g.wasRoot)}const Ai=iw({attachResizeListener:(A,g)=>Mg(A,"resize",g),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),sM={current:void 0},cw=iw({measureScroll:A=>({x:A.scrollLeft,y:A.scrollTop}),defaultParent:()=>{if(!sM.current){const A=new Ai({});A.mount(window),A.setOptions({layoutScroll:!0}),sM.current=A}return sM.current},resetTransform:(A,g)=>{A.style.transform=g!==void 0?g:"none"},checkIsScrollRoot:A=>window.getComputedStyle(A).position==="fixed"}),gi={pan:{Feature:ls},drag:{Feature:Es,ProjectionNode:cw,MeasureLayout:He}};function Yw(A,g,B){const{props:M}=A;A.animationState&&M.whileHover&&A.animationState.setActive("whileHover",B==="Start");const D="onHover"+B,w=M[D];w&&J.postRender(()=>w(g,Dg(g)))}class Bi extends GA{mount(){const{current:g}=this.node;g&&(this.unmount=DQ(g,(B,M)=>(Yw(this.node,M,"Start"),D=>Yw(this.node,D,"End"))))}unmount(){}}class Mi extends GA{constructor(){super(...arguments),this.isActive=!1}onFocus(){let g=!1;try{g=this.node.current.matches(":focus-visible")}catch{g=!0}!g||!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=Bg(Mg(this.node.current,"focus",()=>this.onFocus()),Mg(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yw(A,g,B){const{props:M}=A;A.animationState&&M.whileTap&&A.animationState.setActive("whileTap",B==="Start");const D="onTap"+(B==="End"?"":B),w=M[D];w&&J.postRender(()=>w(g,Dg(g)))}class Di extends GA{mount(){const{current:g}=this.node;g&&(this.unmount=QQ(g,(B,M)=>(yw(this.node,M,"Start"),(D,{success:w})=>yw(this.node,D,w?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const iM=new WeakMap,oM=new WeakMap,ei=A=>{const g=iM.get(A.target);g&&g(A)},wi=A=>{A.forEach(ei)};function ti({root:A,...g}){const B=A||document;oM.has(B)||oM.set(B,{});const M=oM.get(B),D=JSON.stringify(g);return M[D]||(M[D]=new IntersectionObserver(wi,{root:A,...g})),M[D]}function Qi(A,g,B){const M=ti(g);return iM.set(A,B),M.observe(A),()=>{iM.delete(A),M.unobserve(A)}}const Ci={some:0,all:1};class si extends GA{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:g={}}=this.node.getProps(),{root:B,margin:M,amount:D="some",once:w}=g,e={root:B?B.current:void 0,rootMargin:M,threshold:typeof D=="number"?D:Ci[D]},Q=t=>{const{isIntersecting:s}=t;if(this.isInView===s||(this.isInView=s,w&&!s&&this.hasEnteredView))return;s&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",s);const{onViewportEnter:i,onViewportLeave:o}=this.node.getProps(),I=s?i:o;I&&I(t)};return Qi(this.node.current,e,Q)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:g,prevProps:B}=this.node;["amount","margin","root"].some(ii(g,B))&&this.startObserver()}unmount(){}}function ii({viewport:A={}},{viewport:g={}}={}){return B=>A[B]!==g[B]}const oi={inView:{Feature:si},tap:{Feature:Di},focus:{Feature:Mi},hover:{Feature:Bi}},Ii={layout:{ProjectionNode:cw,MeasureLayout:He}},IM={current:null},uw={current:!1};function ni(){if(uw.current=!0,!!QB)if(window.matchMedia){const A=window.matchMedia("(prefers-reduced-motion)"),g=()=>IM.current=A.matches;A.addListener(g),g()}else IM.current=!1}const ri=[...ND,T,lA],Ei=A=>ri.find(XD(A)),mw=new WeakMap;function li(A,g,B){for(const M in g){const D=g[M],w=B[M];if(H(D))A.addValue(M,D),process.env.NODE_ENV==="development"&&ag(D.version==="12.0.3",`Attempting to mix Motion versions ${D.version} with 12.0.3 may not work as expected.`);else if(H(w))A.addValue(M,$A(D,{owner:A}));else if(w!==D)if(A.hasValue(M)){const e=A.getValue(M);e.liveStyle===!0?e.jump(D):e.hasAnimated||e.set(D)}else{const e=A.getStaticValue(M);A.addValue(M,$A(e!==void 0?e:D,{owner:A}))}}for(const M in B)g[M]===void 0&&A.removeValue(M);return g}const Uw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Gi{scrapeMotionValuesFromProps(g,B,M){return{}}constructor({parent:g,props:B,presenceContext:M,reducedMotionConfig:D,blockInitialAnimation:w,visualState:e},Q={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=SB,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 n=CA.now();this.renderScheduledAt<n&&(this.renderScheduledAt=n,J.render(this.render,!1,!0))};const{latestValues:t,renderState:s,onUpdate:i}=e;this.onUpdate=i,this.latestValues=t,this.baseTarget={...t},this.initialValues=B.initial?{...t}:{},this.renderState=s,this.parent=g,this.props=B,this.presenceContext=M,this.depth=g?g.depth+1:0,this.reducedMotionConfig=D,this.options=Q,this.blockInitialAnimation=!!w,this.isControllingVariants=yg(B),this.isVariantNode=FM(B),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(g&&g.current);const{willChange:o,...I}=this.scrapeMotionValuesFromProps(B,{},this);for(const n in I){const E=I[n];t[n]!==void 0&&H(E)&&E.set(t[n],!1)}}mount(g){this.current=g,mw.set(g,this),this.projection&&!this.projection.instance&&this.projection.mount(g),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((B,M)=>this.bindToMotionValue(M,B)),uw.current||ni(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:IM.current,process.env.NODE_ENV!=="production"&&ag(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(){mw.delete(this.current),this.projection&&this.projection.unmount(),rA(this.notifyUpdate),rA(this.render),this.valueSubscriptions.forEach(g=>g()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const g in this.events)this.events[g].clear();for(const g in this.features){const B=this.features[g];B&&(B.unmount(),B.isMounted=!1)}this.current=null}bindToMotionValue(g,B){this.valueSubscriptions.has(g)&&this.valueSubscriptions.get(g)();const M=yA.has(g),D=B.on("change",Q=>{this.latestValues[g]=Q,this.props.onUpdate&&J.preRender(this.notifyUpdate),M&&this.projection&&(this.projection.isTransformDirty=!0)}),w=B.on("renderRequest",this.scheduleRender);let e;window.MotionCheckAppearSync&&(e=window.MotionCheckAppearSync(this,g,B)),this.valueSubscriptions.set(g,()=>{D(),w(),e&&e(),B.owner&&B.stop()})}sortNodePosition(g){return!this.current||!this.sortInstanceNodePosition||this.type!==g.type?0:this.sortInstanceNodePosition(this.current,g.current)}updateFeatures(){let g="animation";for(g in RA){const B=RA[g];if(!B)continue;const{isEnabled:M,Feature:D}=B;if(!this.features[g]&&D&&M(this.props)&&(this.features[g]=new D(this)),this.features[g]){const w=this.features[g];w.isMounted?w.update():(w.mount(),w.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(g){return this.latestValues[g]}setStaticValue(g,B){this.latestValues[g]=B}update(g,B){(g.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=g,this.prevPresenceContext=this.presenceContext,this.presenceContext=B;for(let M=0;M<Uw.length;M++){const D=Uw[M];this.propEventSubscriptions[D]&&(this.propEventSubscriptions[D](),delete this.propEventSubscriptions[D]);const w="on"+D,e=g[w];e&&(this.propEventSubscriptions[D]=this.on(D,e))}this.prevMotionValues=li(this,this.scrapeMotionValuesFromProps(g,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(g){return this.props.variants?this.props.variants[g]: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(g){const B=this.getClosestVariantNode();if(B)return B.variantChildren&&B.variantChildren.add(g),()=>B.variantChildren.delete(g)}addValue(g,B){const M=this.values.get(g);B!==M&&(M&&this.removeValue(g),this.bindToMotionValue(g,B),this.values.set(g,B),this.latestValues[g]=B.get())}removeValue(g){this.values.delete(g);const B=this.valueSubscriptions.get(g);B&&(B(),this.valueSubscriptions.delete(g)),delete this.latestValues[g],this.removeValueFromRenderState(g,this.renderState)}hasValue(g){return this.values.has(g)}getValue(g,B){if(this.props.values&&this.props.values[g])return this.props.values[g];let M=this.values.get(g);return M===void 0&&B!==void 0&&(M=$A(B===null?void 0:B,{owner:this}),this.addValue(g,M)),M}readValue(g,B){var M;let D=this.latestValues[g]!==void 0||!this.current?this.latestValues[g]:(M=this.getBaseTargetFromProps(this.props,g))!==null&&M!==void 0?M:this.readValueFromInstance(this.current,g,this.options);return D!=null&&(typeof D=="string"&&(TD(D)||pD(D))?D=parseFloat(D):!Ei(D)&&lA.test(B)&&(D=LD(g,B)),this.setBaseTarget(g,H(D)?D.get():D)),H(D)?D.get():D}setBaseTarget(g,B){this.baseTarget[g]=B}getBaseTarget(g){var B;const{initial:M}=this.props;let D;if(typeof M=="string"||typeof M=="object"){const e=EB(this.props,M,(B=this.presenceContext)===null||B===void 0?void 0:B.custom);e&&(D=e[g])}if(M&&D!==void 0)return D;const w=this.getBaseTargetFromProps(this.props,g);return w!==void 0&&!H(w)?w:this.initialValues[g]!==void 0&&D===void 0?void 0:this.baseTarget[g]}on(g,B){return this.events[g]||(this.events[g]=new hB),this.events[g].add(B)}notify(g,...B){this.events[g]&&this.events[g].notify(...B)}}class fw extends Gi{constructor(){super(...arguments),this.KeyframeResolver=WD}sortInstanceNodePosition(g,B){return g.compareDocumentPosition(B)&2?1:-1}getBaseTargetFromProps(g,B){return g.style?g.style[B]:void 0}removeValueFromRenderState(g,{vars:B,style:M}){delete B[g],delete M[g]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:g}=this.props;H(g)&&(this.childSubscription=g.on("change",B=>{this.current&&(this.current.textContent=`${B}`)}))}}function ai(A){return window.getComputedStyle(A)}class ci extends fw{constructor(){super(...arguments),this.type="html",this.renderInstance=gD}readValueFromInstance(g,B){if(yA.has(B)){const M=jB(B);return M&&M.default||0}else{const M=ai(g),D=(NM(B)?M.getPropertyValue(B):M[B])||0;return typeof D=="string"?D.trim():D}}measureInstanceViewportBox(g,{transformPagePoint:B}){return Fe(g,B)}build(g,B,M){cB(g,B,M.transformTemplate)}scrapeMotionValuesFromProps(g,B,M){return mB(g,B,M)}}class Yi extends fw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(g,B){return g[B]}readValueFromInstance(g,B){if(yA.has(B)){const M=jB(B);return M&&M.default||0}return B=BD.has(B)?B:IB(B),g.getAttribute(B)}scrapeMotionValuesFromProps(g,B,M){return eD(g,B,M)}build(g,B,M){YB(g,B,this.isSVGTag,M.transformTemplate)}renderInstance(g,B,M,D){MD(g,B,M,D)}mount(g){this.isSVGTag=uB(g.tagName),super.mount(g)}}const yi=(A,g)=>rB(A)?new Yi(g):new ci(g,{allowProjection:A!==r.Fragment}),ui=$t({...TC,...oi,...gi,...Ii},yi),Jg=nt(ui);function mi(A){A.values.forEach(g=>g.stop())}function nM(A,g){[...g].reverse().forEach(M=>{const D=A.getVariant(M);D&&RB(A,D),A.variantChildren&&A.variantChildren.forEach(w=>{nM(w,g)})})}function Ui(A,g){if(Array.isArray(g))return nM(A,g);if(typeof g=="string")return nM(A,[g]);RB(A,g)}function fi(){let A=!1;const g=new Set,B={subscribe(M){return g.add(M),()=>void g.delete(M)},start(M,D){wA(A,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const w=[];return g.forEach(e=>{w.push(re(e,M,{transitionOverride:D}))}),Promise.all(w)},set(M){return wA(A,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),g.forEach(D=>{Ui(D,M)})},stop(){g.forEach(M=>{mi(M)})},mount(){return A=!0,()=>{A=!1,B.stop()}}};return B}function Zi(){const A=pM(fi);return RM(A.mount,[]),A}const zg=Zi,Vi={some:0,all:1};function di(A,g,{root:B,margin:M,amount:D="some"}={}){const w=rD(A),e=new WeakMap,Q=s=>{s.forEach(i=>{const o=e.get(i.target);if(i.isIntersecting!==!!o)if(i.isIntersecting){const I=g(i.target,i);typeof I=="function"?e.set(i.target,I):t.unobserve(i.target)}else typeof o=="function"&&(o(i),e.delete(i.target))})},t=new IntersectionObserver(Q,{root:B,rootMargin:M,threshold:typeof D=="number"?D:Vi[D]});return w.forEach(s=>t.observe(s)),()=>t.disconnect()}function Zw(A,{root:g,margin:B,amount:M,once:D=!1}={}){const[w,e]=r.useState(!1);return r.useEffect(()=>{if(!A.current||D&&w)return;const Q=()=>(e(!0),D?void 0:()=>e(!1)),t={root:g&&g.current||void 0,margin:B,amount:M};return di(A.current,Q,t)},[g,A,B,D,M]),w}const Vw=r.forwardRef(({variant:A="goatData",items:g=[],logo:B,heightLogo:M="40px",widthLogo:D="65px",router:w,handleOpenItem:e,...Q},t)=>{const s=wB(),[i,o]=r.useState(!1),[I,n]=r.useState(void 0),[E]=r.useState(""),l=g.reduce((Z,f)=>(Z[f.refId]=r.useRef(null),Z),{}),G=()=>o(!i);r.useEffect(()=>{g.forEach(f=>{const u=l[f.refId];if(u!=null&&u.current){const y=V=>{const h=V.target;n(h.getBoundingClientRect())};u.current.addEventListener("mouseenter",y)}});const Z=l[E];return Z!=null&&Z.current&&n(Z.current.getBoundingClientRect()),()=>{g.forEach(f=>{const u=l[f.refId];u!=null&&u.current&&u.current.removeEventListener("mouseenter",()=>{})})}},[E,g,l]),r.useEffect(()=>{const Z=window.matchMedia("(min-width: 640px)"),f=()=>{Z.matches&&i&&o(!1)};return Z.addEventListener("change",f),()=>{Z.removeEventListener("change",f)}},[i]);const a={goatData:"bg-zinc-900",secondary:"bg-[#ededed]",experiences:"bg-[#FFFFFF]"},c={goatData:"#9a6d79",secondary:"#1f2937e7",experiences:"#6BC1E4"},U={goatData:"#ff0145",secondary:"#ff0145",experiences:"#1f2937e7"},q={goatData:"white",secondary:"#1F2937",experiences:"#000000"},Y={goatData:"text-white",secondary:"text-[#1F2937]",experiences:"text-white"};return C.jsxs("nav",{ref:t,...Q,style:{zIndex:9999,position:"fixed",top:"0px",left:"0px",right:"0px"},className:`${a[A]} ${A==="experiences"?"":"bg-opacity-75"} `,children:[C.jsxs("div",{style:{marginLeft:"auto",marginRight:"auto",maxWidth:"80rem",paddingLeft:s?"0.5rem":"1.5rem",paddingRight:s?"0.5rem":"1.5rem"},children:[(A==="goatData"||A==="secondary")&&C.jsx(Jg.div,{style:{background:c[A],position:"absolute",opacity:.4,borderRadius:"0.25rem"},className:"z-20 pointer-events-none",animate:{top:(I==null?void 0:I.top)||0,left:(I==null?void 0:I.left)||0,width:(I==null?void 0:I.width)||0,height:(I==null?void 0:I.height)||0}}),C.jsxs("div",{style:{position:"relative",display:"flex",height:"4rem",alignItems:"center",justifyContent:"space-between"},children:[C.jsx("div",{style:{position:"absolute",top:"0px",bottom:"0px",left:A==="experiences"?"auto":"0px",right:A==="experiences"?"0px":"auto",display:s?"flex":"none",alignItems:"center"},children:C.jsx("button",{className:`menu ${i?A==="secondary"?"openedark":A==="experiences"?"openeExperiences":"opened":""}`,onClick:G,"aria-label":"Main Menu",children:C.jsxs("svg",{width:"45",height:"45",viewBox:"0 0 100 100",style:{fill:"#f9f8f8 !important"},children:[C.jsx("path",{className:A==="secondary"?"linedark linedark1":A==="experiences"?"lineExperiences lineExperiences1":"line line1",d:"M 20,29.000046 H 80.000231 C 80.000231,29.000046 94.498839,28.817352 94.532987,66.711331 94.543142,77.980673 90.966081,81.670246 85.259173,81.668997 79.552261,81.667751 75.000211,74.999942 75.000211,74.999942 L 25.000021,25.000058"}),C.jsx("path",{className:A==="secondary"?"linedark linedark2":A==="experiences"?"lineExperiences lineExperiences2":"line line2",d:"M 20,50 H 80"}),C.jsx("path",{className:A==="secondary"?"linedark linedark3":A==="experiences"?"lineExperiences lineExperiences3":"line line3",d:"M 20,70.999954 H 80.000231 C 80.000231,70.999954 94.498839,71.182648 94.532987,33.288669 94.543142,22.019327 90.966081,18.329754 85.259173,18.331003 79.552261,18.332249 75.000211,25.000058 75.000211,25.000058 L 25.000021,74.999942"})]})})}),C.jsxs("div",{style:{display:"flex",flex:A==="experiences"&&s?"":"1 1 0%",alignItems:"center",justifyContent:s?"center":A==="experiences"?"flex-end":"stretch"},children:[C.jsx("div",{className:"flex flex-shrink-0 items-center",style:{paddingLeft:A==="experiences"?"20px":""},children:C.jsxs("div",{className:"flex flex-col items-center lg:ml-[120px] ml-0",children:[C.jsx("img",{className:`${s?"hidden":"block"}`,style:{height:M&&M.trim()!==""?M:"40px",width:D&&D.trim()!==""?D:"65px"},src:B&&B.trim()!==""?B:A==="secondary"?cA:YA,alt:"Logo"}),C.jsx("img",{className:`${s?"block":"hidden"}`,style:{height:M&&M.trim()!==""?M:"40px",width:D&&D.trim()!==""?D:"65px"},src:B&&B.trim()!==""?B:A==="secondary"?cA:YA,alt:"Logo"}),(!B||B.trim()==="")&&C.jsx("div",{className:`text-[10px] ${Y[A]} tracking-[4px]`,children:"DATA"})]})}),C.jsx("div",{style:{display:s?"none":"block",flexGrow:1,marginLeft:"1.5rem"},children:C.jsx("nav",{style:{display:"flex",justifyContent:"flex-end"},children:C.jsx("ul",{className:"flex space-x-4",children:g.map(({label:Z,href:f,refId:u,open:y,routerApp:V,link:h})=>C.jsx("li",{children:C.jsx(kM,{href:f,Viewport:U[A],colorButton:q[A],setIsOpen:o,open:y,routerApp:V,handleOpen:e,handleRouter:()=>{w.push(h)},children:C.jsx("div",{id:u,ref:l[u],className:`
9
9
  relative inline-block px-2 py-2
10
10
  text-[${q[A]}]
11
11
  after:content-['']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-goat",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "files": [