Error generating stack: `+r.message+` `+r.stack}}var Yt=Object.prototype.hasOwnProperty,li=t.unstable_scheduleCallback,Ea=t.unstable_cancelCallback,Vt=t.unstable_shouldYield,Fn=t.unstable_requestPaint,St=t.unstable_now,Is=t.unstable_getCurrentPriorityLevel,Xn=t.unstable_ImmediatePriority,Da=t.unstable_UserBlockingPriority,ps=t.unstable_NormalPriority,ka=t.unstable_LowPriority,Ln=t.unstable_IdlePriority,ri=t.log,cn=t.unstable_setDisableYieldValue,Ft=null,ft=null;function Ut(e){if(typeof ri=="function"&&cn(e),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(Ft,e)}catch{}}var Ct=Math.clz32?Math.clz32:un,Gs=Math.log,Kn=Math.LN2;function un(e){return e>>>=0,e===0?32:31-(Gs(e)/Kn|0)|0}var gs=256,Qn=262144,Pt=4194304;function Xt(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function be(e,n,a){var r=e.pendingLanes;if(r===0)return 0;var u=0,h=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var j=r&134217727;return j!==0?(r=j&~h,r!==0?u=Xt(r):(v&=j,v!==0?u=Xt(v):a||(a=j&~e,a!==0&&(u=Xt(a))))):(j=r&~h,j!==0?u=Xt(j):v!==0?u=Xt(v):a||(a=r&~e,a!==0&&(u=Xt(a)))),u===0?0:n!==0&&n!==u&&(n&h)===0&&(h=u&-u,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:u}function Fe(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function ht(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function At(){var e=Pt;return Pt<<=1,(Pt&62914560)===0&&(Pt=4194304),e}function Zn(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Xe(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ht(e,n,a,r,u,h){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var j=e.entanglements,E=e.expirationTimes,U=e.hiddenUpdates;for(a=v&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var kS=/[\n"\\]/g;function Sn(e){return e.replace(kS,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Gc(e,n,a,r,u,h,v,j){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+wn(n)):e.value!==""+wn(n)&&(e.value=""+wn(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Yc(e,v,wn(n)):a!=null?Yc(e,v,wn(a)):r!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+wn(j):e.removeAttribute("name")}function ym(e,n,a,r,u,h,v,j){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Ic(e);return}a=a!=null?""+wn(a):"",n=n!=null?""+wn(n):a,j||n===e.value||(e.value=n),e.defaultValue=n}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=j?e.checked:!!r,e.defaultChecked=!!r,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Ic(e)}function Yc(e,n,a){n==="number"&&Rr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function di(e,n,a,r){if(e=e.options,n){n={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zc=!1;if(ws)try{var fl={};Object.defineProperty(fl,"passive",{get:function(){Zc=!0}}),window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch{Zc=!1}var Xs=null,Jc=null,Or=null;function Tm(){if(Or)return Or;var e,n=Jc,a=n.length,r,u="value"in Xs?Xs.value:Xs.textContent,h=u.length;for(e=0;e=pl),km=" ",Rm=!1;function Mm(e,n){switch(e){case"keyup":return a1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Om(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function l1(e,n){switch(e){case"compositionend":return Om(n);case"keypress":return n.which!==32?null:(Rm=!0,km);case"textInput":return e=n.data,e===km&&Rm?null:e;default:return null}}function r1(e,n){if(pi)return e==="compositionend"||!su&&Mm(e,n)?(e=Tm(),Or=Jc=Xs=null,pi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Hm(a)}}function $m(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?$m(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Im(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Rr(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Rr(e.document)}return n}function lu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var p1=ws&&"documentMode"in document&&11>=document.documentMode,gi=null,ru=null,bl=null,ou=!1;function Gm(e,n,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ou||gi==null||gi!==Rr(r)||(r=gi,"selectionStart"in r&&lu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bl&&xl(bl,r)||(bl=r,r=Ao(ru,"onSelect"),0>=v,u-=v,es=1<<32-Ct(n)+u|a<Ce?(Me=pe,pe=null):Me=pe.sibling;var Ue=q(L,pe,V[Ce],J);if(Ue===null){pe===null&&(pe=Me);break}e&&pe&&Ue.alternate===null&&n(L,pe),M=h(Ue,M,Ce),Ve===null?xe=Ue:Ve.sibling=Ue,Ve=Ue,pe=Me}if(Ce===V.length)return a(L,pe),Oe&&js(L,Ce),xe;if(pe===null){for(;CeCe?(Me=pe,pe=null):Me=pe.sibling;var ga=q(L,pe,Ue.value,J);if(ga===null){pe===null&&(pe=Me);break}e&&pe&&ga.alternate===null&&n(L,pe),M=h(ga,M,Ce),Ve===null?xe=ga:Ve.sibling=ga,Ve=ga,pe=Me}if(Ue.done)return a(L,pe),Oe&&js(L,Ce),xe;if(pe===null){for(;!Ue.done;Ce++,Ue=V.next())Ue=W(L,Ue.value,J),Ue!==null&&(M=h(Ue,M,Ce),Ve===null?xe=Ue:Ve.sibling=Ue,Ve=Ue);return Oe&&js(L,Ce),xe}for(pe=r(pe);!Ue.done;Ce++,Ue=V.next())Ue=Y(pe,L,Ce,Ue.value,J),Ue!==null&&(e&&Ue.alternate!==null&&pe.delete(Ue.key===null?Ce:Ue.key),M=h(Ue,M,Ce),Ve===null?xe=Ue:Ve.sibling=Ue,Ve=Ue);return e&&pe.forEach(function(Lj){return n(L,Lj)}),Oe&&js(L,Ce),xe}function Ge(L,M,V,J){if(typeof V=="object"&&V!==null&&V.type===N&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case S:e:{for(var xe=V.key;M!==null;){if(M.key===xe){if(xe=V.type,xe===N){if(M.tag===7){a(L,M.sibling),J=u(M,V.props.children),J.return=L,L=J;break e}}else if(M.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===$&&Pa(xe)===M.type){a(L,M.sibling),J=u(M,V.props),Nl(J,V),J.return=L,L=J;break e}a(L,M);break}else n(L,M);M=M.sibling}V.type===N?(J=La(V.props.children,L.mode,J,V.key),J.return=L,L=J):(J=$r(V.type,V.key,V.props,null,L.mode,J),Nl(J,V),J.return=L,L=J)}return v(L);case T:e:{for(xe=V.key;M!==null;){if(M.key===xe)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){a(L,M.sibling),J=u(M,V.children||[]),J.return=L,L=J;break e}else{a(L,M);break}else n(L,M);M=M.sibling}J=pu(V,L.mode,J),J.return=L,L=J}return v(L);case $:return V=Pa(V),Ge(L,M,V,J)}if(ae(V))return he(L,M,V,J);if(H(V)){if(xe=H(V),typeof xe!="function")throw Error(l(150));return V=xe.call(V),ve(L,M,V,J)}if(typeof V.then=="function")return Ge(L,M,Qr(V),J);if(V.$$typeof===C)return Ge(L,M,Yr(L,V),J);Zr(L,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,M!==null&&M.tag===6?(a(L,M.sibling),J=u(M,V),J.return=L,L=J):(a(L,M),J=mu(V,L.mode,J),J.return=L,L=J),v(L)):a(L,M)}return function(L,M,V,J){try{Tl=0;var xe=Ge(L,M,V,J);return Ai=null,xe}catch(pe){if(pe===Ci||pe===Xr)throw pe;var Ve=fn(29,pe,null,L.mode);return Ve.lanes=J,Ve.return=L,Ve}}}var qa=mp(!0),pp=mp(!1),Ws=!1;function Au(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ea(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ta(e,n,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Pe&2)!==0){var u=r.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),r.pending=n,n=qr(e),Jm(e,null,a),n}return Hr(e,r,n,a),qr(e)}function Cl(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var r=n.lanes;r&=e.pendingLanes,a|=r,n.lanes=a,Dt(e,a)}}function Du(e,n){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var u=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?u=h=v:h=h.next=v,a=a.next}while(a!==null);h===null?u=h=n:h=h.next=n}else u=h=n;a={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var ku=!1;function Al(){if(ku){var e=Ni;if(e!==null)throw e}}function El(e,n,a,r){ku=!1;var u=e.updateQueue;Ws=!1;var h=u.firstBaseUpdate,v=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var E=j,U=E.next;E.next=null,v===null?h=U:v.next=U,v=E;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,j=Q.lastBaseUpdate,j!==v&&(j===null?Q.firstBaseUpdate=U:j.next=U,Q.lastBaseUpdate=E))}if(h!==null){var W=u.baseState;v=0,Q=U=E=null,j=h;do{var q=j.lane&-536870913,Y=q!==j.lane;if(Y?(Re&q)===q:(r&q)===q){q!==0&&q===Ti&&(ku=!0),Q!==null&&(Q=Q.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var he=e,ve=j;q=n;var Ge=a;switch(ve.tag){case 1:if(he=ve.payload,typeof he=="function"){W=he.call(Ge,W,q);break e}W=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ve.payload,q=typeof he=="function"?he.call(Ge,W,q):he,q==null)break e;W=g({},W,q);break e;case 2:Ws=!0}}q=j.callback,q!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=u.callbacks,Y===null?u.callbacks=[q]:Y.push(q))}else Y={lane:q,tag:j.tag,payload:j.payload,callback:j.callback,next:null},Q===null?(U=Q=Y,E=W):Q=Q.next=Y,v|=q;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;Y=j,j=Y.next,Y.next=null,u.lastBaseUpdate=Y,u.shared.pending=null}}while(!0);Q===null&&(E=W),u.baseState=E,u.firstBaseUpdate=U,u.lastBaseUpdate=Q,h===null&&(u.shared.lanes=0),la|=v,e.lanes=v,e.memoizedState=W}}function gp(e,n){if(typeof e!="function")throw Error(l(191,e));e.call(n)}function yp(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var v=O.T,j={};O.T=j,Ku(e,!1,n,a);try{var E=u(),U=O.S;if(U!==null&&U(j,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var Q=T1(E,r);Rl(e,n,Q,yn(e))}else Rl(e,n,r,yn(e))}catch(W){Rl(e,n,{then:function(){},status:"rejected",reason:W},yn())}finally{G.p=h,v!==null&&j.types!==null&&(v.types=j.types),O.T=v}}function k1(){}function Fu(e,n,a,r){if(e.tag!==5)throw Error(l(476));var u=Kp(e).queue;Xp(e,u,n,Z,a===null?k1:function(){return Qp(e),a(r)})}function Kp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Qp(e){var n=Kp(e);n.next===null&&(n=e.alternate.memoizedState),Rl(e,n.next.queue,{},yn())}function Xu(){return Ot(Xl)}function Zp(){return dt().memoizedState}function Jp(){return dt().memoizedState}function R1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=yn();e=ea(a);var r=ta(n,e,a);r!==null&&(ln(r,n,a),Cl(r,n,a)),n={cache:ju()},e.payload=n;return}n=n.return}}function M1(e,n,a){var r=yn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ro(e)?e0(n,a):(a=fu(e,n,a,r),a!==null&&(ln(a,e,r),t0(a,n,r)))}function Wp(e,n,a){var r=yn();Rl(e,n,a,r)}function Rl(e,n,a,r){var u={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ro(e))e0(n,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var v=n.lastRenderedState,j=h(v,a);if(u.hasEagerState=!0,u.eagerState=j,dn(j,v))return Hr(e,n,u,0),Ye===null&&Pr(),!1}catch{}if(a=fu(e,n,u,r),a!==null)return ln(a,e,r),t0(a,n,r),!0}return!1}function Ku(e,n,a,r){if(r={lane:2,revertLane:Ad(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ro(e)){if(n)throw Error(l(479))}else n=fu(e,a,r,2),n!==null&&ln(n,e,2)}function ro(e){var n=e.alternate;return e===Te||n!==null&&n===Te}function e0(e,n){Di=eo=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function t0(e,n,a){if((a&4194048)!==0){var r=n.lanes;r&=e.pendingLanes,a|=r,n.lanes=a,Dt(e,a)}}var Ml={readContext:Ot,use:so,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};Ml.useEffectEvent=lt;var n0={readContext:Ot,use:so,useCallback:function(e,n){return Qt().memoizedState=[e,n===void 0?null:n],e},useContext:Ot,useEffect:Up,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,io(4194308,4,$p.bind(null,n,e),a)},useLayoutEffect:function(e,n){return io(4194308,4,e,n)},useInsertionEffect:function(e,n){io(4,2,e,n)},useMemo:function(e,n){var a=Qt();n=n===void 0?null:n;var r=e();if($a){Ut(!0);try{e()}finally{Ut(!1)}}return a.memoizedState=[r,n],r},useReducer:function(e,n,a){var r=Qt();if(a!==void 0){var u=a(n);if($a){Ut(!0);try{a(n)}finally{Ut(!1)}}}else u=n;return r.memoizedState=r.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},r.queue=e,e=e.dispatch=M1.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var n=Qt();return e={current:e},n.memoizedState=e},useState:function(e){e=qu(e);var n=e.queue,a=Wp.bind(null,Te,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Gu,useDeferredValue:function(e,n){var a=Qt();return Yu(a,e,n)},useTransition:function(){var e=qu(!1);return e=Xp.bind(null,Te,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var r=Te,u=Qt();if(Oe){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),Ye===null)throw Error(l(349));(Re&127)!==0||jp(r,n,a)}u.memoizedState=a;var h={value:a,getSnapshot:n};return u.queue=h,Up(Np.bind(null,r,h,e),[e]),r.flags|=2048,Ri(9,{destroy:void 0},Tp.bind(null,r,h,a,n),null),a},useId:function(){var e=Qt(),n=Ye.identifierPrefix;if(Oe){var a=ts,r=es;a=(r&~(1<<32-Ct(r)-1)).toString(32)+a,n="_"+n+"R_"+a,a=to++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof r.is=="string"?v.createElement("select",{is:r.is}):v.createElement("select"),r.multiple?h.multiple=!0:r.size&&(h.size=r.size);break;default:h=typeof r.is=="string"?v.createElement(u,{is:r.is}):v.createElement(u)}}h[mt]=n,h[Rt]=r;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=h;e:switch(Lt(h,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Ds(n)}}return Je(n),cd(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==r&&Ds(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(l(166));if(e=de.current,Si(n)){if(e=n.stateNode,a=n.memoizedProps,r=null,u=Mt,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}e[mt]=n,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||wg(e.nodeValue,a)),e||Zs(n,!0)}else e=Eo(e).createTextNode(r),e[mt]=n,n.stateNode=e}return Je(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(r=Si(n),a!==null){if(e===null){if(!r)throw Error(l(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[mt]=n}else za(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Je(n),e=!1}else a=bu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(mn(n),n):(mn(n),null);if((n.flags&128)!==0)throw Error(l(558))}return Je(n),null;case 13:if(r=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Si(n),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(l(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(l(317));u[mt]=n}else za(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Je(n),u=!1}else u=bu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(mn(n),n):(mn(n),null)}return mn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=n.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),h=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(h=r.memoizedState.cachePool.pool),h!==u&&(r.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),ho(n,n.updateQueue),Je(n),null);case 4:return ge(),e===null&&Rd(n.stateNode.containerInfo),Je(n),null;case 10:return Ns(n.type),Je(n),null;case 19:if(Ne(ut),r=n.memoizedState,r===null)return Je(n),null;if(u=(n.flags&128)!==0,h=r.rendering,h===null)if(u)_l(r,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Wr(e),h!==null){for(n.flags|=128,_l(r,!1),e=h.updateQueue,n.updateQueue=e,ho(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Wm(a,e),a=a.sibling;return se(ut,ut.current&1|2),Oe&&js(n,r.treeForkCount),n.child}e=e.sibling}r.tail!==null&&St()>xo&&(n.flags|=128,u=!0,_l(r,!1),n.lanes=4194304)}else{if(!u)if(e=Wr(h),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,ho(n,e),_l(r,!0),r.tail===null&&r.tailMode==="hidden"&&!h.alternate&&!Oe)return Je(n),null}else 2*St()-r.renderingStartTime>xo&&a!==536870912&&(n.flags|=128,u=!0,_l(r,!1),n.lanes=4194304);r.isBackwards?(h.sibling=n.child,n.child=h):(e=r.last,e!==null?e.sibling=h:n.child=h,r.last=h)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=St(),e.sibling=null,a=ut.current,se(ut,u?a&1|2:a&1),Oe&&js(n,r.treeForkCount),e):(Je(n),null);case 22:case 23:return mn(n),Mu(),r=n.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(a&536870912)!==0&&(n.flags&128)===0&&(Je(n),n.subtreeFlags&6&&(n.flags|=8192)):Je(n),a=n.updateQueue,a!==null&&ho(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==a&&(n.flags|=2048),e!==null&&Ne(Ua),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Ns(pt),Je(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function B1(e,n){switch(yu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ns(pt),ge(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return wt(n),null;case 31:if(n.memoizedState!==null){if(mn(n),n.alternate===null)throw Error(l(340));za()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(mn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(l(340));za()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ne(ut),null;case 4:return ge(),null;case 10:return Ns(n.type),null;case 22:case 23:return mn(n),Mu(),e!==null&&Ne(Ua),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Ns(pt),null;case 25:return null;default:return null}}function C0(e,n){switch(yu(n),n.tag){case 3:Ns(pt),ge();break;case 26:case 27:case 5:wt(n);break;case 4:ge();break;case 31:n.memoizedState!==null&&mn(n);break;case 13:mn(n);break;case 19:Ne(ut);break;case 10:Ns(n.type);break;case 22:case 23:mn(n),Mu(),e!==null&&Ne(Ua);break;case 24:Ns(pt)}}function Ll(e,n){try{var a=n.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var u=r.next;a=u;do{if((a.tag&e)===e){r=void 0;var h=a.create,v=a.inst;r=h(),v.destroy=r}a=a.next}while(a!==u)}}catch(j){qe(n,n.return,j)}}function aa(e,n,a){try{var r=n.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var h=u.next;r=h;do{if((r.tag&e)===e){var v=r.inst,j=v.destroy;if(j!==void 0){v.destroy=void 0,u=n;var E=a,U=j;try{U()}catch(Q){qe(u,E,Q)}}}r=r.next}while(r!==h)}}catch(Q){qe(n,n.return,Q)}}function A0(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{yp(n,a)}catch(r){qe(e,e.return,r)}}}function E0(e,n,a){a.props=Ia(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){qe(e,n,r)}}function zl(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(u){qe(e,n,u)}}function ns(e,n){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(u){qe(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){qe(e,n,u)}else a.current=null}function D0(e){var n=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(u){qe(e,e.return,u)}}function ud(e,n,a){try{var r=e.stateNode;ij(r,e.type,a,n),r[Rt]=n}catch(u){qe(e,e.return,u)}}function k0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&da(e.type)||e.tag===4}function dd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||k0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&da(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fd(e,n,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=vs));else if(r!==4&&(r===27&&da(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(fd(e,n,a),e=e.sibling;e!==null;)fd(e,n,a),e=e.sibling}function mo(e,n,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(r!==4&&(r===27&&da(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mo(e,n,a),e=e.sibling;e!==null;)mo(e,n,a),e=e.sibling}function R0(e){var n=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);Lt(n,r,a),n[mt]=e,n[Rt]=a}catch(h){qe(e,e.return,h)}}var ks=!1,xt=!1,hd=!1,M0=typeof WeakSet=="function"?WeakSet:Set,Et=null;function V1(e,n){if(e=e.containerInfo,_d=Lo,e=Im(e),lu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var u=r.anchorOffset,h=r.focusNode;r=r.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var v=0,j=-1,E=-1,U=0,Q=0,W=e,q=null;t:for(;;){for(var Y;W!==a||u!==0&&W.nodeType!==3||(j=v+u),W!==h||r!==0&&W.nodeType!==3||(E=v+r),W.nodeType===3&&(v+=W.nodeValue.length),(Y=W.firstChild)!==null;)q=W,W=Y;for(;;){if(W===e)break t;if(q===a&&++U===u&&(j=v),q===h&&++Q===r&&(E=v),(Y=W.nextSibling)!==null)break;W=q,q=W.parentNode}W=Y}a=j===-1||E===-1?null:{start:j,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ld={focusedElem:e,selectionRange:a},Lo=!1,Et=n;Et!==null;)if(n=Et,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Et=e;else for(;Et!==null;){switch(n=Et,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Lt(h,r,a),h[mt]=e,Be(h),r=h;break e;case"link":var v=Vg("link","href",u).get(r+(a.href||""));if(v){for(var j=0;jGe&&(v=Ge,Ge=ve,ve=v);var L=qm(j,ve),M=qm(j,Ge);if(L&&M&&(Y.rangeCount!==1||Y.anchorNode!==L.node||Y.anchorOffset!==L.offset||Y.focusNode!==M.node||Y.focusOffset!==M.offset)){var V=W.createRange();V.setStart(L.node,L.offset),Y.removeAllRanges(),ve>Ge?(Y.addRange(V),Y.extend(M.node,M.offset)):(V.setEnd(M.node,M.offset),Y.addRange(V))}}}}for(W=[],Y=j;Y=Y.parentNode;)Y.nodeType===1&&W.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;ja?32:a,O.T=null,a=vd,vd=null;var h=oa,v=Ls;if(jt=0,zi=oa=null,Ls=0,(Pe&6)!==0)throw Error(l(331));var j=Pe;if(Pe|=4,$0(h.current),P0(h,h.current,v,a),Pe=j,ql(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Ft,h)}catch{}return!0}finally{G.p=u,O.T=r,rg(e,n)}}function cg(e,n,a){n=Tn(a,n),n=Wu(e.stateNode,n,2),e=ta(e,n,2),e!==null&&(Xe(e,2),ss(e))}function qe(e,n,a){if(e.tag===3)cg(e,e,a);else for(;n!==null;){if(n.tag===3){cg(n,e,a);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ra===null||!ra.has(r))){e=Tn(a,e),a=u0(2),r=ta(n,a,2),r!==null&&(d0(a,r,n,e),Xe(r,2),ss(r));break}}n=n.return}}function Td(e,n,a){var r=e.pingCache;if(r===null){r=e.pingCache=new H1;var u=new Set;r.set(n,u)}else u=r.get(n),u===void 0&&(u=new Set,r.set(n,u));u.has(a)||(gd=!0,u.add(a),e=Y1.bind(null,e,n,a),n.then(e,e))}function Y1(e,n,a){var r=e.pingCache;r!==null&&r.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ye===e&&(Re&a)===a&&(rt===4||rt===3&&(Re&62914560)===Re&&300>St()-yo?(Pe&2)===0&&Bi(e,0):yd|=a,Li===Re&&(Li=0)),ss(e)}function ug(e,n){n===0&&(n=At()),e=_a(e,n),e!==null&&(Xe(e,n),ss(e))}function F1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),ug(e,a)}function X1(e,n){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(l(314))}r!==null&&r.delete(n),ug(e,a)}function K1(e,n){return li(e,n)}var To=null,Ui=null,Nd=!1,No=!1,Cd=!1,ua=0;function ss(e){e!==Ui&&e.next===null&&(Ui===null?To=Ui=e:Ui=Ui.next=e),No=!0,Nd||(Nd=!0,Z1())}function ql(e,n){if(!Cd&&No){Cd=!0;do for(var a=!1,r=To;r!==null;){if(e!==0){var u=r.pendingLanes;if(u===0)var h=0;else{var v=r.suspendedLanes,j=r.pingedLanes;h=(1<<31-Ct(42|e)+1)-1,h&=u&~(v&~j),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,mg(r,h))}else h=Re,h=be(r,r===Ye?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||Fe(r,h)||(a=!0,mg(r,h));r=r.next}while(a);Cd=!1}}function Q1(){dg()}function dg(){No=Nd=!1;var e=0;ua!==0&&rj()&&(e=ua);for(var n=St(),a=null,r=To;r!==null;){var u=r.next,h=fg(r,n);h===0?(r.next=null,a===null?To=u:a.next=u,u===null&&(Ui=a)):(a=r,(e!==0||(h&3)!==0)&&(No=!0)),r=u}jt!==0&&jt!==5||ql(e),ua!==0&&(ua=0)}function fg(e,n){for(var a=e.suspendedLanes,r=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0j)break;var Q=E.transferSize,W=E.initiatorType;Q&&Sg(W)&&(E=E.responseEnd,v+=Q*(E"u"?null:document;function _g(e,n,a){var r=Pi;if(r&&typeof n=="string"&&n){var u=Sn(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Og.has(u)||(Og.add(u),e={rel:e,crossOrigin:a,href:n},r.querySelector(u)===null&&(n=r.createElement("link"),Lt(n,"link",e),Be(n),r.head.appendChild(n)))}}function gj(e){zs.D(e),_g("dns-prefetch",e,null)}function yj(e,n){zs.C(e,n),_g("preconnect",e,n)}function xj(e,n,a){zs.L(e,n,a);var r=Pi;if(r&&e&&n){var u='link[rel="preload"][as="'+Sn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Sn(a.imageSizes)+'"]')):u+='[href="'+Sn(e)+'"]';var h=u;switch(n){case"style":h=Hi(e);break;case"script":h=qi(e)}kn.has(h)||(e=g({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),kn.set(h,e),r.querySelector(u)!==null||n==="style"&&r.querySelector(Yl(h))||n==="script"&&r.querySelector(Fl(h))||(n=r.createElement("link"),Lt(n,"link",e),Be(n),r.head.appendChild(n)))}}function bj(e,n){zs.m(e,n);var a=Pi;if(a&&e){var r=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Sn(r)+'"][href="'+Sn(e)+'"]',h=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=qi(e)}if(!kn.has(h)&&(e=g({rel:"modulepreload",href:e},n),kn.set(h,e),a.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fl(h)))return}r=a.createElement("link"),Lt(r,"link",e),Be(r),a.head.appendChild(r)}}}function vj(e,n,a){zs.S(e,n,a);var r=Pi;if(r&&e){var u=et(r).hoistableStyles,h=Hi(e);n=n||"default";var v=u.get(h);if(!v){var j={loading:0,preload:null};if(v=r.querySelector(Yl(h)))j.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},a),(a=kn.get(h))&&qd(e,a);var E=v=r.createElement("link");Be(E),Lt(E,"link",e),E._p=new Promise(function(U,Q){E.onload=U,E.onerror=Q}),E.addEventListener("load",function(){j.loading|=1}),E.addEventListener("error",function(){j.loading|=2}),j.loading|=4,ko(v,n,r)}v={type:"stylesheet",instance:v,count:1,state:j},u.set(h,v)}}}function wj(e,n){zs.X(e,n);var a=Pi;if(a&&e){var r=et(a).hoistableScripts,u=qi(e),h=r.get(u);h||(h=a.querySelector(Fl(u)),h||(e=g({src:e,async:!0},n),(n=kn.get(u))&&$d(e,n),h=a.createElement("script"),Be(h),Lt(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(u,h))}}function Sj(e,n){zs.M(e,n);var a=Pi;if(a&&e){var r=et(a).hoistableScripts,u=qi(e),h=r.get(u);h||(h=a.querySelector(Fl(u)),h||(e=g({src:e,async:!0,type:"module"},n),(n=kn.get(u))&&$d(e,n),h=a.createElement("script"),Be(h),Lt(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(u,h))}}function Lg(e,n,a,r){var u=(u=de.current)?Do(u):null;if(!u)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Hi(a.href),a=et(u).hoistableStyles,r=a.get(n),r||(r={type:"style",instance:null,count:0,state:null},a.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Hi(a.href);var h=et(u).hoistableStyles,v=h.get(e);if(v||(u=u.ownerDocument||u,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,v),(h=u.querySelector(Yl(e)))&&!h._p&&(v.instance=h,v.state.loading=5),kn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},kn.set(e,a),h||jj(u,e,a,v.state))),n&&r===null)throw Error(l(528,""));return v}if(n&&r!==null)throw Error(l(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=qi(a),a=et(u).hoistableScripts,r=a.get(n),r||(r={type:"script",instance:null,count:0,state:null},a.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Hi(e){return'href="'+Sn(e)+'"'}function Yl(e){return'link[rel="stylesheet"]['+e+"]"}function zg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function jj(e,n,a,r){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=e.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),Lt(n,"link",a),Be(n),e.head.appendChild(n))}function qi(e){return'[src="'+Sn(e)+'"]'}function Fl(e){return"script[async]"+e}function Bg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var r=e.querySelector('style[data-href~="'+Sn(a.href)+'"]');if(r)return n.instance=r,Be(r),r;var u=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Be(r),Lt(r,"style",u),ko(r,a.precedence,e),n.instance=r;case"stylesheet":u=Hi(a.href);var h=e.querySelector(Yl(u));if(h)return n.state.loading|=4,n.instance=h,Be(h),h;r=zg(a),(u=kn.get(u))&&qd(r,u),h=(e.ownerDocument||e).createElement("link"),Be(h);var v=h;return v._p=new Promise(function(j,E){v.onload=j,v.onerror=E}),Lt(h,"link",r),n.state.loading|=4,ko(h,a.precedence,e),n.instance=h;case"script":return h=qi(a.src),(u=e.querySelector(Fl(h)))?(n.instance=u,Be(u),u):(r=a,(u=kn.get(h))&&(r=g({},a),$d(r,u)),e=e.ownerDocument||e,u=e.createElement("script"),Be(u),Lt(u,"link",r),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,ko(r,a.precedence,e));return n.instance}function ko(e,n,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,h=u,v=0;v title"):null)}function Tj(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Nj(e,n,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Hi(r.href),h=n.querySelector(Yl(u));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Mo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,Be(h);return}h=n.ownerDocument||n,r=zg(r),(u=kn.get(u))&&qd(r,u),h=h.createElement("link"),Be(h);var v=h;v._p=new Promise(function(j,E){v.onload=j,v.onerror=E}),Lt(h,"link",r),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Mo.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Id=0;function Cj(e,n){return e.stylesheets&&e.count===0&&_o(e,e.stylesheets),0Id?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function Mo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_o(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Oo=null;function _o(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Oo=new Map,n.forEach(Aj,e),Oo=null,Mo.call(e))}function Aj(e,n){if(!(n.state.loading&4)){var a=Oo.get(e);if(a)var r=a.get(null);else{a=new Map,Oo.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(s){console.error(s)}}return t(),Zd.exports=yT(),Zd.exports}var bT=xT();const vT="modulepreload",wT=function(t){return"/"+t},dy={},ct=function(s,i,l){let o=Promise.resolve();if(i&&i.length>0){let p=function(y){return Promise.all(y.map(x=>Promise.resolve(x).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=f?.nonce||f?.getAttribute("nonce");o=p(i.map(y=>{if(y=wT(y),y in dy)return;dy[y]=!0;const x=y.endsWith(".css"),g=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${g}`))return;const w=document.createElement("link");if(w.rel=x?"stylesheet":vT,x||(w.as="script"),w.crossOrigin="",w.href=y,m&&w.setAttribute("nonce",m),document.head.appendChild(w),x)return new Promise((S,T)=>{w.addEventListener("load",S),w.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${y}`)))})}))}function d(f){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=f,window.dispatchEvent(m),!m.defaultPrevented)throw f}return o.then(f=>{for(const m of f||[])m.status==="rejected"&&d(m.reason);return s().catch(d)})};let Nt;{console.warn("Supabase credentials not configured - auth/realtime disabled. Add VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY to enable.");const t={error:new Error("Auth not configured. Add VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY to Railway.")},s={on:()=>s,subscribe:i=>(i&&i("SUBSCRIBED"),s),unsubscribe:()=>Promise.resolve()};Nt={auth:{getSession:async()=>({data:{session:null},error:null}),onAuthStateChange:()=>({data:{subscription:{unsubscribe:()=>{}}}}),signInWithOtp:async()=>t,signInWithPassword:async()=>t,verifyOtp:async()=>t,signOut:async()=>({error:null})},channel:()=>s,removeChannel:()=>Promise.resolve()}}const _b=b.createContext(null),fy=["tonymccabe53@gmail.com","angelica@rateright.com.au","admin@rateright.com.au","cormick@rateright.com.au","stephen@rftn.com.au","cathyrei@gmail.com","markus@rateright.com.au","ytingmae@gmail.com","entero.vena@gmail.com"],hy={"tonymccabe53@gmail.com":"Tony","angelica@rateright.com.au":"Angelica","admin@rateright.com.au":"Michael","cormick@rateright.com.au":"Cormick","stephen@rftn.com.au":"Stephen","cathyrei@gmail.com":"Cathy","markus@rateright.com.au":"Markus","ytingmae@gmail.com":"Mae","entero.vena@gmail.com":"Vena"},Lb={"admin@rateright.com.au":"admin","tonymccabe53@gmail.com":"closer"};async function my(t){try{const s=new Promise(l=>{setTimeout(()=>{console.warn("[Auth] Database user check timed out after 5s"),l(null)},5e3)}),i=Nt.from("user_xp").select("user_id, display_name, role, is_active").eq("email",t.toLowerCase()).eq("is_active",!0).single().then(({data:l,error:o})=>o||!l?null:l);return await Promise.race([i,s])}catch(s){return console.warn("[Auth] Database user check failed:",s.message),null}}async function ST(t,s,i){try{const{data:l}=await Nt.from("user_xp").select("user_id").eq("user_id",t).single();l||(await Nt.from("user_xp").insert({user_id:t,display_name:i,email:s.toLowerCase(),role:Lb[s.toLowerCase()]||"caller",level:1,total_xp:0,is_active:!0}),console.log("[Auth] User synced to database:",s))}catch(l){console.warn("[Auth] User sync failed:",l.message)}}function jT({children:t}){const[s,i]=b.useState(null),[l,o]=b.useState(!0),[d,f]=b.useState({});b.useEffect(()=>{(async()=>{try{const{data:S}=await Nt.from("user_xp").select("user_id, display_name").eq("is_active",!0),T={};(S||[]).forEach(N=>{T[N.user_id]=N.display_name}),f(T)}catch(S){console.warn("[Auth] Failed to load user map:",S.message)}})()},[]);const m=async w=>{const S=w.email,T=await my(S);return T?(i({...w,displayName:T.display_name,role:T.role||"caller"}),!0):fy.includes(S)?(i({...w,displayName:hy[S]||S.split("@")[0],role:Lb[S]||"caller"}),ST(w.id,S,hy[S]||S.split("@")[0]),!0):!1};b.useEffect(()=>{console.log("[Auth] Checking session...");const w=setTimeout(()=>{console.warn("[Auth] Session check timed out after 5s - proceeding without auth"),o(!1)},5e3);Nt.auth.getSession().then(async({data:{session:T}})=>{clearTimeout(w),console.log("[Auth] Session check complete:",T?"has session":"no session"),T?.user&&(await m(T.user)||Nt.auth.signOut()),o(!1)}).catch(T=>{console.error("[Auth] Session check failed:",T.message),clearTimeout(w),o(!1)});const{data:{subscription:S}}=Nt.auth.onAuthStateChange(async(T,N)=>{N?.user?await m(N.user)||(Nt.auth.signOut(),i(null)):i(null)});return()=>S.unsubscribe()},[]);const g={user:s,loading:l,signIn:async(w,S)=>{const T=w.toLowerCase();if(!await my(T)&&!fy.includes(T))throw new Error("Access denied. This app is invite-only.");console.log("[Auth] Attempting login for:",T);const R=new Promise((B,_)=>{setTimeout(()=>{console.error("[Auth] Login timed out after 10s"),_(new Error("Login timed out. Check your internet connection and try again."))},1e4)}),D=Nt.auth.signInWithPassword({email:T,password:S}).then(B=>(console.log("[Auth] Supabase responded:",B.error?B.error.message:"success"),B)),{data:A,error:C}=await Promise.race([D,R]);if(C)throw C;return A},signOut:async()=>{const{error:w}=await Nt.auth.signOut();if(w)throw w;i(null)},isAuthenticated:!!s,userMap:d,getAssigneeName:w=>w?d[w]||"Unknown":"Unassigned"};return c.jsx(_b.Provider,{value:g,children:t})}function br(){const t=b.useContext(_b);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t}const xh=b.createContext({});function bh(t){const s=b.useRef(null);return s.current===null&&(s.current=t()),s.current}const zb=typeof window<"u",Bb=zb?b.useLayoutEffect:b.useEffect,Cc=b.createContext(null);function vh(t,s){t.indexOf(s)===-1&&t.push(s)}function wh(t,s){const i=t.indexOf(s);i>-1&&t.splice(i,1)}const cs=(t,s,i)=>i>s?s:i{};const Ps={},Vb=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ub(t){return typeof t=="object"&&t!==null}const Pb=t=>/^0[^.\s]+$/u.test(t);function jh(t){let s;return()=>(s===void 0&&(s=t()),s)}const On=t=>t,TT=(t,s)=>i=>s(t(i)),vr=(...t)=>t.reduce(TT),dr=(t,s,i)=>{const l=s-t;return l===0?1:(i-t)/l};class Th{constructor(){this.subscriptions=[]}add(s){return vh(this.subscriptions,s),()=>wh(this.subscriptions,s)}notify(s,i,l){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](s,i,l);else for(let d=0;dt*1e3,Mn=t=>t/1e3;function Hb(t,s){return s?t*(1e3/s):0}const qb=(t,s,i)=>(((1-3*i+3*s)*t+(3*i-6*s))*t+3*s)*t,NT=1e-7,CT=12;function AT(t,s,i,l,o){let d,f,m=0;do f=s+(i-s)/2,d=qb(f,l,o)-t,d>0?i=f:s=f;while(Math.abs(d)>NT&&++mAT(d,0,1,t,i);return d=>d===0||d===1?d:qb(o(d),s,l)}const $b=t=>s=>s<=.5?t(2*s)/2:(2-t(2*(1-s)))/2,Ib=t=>s=>1-t(1-s),Gb=wr(.33,1.53,.69,.99),Nh=Ib(Gb),Yb=$b(Nh),Fb=t=>(t*=2)<1?.5*Nh(t):.5*(2-Math.pow(2,-10*(t-1))),Ch=t=>1-Math.sin(Math.acos(t)),Xb=Ib(Ch),Kb=$b(Ch),ET=wr(.42,0,1,1),DT=wr(0,0,.58,1),Qb=wr(.42,0,.58,1),kT=t=>Array.isArray(t)&&typeof t[0]!="number",Zb=t=>Array.isArray(t)&&typeof t[0]=="number",RT={linear:On,easeIn:ET,easeInOut:Qb,easeOut:DT,circIn:Ch,circInOut:Kb,circOut:Xb,backIn:Nh,backInOut:Yb,backOut:Gb,anticipate:Fb},MT=t=>typeof t=="string",py=t=>{if(Zb(t)){Sh(t.length===4);const[s,i,l,o]=t;return wr(s,i,l,o)}else if(MT(t))return RT[t];return t},qo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function OT(t,s){let i=new Set,l=new Set,o=!1,d=!1;const f=new WeakSet;let m={delta:0,timestamp:0,isProcessing:!1};function p(x){f.has(x)&&(y.schedule(x),t()),x(m)}const y={schedule:(x,g=!1,w=!1)=>{const T=w&&o?i:l;return g&&f.add(x),T.has(x)||T.add(x),x},cancel:x=>{l.delete(x),f.delete(x)},process:x=>{if(m=x,o){d=!0;return}o=!0,[i,l]=[l,i],i.forEach(p),i.clear(),o=!1,d&&(d=!1,y.process(x))}};return y}const _T=40;function Jb(t,s){let i=!1,l=!0;const o={delta:0,timestamp:0,isProcessing:!1},d=()=>i=!0,f=qo.reduce((C,B)=>(C[B]=OT(d),C),{}),{setup:m,read:p,resolveKeyframes:y,preUpdate:x,update:g,preRender:w,render:S,postRender:T}=f,N=()=>{const C=Ps.useManualTiming?o.timestamp:performance.now();i=!1,Ps.useManualTiming||(o.delta=l?1e3/60:Math.max(Math.min(C-o.timestamp,_T),1)),o.timestamp=C,o.isProcessing=!0,m.process(o),p.process(o),y.process(o),x.process(o),g.process(o),w.process(o),S.process(o),T.process(o),o.isProcessing=!1,i&&s&&(l=!1,t(N))},R=()=>{i=!0,l=!0,o.isProcessing||t(N)};return{schedule:qo.reduce((C,B)=>{const _=f[B];return C[B]=(F,I=!1,$=!1)=>(i||R(),_.schedule(F,I,$)),C},{}),cancel:C=>{for(let B=0;B(Jo===void 0&&Zt.set(Bt.isProcessing||Ps.useManualTiming?Bt.timestamp:performance.now()),Jo),set:t=>{Jo=t,queueMicrotask(LT)}},Wb=t=>s=>typeof s=="string"&&s.startsWith(t),ev=Wb("--"),zT=Wb("var(--"),Ah=t=>zT(t)?BT.test(t.split("/*")[0].trim()):!1,BT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gy(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const sl={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fr={...sl,transform:t=>cs(0,1,t)},$o={...sl,default:1},ar=t=>Math.round(t*1e5)/1e5,Eh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function VT(t){return t==null}const UT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dh=(t,s)=>i=>!!(typeof i=="string"&&UT.test(i)&&i.startsWith(t)||s&&!VT(i)&&Object.prototype.hasOwnProperty.call(i,s)),tv=(t,s,i)=>l=>{if(typeof l!="string")return l;const[o,d,f,m]=l.match(Eh);return{[t]:parseFloat(o),[s]:parseFloat(d),[i]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},PT=t=>cs(0,255,t),tf={...sl,transform:t=>Math.round(PT(t))},Ja={test:Dh("rgb","red"),parse:tv("red","green","blue"),transform:({red:t,green:s,blue:i,alpha:l=1})=>"rgba("+tf.transform(t)+", "+tf.transform(s)+", "+tf.transform(i)+", "+ar(fr.transform(l))+")"};function HT(t){let s="",i="",l="",o="";return t.length>5?(s=t.substring(1,3),i=t.substring(3,5),l=t.substring(5,7),o=t.substring(7,9)):(s=t.substring(1,2),i=t.substring(2,3),l=t.substring(3,4),o=t.substring(4,5),s+=s,i+=i,l+=l,o+=o),{red:parseInt(s,16),green:parseInt(i,16),blue:parseInt(l,16),alpha:o?parseInt(o,16)/255:1}}const Ef={test:Dh("#"),parse:HT,transform:Ja.transform},Sr=t=>({test:s=>typeof s=="string"&&s.endsWith(t)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${t}`}),ya=Sr("deg"),rs=Sr("%"),fe=Sr("px"),qT=Sr("vh"),$T=Sr("vw"),yy={...rs,parse:t=>rs.parse(t)/100,transform:t=>rs.transform(t*100)},Gi={test:Dh("hsl","hue"),parse:tv("hue","saturation","lightness"),transform:({hue:t,saturation:s,lightness:i,alpha:l=1})=>"hsla("+Math.round(t)+", "+rs.transform(ar(s))+", "+rs.transform(ar(i))+", "+ar(fr.transform(l))+")"},vt={test:t=>Ja.test(t)||Ef.test(t)||Gi.test(t),parse:t=>Ja.test(t)?Ja.parse(t):Gi.test(t)?Gi.parse(t):Ef.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ja.transform(t):Gi.transform(t),getAnimatableNone:t=>{const s=vt.parse(t);return s.alpha=0,vt.transform(s)}},IT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function GT(t){return isNaN(t)&&typeof t=="string"&&(t.match(Eh)?.length||0)+(t.match(IT)?.length||0)>0}const nv="number",sv="color",YT="var",FT="var(",xy="${}",XT=/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 hr(t){const s=t.toString(),i=[],l={color:[],number:[],var:[]},o=[];let d=0;const m=s.replace(XT,p=>(vt.test(p)?(l.color.push(d),o.push(sv),i.push(vt.parse(p))):p.startsWith(FT)?(l.var.push(d),o.push(YT),i.push(p)):(l.number.push(d),o.push(nv),i.push(parseFloat(p))),++d,xy)).split(xy);return{values:i,split:m,indexes:l,types:o}}function av(t){return hr(t).values}function iv(t){const{split:s,types:i}=hr(t),l=s.length;return o=>{let d="";for(let f=0;ftypeof t=="number"?0:vt.test(t)?vt.getAnimatableNone(t):t;function QT(t){const s=av(t);return iv(t)(s.map(KT))}const wa={test:GT,parse:av,createTransformer:iv,getAnimatableNone:QT};function nf(t,s,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+(s-t)*6*i:i<1/2?s:i<2/3?t+(s-t)*(2/3-i)*6:t}function ZT({hue:t,saturation:s,lightness:i,alpha:l}){t/=360,s/=100,i/=100;let o=0,d=0,f=0;if(!s)o=d=f=i;else{const m=i<.5?i*(1+s):i+s-i*s,p=2*i-m;o=nf(p,m,t+1/3),d=nf(p,m,t),f=nf(p,m,t-1/3)}return{red:Math.round(o*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:l}}function lc(t,s){return i=>i>0?s:t}const it=(t,s,i)=>t+(s-t)*i,sf=(t,s,i)=>{const l=t*t,o=i*(s*s-l)+l;return o<0?0:Math.sqrt(o)},JT=[Ef,Ja,Gi],WT=t=>JT.find(s=>s.test(t));function by(t){const s=WT(t);if(!s)return!1;let i=s.parse(t);return s===Gi&&(i=ZT(i)),i}const vy=(t,s)=>{const i=by(t),l=by(s);if(!i||!l)return lc(t,s);const o={...i};return d=>(o.red=sf(i.red,l.red,d),o.green=sf(i.green,l.green,d),o.blue=sf(i.blue,l.blue,d),o.alpha=it(i.alpha,l.alpha,d),Ja.transform(o))},Df=new Set(["none","hidden"]);function eN(t,s){return Df.has(t)?i=>i<=0?t:s:i=>i>=1?s:t}function tN(t,s){return i=>it(t,s,i)}function kh(t){return typeof t=="number"?tN:typeof t=="string"?Ah(t)?lc:vt.test(t)?vy:aN:Array.isArray(t)?lv:typeof t=="object"?vt.test(t)?vy:nN:lc}function lv(t,s){const i=[...t],l=i.length,o=t.map((d,f)=>kh(d)(d,s[f]));return d=>{for(let f=0;f{for(const d in l)i[d]=l[d](o);return i}}function sN(t,s){const i=[],l={color:0,var:0,number:0};for(let o=0;o{const i=wa.createTransformer(s),l=hr(t),o=hr(s);return l.indexes.var.length===o.indexes.var.length&&l.indexes.color.length===o.indexes.color.length&&l.indexes.number.length>=o.indexes.number.length?Df.has(t)&&!o.values.length||Df.has(s)&&!l.values.length?eN(t,s):vr(lv(sN(l,o),o.values),i):lc(t,s)};function rv(t,s,i){return typeof t=="number"&&typeof s=="number"&&typeof i=="number"?it(t,s,i):kh(t)(t,s)}const iN=t=>{const s=({timestamp:i})=>t(i);return{start:(i=!0)=>We.update(s,i),stop:()=>va(s),now:()=>Bt.isProcessing?Bt.timestamp:Zt.now()}},ov=(t,s,i=10)=>{let l="";const o=Math.max(Math.round(s/i),2);for(let d=0;d=rc?1/0:s}function lN(t,s=100,i){const l=i({...t,keyframes:[0,s]}),o=Math.min(Rh(l),rc);return{type:"keyframes",ease:d=>l.next(o*d).value/s,duration:Mn(o)}}const rN=5;function cv(t,s,i){const l=Math.max(s-rN,0);return Hb(i-t(l),s-l)}const ot={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},af=.001;function oN({duration:t=ot.duration,bounce:s=ot.bounce,velocity:i=ot.velocity,mass:l=ot.mass}){let o,d,f=1-s;f=cs(ot.minDamping,ot.maxDamping,f),t=cs(ot.minDuration,ot.maxDuration,Mn(t)),f<1?(o=y=>{const x=y*f,g=x*t,w=x-i,S=kf(y,f),T=Math.exp(-g);return af-w/S*T},d=y=>{const g=y*f*t,w=g*i+i,S=Math.pow(f,2)*Math.pow(y,2)*t,T=Math.exp(-g),N=kf(Math.pow(y,2),f);return(-o(y)+af>0?-1:1)*((w-S)*T)/N}):(o=y=>{const x=Math.exp(-y*t),g=(y-i)*t+1;return-af+x*g},d=y=>{const x=Math.exp(-y*t),g=(i-y)*(t*t);return x*g});const m=5/t,p=uN(o,d,m);if(t=Us(t),isNaN(p))return{stiffness:ot.stiffness,damping:ot.damping,duration:t};{const y=Math.pow(p,2)*l;return{stiffness:y,damping:f*2*Math.sqrt(l*y),duration:t}}}const cN=12;function uN(t,s,i){let l=i;for(let o=1;ot[i]!==void 0)}function hN(t){let s={velocity:ot.velocity,stiffness:ot.stiffness,damping:ot.damping,mass:ot.mass,isResolvedFromDuration:!1,...t};if(!wy(t,fN)&&wy(t,dN))if(t.visualDuration){const i=t.visualDuration,l=2*Math.PI/(i*1.2),o=l*l,d=2*cs(.05,1,1-(t.bounce||0))*Math.sqrt(o);s={...s,mass:ot.mass,stiffness:o,damping:d}}else{const i=oN(t);s={...s,...i,mass:ot.mass},s.isResolvedFromDuration=!0}return s}function oc(t=ot.visualDuration,s=ot.bounce){const i=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:s}:t;let{restSpeed:l,restDelta:o}=i;const d=i.keyframes[0],f=i.keyframes[i.keyframes.length-1],m={done:!1,value:d},{stiffness:p,damping:y,mass:x,duration:g,velocity:w,isResolvedFromDuration:S}=hN({...i,velocity:-Mn(i.velocity||0)}),T=w||0,N=y/(2*Math.sqrt(p*x)),R=f-d,D=Mn(Math.sqrt(p/x)),A=Math.abs(R)<5;l||(l=A?ot.restSpeed.granular:ot.restSpeed.default),o||(o=A?ot.restDelta.granular:ot.restDelta.default);let C;if(N<1){const _=kf(D,N);C=F=>{const I=Math.exp(-N*D*F);return f-I*((T+N*D*R)/_*Math.sin(_*F)+R*Math.cos(_*F))}}else if(N===1)C=_=>f-Math.exp(-D*_)*(R+(T+D*R)*_);else{const _=D*Math.sqrt(N*N-1);C=F=>{const I=Math.exp(-N*D*F),$=Math.min(_*F,300);return f-I*((T+N*D*R)*Math.sinh($)+_*R*Math.cosh($))/_}}const B={calculatedDuration:S&&g||null,next:_=>{const F=C(_);if(S)m.done=_>=g;else{let I=_===0?T:0;N<1&&(I=_===0?Us(T):cv(C,_,F));const $=Math.abs(I)<=l,z=Math.abs(f-F)<=o;m.done=$&&z}return m.value=m.done?f:F,m},toString:()=>{const _=Math.min(Rh(B),rc),F=ov(I=>B.next(_*I).value,_,30);return _+"ms "+F},toTransition:()=>{}};return B}oc.applyToOptions=t=>{const s=lN(t,100,oc);return t.ease=s.ease,t.duration=Us(s.duration),t.type="keyframes",t};function Rf({keyframes:t,velocity:s=0,power:i=.8,timeConstant:l=325,bounceDamping:o=10,bounceStiffness:d=500,modifyTarget:f,min:m,max:p,restDelta:y=.5,restSpeed:x}){const g=t[0],w={done:!1,value:g},S=$=>m!==void 0&&$p,T=$=>m===void 0?p:p===void 0||Math.abs(m-$)-N*Math.exp(-$/l),C=$=>D+A($),B=$=>{const z=A($),X=C($);w.done=Math.abs(z)<=y,w.value=w.done?D:X};let _,F;const I=$=>{S(w.value)&&(_=$,F=oc({keyframes:[w.value,T(w.value)],velocity:cv(C,$,w.value),damping:o,stiffness:d,restDelta:y,restSpeed:x}))};return I(0),{calculatedDuration:null,next:$=>{let z=!1;return!F&&_===void 0&&(z=!0,B($),I($)),_!==void 0&&$>=_?F.next($-_):(!z&&B($),w)}}}function mN(t,s,i){const l=[],o=i||Ps.mix||rv,d=t.length-1;for(let f=0;fs[0];if(d===2&&s[0]===s[1])return()=>s[1];const f=t[0]===t[1];t[0]>t[d-1]&&(t=[...t].reverse(),s=[...s].reverse());const m=mN(s,l,o),p=m.length,y=x=>{if(f&&x1)for(;gy(cs(t[0],t[d-1],x)):y}function gN(t,s){const i=t[t.length-1];for(let l=1;l<=s;l++){const o=dr(0,s,l);t.push(it(i,1,o))}}function yN(t){const s=[0];return gN(s,t.length-1),s}function xN(t,s){return t.map(i=>i*s)}function bN(t,s){return t.map(()=>s||Qb).splice(0,t.length-1)}function ir({duration:t=300,keyframes:s,times:i,ease:l="easeInOut"}){const o=kT(l)?l.map(py):py(l),d={done:!1,value:s[0]},f=xN(i&&i.length===s.length?i:yN(s),t),m=pN(f,s,{ease:Array.isArray(o)?o:bN(s,o)});return{calculatedDuration:t,next:p=>(d.value=m(p),d.done=p>=t,d)}}const vN=t=>t!==null;function Mh(t,{repeat:s,repeatType:i="loop"},l,o=1){const d=t.filter(vN),m=o<0||s&&i!=="loop"&&s%2===1?0:d.length-1;return!m||l===void 0?d[m]:l}const wN={decay:Rf,inertia:Rf,tween:ir,keyframes:ir,spring:oc};function uv(t){typeof t.type=="string"&&(t.type=wN[t.type])}class Oh{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(s=>{this.resolve=s})}notifyFinished(){this.resolve()}then(s,i){return this.finished.then(s,i)}}const SN=t=>t/100;class _h extends Oh{constructor(s){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:i}=this.options;i&&i.updatedAt!==Zt.now()&&this.tick(Zt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=s,this.initAnimation(),this.play(),s.autoplay===!1&&this.pause()}initAnimation(){const{options:s}=this;uv(s);const{type:i=ir,repeat:l=0,repeatDelay:o=0,repeatType:d,velocity:f=0}=s;let{keyframes:m}=s;const p=i||ir;p!==ir&&typeof m[0]!="number"&&(this.mixKeyframes=vr(SN,rv(m[0],m[1])),m=[0,100]);const y=p({...s,keyframes:m});d==="mirror"&&(this.mirroredGenerator=p({...s,keyframes:[...m].reverse(),velocity:-f})),y.calculatedDuration===null&&(y.calculatedDuration=Rh(y));const{calculatedDuration:x}=y;this.calculatedDuration=x,this.resolvedDuration=x+o,this.totalDuration=this.resolvedDuration*(l+1)-o,this.generator=y}updateTime(s){const i=Math.round(s-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(s,i=!1){const{generator:l,totalDuration:o,mixKeyframes:d,mirroredGenerator:f,resolvedDuration:m,calculatedDuration:p}=this;if(this.startTime===null)return l.next(0);const{delay:y=0,keyframes:x,repeat:g,repeatType:w,repeatDelay:S,type:T,onUpdate:N,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-o/this.speed,this.startTime)),i?this.currentTime=s:this.updateTime(s);const D=this.currentTime-y*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?D<0:D>o;this.currentTime=Math.max(D,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let C=this.currentTime,B=l;if(g){const $=Math.min(this.currentTime,o)/m;let z=Math.floor($),X=$%1;!X&&$>=1&&(X=1),X===1&&z--,z=Math.min(z,g+1),z%2&&(w==="reverse"?(X=1-X,S&&(X-=S/m)):w==="mirror"&&(B=f)),C=cs(0,1,X)*m}const _=A?{done:!1,value:x[0]}:B.next(C);d&&(_.value=d(_.value));let{done:F}=_;!A&&p!==null&&(F=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return I&&T!==Rf&&(_.value=Mh(x,this.options,R,this.speed)),N&&N(_.value),I&&this.finish(),_}then(s,i){return this.finished.then(s,i)}get duration(){return Mn(this.calculatedDuration)}get iterationDuration(){const{delay:s=0}=this.options||{};return this.duration+Mn(s)}get time(){return Mn(this.currentTime)}set time(s){s=Us(s),this.currentTime=s,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(s){this.updateTime(Zt.now());const i=this.playbackSpeed!==s;this.playbackSpeed=s,i&&(this.time=Mn(this.currentTime))}play(){if(this.isStopped)return;const{driver:s=iN,startTime:i}=this.options;this.driver||(this.driver=s(o=>this.tick(o))),this.options.onPlay?.();const l=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=l):this.holdTime!==null?this.startTime=l-this.holdTime:this.startTime||(this.startTime=i??l),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Zt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}attachTimeline(s){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),s.observe(this)}}function jN(t){for(let s=1;st*180/Math.PI,Mf=t=>{const s=Wa(Math.atan2(t[1],t[0]));return Of(s)},TN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Mf,rotateZ:Mf,skewX:t=>Wa(Math.atan(t[1])),skewY:t=>Wa(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Of=t=>(t=t%360,t<0&&(t+=360),t),Sy=Mf,jy=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ty=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),NN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jy,scaleY:Ty,scale:t=>(jy(t)+Ty(t))/2,rotateX:t=>Of(Wa(Math.atan2(t[6],t[5]))),rotateY:t=>Of(Wa(Math.atan2(-t[2],t[0]))),rotateZ:Sy,rotate:Sy,skewX:t=>Wa(Math.atan(t[4])),skewY:t=>Wa(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function _f(t){return t.includes("scale")?1:0}function Lf(t,s){if(!t||t==="none")return _f(s);const i=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let l,o;if(i)l=NN,o=i;else{const m=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);l=TN,o=m}if(!o)return _f(s);const d=l[s],f=o[1].split(",").map(AN);return typeof d=="function"?d(f):f[d]}const CN=(t,s)=>{const{transform:i="none"}=getComputedStyle(t);return Lf(i,s)};function AN(t){return parseFloat(t.trim())}const al=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],il=new Set(al),Ny=t=>t===sl||t===fe,EN=new Set(["x","y","z"]),DN=al.filter(t=>!EN.has(t));function kN(t){const s=[];return DN.forEach(i=>{const l=t.getValue(i);l!==void 0&&(s.push([i,l.get()]),l.set(i.startsWith("scale")?1:0))}),s}const xa={width:({x:t},{paddingLeft:s="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(s)-parseFloat(i),height:({y:t},{paddingTop:s="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(s)-parseFloat(i),top:(t,{top:s})=>parseFloat(s),left:(t,{left:s})=>parseFloat(s),bottom:({y:t},{top:s})=>parseFloat(s)+(t.max-t.min),right:({x:t},{left:s})=>parseFloat(s)+(t.max-t.min),x:(t,{transform:s})=>Lf(s,"x"),y:(t,{transform:s})=>Lf(s,"y")};xa.translateX=xa.x;xa.translateY=xa.y;const ei=new Set;let zf=!1,Bf=!1,Vf=!1;function dv(){if(Bf){const t=Array.from(ei).filter(l=>l.needsMeasurement),s=new Set(t.map(l=>l.element)),i=new Map;s.forEach(l=>{const o=kN(l);o.length&&(i.set(l,o),l.render())}),t.forEach(l=>l.measureInitialState()),s.forEach(l=>{l.render();const o=i.get(l);o&&o.forEach(([d,f])=>{l.getValue(d)?.set(f)})}),t.forEach(l=>l.measureEndState()),t.forEach(l=>{l.suspendedScrollY!==void 0&&window.scrollTo(0,l.suspendedScrollY)})}Bf=!1,zf=!1,ei.forEach(t=>t.complete(Vf)),ei.clear()}function fv(){ei.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bf=!0)})}function RN(){Vf=!0,fv(),dv(),Vf=!1}class Lh{constructor(s,i,l,o,d,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...s],this.onComplete=i,this.name=l,this.motionValue=o,this.element=d,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(ei.add(this),zf||(zf=!0,We.read(fv),We.resolveKeyframes(dv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:i,element:l,motionValue:o}=this;if(s[0]===null){const d=o?.get(),f=s[s.length-1];if(d!==void 0)s[0]=d;else if(l&&i){const m=l.readValue(i,f);m!=null&&(s[0]=m)}s[0]===void 0&&(s[0]=f),o&&d===void 0&&o.set(s[0])}jN(s)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(s=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,s),ei.delete(this)}cancel(){this.state==="scheduled"&&(ei.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const MN=t=>t.startsWith("--");function ON(t,s,i){MN(s)?t.style.setProperty(s,i):t.style[s]=i}const _N=jh(()=>window.ScrollTimeline!==void 0),LN={};function zN(t,s){const i=jh(t);return()=>LN[s]??i()}const hv=zN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),nr=([t,s,i,l])=>`cubic-bezier(${t}, ${s}, ${i}, ${l})`,Cy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nr([0,.65,.55,1]),circOut:nr([.55,0,1,.45]),backIn:nr([.31,.01,.66,-.59]),backOut:nr([.33,1.53,.69,.99])};function mv(t,s){if(t)return typeof t=="function"?hv()?ov(t,s):"ease-out":Zb(t)?nr(t):Array.isArray(t)?t.map(i=>mv(i,s)||Cy.easeOut):Cy[t]}function BN(t,s,i,{delay:l=0,duration:o=300,repeat:d=0,repeatType:f="loop",ease:m="easeOut",times:p}={},y=void 0){const x={[s]:i};p&&(x.offset=p);const g=mv(m,o);Array.isArray(g)&&(x.easing=g);const w={delay:l,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"};return y&&(w.pseudoElement=y),t.animate(x,w)}function pv(t){return typeof t=="function"&&"applyToOptions"in t}function VN({type:t,...s}){return pv(t)&&hv()?t.applyToOptions(s):(s.duration??(s.duration=300),s.ease??(s.ease="easeOut"),s)}class UN extends Oh{constructor(s){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!s)return;const{element:i,name:l,keyframes:o,pseudoElement:d,allowFlatten:f=!1,finalKeyframe:m,onComplete:p}=s;this.isPseudoElement=!!d,this.allowFlatten=f,this.options=s,Sh(typeof s.type!="string");const y=VN(s);this.animation=BN(i,l,o,y,d),y.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const x=Mh(o,this.options,m,this.speed);this.updateMotionValue?this.updateMotionValue(x):ON(i,l,x),this.animation.cancel()}p?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:s}=this;s==="idle"||s==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const s=this.animation.effect?.getComputedTiming?.().duration||0;return Mn(Number(s))}get iterationDuration(){const{delay:s=0}=this.options||{};return this.duration+Mn(s)}get time(){return Mn(Number(this.animation.currentTime)||0)}set time(s){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Us(s)}get speed(){return this.animation.playbackRate}set speed(s){s<0&&(this.finishedTime=null),this.animation.playbackRate=s}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(s){this.manualStartTime=this.animation.startTime=s}attachTimeline({timeline:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,s&&_N()?(this.animation.timeline=s,On):i(this)}}const gv={anticipate:Fb,backInOut:Yb,circInOut:Kb};function PN(t){return t in gv}function HN(t){typeof t.ease=="string"&&PN(t.ease)&&(t.ease=gv[t.ease])}const lf=10;class qN extends UN{constructor(s){HN(s),uv(s),super(s),s.startTime!==void 0&&(this.startTime=s.startTime),this.options=s}updateMotionValue(s){const{motionValue:i,onUpdate:l,onComplete:o,element:d,...f}=this.options;if(!i)return;if(s!==void 0){i.set(s);return}const m=new _h({...f,autoplay:!1}),p=Math.max(lf,Zt.now()-this.startTime),y=cs(0,lf,p-lf);i.setWithVelocity(m.sample(Math.max(0,p-y)).value,m.sample(p).value,y),m.stop()}}const Ay=(t,s)=>s==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wa.test(t)||t==="0")&&!t.startsWith("url("));function $N(t){const s=t[0];if(t.length===1)return!0;for(let i=0;iObject.hasOwnProperty.call(Element.prototype,"animate"));function FN(t){const{motionValue:s,name:i,repeatDelay:l,repeatType:o,damping:d,type:f}=t;if(!(s?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:y}=s.owner.getProps();return YN()&&i&&GN.has(i)&&(i!=="transform"||!y)&&!p&&!l&&o!=="mirror"&&d!==0&&f!=="inertia"}const XN=40;class KN extends Oh{constructor({autoplay:s=!0,delay:i=0,type:l="keyframes",repeat:o=0,repeatDelay:d=0,repeatType:f="loop",keyframes:m,name:p,motionValue:y,element:x,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Zt.now();const w={autoplay:s,delay:i,type:l,repeat:o,repeatDelay:d,repeatType:f,name:p,motionValue:y,element:x,...g},S=x?.KeyframeResolver||Lh;this.keyframeResolver=new S(m,(T,N,R)=>this.onKeyframesResolved(T,N,w,!R),p,y,x),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(s,i,l,o){this.keyframeResolver=void 0;const{name:d,type:f,velocity:m,delay:p,isHandoff:y,onUpdate:x}=l;this.resolvedAt=Zt.now(),IN(s,d,f,m)||((Ps.instantAnimations||!p)&&x?.(Mh(s,l,i)),s[0]=s[s.length-1],Uf(l),l.repeat=0);const w={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>XN?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...l,keyframes:s},S=!y&&FN(w)?new qN({...w,element:w.motionValue.owner.current}):new _h(w);S.finished.then(()=>this.notifyFinished()).catch(On),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(s,i){return this.finished.finally(s).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),RN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(s){this.animation.time=s}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(s){this.animation.speed=s}get startTime(){return this.animation.startTime}attachTimeline(s){return this._animation?this.stopTimeline=this.animation.attachTimeline(s):this.pendingTimeline=s,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const QN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ZN(t){const s=QN.exec(t);if(!s)return[,];const[,i,l,o]=s;return[`--${i??l}`,o]}function yv(t,s,i=1){const[l,o]=ZN(t);if(!l)return;const d=window.getComputedStyle(s).getPropertyValue(l);if(d){const f=d.trim();return Vb(f)?parseFloat(f):f}return Ah(o)?yv(o,s,i+1):o}function zh(t,s){return t?.[s]??t?.default??t}const JN={type:"spring",stiffness:500,damping:25,restSpeed:10},WN=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),eC={type:"keyframes",duration:.8},tC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nC=(t,{keyframes:s})=>s.length>2?eC:il.has(t)?t.startsWith("scale")?WN(s[1]):JN:tC;function sC({when:t,delay:s,delayChildren:i,staggerChildren:l,staggerDirection:o,repeat:d,repeatType:f,repeatDelay:m,from:p,elapsed:y,...x}){return!!Object.keys(x).length}const aC=t=>t!==null;function iC(t,{repeat:s,repeatType:i="loop"},l){const o=t.filter(aC),d=s&&i!=="loop"&&s%2===1?0:o.length-1;return o[d]}function xv(t,s,i,l=0,o=1){const d=Array.from(t).sort((y,x)=>y.sortNodePosition(x)).indexOf(s),f=t.size,m=(f-1)*l;return typeof i=="function"?i(d,f):o===1?d*l:m-d*l}const Bh=(t,s,i,l={},o,d)=>f=>{const m=zh(l,t)||{},p=m.delay||l.delay||0;let{elapsed:y=0}=l;y=y-Us(p);const x={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:s.getVelocity(),...m,delay:-y,onUpdate:w=>{s.set(w),m.onUpdate&&m.onUpdate(w)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:t,motionValue:s,element:d?void 0:o};sC(m)||Object.assign(x,nC(t,x)),x.duration&&(x.duration=Us(x.duration)),x.repeatDelay&&(x.repeatDelay=Us(x.repeatDelay)),x.from!==void 0&&(x.keyframes[0]=x.from);let g=!1;if((x.type===!1||x.duration===0&&!x.repeatDelay)&&(Uf(x),x.delay===0&&(g=!0)),(Ps.instantAnimations||Ps.skipAnimations)&&(g=!0,Uf(x),x.delay=0),x.allowFlatten=!m.type&&!m.ease,g&&!d&&s.get()!==void 0){const w=iC(x.keyframes,m);if(w!==void 0){We.update(()=>{x.onUpdate(w),x.onComplete()});return}}return m.isSync?new _h(x):new KN(x)},bv=new Set(["width","height","top","left","right","bottom",...al]),Ey=30,lC=t=>!isNaN(parseFloat(t));class rC{constructor(s,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=l=>{const o=Zt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(l),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty()},this.hasAnimated=!1,this.setCurrent(s),this.owner=i.owner}setCurrent(s){this.current=s,this.updatedAt=Zt.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=lC(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,i){this.events[s]||(this.events[s]=new Th);const l=this.events[s].add(i);return s==="change"?()=>{l(),We.read(()=>{this.events.change.getSize()||this.stop()})}:l}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,i){this.passiveEffect=s,this.stopPassiveEffect=i}set(s){this.passiveEffect?this.passiveEffect(s,this.updateAndNotify):this.updateAndNotify(s)}setWithVelocity(s,i,l){this.set(i),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-l}jump(s,i=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(s){this.dependents||(this.dependents=new Set),this.dependents.add(s)}removeDependent(s){this.dependents&&this.dependents.delete(s)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=Zt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>Ey)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Ey);return Hb(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(s){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=s(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wi(t,s){return new rC(t,s)}function Dy(t){const s=[{},{}];return t?.values.forEach((i,l)=>{s[0][l]=i.get(),s[1][l]=i.getVelocity()}),s}function Vh(t,s,i,l){if(typeof s=="function"){const[o,d]=Dy(l);s=s(i!==void 0?i:t.custom,o,d)}if(typeof s=="string"&&(s=t.variants&&t.variants[s]),typeof s=="function"){const[o,d]=Dy(l);s=s(i!==void 0?i:t.custom,o,d)}return s}function Qi(t,s,i){const l=t.getProps();return Vh(l,s,i!==void 0?i:l.custom,t)}const Pf=t=>Array.isArray(t);function oC(t,s,i){t.hasValue(s)?t.getValue(s).set(i):t.addValue(s,Wi(i))}function cC(t){return Pf(t)?t[t.length-1]||0:t}function uC(t,s){const i=Qi(t,s);let{transitionEnd:l={},transition:o={},...d}=i||{};d={...d,...l};for(const f in d){const m=cC(d[f]);oC(t,f,m)}}const It=t=>!!(t&&t.getVelocity);function dC(t){return!!(It(t)&&t.add)}function Hf(t,s){const i=t.getValue("willChange");if(dC(i))return i.add(s);if(!i&&Ps.WillChange){const l=new Ps.WillChange("auto");t.addValue("willChange",l),l.add(s)}}function Uh(t){return t.replace(/([A-Z])/g,s=>`-${s.toLowerCase()}`)}const fC="framerAppearId",vv="data-"+Uh(fC);function wv(t){return t.props[vv]}function hC({protectedKeys:t,needsAnimating:s},i){const l=t.hasOwnProperty(i)&&s[i]!==!0;return s[i]=!1,l}function Sv(t,s,{delay:i=0,transitionOverride:l,type:o}={}){let{transition:d=t.getDefaultTransition(),transitionEnd:f,...m}=s;l&&(d=l);const p=[],y=o&&t.animationState&&t.animationState.getState()[o];for(const x in m){const g=t.getValue(x,t.latestValues[x]??null),w=m[x];if(w===void 0||y&&hC(y,x))continue;const S={delay:i,...zh(d||{},x)},T=g.get();if(T!==void 0&&!g.isAnimating&&!Array.isArray(w)&&w===T&&!S.velocity)continue;let N=!1;if(window.MotionHandoffAnimation){const D=wv(t);if(D){const A=window.MotionHandoffAnimation(D,x,We);A!==null&&(S.startTime=A,N=!0)}}Hf(t,x),g.start(Bh(x,g,w,t.shouldReduceMotion&&bv.has(x)?{type:!1}:S,t,N));const R=g.animation;R&&p.push(R)}return f&&Promise.all(p).then(()=>{We.update(()=>{f&&uC(t,f)})}),p}function qf(t,s,i={}){const l=Qi(t,s,i.type==="exit"?t.presenceContext?.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=l||{};i.transitionOverride&&(o=i.transitionOverride);const d=l?()=>Promise.all(Sv(t,l,i)):()=>Promise.resolve(),f=t.variantChildren&&t.variantChildren.size?(p=0)=>{const{delayChildren:y=0,staggerChildren:x,staggerDirection:g}=o;return mC(t,s,p,y,x,g,i)}:()=>Promise.resolve(),{when:m}=o;if(m){const[p,y]=m==="beforeChildren"?[d,f]:[f,d];return p().then(()=>y())}else return Promise.all([d(),f(i.delay)])}function mC(t,s,i=0,l=0,o=0,d=1,f){const m=[];for(const p of t.variantChildren)p.notify("AnimationStart",s),m.push(qf(p,s,{...f,delay:i+(typeof l=="function"?0:l)+xv(t.variantChildren,p,l,o,d)}).then(()=>p.notify("AnimationComplete",s)));return Promise.all(m)}function pC(t,s,i={}){t.notify("AnimationStart",s);let l;if(Array.isArray(s)){const o=s.map(d=>qf(t,d,i));l=Promise.all(o)}else if(typeof s=="string")l=qf(t,s,i);else{const o=typeof s=="function"?Qi(t,s,i.custom):s;l=Promise.all(Sv(t,o,i))}return l.then(()=>{t.notify("AnimationComplete",s)})}const gC={test:t=>t==="auto",parse:t=>t},jv=t=>s=>s.test(t),Tv=[sl,fe,rs,ya,$T,qT,gC],ky=t=>Tv.find(jv(t));function yC(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Pb(t):!0}const xC=new Set(["brightness","contrast","saturate","opacity"]);function bC(t){const[s,i]=t.slice(0,-1).split("(");if(s==="drop-shadow")return t;const[l]=i.match(Eh)||[];if(!l)return t;const o=i.replace(l,"");let d=xC.has(s)?1:0;return l!==i&&(d*=100),s+"("+d+o+")"}const vC=/\b([a-z-]*)\(.*?\)/gu,$f={...wa,getAnimatableNone:t=>{const s=t.match(vC);return s?s.map(bC).join(" "):t}},Ry={...sl,transform:Math.round},wC={rotate:ya,rotateX:ya,rotateY:ya,rotateZ:ya,scale:$o,scaleX:$o,scaleY:$o,scaleZ:$o,skew:ya,skewX:ya,skewY:ya,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:fr,originX:yy,originY:yy,originZ:fe},Ph={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,top:fe,right:fe,bottom:fe,left:fe,inset:fe,insetBlock:fe,insetBlockStart:fe,insetBlockEnd:fe,insetInline:fe,insetInlineStart:fe,insetInlineEnd:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,paddingBlock:fe,paddingBlockStart:fe,paddingBlockEnd:fe,paddingInline:fe,paddingInlineStart:fe,paddingInlineEnd:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,marginBlock:fe,marginBlockStart:fe,marginBlockEnd:fe,marginInline:fe,marginInlineStart:fe,marginInlineEnd:fe,backgroundPositionX:fe,backgroundPositionY:fe,...wC,zIndex:Ry,fillOpacity:fr,strokeOpacity:fr,numOctaves:Ry},SC={...Ph,color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:$f,WebkitFilter:$f},Nv=t=>SC[t];function Cv(t,s){let i=Nv(t);return i!==$f&&(i=wa),i.getAnimatableNone?i.getAnimatableNone(s):void 0}const jC=new Set(["auto","none","0"]);function TC(t,s,i){let l=0,o;for(;l{s.getValue(m).set(p)}),this.resolveNoneKeyframes()}}function CC(t,s,i){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let l=document;const o=i?.[t]??l.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t)}const Av=(t,s)=>s&&typeof t=="number"?s.transform(t):t;function Ev(t){return Ub(t)&&"offsetHeight"in t}const{schedule:Hh}=Jb(queueMicrotask,!1),$n={x:!1,y:!1};function Dv(){return $n.x||$n.y}function AC(t){return t==="x"||t==="y"?$n[t]?null:($n[t]=!0,()=>{$n[t]=!1}):$n.x||$n.y?null:($n.x=$n.y=!0,()=>{$n.x=$n.y=!1})}function kv(t,s){const i=CC(t),l=new AbortController,o={passive:!0,...s,signal:l.signal};return[i,o,()=>l.abort()]}function My(t){return!(t.pointerType==="touch"||Dv())}function EC(t,s,i={}){const[l,o,d]=kv(t,i),f=m=>{if(!My(m))return;const{target:p}=m,y=s(p,m);if(typeof y!="function"||!p)return;const x=g=>{My(g)&&(y(g),p.removeEventListener("pointerleave",x))};p.addEventListener("pointerleave",x,o)};return l.forEach(m=>{m.addEventListener("pointerenter",f,o)}),d}const Rv=(t,s)=>s?t===s?!0:Rv(t,s.parentElement):!1,qh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,DC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mv(t){return DC.has(t.tagName)||t.isContentEditable===!0}const Wo=new WeakSet;function Oy(t){return s=>{s.key==="Enter"&&t(s)}}function rf(t,s){t.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const kC=(t,s)=>{const i=t.currentTarget;if(!i)return;const l=Oy(()=>{if(Wo.has(i))return;rf(i,"down");const o=Oy(()=>{rf(i,"up")}),d=()=>rf(i,"cancel");i.addEventListener("keyup",o,s),i.addEventListener("blur",d,s)});i.addEventListener("keydown",l,s),i.addEventListener("blur",()=>i.removeEventListener("keydown",l),s)};function _y(t){return qh(t)&&!Dv()}function RC(t,s,i={}){const[l,o,d]=kv(t,i),f=m=>{const p=m.currentTarget;if(!_y(m))return;Wo.add(p);const y=s(p,m),x=(S,T)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",w),Wo.has(p)&&Wo.delete(p),_y(S)&&typeof y=="function"&&y(S,{success:T})},g=S=>{x(S,p===window||p===document||i.useGlobalTarget||Rv(p,S.target))},w=S=>{x(S,!1)};window.addEventListener("pointerup",g,o),window.addEventListener("pointercancel",w,o)};return l.forEach(m=>{(i.useGlobalTarget?window:m).addEventListener("pointerdown",f,o),Ev(m)&&(m.addEventListener("focus",y=>kC(y,o)),!Mv(m)&&!m.hasAttribute("tabindex")&&(m.tabIndex=0))}),d}function Ov(t){return Ub(t)&&"ownerSVGElement"in t}function MC(t){return Ov(t)&&t.tagName==="svg"}const OC=[...Tv,vt,wa],_C=t=>OC.find(jv(t)),Ly=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yi=()=>({x:Ly(),y:Ly()}),zy=()=>({min:0,max:0}),Tt=()=>({x:zy(),y:zy()}),If={current:null},_v={current:!1},LC=typeof window<"u";function zC(){if(_v.current=!0,!!LC)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),s=()=>If.current=t.matches;t.addEventListener("change",s),s()}else If.current=!1}const BC=new WeakMap;function Ac(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function mr(t){return typeof t=="string"||Array.isArray(t)}const $h=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ih=["initial",...$h];function Ec(t){return Ac(t.animate)||Ih.some(s=>mr(t[s]))}function Lv(t){return!!(Ec(t)||t.variants)}function VC(t,s,i){for(const l in s){const o=s[l],d=i[l];if(It(o))t.addValue(l,o);else if(It(d))t.addValue(l,Wi(o,{owner:t}));else if(d!==o)if(t.hasValue(l)){const f=t.getValue(l);f.liveStyle===!0?f.jump(o):f.hasAnimated||f.set(o)}else{const f=t.getStaticValue(l);t.addValue(l,Wi(f!==void 0?f:o,{owner:t}))}}for(const l in i)s[l]===void 0&&t.removeValue(l);return s}const By=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let cc={};function zv(t){cc=t}function UC(){return cc}class PC{scrapeMotionValuesFromProps(s,i,l){return{}}constructor({parent:s,props:i,presenceContext:l,reducedMotionConfig:o,blockInitialAnimation:d,visualState:f},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Lh,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 w=Zt.now();this.renderScheduledAtthis.bindToMotionValue(l,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(_v.current||zC(),this.shouldReduceMotion=If.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),va(this.notifyUpdate),va(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const i=this.features[s];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(s){this.children.add(s),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(s)}removeChild(s){this.children.delete(s),this.enteringChildren&&this.enteringChildren.delete(s)}bindToMotionValue(s,i){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const l=il.has(s);l&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",f=>{this.latestValues[s]=f,this.props.onUpdate&&We.preRender(this.notifyUpdate),l&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,s,i)),this.valueSubscriptions.set(s,()=>{o(),d&&d(),i.owner&&i.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in cc){const i=cc[s];if(!i)continue;const{isEnabled:l,Feature:o}=i;if(!this.features[s]&&o&&l(this.props)&&(this.features[s]=new o(this)),this.features[s]){const d=this.features[s];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Tt()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,i){this.latestValues[s]=i}update(s,i){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let l=0;li.variantChildren.delete(s)}addValue(s,i){const l=this.values.get(s);i!==l&&(l&&this.removeValue(s),this.bindToMotionValue(s,i),this.values.set(s,i),this.latestValues[s]=i.get())}removeValue(s){this.values.delete(s);const i=this.valueSubscriptions.get(s);i&&(i(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,i){if(this.props.values&&this.props.values[s])return this.props.values[s];let l=this.values.get(s);return l===void 0&&i!==void 0&&(l=Wi(i===null?void 0:i,{owner:this}),this.addValue(s,l)),l}readValue(s,i){let l=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:this.getBaseTargetFromProps(this.props,s)??this.readValueFromInstance(this.current,s,this.options);return l!=null&&(typeof l=="string"&&(Vb(l)||Pb(l))?l=parseFloat(l):!_C(l)&&wa.test(i)&&(l=Cv(s,i)),this.setBaseTarget(s,It(l)?l.get():l)),It(l)?l.get():l}setBaseTarget(s,i){this.baseTarget[s]=i}getBaseTarget(s){const{initial:i}=this.props;let l;if(typeof i=="string"||typeof i=="object"){const d=Vh(this.props,i,this.presenceContext?.custom);d&&(l=d[s])}if(i&&l!==void 0)return l;const o=this.getBaseTargetFromProps(this.props,s);return o!==void 0&&!It(o)?o:this.initialValues[s]!==void 0&&l===void 0?void 0:this.baseTarget[s]}on(s,i){return this.events[s]||(this.events[s]=new Th),this.events[s].add(i)}notify(s,...i){this.events[s]&&this.events[s].notify(...i)}scheduleRenderMicrotask(){Hh.render(this.render)}}class Na{constructor(s){this.isMounted=!1,this.node=s}update(){}}class Bv extends PC{constructor(){super(...arguments),this.KeyframeResolver=NC}sortInstanceNodePosition(s,i){return s.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(s,i){const l=s.style;return l?l[i]:void 0}removeValueFromRenderState(s,{vars:i,style:l}){delete i[s],delete l[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;It(s)&&(this.childSubscription=s.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function Vv({top:t,left:s,right:i,bottom:l}){return{x:{min:s,max:i},y:{min:t,max:l}}}function HC({x:t,y:s}){return{top:s.min,right:t.max,bottom:s.max,left:t.min}}function qC(t,s){if(!s)return t;const i=s({x:t.left,y:t.top}),l=s({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:l.y,right:l.x}}function of(t){return t===void 0||t===1}function Gf({scale:t,scaleX:s,scaleY:i}){return!of(t)||!of(s)||!of(i)}function Xa(t){return Gf(t)||Uv(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Uv(t){return Vy(t.x)||Vy(t.y)}function Vy(t){return t&&t!=="0%"}function uc(t,s,i){const l=t-i,o=s*l;return i+o}function Uy(t,s,i,l,o){return o!==void 0&&(t=uc(t,o,l)),uc(t,i,l)+s}function Yf(t,s=0,i=1,l,o){t.min=Uy(t.min,s,i,l,o),t.max=Uy(t.max,s,i,l,o)}function Pv(t,{x:s,y:i}){Yf(t.x,s.translate,s.scale,s.originPoint),Yf(t.y,i.translate,i.scale,i.originPoint)}const Py=.999999999999,Hy=1.0000000000001;function $C(t,s,i,l=!1){const o=i.length;if(!o)return;s.x=s.y=1;let d,f;for(let m=0;mPy&&(s.x=1),s.yPy&&(s.y=1)}function Fi(t,s){t.min=t.min+s,t.max=t.max+s}function qy(t,s,i,l,o=.5){const d=it(t.min,t.max,o);Yf(t,s,i,d,l)}function Xi(t,s){qy(t.x,s.x,s.scaleX,s.scale,s.originX),qy(t.y,s.y,s.scaleY,s.scale,s.originY)}function Hv(t,s){return Vv(qC(t.getBoundingClientRect(),s))}function IC(t,s,i){const l=Hv(t,i),{scroll:o}=s;return o&&(Fi(l.x,o.offset.x),Fi(l.y,o.offset.y)),l}const GC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YC=al.length;function FC(t,s,i){let l="",o=!0;for(let d=0;d{if(!s.target)return t;if(typeof t=="string")if(fe.test(t))t=parseFloat(t);else return t;const i=$y(t,s.target.x),l=$y(t,s.target.y);return`${i}% ${l}%`}},XC={correct:(t,{treeScale:s,projectionDelta:i})=>{const l=t,o=wa.parse(t);if(o.length>5)return l;const d=wa.createTransformer(t),f=typeof o[0]!="number"?1:0,m=i.x.scale*s.x,p=i.y.scale*s.y;o[0+f]/=m,o[1+f]/=p;const y=it(m,p,.5);return typeof o[2+f]=="number"&&(o[2+f]/=y),typeof o[3+f]=="number"&&(o[3+f]/=y),d(o)}},Ff={borderRadius:{...Wl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wl,borderTopRightRadius:Wl,borderBottomLeftRadius:Wl,borderBottomRightRadius:Wl,boxShadow:XC};function $v(t,{layout:s,layoutId:i}){return il.has(t)||t.startsWith("origin")||(s||i!==void 0)&&(!!Ff[t]||t==="opacity")}function Yh(t,s,i){const l=t.style,o=s?.style,d={};if(!l)return d;for(const f in l)(It(l[f])||o&&It(o[f])||$v(f,t)||i?.getValue(f)?.liveStyle!==void 0)&&(d[f]=l[f]);return d}function KC(t){return window.getComputedStyle(t)}class QC extends Bv{constructor(){super(...arguments),this.type="html",this.renderInstance=qv}readValueFromInstance(s,i){if(il.has(i))return this.projection?.isProjecting?_f(i):CN(s,i);{const l=KC(s),o=(ev(i)?l.getPropertyValue(i):l[i])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(s,{transformPagePoint:i}){return Hv(s,i)}build(s,i,l){Gh(s,i,l.transformTemplate)}scrapeMotionValuesFromProps(s,i,l){return Yh(s,i,l)}}const ZC={offset:"stroke-dashoffset",array:"stroke-dasharray"},JC={offset:"strokeDashoffset",array:"strokeDasharray"};function WC(t,s,i=1,l=0,o=!0){t.pathLength=1;const d=o?ZC:JC;t[d.offset]=fe.transform(-l);const f=fe.transform(s),m=fe.transform(i);t[d.array]=`${f} ${m}`}const eA=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Iv(t,{attrX:s,attrY:i,attrScale:l,pathLength:o,pathSpacing:d=1,pathOffset:f=0,...m},p,y,x){if(Gh(t,m,y),p){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:g,style:w}=t;g.transform&&(w.transform=g.transform,delete g.transform),(w.transform||g.transformOrigin)&&(w.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),w.transform&&(w.transformBox=x?.transformBox??"fill-box",delete g.transformBox);for(const S of eA)g[S]!==void 0&&(w[S]=g[S],delete g[S]);s!==void 0&&(g.x=s),i!==void 0&&(g.y=i),l!==void 0&&(g.scale=l),o!==void 0&&WC(g,o,d,f,!1)}const Gv=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"]),Yv=t=>typeof t=="string"&&t.toLowerCase()==="svg";function tA(t,s,i,l){qv(t,s,void 0,l);for(const o in s.attrs)t.setAttribute(Gv.has(o)?o:Uh(o),s.attrs[o])}function Fv(t,s,i){const l=Yh(t,s,i);for(const o in t)if(It(t[o])||It(s[o])){const d=al.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;l[d]=t[o]}return l}class nA extends Bv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(s,i){return s[i]}readValueFromInstance(s,i){if(il.has(i)){const l=Nv(i);return l&&l.default||0}return i=Gv.has(i)?i:Uh(i),s.getAttribute(i)}scrapeMotionValuesFromProps(s,i,l){return Fv(s,i,l)}build(s,i,l){Iv(s,i,this.isSVGTag,l.transformTemplate,l.style)}renderInstance(s,i,l,o){tA(s,i,l,o)}mount(s){this.isSVGTag=Yv(s.tagName),super.mount(s)}}const sA=Ih.length;function Xv(t){if(!t)return;if(!t.isControllingVariants){const i=t.parent?Xv(t.parent)||{}:{};return t.props.initial!==void 0&&(i.initial=t.props.initial),i}const s={};for(let i=0;iPromise.all(s.map(({animation:i,options:l})=>pC(t,i,l)))}function rA(t){let s=lA(t),i=Iy(),l=!0;const o=p=>(y,x)=>{const g=Qi(t,x,p==="exit"?t.presenceContext?.custom:void 0);if(g){const{transition:w,transitionEnd:S,...T}=g;y={...y,...T,...S}}return y};function d(p){s=p(t)}function f(p){const{props:y}=t,x=Xv(t.parent)||{},g=[],w=new Set;let S={},T=1/0;for(let R=0;RT&&B,z=!1;const X=Array.isArray(C)?C:[C];let te=X.reduce(o(D),{});_===!1&&(te={});const{prevResolvedValues:H={}}=A,P={...H,...te},K=G=>{$=!0,w.has(G)&&(z=!0,w.delete(G)),A.needsAnimating[G]=!0;const Z=t.getValue(G);Z&&(Z.liveStyle=!1)};for(const G in P){const Z=te[G],re=H[G];if(S.hasOwnProperty(G))continue;let ue=!1;Pf(Z)&&Pf(re)?ue=!Kv(Z,re):ue=Z!==re,ue?Z!=null?K(G):w.add(G):Z!==void 0&&w.has(G)?K(G):A.protectedKeys[G]=!0}A.prevProp=C,A.prevResolvedValues=te,A.isActive&&(S={...S,...te}),l&&t.blockInitialAnimation&&($=!1);const ae=F&&I;$&&(!ae||z)&&g.push(...X.map(G=>{const Z={type:D};if(typeof G=="string"&&l&&!ae&&t.manuallyAnimateOnMount&&t.parent){const{parent:re}=t,ue=Qi(re,G);if(re.enteringChildren&&ue){const{delayChildren:je}=ue.transition||{};Z.delay=xv(re.enteringChildren,t,je)}}return{animation:G,options:Z}}))}if(w.size){const R={};if(typeof y.initial!="boolean"){const D=Qi(t,Array.isArray(y.initial)?y.initial[0]:y.initial);D&&D.transition&&(R.transition=D.transition)}w.forEach(D=>{const A=t.getBaseTarget(D),C=t.getValue(D);C&&(C.liveStyle=!0),R[D]=A??null}),g.push({animation:R})}let N=!!g.length;return l&&(y.initial===!1||y.initial===y.animate)&&!t.manuallyAnimateOnMount&&(N=!1),l=!1,N?s(g):Promise.resolve()}function m(p,y){if(i[p].isActive===y)return Promise.resolve();t.variantChildren?.forEach(g=>g.animationState?.setActive(p,y)),i[p].isActive=y;const x=f(p);for(const g in i)i[g].protectedKeys={};return x}return{animateChanges:f,setActive:m,setAnimateFunction:d,getState:()=>i,reset:()=>{i=Iy()}}}function oA(t,s){return typeof s=="string"?s!==t:Array.isArray(s)?!Kv(s,t):!1}function Fa(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Iy(){return{animate:Fa(!0),whileInView:Fa(),whileHover:Fa(),whileTap:Fa(),whileDrag:Fa(),whileFocus:Fa(),exit:Fa()}}const Qv=1e-4,cA=1-Qv,uA=1+Qv,Zv=.01,dA=0-Zv,fA=0+Zv;function Jt(t){return t.max-t.min}function hA(t,s,i){return Math.abs(t-s)<=i}function Gy(t,s,i,l=.5){t.origin=l,t.originPoint=it(s.min,s.max,t.origin),t.scale=Jt(i)/Jt(s),t.translate=it(i.min,i.max,t.origin)-t.originPoint,(t.scale>=cA&&t.scale<=uA||isNaN(t.scale))&&(t.scale=1),(t.translate>=dA&&t.translate<=fA||isNaN(t.translate))&&(t.translate=0)}function lr(t,s,i,l){Gy(t.x,s.x,i.x,l?l.originX:void 0),Gy(t.y,s.y,i.y,l?l.originY:void 0)}function Yy(t,s,i){t.min=i.min+s.min,t.max=t.min+Jt(s)}function mA(t,s,i){Yy(t.x,s.x,i.x),Yy(t.y,s.y,i.y)}function Fy(t,s,i){t.min=s.min-i.min,t.max=t.min+Jt(s)}function dc(t,s,i){Fy(t.x,s.x,i.x),Fy(t.y,s.y,i.y)}function Xy(t,s,i,l,o){return t-=s,t=uc(t,1/i,l),o!==void 0&&(t=uc(t,1/o,l)),t}function pA(t,s=0,i=1,l=.5,o,d=t,f=t){if(rs.test(s)&&(s=parseFloat(s),s=it(f.min,f.max,s/100)-f.min),typeof s!="number")return;let m=it(d.min,d.max,l);t===d&&(m-=s),t.min=Xy(t.min,s,i,m,o),t.max=Xy(t.max,s,i,m,o)}function Ky(t,s,[i,l,o],d,f){pA(t,s[i],s[l],s[o],s.scale,d,f)}const gA=["x","scaleX","originX"],yA=["y","scaleY","originY"];function Qy(t,s,i,l){Ky(t.x,s,gA,i?i.x:void 0,l?l.x:void 0),Ky(t.y,s,yA,i?i.y:void 0,l?l.y:void 0)}function Zy(t,s){t.min=s.min,t.max=s.max}function Hn(t,s){Zy(t.x,s.x),Zy(t.y,s.y)}function Jy(t,s){t.translate=s.translate,t.scale=s.scale,t.originPoint=s.originPoint,t.origin=s.origin}function Wy(t){return t.translate===0&&t.scale===1}function Jv(t){return Wy(t.x)&&Wy(t.y)}function ex(t,s){return t.min===s.min&&t.max===s.max}function xA(t,s){return ex(t.x,s.x)&&ex(t.y,s.y)}function tx(t,s){return Math.round(t.min)===Math.round(s.min)&&Math.round(t.max)===Math.round(s.max)}function Wv(t,s){return tx(t.x,s.x)&&tx(t.y,s.y)}function nx(t){return Jt(t.x)/Jt(t.y)}function sx(t,s){return t.translate===s.translate&&t.scale===s.scale&&t.originPoint===s.originPoint}function Rn(t){return[t("x"),t("y")]}function bA(t,s,i){let l="";const o=t.x.translate/s.x,d=t.y.translate/s.y,f=i?.z||0;if((o||d||f)&&(l=`translate3d(${o}px, ${d}px, ${f}px) `),(s.x!==1||s.y!==1)&&(l+=`scale(${1/s.x}, ${1/s.y}) `),i){const{transformPerspective:y,rotate:x,rotateX:g,rotateY:w,skewX:S,skewY:T}=i;y&&(l=`perspective(${y}px) ${l}`),x&&(l+=`rotate(${x}deg) `),g&&(l+=`rotateX(${g}deg) `),w&&(l+=`rotateY(${w}deg) `),S&&(l+=`skewX(${S}deg) `),T&&(l+=`skewY(${T}deg) `)}const m=t.x.scale*s.x,p=t.y.scale*s.y;return(m!==1||p!==1)&&(l+=`scale(${m}, ${p})`),l||"none"}const ew=["TopLeft","TopRight","BottomLeft","BottomRight"],vA=ew.length,ax=t=>typeof t=="string"?parseFloat(t):t,ix=t=>typeof t=="number"||fe.test(t);function wA(t,s,i,l,o,d){o?(t.opacity=it(0,i.opacity??1,SA(l)),t.opacityExit=it(s.opacity??1,0,jA(l))):d&&(t.opacity=it(s.opacity??1,i.opacity??1,l));for(let f=0;fls?1:i(dr(t,s,l))}function TA(t,s){const i=Zt.now(),l=({timestamp:o})=>{const d=o-i;d>=s&&(va(l),t(d-s))};return We.setup(l,!0),()=>va(l)}function pr(t,s,i,l={passive:!0}){return t.addEventListener(s,i,l),()=>t.removeEventListener(s,i)}function ec(t){return It(t)?t.get():t}function NA(t,s,i){const l=It(t)?t:Wi(t);return l.start(Bh("",l,s,i)),l.animation}const CA=(t,s)=>t.depth-s.depth;class AA{constructor(){this.children=[],this.isDirty=!1}add(s){vh(this.children,s),this.isDirty=!0}remove(s){wh(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(CA),this.isDirty=!1,this.children.forEach(s)}}class EA{constructor(){this.members=[]}add(s){vh(this.members,s),s.scheduleRender()}remove(s){if(wh(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(s){const i=this.members.findIndex(o=>s===o);if(i===0)return!1;let l;for(let o=i;o>=0;o--){const d=this.members[o];if(d.isPresent!==!1){l=d;break}}return l?(this.promote(l),!0):!1}promote(s,i){const l=this.lead;if(s!==l&&(this.prevLead=l,this.lead=s,s.show(),l)){l.instance&&l.scheduleRender(),s.scheduleRender(),s.resumeFrom=l,i&&(s.resumeFrom.preserveOpacity=!0),l.snapshot&&(s.snapshot=l.snapshot,s.snapshot.latestValues=l.animationValues||l.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:o}=s.options;o===!1&&l.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:i,resumingFrom:l}=s;i.onExitComplete&&i.onExitComplete(),l&&l.options.onExitComplete&&l.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const tc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},cf=["","X","Y","Z"],DA=1e3;let kA=0;function uf(t,s,i,l){const{latestValues:o}=s;o[t]&&(i[t]=o[t],s.setStaticValue(t,0),l&&(l[t]=0))}function nw(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:s}=t.options;if(!s)return;const i=wv(s);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:d}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",We,!(o||d))}const{parent:l}=t;l&&!l.hasCheckedOptimisedAppear&&nw(l)}function sw({attachResizeListener:t,defaultParent:s,measureScroll:i,checkIsScrollRoot:l,resetTransform:o}){return class{constructor(f={},m=s?.()){this.id=kA++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(OA),this.nodes.forEach(BA),this.nodes.forEach(VA),this.nodes.forEach(_A)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;pthis.root.updateBlockedByResize=!1;We.read(()=>{g=window.innerWidth}),t(f,()=>{const S=window.innerWidth;S!==g&&(g=S,this.root.updateBlockedByResize=!0,x&&x(),x=TA(w,250),tc.hasAnimatedSinceResize&&(tc.hasAnimatedSinceResize=!1,this.nodes.forEach(cx)))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&y&&(m||p)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:g,hasRelativeLayoutChanged:w,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const T=this.options.transition||y.getDefaultTransition()||$A,{onLayoutAnimationStart:N,onLayoutAnimationComplete:R}=y.getProps(),D=!this.targetLayout||!Wv(this.targetLayout,S),A=!g&&w;if(this.options.layoutRoot||this.resumeFrom||A||g&&(D||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...zh(T,"layout"),onPlay:N,onComplete:R};(y.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(x,A)}else g||cx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),va(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(UA),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&nw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let x=0;x{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Jt(this.snapshot.measuredBox.x)&&!Jt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p{const _=B/1e3;ux(g.x,f.x,_),ux(g.y,f.y,_),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dc(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),HA(this.relativeTarget,this.relativeTargetOrigin,w,_),C&&xA(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Tt()),Hn(C,this.relativeTarget)),N&&(this.animationValues=x,wA(x,y,this.latestValues,_,A,D)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(va(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=We.update(()=>{tc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Wi(0)),this.currentAnimation=NA(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),f.onUpdate&&f.onUpdate(m)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.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 f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(DA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:p,layout:y,latestValues:x}=f;if(!(!m||!p||!y)){if(this!==f&&this.layout&&y&&aw(this.options.animationType,this.layout.layoutBox,y.layoutBox)){p=this.target||Tt();const g=Jt(this.layout.layoutBox.x);p.x.min=f.target.x.min,p.x.max=p.x.min+g;const w=Jt(this.layout.layoutBox.y);p.y.min=f.target.y.min,p.y.max=p.y.min+w}Hn(m,p),Xi(m,x),lr(this.projectionDeltaWithTransform,this.layoutCorrected,m,x)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new EA),this.sharedNodes.get(f).add(m);const y=m.options.initialPromotionConfig;m.promote({transition:y?y.transition:void 0,preserveFollowOpacity:y&&y.shouldPreserveFollowOpacity?y.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){const{layoutId:f}=this.options;return f?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:f}=this.options;return f?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:m,preserveFollowOpacity:p}={}){const y=this.getStack();y&&y.promote(this,p),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:p}=f;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const y={};p.z&&uf("z",f,y,this.animationValues);for(let x=0;xf.currentAnimation?.stop()),this.root.nodes.forEach(rx),this.root.sharedNodes.clear()}}}function RA(t){t.updateLayout()}function MA(t){const s=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:l}=t.layout,{animationType:o}=t.options,d=s.source!==t.layout.source;o==="size"?Rn(x=>{const g=d?s.measuredBox[x]:s.layoutBox[x],w=Jt(g);g.min=i[x].min,g.max=g.min+w}):aw(o,s.layoutBox,i)&&Rn(x=>{const g=d?s.measuredBox[x]:s.layoutBox[x],w=Jt(i[x]);g.max=g.min+w,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[x].max=t.relativeTarget[x].min+w)});const f=Yi();lr(f,i,s.layoutBox);const m=Yi();d?lr(m,t.applyTransform(l,!0),s.measuredBox):lr(m,i,s.layoutBox);const p=!Jv(f);let y=!1;if(!t.resumeFrom){const x=t.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:g,layout:w}=x;if(g&&w){const S=Tt();dc(S,s.layoutBox,g.layoutBox);const T=Tt();dc(T,i,w.layoutBox),Wv(S,T)||(y=!0),x.options.layoutRoot&&(t.relativeTarget=T,t.relativeTargetOrigin=S,t.relativeParent=x)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:m,layoutDelta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:y})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function OA(t){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 _A(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function LA(t){t.clearSnapshot()}function rx(t){t.clearMeasurements()}function ox(t){t.isLayoutDirty=!1}function zA(t){const{visualElement:s}=t.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),t.resetTransform()}function cx(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function BA(t){t.resolveTargetDelta()}function VA(t){t.calcProjection()}function UA(t){t.resetSkewAndRotation()}function PA(t){t.removeLeadSnapshot()}function ux(t,s,i){t.translate=it(s.translate,0,i),t.scale=it(s.scale,1,i),t.origin=s.origin,t.originPoint=s.originPoint}function dx(t,s,i,l){t.min=it(s.min,i.min,l),t.max=it(s.max,i.max,l)}function HA(t,s,i,l){dx(t.x,s.x,i.x,l),dx(t.y,s.y,i.y,l)}function qA(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const $A={duration:.45,ease:[.4,0,.1,1]},fx=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),hx=fx("applewebkit/")&&!fx("chrome/")?Math.round:On;function mx(t){t.min=hx(t.min),t.max=hx(t.max)}function IA(t){mx(t.x),mx(t.y)}function aw(t,s,i){return t==="position"||t==="preserve-aspect"&&!hA(nx(s),nx(i),.2)}function GA(t){return t!==t.root&&t.scroll?.wasRoot}const YA=sw({attachResizeListener:(t,s)=>pr(t,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),df={current:void 0},iw=sw({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!df.current){const t=new YA({});t.mount(window),t.setOptions({layoutScroll:!0}),df.current=t}return df.current},resetTransform:(t,s)=>{t.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Fh=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function px(t,s){if(typeof t=="function")return t(s);t!=null&&(t.current=s)}function FA(...t){return s=>{let i=!1;const l=t.map(o=>{const d=px(o,s);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let o=0;o{const{width:x,height:g,top:w,left:S,right:T}=f.current;if(s||!d.current||!x||!g)return;const N=i==="left"?`left: ${S}`:`right: ${T}`;d.current.dataset.motionPopId=o;const R=document.createElement("style");m&&(R.nonce=m);const D=l??document.head;return D.appendChild(R),R.sheet&&R.sheet.insertRule(` [data-motion-pop-id="${o}"] { position: absolute !important;