Files
proxy_web_site/static/js/2755-f4e7dd850c7f17a0.js
2025-07-12 15:34:14 +08:00

1 line
59 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2755],{21752:(t,e,i)=>{i.d(e,{D:()=>h,N:()=>u});var s=i(7620);let n=["light","dark"],r="(prefers-color-scheme: dark)",o="undefined"==typeof window,a=(0,s.createContext)(void 0),l={setTheme:t=>{},themes:[]},h=()=>{var t;return null!=(t=(0,s.useContext)(a))?t:l},u=t=>(0,s.useContext)(a)?s.createElement(s.Fragment,null,t.children):s.createElement(d,t),c=["light","dark"],d=({forcedTheme:t,disableTransitionOnChange:e=!1,enableSystem:i=!0,enableColorScheme:o=!0,storageKey:l="theme",themes:h=c,defaultTheme:u=i?"system":"light",attribute:d="data-theme",value:g,children:y,nonce:x})=>{let[P,T]=(0,s.useState)(()=>p(l,u)),[S,E]=(0,s.useState)(()=>p(l)),A=g?Object.values(g):h,w=(0,s.useCallback)(t=>{let s=t;if(!s)return;"system"===t&&i&&(s=v());let r=g?g[s]:s,a=e?f():null,l=document.documentElement;if("class"===d?(l.classList.remove(...A),r&&l.classList.add(r)):r?l.setAttribute(d,r):l.removeAttribute(d),o){let t=n.includes(u)?u:null,e=n.includes(s)?s:t;l.style.colorScheme=e}null==a||a()},[]),b=(0,s.useCallback)(t=>{T(t);try{localStorage.setItem(l,t)}catch(t){}},[t]),D=(0,s.useCallback)(e=>{E(v(e)),"system"===P&&i&&!t&&w("system")},[P,t]);(0,s.useEffect)(()=>{let t=window.matchMedia(r);return t.addListener(D),D(t),()=>t.removeListener(D)},[D]),(0,s.useEffect)(()=>{let t=t=>{t.key===l&&b(t.newValue||u)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[b]),(0,s.useEffect)(()=>{w(null!=t?t:P)},[t,P]);let L=(0,s.useMemo)(()=>({theme:P,setTheme:b,forcedTheme:t,resolvedTheme:"system"===P?S:P,themes:i?[...h,"system"]:h,systemTheme:i?S:void 0}),[P,b,t,S,i,h]);return s.createElement(a.Provider,{value:L},s.createElement(m,{forcedTheme:t,disableTransitionOnChange:e,enableSystem:i,enableColorScheme:o,storageKey:l,themes:h,defaultTheme:u,attribute:d,value:g,children:y,attrs:A,nonce:x}),y)},m=(0,s.memo)(({forcedTheme:t,storageKey:e,attribute:i,enableSystem:o,enableColorScheme:a,defaultTheme:l,value:h,attrs:u,nonce:c})=>{let d="system"===l,m="class"===i?`var d=document.documentElement,c=d.classList;c.remove(${u.map(t=>`'${t}'`).join(",")});`:`var d=document.documentElement,n='${i}',s='setAttribute';`,p=a?n.includes(l)&&l?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(t,e=!1,s=!0)=>{let r=h?h[t]:t,o=e?t+"|| ''":`'${r}'`,l="";return a&&s&&!e&&n.includes(t)&&(l+=`d.style.colorScheme = '${t}';`),"class"===i?l+=e||r?`c.add(${o})`:"null":r&&(l+=`d[s](n,${o})`),l},v=t?`!function(){${m}${f(t)}}()`:o?`!function(){try{${m}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${d})){var t='${r}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${h?`var x=${JSON.stringify(h)};`:""}${f(h?"x[e]":"e",!0)}}${d?"":"else{"+f(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${m}var e=localStorage.getItem('${e}');if(e){${h?`var x=${JSON.stringify(h)};`:""}${f(h?"x[e]":"e",!0)}}else{${f(l,!1,!1)};}${p}}catch(t){}}();`;return s.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(t,e)=>{let i;if(!o){try{i=localStorage.getItem(t)||void 0}catch(t){}return i||e}},f=()=>{let t=document.createElement("style");return t.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=t=>(t||(t=window.matchMedia(r)),t.matches?"dark":"light")},25316:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),!function(t,e){for(var i in e)Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}(e,{callServer:function(){return s.callServer},createServerReference:function(){return r},findSourceMapURL:function(){return n.findSourceMapURL}});let s=i(35411),n=i(32795),r=i(496).createServerReference},28427:(t,e,i)=>{i.d(e,{P:()=>ia});var s=i(7620);let n=(0,s.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),r=(0,s.createContext)({});var o=i(90548),a=i(96303);let l=(0,s.createContext)({strict:!1});var h=i(68335),u=i(86302),c=i(24732),d=i(61418);function m(t){return Array.isArray(t)?t.join(" "):t}var p=i(80979),f=i(96035),v=i(78386);let g=(0,s.createContext)({}),y=Symbol.for("motionComponentSymbol"),x=["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 P(t){if("string"!=typeof t||t.includes("-"));else if(x.indexOf(t)>-1||/[A-Z]/.test(t))return!0;return!1}var T=i(11330),S=i(96711),E=i(13832);let A=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function w(t,e,i){for(let s in e)(0,S.S)(e[s])||(0,T.z)(s,i)||(t[s]=e[s])}let b=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function D(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||b.has(t)}let L=t=>!D(t);try{!function(t){t&&(L=e=>e.startsWith("on")?!D(e):t(e))}(require("@emotion/is-prop-valid").default)}catch(t){}var C=i(12595);let j=()=>({...A(),attrs:{}});var R=i(24758),M=i(11852),V=i(43938),k=i(25629),B=i(47294),F=i(38094),U=i(4362);function O(t){let e=(0,S.S)(t)?t.get():t;return(0,U.B)(e)?e.toValue():e}let $=t=>(e,i)=>{let n=(0,s.useContext)(r),a=(0,s.useContext)(o.t),l=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:i},s,n,r){let o={latestValues:function(t,e,i,s){let n={},r=s(t,{});for(let t in r)n[t]=O(r[t]);let{initial:o,animate:a}=t,l=(0,d.e)(t),h=(0,d.O)(t);e&&h&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!i&&!1===i.initial,c=(u=u||!1===o)?a:o;return c&&"boolean"!=typeof c&&!(0,k.N)(c)&&(Array.isArray(c)?c:[c]).forEach(e=>{let i=(0,B.a)(t,e);if(!i)return;let{transitionEnd:s,transition:r,...o}=i;for(let t in o){let e=o[t];if(Array.isArray(e)){let t=u?e.length-1:0;e=e[t]}null!==e&&(n[t]=e)}for(let t in s)n[t]=s[t]}),n}(s,n,r,t),renderState:e()};return i&&(o.mount=t=>i(s,t,o)),o})(t,e,n,a);return i?l():(0,F.M)(l)};var G=i(4474);let I={useVisualState:$({scrapeMotionValuesFromProps:V.x,createRenderState:j,onMount:(t,e,{renderState:i,latestValues:s})=>{G.Gt.read(()=>{try{i.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){i.dimensions={x:0,y:0,width:0,height:0}}}),G.Gt.render(()=>{(0,C.B)(i,s,{enableHardwareAcceleration:!1},(0,R.n)(e.tagName),t.transformTemplate),(0,M.d)(e,i)})}})},W={useVisualState:$({scrapeMotionValuesFromProps:i(98577).x,createRenderState:A})};function H(t,e,i,s={passive:!0}){return t.addEventListener(e,i,s),()=>t.removeEventListener(e,i)}let N=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function z(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}let K=t=>e=>N(e)&&t(e,z(e));function X(t,e,i,s){return H(t,e,K(i),s)}var q=i(31088);function _(t){let e=null;return()=>null===e&&(e=t,()=>{e=null})}let Y=_("dragHorizontal"),Q=_("dragVertical");function J(t){let e=!1;if("y"===t)e=Q();else if("x"===t)e=Y();else{let t=Y(),i=Q();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function Z(){let t=J(!0);return!t||(t(),!1)}class tt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function te(t,e){let i="onHover"+(e?"Start":"End");return X(t.current,"pointer"+(e?"enter":"leave"),(s,n)=>{if("touch"===s.pointerType||Z())return;let r=t.getProps();t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",e),r[i]&&G.Gt.update(()=>r[i](s,n))},{passive:!t.getProps()[i]})}class ti extends tt{mount(){this.unmount=(0,q.F)(te(this.node,!0),te(this.node,!1))}unmount(){}}class ts extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=(0,q.F)(H(this.node.current,"focus",()=>this.onFocus()),H(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let tn=(t,e)=>!!e&&(t===e||tn(t,e.parentElement));var tr=i(96652);function to(t,e){if(!e)return;let i=new PointerEvent("pointer"+t);e(i,z(i))}class ta extends tt{constructor(){super(...arguments),this.removeStartListeners=tr.l,this.removeEndListeners=tr.l,this.removeAccessibleListeners=tr.l,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();let i=this.node.getProps(),s=X(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;let{onTap:i,onTapCancel:s,globalTapTarget:n}=this.node.getProps();G.Gt.update(()=>{n||tn(this.node.current,t.target)?i&&i(t,e):s&&s(t,e)})},{passive:!(i.onTap||i.onPointerUp)}),n=X(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=(0,q.F)(s,n),this.startPress(t,e)},this.startAccessiblePress=()=>{let t=H(this.node.current,"keydown",t=>{"Enter"!==t.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=H(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&to("up",(t,e)=>{let{onTap:i}=this.node.getProps();i&&G.Gt.update(()=>i(t,e))})}),to("down",(t,e)=>{this.startPress(t,e)}))}),e=H(this.node.current,"blur",()=>{this.isPressing&&to("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=(0,q.F)(t,e)}}startPress(t,e){this.isPressing=!0;let{onTapStart:i,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&G.Gt.update(()=>i(t,e))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Z()}cancelPress(t,e){if(!this.checkPressEnd())return;let{onTapCancel:i}=this.node.getProps();i&&G.Gt.update(()=>i(t,e))}mount(){let t=this.node.getProps(),e=X(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),i=H(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=(0,q.F)(e,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let tl=new WeakMap,th=new WeakMap,tu=t=>{let e=tl.get(t.target);e&&e(t)},tc=t=>{t.forEach(tu)},td={some:0,all:1};class tm extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:s="some",once:n}=t,r={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof s?s:td[s]};return function(t,e,i){let s=function({root:t,...e}){let i=t||document;th.has(i)||th.set(i,{});let s=th.get(i),n=JSON.stringify(e);return s[n]||(s[n]=new IntersectionObserver(tc,{root:t,...e})),s[n]}(e);return tl.set(t,i),s.observe(t),()=>{tl.delete(t),s.unobserve(t)}}(this.node.current,r,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,n&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),r=e?i:s;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}var tp=i(3807);function tf(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s])return!1;return!0}var tv=i(48306),tg=i(155),ty=i(27113);function tx(t,e,i={}){let s=(0,tv.K)(t,e,i.custom),{transition:n=t.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(n=i.transitionOverride);let r=s?()=>Promise.all((0,ty.$)(t,s,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=n;return function(t,e,i=0,s=0,n=1,r){let o=[],a=(t.variantChildren.size-1)*s,l=1===n?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(tP).forEach((t,s)=>{t.notify("AnimationStart",e),o.push(tx(t,e,{...r,delay:i+l(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,r+s,o,a,i)}:()=>Promise.resolve(),{when:a}=n;if(!a)return Promise.all([r(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}}function tP(t,e){return t.sortNodePosition(e)}let tT=[...tg.U].reverse(),tS=tg.U.length;function tE(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class tA extends tt{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e))s=Promise.all(e.map(e=>tx(t,e,i)));else if("string"==typeof e)s=tx(t,e,i);else{let n="function"==typeof e?(0,tv.K)(t,e,i.custom):e;s=Promise.all((0,ty.$)(t,n,i))}return s.then(()=>t.notify("AnimationComplete",e))})(t,e,i))),i={animate:tE(!0),whileInView:tE(),whileHover:tE(),whileTap:tE(),whileDrag:tE(),whileFocus:tE(),exit:tE()},s=!0,n=(e,i)=>{let s=(0,tv.K)(t,i);if(s){let{transition:t,transitionEnd:i,...n}=s;e={...e,...n,...i}}return e};function r(r,o){let a=t.getProps(),l=t.getVariantContext(!0)||{},h=[],u=new Set,d={},m=1/0;for(let e=0;e<tS;e++){var p,f;let v=tT[e],g=i[v],y=void 0!==a[v]?a[v]:l[v],x=(0,c.w)(y),P=v===o?g.isActive:null;!1===P&&(m=e);let T=y===l[v]&&y!==a[v]&&x;if(T&&s&&t.manuallyAnimateOnMount&&(T=!1),g.protectedKeys={...d},!g.isActive&&null===P||!y&&!g.prevProp||(0,k.N)(y)||"boolean"==typeof y)continue;let S=(p=g.prevProp,("string"==typeof(f=y)?f!==p:!!Array.isArray(f)&&!tf(f,p))||v===o&&g.isActive&&!T&&x||e>m&&x),E=!1,A=Array.isArray(y)?y:[y],w=A.reduce(n,{});!1===P&&(w={});let{prevResolvedValues:b={}}=g,D={...b,...w},L=t=>{S=!0,u.has(t)&&(E=!0,u.delete(t)),g.needsAnimating[t]=!0};for(let t in D){let e=w[t],i=b[t];if(d.hasOwnProperty(t))continue;let s=!1;((0,tp.p)(e)&&(0,tp.p)(i)?tf(e,i):e===i)?void 0!==e&&u.has(t)?L(t):g.protectedKeys[t]=!0:void 0!==e?L(t):u.add(t)}g.prevProp=y,g.prevResolvedValues=w,g.isActive&&(d={...d,...w}),s&&t.blockInitialAnimation&&(S=!1),S&&(!T||E)&&h.push(...A.map(t=>({animation:t,options:{type:v,...r}})))}if(u.size){let e={};u.forEach(i=>{let s=t.getBaseTarget(i);void 0!==s&&(e[i]=s)}),h.push({animation:e})}let v=!!h.length;return s&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(v=!1),s=!1,v?e(h):Promise.resolve()}return{animateChanges:r,setActive:function(e,s,n){var o;if(i[e].isActive===s)return Promise.resolve();null==(o=t.variantChildren)||o.forEach(t=>{var i;return null==(i=t.animationState)?void 0:i.setActive(e,s)}),i[e].isActive=s;let a=r(n,e);for(let t in i)i[t].protectedKeys={};return a},setAnimateFunction:function(i){e=i(t)},getState:()=>i}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();this.unmount(),(0,k.N)(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}let tw=0;class tb extends tt{constructor(){super(...arguments),this.id=tw++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e,custom:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;let n=this.node.animationState.setActive("exit",!t,{custom:null!=i?i:this.node.getProps().custom});e&&!t&&n.then(()=>e(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}var tD=i(67233),tL=i(46658);let tC=(t,e)=>Math.abs(t-e);class tj{constructor(t,e,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:n=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let t=tV(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){return Math.sqrt(tC(t.x,e.x)**2+tC(t.y,e.y)**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!i)return;let{point:s}=t,{timestamp:n}=G.uv;this.history.push({...s,timestamp:n});let{onStart:r,onMove:o}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=tR(e,this.transformPagePoint),G.Gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:n}=this.handlers;if(this.dragSnapToOrigin&&n&&n(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=tV("pointercancel"===t.type?this.lastMoveEventInfo:tR(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,r),s&&s(t,r)},!N(t))return;this.dragSnapToOrigin=n,this.handlers=e,this.transformPagePoint=i,this.contextWindow=s||window;let r=tR(z(t),this.transformPagePoint),{point:o}=r,{timestamp:a}=G.uv;this.history=[{...o,timestamp:a}];let{onSessionStart:l}=e;l&&l(t,tV(r,this.history)),this.removeListeners=(0,q.F)(X(this.contextWindow,"pointermove",this.handlePointerMove),X(this.contextWindow,"pointerup",this.handlePointerUp),X(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,G.WG)(this.updatePoint)}}function tR(t,e){return e?{point:e(t.point)}:t}function tM(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tV({point:t},e){return{point:t,delta:tM(t,tk(e)),offset:tM(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null,n=tk(t);for(;i>=0&&(s=t[i],!(n.timestamp-s.timestamp>(0,tL.f)(.1)));)i--;if(!s)return{x:0,y:0};let r=(0,tL.X)(n.timestamp-s.timestamp);if(0===r)return{x:0,y:0};let o={x:(n.x-s.x)/r,y:(n.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function tk(t){return t[t.length-1]}var tB=i(96705),tF=i(72632);function tU(t){return t.max-t.min}function tO(t,e=0,i=.01){return Math.abs(t-e)<=i}function t$(t,e,i,s=.5){t.origin=s,t.originPoint=(0,tF.j)(e.min,e.max,t.origin),t.scale=tU(i)/tU(e),(tO(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=(0,tF.j)(i.min,i.max,t.origin)-t.originPoint,(tO(t.translate)||isNaN(t.translate))&&(t.translate=0)}function tG(t,e,i,s){t$(t.x,e.x,i.x,s?s.originX:void 0),t$(t.y,e.y,i.y,s?s.originY:void 0)}function tI(t,e,i){t.min=i.min+e.min,t.max=t.min+tU(e)}function tW(t,e,i){t.min=e.min-i.min,t.max=t.min+tU(e)}function tH(t,e,i){tW(t.x,e.x,i.x),tW(t.y,e.y,i.y)}var tN=i(63879);function tz(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function tK(t,e){let i=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,s]=[s,i]),{min:i,max:s}}function tX(t,e,i){return{min:tq(t,e),max:tq(t,i)}}function tq(t,e){return"number"==typeof t?t:t[e]||0}var t_=i(27925);function tY(t){return[t("x"),t("y")]}var tQ=i(97950),tJ=i(30067),tZ=i(94866),t0=i(94253);let t1=({current:t})=>t?t.ownerDocument.defaultView:null,t5=new WeakMap;class t3{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=(0,t_.ge)(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){let{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;let{dragSnapToOrigin:s}=this.getProps();this.panSession=new tj(t,{onSessionStart:t=>{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(z(t,"page").point)},onStart:(t,e)=>{let{drag:i,dragPropagation:s,onDragStart:n}=this.getProps();if(i&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=J(i),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tY(t=>{let e=this.getAxisMotionValue(t).get()||0;if(tZ.KN.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let s=i.layout.layoutBox[t];s&&(e=tU(s)*(parseFloat(e)/100))}}this.originPoint[t]=e}),n&&G.Gt.update(()=>n(t,e),!1,!0);let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:n,onDrag:r}=this.getProps();if(!i&&!this.openGlobalLock)return;let{offset:o}=e;if(s&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&n&&n(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&r(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>tY(t=>{var e;return"paused"===this.getAnimationState(t)&&(null==(e=this.getAxisMotionValue(t).animation)?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:t1(this.visualElement)})}stop(t,e){let i=this.isDragging;if(this.cancel(),!i)return;let{velocity:s}=e;this.startAnimation(s);let{onDragEnd:n}=this.getProps();n&&G.Gt.update(()=>n(t,e))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:s}=this.getProps();if(!i||!t2(t,s,this.currentDirection))return;let n=this.getAxisMotionValue(t),r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},s){return void 0!==e&&t<e?t=s?(0,tF.j)(e,t,s.min):Math.max(t,e):void 0!==i&&t>i&&(t=s?(0,tF.j)(i,t,s.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),n.set(r)}resolveConstraints(){var t;let{dragConstraints:e,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(t=this.visualElement.projection)?void 0:t.layout,n=this.constraints;e&&(0,u.X)(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=function(t,{top:e,left:i,bottom:s,right:n}){return{x:tz(t.x,i,n),y:tz(t.y,e,s)}}(s.layoutBox,e):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:tX(t,"left","right"),y:tX(t,"top","bottom")}}(i),n!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tY(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(s.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!(0,u.X)(e))return!1;let s=e.current;(0,tD.V)(null!==s,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let r=(0,tQ.L)(s,n.root,this.visualElement.getTransformPagePoint()),o=(t=n.layout.layoutBox,{x:tK(t.x,r.x),y:tK(t.y,r.y)});if(i){let t=i((0,tJ.pA)(o));this.hasMutatedConstraints=!!t,t&&(o=(0,tJ.FY)(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:s,dragTransition:n,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(tY(o=>{if(!t2(o,e,this.currentDirection))return;let l=a&&a[o]||{};r&&(l={min:0,max:0});let h={type:"inertia",velocity:i?t[o]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return i.start((0,t0.f)(t,i,0,e))}stopAnimation(){tY(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tY(t=>{var e;return null==(e=this.getAxisMotionValue(t).animation)?void 0:e.pause()})}getAnimationState(t){var e;return null==(e=this.getAxisMotionValue(t).animation)?void 0:e.state}getAxisMotionValue(t){let e="_drag"+t.toUpperCase(),i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){tY(e=>{let{drag:i}=this.getProps();if(!t2(e,i,this.currentDirection))return;let{projection:s}=this.visualElement,n=this.getAxisMotionValue(e);if(s&&s.layout){let{min:i,max:r}=s.layout.layoutBox[e];n.set(t[e]-(0,tF.j)(i,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!(0,u.X)(e)||!i||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};tY(t=>{let e=this.getAxisMotionValue(t);if(e){let i=e.get();s[t]=function(t,e){let i=.5,s=tU(t),n=tU(e);return n>s?i=(0,tB.q)(e.min,e.max-s,t.min):s>n&&(i=(0,tB.q)(t.min,t.max-n,e.min)),(0,tN.q)(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),tY(e=>{if(!t2(e,t,null))return;let i=this.getAxisMotionValue(e),{min:n,max:r}=this.constraints[e];i.set((0,tF.j)(n,r,s[e]))})}addListeners(){if(!this.visualElement.current)return;t5.set(this.visualElement,this);let t=X(this.visualElement.current,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();(0,u.X)(t)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),e();let n=H(window,"resize",()=>this.scalePositionWithinConstraints()),r=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(tY(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{n(),t(),s(),r&&r()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:n=!1,dragElastic:r=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:s,dragConstraints:n,dragElastic:r,dragMomentum:o}}}function t2(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class t7 extends tt{constructor(t){super(t),this.removeGroupControls=tr.l,this.removeListeners=tr.l,this.controls=new t3(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tr.l}unmount(){this.removeGroupControls(),this.removeListeners()}}let t6=t=>(e,i)=>{t&&G.Gt.update(()=>t(e,i))};class t9 extends tt{constructor(){super(...arguments),this.removePointerDownListener=tr.l}onPointerDown(t){this.session=new tj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:t1(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:t6(t),onStart:t6(e),onMove:i,onEnd:(t,e)=>{delete this.session,s&&G.Gt.update(()=>s(t,e))}}}mount(){this.removePointerDownListener=X(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let t4={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function t8(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let et={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!tZ.px.test(t))return t;else t=parseFloat(t);let i=t8(t,e.target.x),s=t8(t,e.target.y);return`${i}% ${s}%`}};var ee=i(37577),ei=i(40014);class es extends s.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:s}=this.props,{projection:n}=t;(0,ei.$)(er),n&&(e.group&&e.group.add(n),i&&i.register&&s&&i.register(n),n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),t4.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:s,isPresent:n}=this.props,r=i.projection;return r&&(r.isPresent=n,s||t.layoutDependency!==e||void 0===e?r.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?r.promote():r.relegate()||G.Gt.postRender(()=>{let t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function en(t){let[e,i]=function(){let t=(0,s.useContext)(o.t);if(null===t)return[!0,null];let{isPresent:e,onExitComplete:i,register:n}=t,r=(0,s.useId)();return(0,s.useEffect)(()=>n(r),[]),!e&&i?[!1,()=>i&&i(r)]:[!0]}(),n=(0,s.useContext)(v.L);return s.createElement(es,{...t,layoutGroup:n,switchLayoutGroup:(0,s.useContext)(g),isPresent:e,safeToRemove:i})}let er={borderRadius:{...et,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomLeftRadius:et,borderBottomRightRadius:et,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let s=ee.f.parse(t);if(s.length>5)return t;let n=ee.f.createTransformer(t),r=+("number"!=typeof s[0]),o=i.x.scale*e.x,a=i.y.scale*e.y;s[0+r]/=o,s[1+r]/=a;let l=(0,tF.j)(o,a,.5);return"number"==typeof s[2+r]&&(s[2+r]/=l),"number"==typeof s[3+r]&&(s[3+r]/=l),n(s)}}};var eo=i(37741),ea=i(76499);let el=["TopLeft","TopRight","BottomLeft","BottomRight"],eh=el.length,eu=t=>"string"==typeof t?parseFloat(t):t,ec=t=>"number"==typeof t||tZ.px.test(t);function ed(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let em=ef(0,.5,ea.yT),ep=ef(.5,.95,tr.l);function ef(t,e,i){return s=>s<t?0:s>e?1:i((0,tB.q)(t,e,s))}function ev(t,e){t.min=e.min,t.max=e.max}function eg(t,e){ev(t.x,e.x),ev(t.y,e.y)}var ey=i(51518);function ex(t,e,i,s,n){return t-=e,t=(0,ey.hq)(t,1/i,s),void 0!==n&&(t=(0,ey.hq)(t,1/n,s)),t}function eP(t,e,[i,s,n],r,o){!function(t,e=0,i=1,s=.5,n,r=t,o=t){if(tZ.KN.test(e)&&(e=parseFloat(e),e=(0,tF.j)(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=(0,tF.j)(r.min,r.max,s);t===r&&(a-=e),t.min=ex(t.min,e,i,a,n),t.max=ex(t.max,e,i,a,n)}(t,e[i],e[s],e[n],e.scale,r,o)}let eT=["x","scaleX","originX"],eS=["y","scaleY","originY"];function eE(t,e,i,s){eP(t.x,e,eT,i?i.x:void 0,s?s.x:void 0),eP(t.y,e,eS,i?i.y:void 0,s?s.y:void 0)}var eA=i(69557);function ew(t){return 0===t.translate&&1===t.scale}function eb(t){return ew(t.x)&&ew(t.y)}function eD(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function eL(t){return tU(t.x)/tU(t.y)}var eC=i(15265);class ej{constructor(){this.members=[]}add(t){(0,eC.Kq)(this.members,t),t.scheduleRender()}remove(t){if((0,eC.Ai)(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e,i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:s}=t.options;!1===s&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eR(t,e,i){let s="",n=t.x.translate/e.x,r=t.y.translate/e.y;if((n||r)&&(s=`translate3d(${n}px, ${r}px, 0) `),(1!==e.x||1!==e.y)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),i){let{rotate:t,rotateX:e,rotateY:n}=i;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),n&&(s+=`rotateY(${n}deg) `)}let o=t.x.scale*e.x,a=t.y.scale*e.y;return(1!==o||1!==a)&&(s+=`scale(${o}, ${a})`),s||"none"}var eM=i(8197);let eV=(t,e)=>t.depth-e.depth;class ek{constructor(){this.children=[],this.isDirty=!1}add(t){(0,eC.Kq)(this.children,t),this.isDirty=!0}remove(t){(0,eC.Ai)(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eV),this.isDirty=!1,this.children.forEach(t)}}var eB=i(23852),eF=i(9572);let eU=["","X","Y","Z"],eO={visibility:"hidden"},e$=0,eG={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function eI({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:n}){return class{constructor(t={},i=null==e?void 0:e()){this.id=e$++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,eG.totalNodes=eG.resolvedTargetDeltas=eG.recalculatedProjection=0,this.nodes.forEach(eN),this.nodes.forEach(eQ),this.nodes.forEach(eJ),this.nodes.forEach(ez),window.MotionDebug&&window.MotionDebug.record(eG)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ek)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new eo.v),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,i=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=(0,eB.x)(e),this.instance=e;let{layoutId:s,layout:n,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),i&&(n||s)&&(this.isLayoutDirty=!0),t){let i,s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=performance.now(),s=({timestamp:e})=>{let n=e-i;n>=250&&((0,G.WG)(s),t(n-250))};return G.Gt.read(s,!0),()=>(0,G.WG)(s)}(s,250),t4.hasAnimatedSinceResize&&(t4.hasAnimatedSinceResize=!1,this.nodes.forEach(eY))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&r&&(s||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:i,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||r.getDefaultTransition()||e2,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!eD(this.targetLayout,s)||i,h=!e&&i;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,h);let e={...(0,eA.r)(n,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||eY(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,(0,G.WG)(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(eZ),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(eX);return}this.isUpdating||this.nodes.forEach(eq),this.isUpdating=!1,this.nodes.forEach(e_),this.nodes.forEach(eW),this.nodes.forEach(eH),this.clearAllSnapshots();let t=performance.now();G.uv.delta=(0,tN.q)(0,1e3/60,t-G.uv.timestamp),G.uv.timestamp=t,G.uv.isProcessing=!0,G.Ci.update.process(G.uv),G.Ci.preRender.process(G.uv),G.Ci.render.process(G.uv),G.uv.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(eK),this.sharedNodes.forEach(e0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,G.Gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){G.Gt.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();let t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=(0,t_.ge)(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:i(this.instance)})}resetTransform(){if(!n)return;let t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!eb(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,r=s!==this.prevTransformTemplateValue;t&&(e||(0,eM.HD)(this.latestValues)||r)&&(n(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),s=this.removeElementScroll(i);return t&&(s=this.removeTransform(s)),e9((e=s).x),e9(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:s,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return(0,t_.ge)();let e=t.measureViewportBox(),{scroll:i}=this.root;return i&&((0,ey.Ql)(e.x,i.offset.x),(0,ey.Ql)(e.y,i.offset.y)),e}removeElementScroll(t){let e=(0,t_.ge)();eg(e,t);for(let i=0;i<this.path.length;i++){let s=this.path[i],{scroll:n,options:r}=s;if(s!==this.root&&n&&r.layoutScroll){if(n.isRoot){eg(e,t);let{scroll:i}=this.root;i&&((0,ey.Ql)(e.x,-i.offset.x),(0,ey.Ql)(e.y,-i.offset.y))}(0,ey.Ql)(e.x,n.offset.x),(0,ey.Ql)(e.y,n.offset.y)}}return e}applyTransform(t,e=!1){let i=(0,t_.ge)();eg(i,t);for(let t=0;t<this.path.length;t++){let s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(0,ey.Ww)(i,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),(0,eM.HD)(s.latestValues)&&(0,ey.Ww)(i,s.latestValues)}return(0,eM.HD)(this.latestValues)&&(0,ey.Ww)(i,this.latestValues),i}removeTransform(t){let e=(0,t_.ge)();eg(e,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];if(!i.instance||!(0,eM.HD)(i.latestValues))continue;(0,eM.vk)(i.latestValues)&&i.updateSnapshot();let s=(0,t_.ge)();eg(s,i.measurePageBox()),eE(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,s)}return(0,eM.HD)(this.latestValues)&&eE(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==G.uv.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e,i,s,n;let r=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=r.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=r.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=r.isSharedProjectionDirty);let o=!!this.resumingFrom||this!==r;if(!(t||o&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;let{layout:a,layoutId:l}=this.options;if(this.layout&&(a||l)){if(this.resolvedRelativeTargetAt=G.uv.timestamp,!this.targetDelta&&!this.relativeTarget){let t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=(0,t_.ge)(),this.relativeTargetOrigin=(0,t_.ge)(),tH(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),eg(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=(0,t_.ge)(),this.targetWithTransforms=(0,t_.ge)()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),i=this.target,s=this.relativeTarget,n=this.relativeParent.target,tI(i.x,s.x,n.x),tI(i.y,s.y,n.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):eg(this.target,this.layout.layoutBox),(0,ey.o4)(this.target,this.targetDelta)):eg(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=(0,t_.ge)(),this.relativeTargetOrigin=(0,t_.ge)(),tH(this.relativeTargetOrigin,this.target,t.target),eg(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}eG.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||(0,eM.vk)(this.parent.latestValues)||(0,eM.vF)(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;let e=this.getLead(),i=!!this.resumingFrom||this!==e,s=!0;if((this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty))&&(s=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===G.uv.timestamp&&(s=!1),s)return;let{layout:n,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||r))return;eg(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,a=this.treeScale.y;(0,ey.OU)(this.layoutCorrected,this.treeScale,this.path,i),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox);let{target:l}=e;if(!l){this.projectionTransform&&(this.projectionDelta=(0,t_.xU)(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=(0,t_.xU)(),this.projectionDeltaWithTransform=(0,t_.xU)());let h=this.projectionTransform;tG(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=eR(this.projectionDelta,this.treeScale),(this.projectionTransform!==h||this.treeScale.x!==o||this.treeScale.y!==a)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),eG.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){let i,s=this.snapshot,n=s?s.latestValues:{},r={...this.latestValues},o=(0,t_.xU)();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=(0,t_.ge)(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,c=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(e3));this.animationProgress=0,this.mixTargetDelta=e=>{let s=e/1e3;if(e1(o.x,t.x,s),e1(o.y,t.y,s),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,d,m,p,f,v;tH(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=a,v=s,e5(m.x,p.x,f.x,v),e5(m.y,p.y,f.y,v),i&&(h=this.relativeTarget,d=i,h.x.min===d.x.min&&h.x.max===d.x.max&&h.y.min===d.y.min&&h.y.max===d.y.max)&&(this.isProjectionDirty=!1),i||(i=(0,t_.ge)()),eg(i,this.relativeTarget)}l&&(this.animationValues=r,function(t,e,i,s,n,r){n?(t.opacity=(0,tF.j)(0,void 0!==i.opacity?i.opacity:1,em(s)),t.opacityExit=(0,tF.j)(void 0!==e.opacity?e.opacity:1,0,ep(s))):r&&(t.opacity=(0,tF.j)(void 0!==e.opacity?e.opacity:1,void 0!==i.opacity?i.opacity:1,s));for(let n=0;n<eh;n++){let r=`border${el[n]}Radius`,o=ed(e,r),a=ed(i,r);(void 0!==o||void 0!==a)&&(o||(o=0),a||(a=0),0===o||0===a||ec(o)===ec(a)?(t[r]=Math.max((0,tF.j)(eu(o),eu(a),s),0),(tZ.KN.test(a)||tZ.KN.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||i.rotate)&&(t.rotate=(0,tF.j)(e.rotate||0,i.rotate||0,s))}(r,n,this.latestValues,s,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=s},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&((0,G.WG)(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=G.Gt.update(()=>{t4.hasAnimatedSinceResize=!0,this.currentAnimation=(0,eF.z)(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.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);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:s,latestValues:n}=t;if(e&&i&&s){if(this!==t&&this.layout&&s&&e4(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||(0,t_.ge)();let e=tU(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let s=tU(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+s}eg(e,i),(0,ey.Ww)(e,n),tG(this.projectionDeltaWithTransform,this.layoutCorrected,e,n)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ej),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){var t;let{layoutId:e}=this.options;return e&&(null==(t=this.getStack())?void 0:t.lead)||this}getPrevLead(){var t;let{layoutId:e}=this.options;return e?null==(t=this.getStack())?void 0:t.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let s=this.getStack();s&&s.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.rotate||i.rotateX||i.rotateY||i.rotateZ)&&(e=!0),!e)return;let s={};for(let e=0;e<eU.length;e++){let n="rotate"+eU[e];i[n]&&(s[n]=i[n],t.setStaticValue(n,0))}for(let e in t.render(),s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t){var e,i;if(!this.instance||this.isSVG)return;if(!this.isVisible)return eO;let s={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=O(null==t?void 0:t.pointerEvents)||"",s.transform=n?n(this.latestValues,""):"none",s;let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){let e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=O(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!(0,eM.HD)(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}let o=r.animationValues||r.latestValues;this.applyTransformsToTarget(),s.transform=eR(this.projectionDeltaWithTransform,this.treeScale,o),n&&(s.transform=n(o,s.transform));let{x:a,y:l}=this.projectionDelta;for(let t in s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,r.animationValues?s.opacity=r===this?null!=(i=null!=(e=o.opacity)?e:this.latestValues.opacity)?i:1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:s.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0,ei.H){if(void 0===o[t])continue;let{correct:e,applyTo:i}=ei.H[t],n="none"===s.transform?o[t]:e(o[t],r);if(i){let t=i.length;for(let e=0;e<t;e++)s[i[e]]=n}else s[t]=n}return this.options.layoutId&&(s.pointerEvents=r===this?O(null==t?void 0:t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null==(e=t.currentAnimation)?void 0:e.stop()}),this.root.nodes.forEach(eX),this.root.sharedNodes.clear()}}}function eW(t){t.updateLayout()}function eH(t){var e;let i=(null==(e=t.resumeFrom)?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){let{layoutBox:e,measuredBox:s}=t.layout,{animationType:n}=t.options,r=i.source!==t.layout.source;"size"===n?tY(t=>{let s=r?i.measuredBox[t]:i.layoutBox[t],n=tU(s);s.min=e[t].min,s.max=s.min+n}):e4(n,i.layoutBox,e)&&tY(s=>{let n=r?i.measuredBox[s]:i.layoutBox[s],o=tU(e[s]);n.max=n.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+o)});let o=(0,t_.xU)();tG(o,e,i.layoutBox);let a=(0,t_.xU)();r?tG(a,t.applyTransform(s,!0),i.measuredBox):tG(a,e,i.layoutBox);let l=!eb(o),h=!1;if(!t.resumeFrom){let s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){let{snapshot:n,layout:r}=s;if(n&&r){let o=(0,t_.ge)();tH(o,i.layoutBox,n.layoutBox);let a=(0,t_.ge)();tH(a,e,r.layoutBox),eD(o,a)||(h=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:i,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeTargetChanged:h})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function eN(t){eG.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ez(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function eK(t){t.clearSnapshot()}function eX(t){t.clearMeasurements()}function eq(t){t.isLayoutDirty=!1}function e_(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function eY(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function eQ(t){t.resolveTargetDelta()}function eJ(t){t.calcProjection()}function eZ(t){t.resetRotation()}function e0(t){t.removeLeadSnapshot()}function e1(t,e,i){t.translate=(0,tF.j)(e.translate,0,i),t.scale=(0,tF.j)(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function e5(t,e,i,s){t.min=(0,tF.j)(e.min,i.min,s),t.max=(0,tF.j)(e.max,i.max,s)}function e3(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let e2={duration:.45,ease:[.4,0,.1,1]},e7=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),e6=e7("applewebkit/")&&!e7("chrome/")?Math.round:tr.l;function e9(t){t.min=e6(t.min),t.max=e6(t.max)}function e4(t,e,i){return"position"===t||"preserve-aspect"===t&&!tO(eL(e),eL(i),.2)}let e8=eI({attachResizeListener:(t,e)=>H(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),it={current:void 0},ie=eI({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!it.current){let t=new e8({});t.mount(window),t.setOptions({layoutScroll:!0}),it.current=t}return it.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});var ii=i(79964),is=i(85e3);let ir=(t,e)=>P(t)?new is.l(e,{enableHardwareAcceleration:!1}):new ii.M(e,{enableHardwareAcceleration:!0}),io={animation:{Feature:tA},exit:{Feature:tb},inView:{Feature:tm},tap:{Feature:ta},focus:{Feature:ts},hover:{Feature:ti},pan:{Feature:t9},drag:{Feature:t7,ProjectionNode:ie,MeasureLayout:en},layout:{ProjectionNode:ie,MeasureLayout:en}},ia=function(t){function e(i,x={}){return function({preloadedFeatures:t,createVisualElement:e,useRender:i,useVisualState:x,Component:P}){t&&function(t){for(let e in t)p.B[e]={...p.B[e],...t[e]}}(t);let T=(0,s.forwardRef)(function(p,y){var T;let S,E={...(0,s.useContext)(n),...p,layoutId:function({layoutId:t}){let e=(0,s.useContext)(v.L).id;return e&&void 0!==t?e+"-"+t:t}(p)},{isStatic:A}=E,w=function(t){let{initial:e,animate:i}=function(t,e){if((0,d.e)(t)){let{initial:e,animate:i}=t;return{initial:!1===e||(0,c.w)(e)?e:void 0,animate:(0,c.w)(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,s.useContext)(r));return(0,s.useMemo)(()=>({initial:e,animate:i}),[m(e),m(i)])}(p),b=x(p,A);if(!A&&f.B){w.visualElement=function(t,e,i,u){let{visualElement:c}=(0,s.useContext)(r),d=(0,s.useContext)(l),m=(0,s.useContext)(o.t),p=(0,s.useContext)(n).reducedMotion,f=(0,s.useRef)();u=u||d.renderer,!f.current&&u&&(f.current=u(t,{visualState:e,parent:c,props:i,presenceContext:m,blockInitialAnimation:!!m&&!1===m.initial,reducedMotionConfig:p}));let v=f.current;(0,s.useInsertionEffect)(()=>{v&&v.update(i,m)});let g=(0,s.useRef)(!!(i[h.n]&&!window.HandoffComplete));return(0,a.E)(()=>{v&&(v.render(),g.current&&v.animationState&&v.animationState.animateChanges())}),(0,s.useEffect)(()=>{v&&(v.updateFeatures(),!g.current&&v.animationState&&v.animationState.animateChanges(),g.current&&(g.current=!1,window.HandoffComplete=!0))}),v}(P,b,E,e);let i=(0,s.useContext)(g),u=(0,s.useContext)(l).strict;w.visualElement&&(S=w.visualElement.loadFeatures(E,u,t,i))}return s.createElement(r.Provider,{value:w},S&&w.visualElement?s.createElement(S,{visualElement:w.visualElement,...E}):null,i(P,p,(T=w.visualElement,(0,s.useCallback)(t=>{t&&b.mount&&b.mount(t),T&&(t?T.mount(t):T.unmount()),y&&("function"==typeof y?y(t):(0,u.X)(y)&&(y.current=t))},[T])),b,A,w.visualElement))});return T[y]=P,T}(t(i,x))}if("undefined"==typeof Proxy)return e;let i=new Map;return new Proxy(e,{get:(t,s)=>(i.has(s)||i.set(s,e(s)),i.get(s))})}((t,e)=>(function(t,{forwardMotionProps:e=!1},i,n){return{...P(t)?I:W,preloadedFeatures:i,useRender:function(t=!1){return(e,i,n,{latestValues:r},o)=>{let a=(P(e)?function(t,e,i,n){let r=(0,s.useMemo)(()=>{let i=j();return(0,C.B)(i,e,{enableHardwareAcceleration:!1},(0,R.n)(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};w(e,t.style,t),r.style={...e,...r.style}}return r}:function(t,e,i){let n={},r=function(t,e,i){let n=t.style||{},r={};return w(r,n,t),Object.assign(r,function({transformTemplate:t},e,i){return(0,s.useMemo)(()=>{let s=A();return(0,E.O)(s,e,{enableHardwareAcceleration:!i},t),Object.assign({},s.vars,s.style)},[e])}(t,e,i)),t.transformValues?t.transformValues(r):r}(t,e,i);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n})(i,r,o,e),l={...function(t,e,i){let s={};for(let n in t)("values"!==n||"object"!=typeof t.values)&&(L(n)||!0===i&&D(n)||!e&&!D(n)||t.draggable&&n.startsWith("onDrag"))&&(s[n]=t[n]);return s}(i,"string"==typeof e,t),...a,ref:n},{children:h}=i,u=(0,s.useMemo)(()=>(0,S.S)(h)?h.get():h,[h]);return(0,s.createElement)(e,{...l,children:u})}}(e),createVisualElement:n,Component:t}})(t,e,io,ir))},78386:(t,e,i)=>{i.d(e,{L:()=>s});let s=(0,i(7620).createContext)({})},90548:(t,e,i)=>{i.d(e,{t:()=>s});let s=(0,i(7620).createContext)(null)},96303:(t,e,i)=>{i.d(e,{E:()=>n});var s=i(7620);let n=i(96035).B?s.useLayoutEffect:s.useEffect}}]);