=r)return{node:a,offset:r-i};i=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Z0(a)}}function e_(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?e_(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function t_(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=pi(i.document);r instanceof i.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)i=r.contentWindow;else break;r=pi(i.document)}return r}function cp(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var PP=vn&&"documentMode"in document&&11>=document.documentMode,ka=null,up=null,gc=null,fp=!1;function n_(i,r,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fp||ka==null||ka!==pi(u)||(u=ka,"selectionStart"in u&&cp(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),gc&&pc(gc,u)||(gc=u,u=wh(up,"onSelect"),0>=x,p-=x,_i=1<<32-gn(r)+p|a<y?y:8;var x=$.T,C={};$.T=C,Wp(i,!1,r,a);try{var U=p(),X=$.S;if(X!==null&&X(C,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ne=zP(U,u);Pc(i,r,ne,Un(i))}else Pc(i,r,u,Un(i))}catch(oe){Pc(i,r,{then:function(){},status:"rejected",reason:oe},Un())}finally{le.p=y,$.T=x}}function GP(){}function Qp(i,r,a,u){if(i.tag!==5)throw Error(s(476));var p=sT(i).queue;nT(i,p,r,se,a===null?GP:function(){return iT(i),a(u)})}function sT(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:se},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:a},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function iT(i){var r=sT(i).next.queue;Pc(i,r,{},Un())}function Yp(){return cn(Yc)}function rT(){return It().memoizedState}function oT(){return It().memoizedState}function $P(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var a=Un();i=hr(a);var u=dr(r,i,a);u!==null&&(zn(u,r,a),Sc(u,r,a)),r={cache:Sp()},i.payload=r;return}r=r.return}}function KP(i,r,a){var u=Un();a={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},nh(i)?lT(r,a):(a=pp(i,r,a,u),a!==null&&(zn(a,i,u),cT(a,r,u)))}function aT(i,r,a){var u=Un();Pc(i,r,a,u)}function Pc(i,r,a,u){var p={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(nh(i))lT(r,p);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var x=r.lastRenderedState,C=y(x,a);if(p.hasEagerState=!0,p.eagerState=C,Mn(C,x))return Uf(i,r,p,0),lt===null&&Lf(),!1}catch{}if(a=pp(i,r,p,u),a!==null)return zn(a,i,u),cT(a,r,u),!0}return!1}function Wp(i,r,a,u){if(u={lane:2,revertLane:Cg(),action:u,hasEagerState:!1,eagerState:null,next:null},nh(i)){if(r)throw Error(s(479))}else r=pp(i,a,u,2),r!==null&&zn(r,i,2)}function nh(i){var r=i.alternate;return i===ke||r!==null&&r===ke}function lT(i,r){Ga=Wf=!0;var a=i.pending;a===null?r.next=r:(r.next=a.next,a.next=r),i.pending=r}function cT(i,r,a){if((a&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,a|=u,r.lanes=a,Ji(i,a)}}var sh={readContext:cn,use:Zf,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et},uT={readContext:cn,use:Zf,useCallback:function(i,r){return An().memoizedState=[i,r===void 0?null:r],i},useContext:cn,useEffect:K_,useImperativeHandle:function(i,r,a){a=a!=null?a.concat([i]):null,th(4194308,4,X_.bind(null,r,i),a)},useLayoutEffect:function(i,r){return th(4194308,4,i,r)},useInsertionEffect:function(i,r){th(4,2,i,r)},useMemo:function(i,r){var a=An();r=r===void 0?null:r;var u=i();if(qo){Kn(!0);try{i()}finally{Kn(!1)}}return a.memoizedState=[u,r],u},useReducer:function(i,r,a){var u=An();if(a!==void 0){var p=a(r);if(qo){Kn(!0);try{a(r)}finally{Kn(!1)}}}else p=r;return u.memoizedState=u.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},u.queue=i,i=i.dispatch=KP.bind(null,ke,i),[u.memoizedState,i]},useRef:function(i){var r=An();return i={current:i},r.memoizedState=i},useState:function(i){i=Hp(i);var r=i.queue,a=aT.bind(null,ke,r);return r.dispatch=a,[i.memoizedState,a]},useDebugValue:$p,useDeferredValue:function(i,r){var a=An();return Kp(a,i,r)},useTransition:function(){var i=Hp(!1);return i=nT.bind(null,ke,i.queue,!0,!1),An().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,a){var u=ke,p=An();if(Ye){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),lt===null)throw Error(s(349));(He&124)!==0||P_(u,r,a)}p.memoizedState=a;var y={value:a,getSnapshot:r};return p.queue=y,K_(O_.bind(null,u,y,i),[i]),u.flags|=2048,Ka(9,eh(),D_.bind(null,u,y,a,r),null),a},useId:function(){var i=An(),r=lt.identifierPrefix;if(Ye){var a=Ti,u=_i;a=(u&~(1<<32-gn(u)-1)).toString(32)+a,r="«"+r+"R"+a,a=Xf++,0Re?(Kt=xe,xe=null):Kt=xe.sibling;var Qe=Z(G,xe,Y[Re],ie);if(Qe===null){xe===null&&(xe=Kt);break}i&&xe&&Qe.alternate===null&&r(G,xe),q=y(Qe,q,Re),je===null?be=Qe:je.sibling=Qe,je=Qe,xe=Kt}if(Re===Y.length)return a(G,xe),Ye&&jo(G,Re),be;if(xe===null){for(;ReRe?(Kt=xe,xe=null):Kt=xe.sibling;var Nr=Z(G,xe,Qe.value,ie);if(Nr===null){xe===null&&(xe=Kt);break}i&&xe&&Nr.alternate===null&&r(G,xe),q=y(Nr,q,Re),je===null?be=Nr:je.sibling=Nr,je=Nr,xe=Kt}if(Qe.done)return a(G,xe),Ye&&jo(G,Re),be;if(xe===null){for(;!Qe.done;Re++,Qe=Y.next())Qe=oe(G,Qe.value,ie),Qe!==null&&(q=y(Qe,q,Re),je===null?be=Qe:je.sibling=Qe,je=Qe);return Ye&&jo(G,Re),be}for(xe=u(xe);!Qe.done;Re++,Qe=Y.next())Qe=J(xe,G,Re,Qe.value,ie),Qe!==null&&(i&&Qe.alternate!==null&&xe.delete(Qe.key===null?Re:Qe.key),q=y(Qe,q,Re),je===null?be=Qe:je.sibling=Qe,je=Qe);return i&&xe.forEach(function(YD){return r(G,YD)}),Ye&&jo(G,Re),be}function it(G,q,Y,ie){if(typeof Y=="object"&&Y!==null&&Y.type===R&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$typeof){case T:e:{for(var be=Y.key;q!==null;){if(q.key===be){if(be=Y.type,be===R){if(q.tag===7){a(G,q.sibling),ie=p(q,Y.props.children),ie.return=G,G=ie;break e}}else if(q.elementType===be||typeof be=="object"&&be!==null&&be.$typeof===A&&hT(be)===q.type){a(G,q.sibling),ie=p(q,Y.props),Oc(ie,Y),ie.return=G,G=ie;break e}a(G,q);break}else r(G,q);q=q.sibling}Y.type===R?(ie=ko(Y.props.children,G.mode,ie,Y.key),ie.return=G,G=ie):(ie=Bf(Y.type,Y.key,Y.props,null,G.mode,ie),Oc(ie,Y),ie.return=G,G=ie)}return x(G);case E:e:{for(be=Y.key;q!==null;){if(q.key===be)if(q.tag===4&&q.stateNode.containerInfo===Y.containerInfo&&q.stateNode.implementation===Y.implementation){a(G,q.sibling),ie=p(q,Y.children||[]),ie.return=G,G=ie;break e}else{a(G,q);break}else r(G,q);q=q.sibling}ie=vp(Y,G.mode,ie),ie.return=G,G=ie}return x(G);case A:return be=Y._init,Y=be(Y._payload),it(G,q,Y,ie)}if(ye(Y))return Ne(G,q,Y,ie);if(F(Y)){if(be=F(Y),typeof be!="function")throw Error(s(150));return Y=be.call(Y),Ae(G,q,Y,ie)}if(typeof Y.then=="function")return it(G,q,ih(Y),ie);if(Y.$typeof===B)return it(G,q,Gf(G,Y),ie);rh(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,q!==null&&q.tag===6?(a(G,q.sibling),ie=p(q,Y),ie.return=G,G=ie):(a(G,q),ie=yp(Y,G.mode,ie),ie.return=G,G=ie),x(G)):a(G,q)}return function(G,q,Y,ie){try{Dc=0;var be=it(G,q,Y,ie);return Qa=null,be}catch(xe){if(xe===xc||xe===Kf)throw xe;var je=kn(29,xe,null,G.mode);return je.lanes=ie,je.return=G,je}}}var Ya=dT(!0),mT=dT(!1),ns=Q(null),Ks=null;function pr(i){var r=i.alternate;fe(Lt,Lt.current&1),fe(ns,i),Ks===null&&(r===null||Ha.current!==null||r.memoizedState!==null)&&(Ks=i)}function pT(i){if(i.tag===22){if(fe(Lt,Lt.current),fe(ns,i),Ks===null){var r=i.alternate;r!==null&&r.memoizedState!==null&&(Ks=i)}}else gr()}function gr(){fe(Lt,Lt.current),fe(ns,ns.current)}function Si(i){ce(ns),Ks===i&&(Ks=null),ce(Lt)}var Lt=Q(0);function oh(i){for(var r=i;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||zg(a)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Xp(i,r,a,u){r=i.memoizedState,a=a(u,r),a=a==null?r:g({},r,a),i.memoizedState=a,i.lanes===0&&(i.updateQueue.baseState=a)}var Zp={enqueueSetState:function(i,r,a){i=i._reactInternals;var u=Un(),p=hr(u);p.payload=r,a!=null&&(p.callback=a),r=dr(i,p,u),r!==null&&(zn(r,i,u),Sc(r,i,u))},enqueueReplaceState:function(i,r,a){i=i._reactInternals;var u=Un(),p=hr(u);p.tag=1,p.payload=r,a!=null&&(p.callback=a),r=dr(i,p,u),r!==null&&(zn(r,i,u),Sc(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var a=Un(),u=hr(a);u.tag=2,r!=null&&(u.callback=r),r=dr(i,u,a),r!==null&&(zn(r,i,a),Sc(r,i,a))}};function gT(i,r,a,u,p,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,y,x):r.prototype&&r.prototype.isPureReactComponent?!pc(a,u)||!pc(p,y):!0}function yT(i,r,a,u){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,u),r.state!==i&&Zp.enqueueReplaceState(r,r.state,null)}function Ho(i,r){var a=r;if("ref"in r){a={};for(var u in r)u!=="ref"&&(a[u]=r[u])}if(i=i.defaultProps){a===r&&(a=g({},a));for(var p in i)a[p]===void 0&&(a[p]=i[p])}return a}var ah=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function vT(i){ah(i)}function bT(i){console.error(i)}function _T(i){ah(i)}function lh(i,r){try{var a=i.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function TT(i,r,a){try{var u=i.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Jp(i,r,a){return a=hr(a),a.tag=3,a.payload={element:null},a.callback=function(){lh(i,r)},a}function wT(i){return i=hr(i),i.tag=3,i}function xT(i,r,a,u){var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;i.payload=function(){return p(y)},i.callback=function(){TT(r,a,u)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(i.callback=function(){TT(r,a,u),typeof p!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var C=u.stack;this.componentDidCatch(u.value,{componentStack:C!==null?C:""})})}function YP(i,r,a,u,p){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=a.alternate,r!==null&&_c(r,a,p,!0),a=ns.current,a!==null){switch(a.tag){case 13:return Ks===null?xg():a.alternate===null&&vt===0&&(vt=3),a.flags&=-257,a.flags|=65536,a.lanes=p,u===Cp?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([u]):r.add(u),Sg(i,u,p)),!1;case 22:return a.flags|=65536,u===Cp?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([u]):a.add(u)),Sg(i,u,p)),!1}throw Error(s(435,a.tag))}return Sg(i,u,p),xg(),!1}if(Ye)return r=ns.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==Tp&&(i=Error(s(422),{cause:u}),bc(Zn(i,a)))):(u!==Tp&&(r=Error(s(423),{cause:u}),bc(Zn(r,a))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,u=Zn(u,a),p=Jp(i.stateNode,u,p),Pp(i,p),vt!==4&&(vt=2)),!1;var y=Error(s(520),{cause:u});if(y=Zn(y,a),zc===null?zc=[y]:zc.push(y),vt!==4&&(vt=2),r===null)return!0;u=Zn(u,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,i=p&-p,a.lanes|=i,i=Jp(a.stateNode,u,i),Pp(a,i),!1;case 1:if(r=a.type,y=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(wr===null||!wr.has(y))))return a.flags|=65536,p&=-p,a.lanes|=p,p=wT(p),xT(p,i,a,u),Pp(a,p),!1}a=a.return}while(a!==null);return!1}var ET=Error(s(461)),Gt=!1;function Xt(i,r,a,u){r.child=i===null?mT(r,null,a,u):Ya(r,i.child,a,u)}function ST(i,r,a,u,p){a=a.render;var y=r.ref;if("ref"in u){var x={};for(var C in u)C!=="ref"&&(x[C]=u[C])}else x=u;return Bo(r),u=Vp(i,r,a,x,y,p),C=jp(),i!==null&&!Gt?(Lp(i,r,p),Ai(i,r,p)):(Ye&&C&&bp(r),r.flags|=1,Xt(i,r,u,p),r.child)}function AT(i,r,a,u,p){if(i===null){var y=a.type;return typeof y=="function"&&!gp(y)&&y.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=y,RT(i,r,y,u,p)):(i=Bf(a.type,null,u,r,r.mode,p),i.ref=r.ref,i.return=r,r.child=i)}if(y=i.child,!ag(i,p)){var x=y.memoizedProps;if(a=a.compare,a=a!==null?a:pc,a(x,u)&&i.ref===r.ref)return Ai(i,r,p)}return r.flags|=1,i=bi(y,u),i.ref=r.ref,i.return=r,r.child=i}function RT(i,r,a,u,p){if(i!==null){var y=i.memoizedProps;if(pc(y,u)&&i.ref===r.ref)if(Gt=!1,r.pendingProps=u=y,ag(i,p))(i.flags&131072)!==0&&(Gt=!0);else return r.lanes=i.lanes,Ai(i,r,p)}return eg(i,r,a,u,p)}function CT(i,r,a){var u=r.pendingProps,p=u.children,y=i!==null?i.memoizedState:null;if(u.mode==="hidden"){if((r.flags&128)!==0){if(u=y!==null?y.baseLanes|a:a,i!==null){for(p=r.child=i.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;r.childLanes=y&~u}else r.childLanes=0,r.child=null;return IT(i,r,u,a)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&$f(r,y!==null?y.cachePool:null),y!==null?R_(r,y):Op(),pT(r);else return r.lanes=r.childLanes=536870912,IT(i,r,y!==null?y.baseLanes|a:a,a)}else y!==null?($f(r,y.cachePool),R_(r,y),gr(),r.memoizedState=null):(i!==null&&$f(r,null),Op(),gr());return Xt(i,r,p,a),r.child}function IT(i,r,a,u){var p=Rp();return p=p===null?null:{parent:jt._currentValue,pool:p},r.memoizedState={baseLanes:a,cachePool:p},i!==null&&$f(r,null),Op(),pT(r),i!==null&&_c(i,r,u,!0),null}function ch(i,r){var a=r.ref;if(a===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(i===null||i.ref!==a)&&(r.flags|=4194816)}}function eg(i,r,a,u,p){return Bo(r),a=Vp(i,r,a,u,void 0,p),u=jp(),i!==null&&!Gt?(Lp(i,r,p),Ai(i,r,p)):(Ye&&u&&bp(r),r.flags|=1,Xt(i,r,a,p),r.child)}function NT(i,r,a,u,p,y){return Bo(r),r.updateQueue=null,a=I_(r,u,a,p),C_(i),u=jp(),i!==null&&!Gt?(Lp(i,r,y),Ai(i,r,y)):(Ye&&u&&bp(r),r.flags|=1,Xt(i,r,a,y),r.child)}function PT(i,r,a,u,p){if(Bo(r),r.stateNode===null){var y=Ua,x=a.contextType;typeof x=="object"&&x!==null&&(y=cn(x)),y=new a(u,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Zp,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=u,y.state=r.memoizedState,y.refs={},Ip(r),x=a.contextType,y.context=typeof x=="object"&&x!==null?cn(x):Ua,y.state=r.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(Xp(r,a,x,u),y.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(x=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),x!==y.state&&Zp.enqueueReplaceState(y,y.state,null),Rc(r,u,y,p),Ac(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){y=r.stateNode;var C=r.memoizedProps,U=Ho(a,C);y.props=U;var X=y.context,ne=a.contextType;x=Ua,typeof ne=="object"&&ne!==null&&(x=cn(ne));var oe=a.getDerivedStateFromProps;ne=typeof oe=="function"||typeof y.getSnapshotBeforeUpdate=="function",C=r.pendingProps!==C,ne||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C||X!==x)&&yT(r,y,u,x),fr=!1;var Z=r.memoizedState;y.state=Z,Rc(r,u,y,p),Ac(),X=r.memoizedState,C||Z!==X||fr?(typeof oe=="function"&&(Xp(r,a,oe,u),X=r.memoizedState),(U=fr||gT(r,a,U,u,Z,X,x))?(ne||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=X),y.props=u,y.state=X,y.context=x,u=U):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,Np(i,r),x=r.memoizedProps,ne=Ho(a,x),y.props=ne,oe=r.pendingProps,Z=y.context,X=a.contextType,U=Ua,typeof X=="object"&&X!==null&&(U=cn(X)),C=a.getDerivedStateFromProps,(X=typeof C=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(x!==oe||Z!==U)&&yT(r,y,u,U),fr=!1,Z=r.memoizedState,y.state=Z,Rc(r,u,y,p),Ac();var J=r.memoizedState;x!==oe||Z!==J||fr||i!==null&&i.dependencies!==null&&Hf(i.dependencies)?(typeof C=="function"&&(Xp(r,a,C,u),J=r.memoizedState),(ne=fr||gT(r,a,ne,u,Z,J,U)||i!==null&&i.dependencies!==null&&Hf(i.dependencies))?(X||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,J,U),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,J,U)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||x===i.memoizedProps&&Z===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&Z===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=J),y.props=u,y.state=J,y.context=U,u=ne):(typeof y.componentDidUpdate!="function"||x===i.memoizedProps&&Z===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&Z===i.memoizedState||(r.flags|=1024),u=!1)}return y=u,ch(i,r),u=(r.flags&128)!==0,y||u?(y=r.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,i!==null&&u?(r.child=Ya(r,i.child,null,p),r.child=Ya(r,null,a,p)):Xt(i,r,a,p),r.memoizedState=y.state,i=r.child):i=Ai(i,r,p),i}function DT(i,r,a,u){return vc(),r.flags|=256,Xt(i,r,a,u),r.child}var tg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ng(i){return{baseLanes:i,cachePool:b_()}}function sg(i,r,a){return i=i!==null?i.childLanes&~a:0,r&&(i|=ss),i}function OT(i,r,a){var u=r.pendingProps,p=!1,y=(r.flags&128)!==0,x;if((x=y)||(x=i!==null&&i.memoizedState===null?!1:(Lt.current&2)!==0),x&&(p=!0,r.flags&=-129),x=(r.flags&32)!==0,r.flags&=-33,i===null){if(Ye){if(p?pr(r):gr(),Ye){var C=yt,U;if(U=C){e:{for(U=C,C=$s;U.nodeType!==8;){if(!C){C=null;break e}if(U=ws(U.nextSibling),U===null){C=null;break e}}C=U}C!==null?(r.memoizedState={dehydrated:C,treeContext:Vo!==null?{id:_i,overflow:Ti}:null,retryLane:536870912,hydrationErrors:null},U=kn(18,null,null,0),U.stateNode=C,U.return=r,r.child=U,_n=r,yt=null,U=!0):U=!1}U||Uo(r)}if(C=r.memoizedState,C!==null&&(C=C.dehydrated,C!==null))return zg(C)?r.lanes=32:r.lanes=536870912,null;Si(r)}return C=u.children,u=u.fallback,p?(gr(),p=r.mode,C=uh({mode:"hidden",children:C},p),u=ko(u,p,a,null),C.return=r,u.return=r,C.sibling=u,r.child=C,p=r.child,p.memoizedState=ng(a),p.childLanes=sg(i,x,a),r.memoizedState=tg,u):(pr(r),ig(r,C))}if(U=i.memoizedState,U!==null&&(C=U.dehydrated,C!==null)){if(y)r.flags&256?(pr(r),r.flags&=-257,r=rg(i,r,a)):r.memoizedState!==null?(gr(),r.child=i.child,r.flags|=128,r=null):(gr(),p=u.fallback,C=r.mode,u=uh({mode:"visible",children:u.children},C),p=ko(p,C,a,null),p.flags|=2,u.return=r,p.return=r,u.sibling=p,r.child=u,Ya(r,i.child,null,a),u=r.child,u.memoizedState=ng(a),u.childLanes=sg(i,x,a),r.memoizedState=tg,r=p);else if(pr(r),zg(C)){if(x=C.nextSibling&&C.nextSibling.dataset,x)var X=x.dgst;x=X,u=Error(s(419)),u.stack="",u.digest=x,bc({value:u,source:null,stack:null}),r=rg(i,r,a)}else if(Gt||_c(i,r,a,!1),x=(a&i.childLanes)!==0,Gt||x){if(x=lt,x!==null&&(u=a&-a,u=(u&42)!==0?1:Zl(u),u=(u&(x.suspendedLanes|a))!==0?0:u,u!==0&&u!==U.retryLane))throw U.retryLane=u,La(i,u),zn(x,i,u),ET;C.data==="$?"||xg(),r=rg(i,r,a)}else C.data==="$?"?(r.flags|=192,r.child=i.child,r=null):(i=U.treeContext,yt=ws(C.nextSibling),_n=r,Ye=!0,Lo=null,$s=!1,i!==null&&(es[ts++]=_i,es[ts++]=Ti,es[ts++]=Vo,_i=i.id,Ti=i.overflow,Vo=r),r=ig(r,u.children),r.flags|=4096);return r}return p?(gr(),p=u.fallback,C=r.mode,U=i.child,X=U.sibling,u=bi(U,{mode:"hidden",children:u.children}),u.subtreeFlags=U.subtreeFlags&65011712,X!==null?p=bi(X,p):(p=ko(p,C,a,null),p.flags|=2),p.return=r,u.return=r,u.sibling=p,r.child=u,u=p,p=r.child,C=i.child.memoizedState,C===null?C=ng(a):(U=C.cachePool,U!==null?(X=jt._currentValue,U=U.parent!==X?{parent:X,pool:X}:U):U=b_(),C={baseLanes:C.baseLanes|a,cachePool:U}),p.memoizedState=C,p.childLanes=sg(i,x,a),r.memoizedState=tg,u):(pr(r),a=i.child,i=a.sibling,a=bi(a,{mode:"visible",children:u.children}),a.return=r,a.sibling=null,i!==null&&(x=r.deletions,x===null?(r.deletions=[i],r.flags|=16):x.push(i)),r.child=a,r.memoizedState=null,a)}function ig(i,r){return r=uh({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function uh(i,r){return i=kn(22,i,null,r),i.lanes=0,i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},i}function rg(i,r,a){return Ya(r,i.child,null,a),i=ig(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function MT(i,r,a){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),xp(i.return,r,a)}function og(i,r,a,u,p){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:p}:(y.isBackwards=r,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=a,y.tailMode=p)}function kT(i,r,a){var u=r.pendingProps,p=u.revealOrder,y=u.tail;if(Xt(i,r,u.children,a),u=Lt.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&MT(i,a,r);else if(i.tag===19)MT(i,a,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}u&=1}switch(fe(Lt,u),p){case"forwards":for(a=r.child,p=null;a!==null;)i=a.alternate,i!==null&&oh(i)===null&&(p=a),a=a.sibling;a=p,a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),og(r,!1,p,a,y);break;case"backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(i=p.alternate,i!==null&&oh(i)===null){r.child=p;break}i=p.sibling,p.sibling=a,a=p,p=i}og(r,!0,a,null,y);break;case"together":og(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Ai(i,r,a){if(i!==null&&(r.dependencies=i.dependencies),Tr|=r.lanes,(a&r.childLanes)===0)if(i!==null){if(_c(i,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(s(153));if(r.child!==null){for(i=r.child,a=bi(i,i.pendingProps),r.child=a,a.return=r;i.sibling!==null;)i=i.sibling,a=a.sibling=bi(i,i.pendingProps),a.return=r;a.sibling=null}return r.child}function ag(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Hf(i)))}function WP(i,r,a){switch(r.tag){case 3:qe(r,r.stateNode.containerInfo),ur(r,jt,i.memoizedState.cache),vc();break;case 27:case 5:Vs(r);break;case 4:qe(r,r.stateNode.containerInfo);break;case 10:ur(r,r.type,r.memoizedProps.value);break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(pr(r),r.flags|=128,null):(a&r.child.childLanes)!==0?OT(i,r,a):(pr(r),i=Ai(i,r,a),i!==null?i.sibling:null);pr(r);break;case 19:var p=(i.flags&128)!==0;if(u=(a&r.childLanes)!==0,u||(_c(i,r,a,!1),u=(a&r.childLanes)!==0),p){if(u)return kT(i,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),fe(Lt,Lt.current),u)break;return null;case 22:case 23:return r.lanes=0,CT(i,r,a);case 24:ur(r,jt,i.memoizedState.cache)}return Ai(i,r,a)}function VT(i,r,a){if(i!==null)if(i.memoizedProps!==r.pendingProps)Gt=!0;else{if(!ag(i,a)&&(r.flags&128)===0)return Gt=!1,WP(i,r,a);Gt=(i.flags&131072)!==0}else Gt=!1,Ye&&(r.flags&1048576)!==0&&h_(r,qf,r.index);switch(r.lanes=0,r.tag){case 16:e:{i=r.pendingProps;var u=r.elementType,p=u._init;if(u=p(u._payload),r.type=u,typeof u=="function")gp(u)?(i=Ho(u,i),r.tag=1,r=PT(null,r,u,i,a)):(r.tag=0,r=eg(null,r,u,i,a));else{if(u!=null){if(p=u.$typeof,p===H){r.tag=11,r=ST(null,r,u,i,a);break e}else if(p===M){r.tag=14,r=AT(null,r,u,i,a);break e}}throw r=ue(u)||u,Error(s(306,r,""))}}return r;case 0:return eg(i,r,r.type,r.pendingProps,a);case 1:return u=r.type,p=Ho(u,r.pendingProps),PT(i,r,u,p,a);case 3:e:{if(qe(r,r.stateNode.containerInfo),i===null)throw Error(s(387));u=r.pendingProps;var y=r.memoizedState;p=y.element,Np(i,r),Rc(r,u,null,a);var x=r.memoizedState;if(u=x.cache,ur(r,jt,u),u!==y.cache&&Ep(r,[jt],a,!0),Ac(),u=x.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:x.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=DT(i,r,u,a);break e}else if(u!==p){p=Zn(Error(s(424)),r),bc(p),r=DT(i,r,u,a);break e}else for(i=r.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,yt=ws(i.firstChild),_n=r,Ye=!0,Lo=null,$s=!0,a=mT(r,null,u,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(vc(),u===p){r=Ai(i,r,a);break e}Xt(i,r,u,a)}r=r.child}return r;case 26:return ch(i,r),i===null?(a=zw(r.type,null,r.pendingProps,null))?r.memoizedState=a:Ye||(a=r.type,i=r.pendingProps,u=Eh(ve.current).createElement(a),u[Tt]=r,u[Wt]=i,Jt(u,a,i),wt(u),r.stateNode=u):r.memoizedState=zw(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Vs(r),i===null&&Ye&&(u=r.stateNode=jw(r.type,r.pendingProps,ve.current),_n=r,$s=!0,p=yt,Sr(r.type)?(Bg=p,yt=ws(u.firstChild)):yt=p),Xt(i,r,r.pendingProps.children,a),ch(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&Ye&&((p=u=yt)&&(u=ED(u,r.type,r.pendingProps,$s),u!==null?(r.stateNode=u,_n=r,yt=ws(u.firstChild),$s=!1,p=!0):p=!1),p||Uo(r)),Vs(r),p=r.type,y=r.pendingProps,x=i!==null?i.memoizedProps:null,u=y.children,jg(p,y)?u=null:x!==null&&jg(p,x)&&(r.flags|=32),r.memoizedState!==null&&(p=Vp(i,r,FP,null,null,a),Yc._currentValue=p),ch(i,r),Xt(i,r,u,a),r.child;case 6:return i===null&&Ye&&((i=a=yt)&&(a=SD(a,r.pendingProps,$s),a!==null?(r.stateNode=a,_n=r,yt=null,i=!0):i=!1),i||Uo(r)),null;case 13:return OT(i,r,a);case 4:return qe(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Ya(r,null,u,a):Xt(i,r,u,a),r.child;case 11:return ST(i,r,r.type,r.pendingProps,a);case 7:return Xt(i,r,r.pendingProps,a),r.child;case 8:return Xt(i,r,r.pendingProps.children,a),r.child;case 12:return Xt(i,r,r.pendingProps.children,a),r.child;case 10:return u=r.pendingProps,ur(r,r.type,u.value),Xt(i,r,u.children,a),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,Bo(r),p=cn(p),u=u(p),r.flags|=1,Xt(i,r,u,a),r.child;case 14:return AT(i,r,r.type,r.pendingProps,a);case 15:return RT(i,r,r.type,r.pendingProps,a);case 19:return kT(i,r,a);case 31:return u=r.pendingProps,a=r.mode,u={mode:u.mode,children:u.children},i===null?(a=uh(u,a),a.ref=r.ref,r.child=a,a.return=r,r=a):(a=bi(i.child,u),a.ref=r.ref,r.child=a,a.return=r,r=a),r;case 22:return CT(i,r,a);case 24:return Bo(r),u=cn(jt),i===null?(p=Rp(),p===null&&(p=lt,y=Sp(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=a),p=y),r.memoizedState={parent:u,cache:p},Ip(r),ur(r,jt,p)):((i.lanes&a)!==0&&(Np(i,r),Rc(r,null,null,a),Ac()),p=i.memoizedState,y=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),ur(r,jt,u)):(u=y.cache,ur(r,jt,u),u!==p.cache&&Ep(r,[jt],a,!0))),Xt(i,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function Ri(i){i.flags|=4}function jT(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Gw(r)){if(r=ns.current,r!==null&&((He&4194048)===He?Ks!==null:(He&62914560)!==He&&(He&536870912)===0||r!==Ks))throw Ec=Cp,__;i.flags|=8192}}function fh(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?Xi():536870912,i.lanes|=r,Ja|=r)}function Mc(i,r){if(!Ye)switch(i.tailMode){case"hidden":r=i.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?i.tail=null:a.sibling=null;break;case"collapsed":a=i.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:u.sibling=null}}function gt(i){var r=i.alternate!==null&&i.alternate.child===i.child,a=0,u=0;if(r)for(var p=i.child;p!==null;)a|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)a|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=u,i.childLanes=a,r}function XP(i,r,a){var u=r.pendingProps;switch(_p(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(r),null;case 1:return gt(r),null;case 3:return a=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),xi(jt),Ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(i===null||i.child===null)&&(yc(r)?Ri(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,p_())),gt(r),null;case 26:return a=r.memoizedState,i===null?(Ri(r),a!==null?(gt(r),jT(r,a)):(gt(r),r.flags&=-16777217)):a?a!==i.memoizedState?(Ri(r),gt(r),jT(r,a)):(gt(r),r.flags&=-16777217):(i.memoizedProps!==u&&Ri(r),gt(r),r.flags&=-16777217),null;case 27:Pn(r),a=ve.current;var p=r.type;if(i!==null&&r.stateNode!=null)i.memoizedProps!==u&&Ri(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return gt(r),null}i=de.current,yc(r)?d_(r):(i=jw(p,u,a),r.stateNode=i,Ri(r))}return gt(r),null;case 5:if(Pn(r),a=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&Ri(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return gt(r),null}if(i=de.current,yc(r))d_(r);else{switch(p=Eh(ve.current),i){case 1:i=p.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=p.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=p.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=p.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=p.createElement("div"),i.innerHTML="&{alignmentOffset:le}},reset:$}}}),c4=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,s;const{placement:o,middlewareData:l,rects:c,initialPlacement:f,platform:d,elements:m}=e,{mainAxis:g=!0,crossAxis:v=!0,fallbackPlacements:T,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:P=!0,...N}=Ui(t,e);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const L=zi(o),z=ei(f),B=zi(f)===f,H=await(d.isRTL==null?void 0:d.isRTL(m.floating)),K=T||(B||!P?[Ad(f)]:JV(f)),te=R!=="none";!T&&te&&K.push(...s4(f,P,R,H));const M=[f,...K],A=await d.detectOverflow(e,N),O=[];let k=((s=l.flip)==null?void 0:s.overflows)||[];if(g&&O.push(A[L]),v){const ue=ZV(o,c,H);O.push(A[ue[0]],A[ue[1]])}if(k=[...k,{placement:o,overflows:O}],!O.every(ue=>ue<=0)){var j,F;const ue=(((j=l.flip)==null?void 0:j.index)||0)+1,ye=M[ue];if(ye&&(!(v==="alignment"?z!==ei(ye):!1)||k.every(se=>ei(se.placement)===z?se.overflows[0]>0:!0)))return{data:{index:ue,overflows:k},reset:{placement:ye}};let $=(F=k.filter(le=>le.overflows[0]<=0).sort((le,se)=>le.overflows[1]-se.overflows[1])[0])==null?void 0:F.placement;if(!$)switch(E){case"bestFit":{var V;const le=(V=k.filter(se=>{if(te){const pe=ei(se.placement);return pe===z||pe==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(pe=>pe>0).reduce((pe,S)=>pe+S,0)]).sort((se,pe)=>se[1]-pe[1])[0])==null?void 0:V[0];le&&($=le);break}case"initialPlacement":$=f;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Yx(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wx(t){return WV.some(e=>t[e]>=0)}const u4=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:s}=e,{strategy:o="referenceHidden",...l}=Ui(t,e);switch(o){case"referenceHidden":{const c=await s.detectOverflow(e,{...l,elementContext:"reference"}),f=Yx(c,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Wx(f)}}}case"escaped":{const c=await s.detectOverflow(e,{...l,altBoundary:!0}),f=Yx(c,n.floating);return{data:{escapedOffsets:f,escaped:Wx(f)}}}default:return{}}}}},pR=new Set(["left","top"]);async function f4(t,e){const{placement:n,platform:s,elements:o}=t,l=await(s.isRTL==null?void 0:s.isRTL(o.floating)),c=zi(n),f=jl(n),d=ei(n)==="y",m=pR.has(c)?-1:1,g=l&&d?-1:1,v=Ui(e,t);let{mainAxis:T,crossAxis:E,alignmentAxis:R}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof R=="number"&&(E=f==="end"?R*-1:R),d?{x:E*g,y:T*m}:{x:T*m,y:E*g}}const h4=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,s;const{x:o,y:l,placement:c,middlewareData:f}=e,d=await f4(e,t);return c===((n=f.offset)==null?void 0:n.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:o+d.x,y:l+d.y,data:{...d,placement:c}}}}},d4=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:s,placement:o,platform:l}=e,{mainAxis:c=!0,crossAxis:f=!1,limiter:d={fn:L=>{let{x:z,y:B}=L;return{x:z,y:B}}},...m}=Ui(t,e),g={x:n,y:s},v=await l.detectOverflow(e,m),T=ei(zi(o)),E=hb(T);let R=g[E],P=g[T];if(c){const L=E==="y"?"top":"left",z=E==="y"?"bottom":"right",B=R+v[L],H=R-v[z];R=Jy(B,R,H)}if(f){const L=T==="y"?"top":"left",z=T==="y"?"bottom":"right",B=P+v[L],H=P-v[z];P=Jy(B,P,H)}const N=d.fn({...e,[E]:R,[T]:P});return{...N,data:{x:N.x-n,y:N.y-s,enabled:{[E]:c,[T]:f}}}}}},m4=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:s,placement:o,rects:l,middlewareData:c}=e,{offset:f=0,mainAxis:d=!0,crossAxis:m=!0}=Ui(t,e),g={x:n,y:s},v=ei(o),T=hb(v);let E=g[T],R=g[v];const P=Ui(f,e),N=typeof P=="number"?{mainAxis:P,crossAxis:0}:{mainAxis:0,crossAxis:0,...P};if(d){const B=T==="y"?"height":"width",H=l.reference[T]-l.floating[B]+N.mainAxis,K=l.reference[T]+l.reference[B]-N.mainAxis;EK&&(E=K)}if(m){var L,z;const B=T==="y"?"width":"height",H=pR.has(zi(o)),K=l.reference[v]-l.floating[B]+(H&&((L=c.offset)==null?void 0:L[v])||0)+(H?0:N.crossAxis),te=l.reference[v]+l.reference[B]+(H?0:((z=c.offset)==null?void 0:z[v])||0)-(H?N.crossAxis:0);Rte&&(R=te)}return{[T]:E,[v]:R}}}},p4=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,s;const{placement:o,rects:l,platform:c,elements:f}=e,{apply:d=()=>{},...m}=Ui(t,e),g=await c.detectOverflow(e,m),v=zi(o),T=jl(o),E=ei(o)==="y",{width:R,height:P}=l.floating;let N,L;v==="top"||v==="bottom"?(N=v,L=T===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(L=v,N=T==="end"?"top":"bottom");const z=P-g.top-g.bottom,B=R-g.left-g.right,H=Kr(P-g[N],z),K=Kr(R-g[L],B),te=!e.middlewareData.shift;let M=H,A=K;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=B),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(M=z),te&&!T){const k=Bn(g.left,0),j=Bn(g.right,0),F=Bn(g.top,0),V=Bn(g.bottom,0);E?A=R-2*(k!==0||j!==0?k+j:Bn(g.left,g.right)):M=P-2*(F!==0||V!==0?F+V:Bn(g.top,g.bottom))}await d({...e,availableWidth:A,availableHeight:M});const O=await c.getDimensions(f.floating);return R!==O.width||P!==O.height?{reset:{rects:!0}}:{}}}};function ym(){return typeof window<"u"}function Ll(t){return gR(t)?(t.nodeName||"").toLowerCase():"#document"}function Hn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ui(t){var e;return(e=(gR(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function gR(t){return ym()?t instanceof Node||t instanceof Hn(t).Node:!1}function Ds(t){return ym()?t instanceof Element||t instanceof Hn(t).Element:!1}function Gi(t){return ym()?t instanceof HTMLElement||t instanceof Hn(t).HTMLElement:!1}function Xx(t){return!ym()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Hn(t).ShadowRoot}function Wu(t){const{overflow:e,overflowX:n,overflowY:s,display:o}=Os(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&o!=="inline"&&o!=="contents"}function g4(t){return/^(table|td|th)$/.test(Ll(t))}function vm(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const y4=/transform|translate|scale|rotate|perspective|filter/,v4=/paint|layout|strict|content/,Yo=t=>!!t&&t!=="none";let cy;function pb(t){const e=Ds(t)?Os(t):t;return Yo(e.transform)||Yo(e.translate)||Yo(e.scale)||Yo(e.rotate)||Yo(e.perspective)||!gb()&&(Yo(e.backdropFilter)||Yo(e.filter))||y4.test(e.willChange||"")||v4.test(e.contain||"")}function b4(t){let e=Qr(t);for(;Gi(e)&&!Al(e);){if(pb(e))return e;if(vm(e))return null;e=Qr(e)}return null}function gb(){return cy==null&&(cy=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),cy}function Al(t){return/^(html|body|#document)$/.test(Ll(t))}function Os(t){return Hn(t).getComputedStyle(t)}function bm(t){return Ds(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Qr(t){if(Ll(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Xx(t)&&t.host||ui(t);return Xx(e)?e.host:e}function yR(t){const e=Qr(t);return Al(e)?t.ownerDocument?t.ownerDocument.body:t.body:Gi(e)&&Wu(e)?e:yR(e)}function Nu(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=yR(t),l=o===((s=t.ownerDocument)==null?void 0:s.body),c=Hn(o);if(l){const f=tv(c);return e.concat(c,c.visualViewport||[],Wu(o)?o:[],f&&n?Nu(f):[])}else return e.concat(o,Nu(o,[],n))}function tv(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function vR(t){const e=Os(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const o=Gi(t),l=o?t.offsetWidth:n,c=o?t.offsetHeight:s,f=Sd(n)!==l||Sd(s)!==c;return f&&(n=l,s=c),{width:n,height:s,$:f}}function yb(t){return Ds(t)?t:t.contextElement}function yl(t){const e=yb(t);if(!Gi(e))return ti(1);const n=e.getBoundingClientRect(),{width:s,height:o,$:l}=vR(e);let c=(l?Sd(n.width):n.width)/s,f=(l?Sd(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const _4=ti(0);function bR(t){const e=Hn(t);return!gb()||!e.visualViewport?_4:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function T4(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Hn(t)?!1:e}function la(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),l=yb(t);let c=ti(1);e&&(s?Ds(s)&&(c=yl(s)):c=yl(t));const f=T4(l,n,s)?bR(l):ti(0);let d=(o.left+f.x)/c.x,m=(o.top+f.y)/c.y,g=o.width/c.x,v=o.height/c.y;if(l){const T=Hn(l),E=s&&Ds(s)?Hn(s):s;let R=T,P=tv(R);for(;P&&s&&E!==R;){const N=yl(P),L=P.getBoundingClientRect(),z=Os(P),B=L.left+(P.clientLeft+parseFloat(z.paddingLeft))*N.x,H=L.top+(P.clientTop+parseFloat(z.paddingTop))*N.y;d*=N.x,m*=N.y,g*=N.x,v*=N.y,d+=B,m+=H,R=Hn(P),P=tv(R)}}return Rd({width:g,height:v,x:d,y:m})}function _m(t,e){const n=bm(t).scrollLeft;return e?e.left+n:la(ui(t)).left+n}function _R(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-_m(t,n),o=n.top+e.scrollTop;return{x:s,y:o}}function w4(t){let{elements:e,rect:n,offsetParent:s,strategy:o}=t;const l=o==="fixed",c=ui(s),f=e?vm(e.floating):!1;if(s===c||f&&l)return n;let d={scrollLeft:0,scrollTop:0},m=ti(1);const g=ti(0),v=Gi(s);if((v||!v&&!l)&&((Ll(s)!=="body"||Wu(c))&&(d=bm(s)),v)){const E=la(s);m=yl(s),g.x=E.x+s.clientLeft,g.y=E.y+s.clientTop}const T=c&&!v&&!l?_R(c,d):ti(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-d.scrollLeft*m.x+g.x+T.x,y:n.y*m.y-d.scrollTop*m.y+g.y+T.y}}function x4(t){return Array.from(t.getClientRects())}function E4(t){const e=ui(t),n=bm(t),s=t.ownerDocument.body,o=Bn(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),l=Bn(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let c=-n.scrollLeft+_m(t);const f=-n.scrollTop;return Os(s).direction==="rtl"&&(c+=Bn(e.clientWidth,s.clientWidth)-o),{width:o,height:l,x:c,y:f}}const Zx=25;function S4(t,e){const n=Hn(t),s=ui(t),o=n.visualViewport;let l=s.clientWidth,c=s.clientHeight,f=0,d=0;if(o){l=o.width,c=o.height;const g=gb();(!g||g&&e==="fixed")&&(f=o.offsetLeft,d=o.offsetTop)}const m=_m(s);if(m<=0){const g=s.ownerDocument,v=g.body,T=getComputedStyle(v),E=g.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,R=Math.abs(s.clientWidth-v.clientWidth-E);R<=Zx&&(l-=R)}else m<=Zx&&(l+=m);return{width:l,height:c,x:f,y:d}}function A4(t,e){const n=la(t,!0,e==="fixed"),s=n.top+t.clientTop,o=n.left+t.clientLeft,l=Gi(t)?yl(t):ti(1),c=t.clientWidth*l.x,f=t.clientHeight*l.y,d=o*l.x,m=s*l.y;return{width:c,height:f,x:d,y:m}}function Jx(t,e,n){let s;if(e==="viewport")s=S4(t,n);else if(e==="document")s=E4(ui(t));else if(Ds(e))s=A4(e,n);else{const o=bR(t);s={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Rd(s)}function TR(t,e){const n=Qr(t);return n===e||!Ds(n)||Al(n)?!1:Os(n).position==="fixed"||TR(n,e)}function R4(t,e){const n=e.get(t);if(n)return n;let s=Nu(t,[],!1).filter(f=>Ds(f)&&Ll(f)!=="body"),o=null;const l=Os(t).position==="fixed";let c=l?Qr(t):t;for(;Ds(c)&&!Al(c);){const f=Os(c),d=pb(c);!d&&f.position==="fixed"&&(o=null),(l?!d&&!o:!d&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Wu(c)&&!d&&TR(t,c))?s=s.filter(g=>g!==c):o=f,c=Qr(c)}return e.set(t,s),s}function C4(t){let{element:e,boundary:n,rootBoundary:s,strategy:o}=t;const c=[...n==="clippingAncestors"?vm(e)?[]:R4(e,this._c):[].concat(n),s],f=Jx(e,c[0],o);let d=f.top,m=f.right,g=f.bottom,v=f.left;for(let T=1;T{c(!1,1e-7)},1e3)}M===1&&!xR(m,t.getBoundingClientRect())&&c(),H=!1}try{n=new IntersectionObserver(K,{...B,root:o.ownerDocument})}catch{n=new IntersectionObserver(K,B)}n.observe(t)}return c(!0),l}function k4(t,e,n,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=s,m=yb(t),g=o||l?[...m?Nu(m):[],...e?Nu(e):[]]:[];g.forEach(L=>{o&&L.addEventListener("scroll",n,{passive:!0}),l&&L.addEventListener("resize",n)});const v=m&&f?M4(m,n):null;let T=-1,E=null;c&&(E=new ResizeObserver(L=>{let[z]=L;z&&z.target===m&&E&&e&&(E.unobserve(e),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var B;(B=E)==null||B.observe(e)})),n()}),m&&!d&&E.observe(m),e&&E.observe(e));let R,P=d?la(t):null;d&&N();function N(){const L=la(t);P&&!xR(P,L)&&n(),P=L,R=requestAnimationFrame(N)}return n(),()=>{var L;g.forEach(z=>{o&&z.removeEventListener("scroll",n),l&&z.removeEventListener("resize",n)}),v?.(),(L=E)==null||L.disconnect(),E=null,d&&cancelAnimationFrame(R)}}const V4=h4,j4=d4,L4=c4,U4=p4,z4=u4,tE=l4,B4=m4,F4=(t,e,n)=>{const s=new Map,o={platform:O4,...n},l={...o.platform,_c:s};return a4(t,e,{...o,platform:l})};var q4=typeof document<"u",H4=function(){},sd=q4?I.useLayoutEffect:H4;function Cd(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,s,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(s=n;s--!==0;)if(!Cd(t[s],e[s]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(e,o[s]))return!1;for(s=n;s--!==0;){const l=o[s];if(!(l==="_owner"&&t.$typeof)&&!Cd(t[l],e[l]))return!1}return!0}return t!==t&&e!==e}function ER(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function nE(t,e){const n=ER(t);return Math.round(e*n)/n}function fy(t){const e=I.useRef(t);return sd(()=>{e.current=t}),e}function G4(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:o,elements:{reference:l,floating:c}={},transform:f=!0,whileElementsMounted:d,open:m}=t,[g,v]=I.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[T,E]=I.useState(s);Cd(T,s)||E(s);const[R,P]=I.useState(null),[N,L]=I.useState(null),z=I.useCallback(se=>{se!==te.current&&(te.current=se,P(se))},[]),B=I.useCallback(se=>{se!==M.current&&(M.current=se,L(se))},[]),H=l||R,K=c||N,te=I.useRef(null),M=I.useRef(null),A=I.useRef(g),O=d!=null,k=fy(d),j=fy(o),F=fy(m),V=I.useCallback(()=>{if(!te.current||!M.current)return;const se={placement:e,strategy:n,middleware:T};j.current&&(se.platform=j.current),F4(te.current,M.current,se).then(pe=>{const S={...pe,isPositioned:F.current!==!1};ue.current&&!Cd(A.current,S)&&(A.current=S,um.flushSync(()=>{v(S)}))})},[T,e,n,j,F]);sd(()=>{m===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,v(se=>({...se,isPositioned:!1})))},[m]);const ue=I.useRef(!1);sd(()=>(ue.current=!0,()=>{ue.current=!1}),[]),sd(()=>{if(H&&(te.current=H),K&&(M.current=K),H&&K){if(k.current)return k.current(H,K,V);V()}},[H,K,V,k,O]);const ye=I.useMemo(()=>({reference:te,floating:M,setReference:z,setFloating:B}),[z,B]),$=I.useMemo(()=>({reference:H,floating:K}),[H,K]),le=I.useMemo(()=>{const se={position:n,left:0,top:0};if(!$.floating)return se;const pe=nE($.floating,g.x),S=nE($.floating,g.y);return f?{...se,transform:"translate("+pe+"px, "+S+"px)",...ER($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:pe,top:S}},[n,f,$.floating,g.x,g.y]);return I.useMemo(()=>({...g,update:V,refs:ye,elements:$,floatingStyles:le}),[g,V,ye,$,le])}const $4=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:s,padding:o}=typeof t=="function"?t(n):t;return s&&e(s)?s.current!=null?tE({element:s.current,padding:o}).fn(n):{}:s?tE({element:s,padding:o}).fn(n):{}}}},K4=(t,e)=>{const n=V4(t);return{name:n.name,fn:n.fn,options:[t,e]}},Q4=(t,e)=>{const n=j4(t);return{name:n.name,fn:n.fn,options:[t,e]}},Y4=(t,e)=>({fn:B4(t).fn,options:[t,e]}),W4=(t,e)=>{const n=L4(t);return{name:n.name,fn:n.fn,options:[t,e]}},X4=(t,e)=>{const n=U4(t);return{name:n.name,fn:n.fn,options:[t,e]}},Z4=(t,e)=>{const n=z4(t);return{name:n.name,fn:n.fn,options:[t,e]}},J4=(t,e)=>{const n=$4(t);return{name:n.name,fn:n.fn,options:[t,e]}};var ej="Arrow",SR=I.forwardRef((t,e)=>{const{children:n,width:s=10,height:o=5,...l}=t;return b.jsx(pn.svg,{...l,ref:e,width:s,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});SR.displayName=ej;var tj=SR;function AR(t){const[e,n]=I.useState(void 0);return $r(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let c,f;if("borderBoxSize"in l){const d=l.borderBoxSize,m=Array.isArray(d)?d[0]:d;c=m.inlineSize,f=m.blockSize}else c=t.offsetWidth,f=t.offsetHeight;n({width:c,height:f})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else n(void 0)},[t]),e}var RR="Popper",[CR,IR]=Qu(RR),[oG,NR]=CR(RR),PR="PopperAnchor",DR=I.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:s,...o}=t,l=NR(PR,n),c=I.useRef(null),f=$n(e,c),d=I.useRef(null);return I.useEffect(()=>{const m=d.current;d.current=s?.current||c.current,m!==d.current&&l.onAnchorChange(d.current)}),s?null:b.jsx(pn.div,{...o,ref:f})});DR.displayName=PR;var vb="PopperContent",[nj,sj]=CR(vb),OR=I.forwardRef((t,e)=>{const{__scopePopper:n,side:s="bottom",sideOffset:o=0,align:l="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:v="partial",hideWhenDetached:T=!1,updatePositionStrategy:E="optimized",onPlaced:R,...P}=t,N=NR(vb,n),[L,z]=I.useState(null),B=$n(e,et=>z(et)),[H,K]=I.useState(null),te=AR(H),M=te?.width??0,A=te?.height??0,O=s+(l!=="center"?"-"+l:""),k=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},j=Array.isArray(m)?m:[m],F=j.length>0,V={padding:k,boundary:j.filter(rj),altBoundary:F},{refs:ue,floatingStyles:ye,placement:$,isPositioned:le,middlewareData:se}=G4({strategy:"fixed",placement:O,whileElementsMounted:(...et)=>k4(...et,{animationFrame:E==="always"}),elements:{reference:N.anchor},middleware:[K4({mainAxis:o+A,alignmentAxis:c}),d&&Q4({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?Y4():void 0,...V}),d&&W4({...V}),X4({...V,apply:({elements:et,rects:qe,availableWidth:Ke,availableHeight:Vs})=>{const{width:Pn,height:Dn}=qe.reference,on=et.floating.style;on.setProperty("--radix-popper-available-width",`${Ke}px`),on.setProperty("--radix-popper-available-height",`${Vs}px`),on.setProperty("--radix-popper-anchor-width",`${Pn}px`),on.setProperty("--radix-popper-anchor-height",`${Dn}px`)}}),H&&J4({element:H,padding:f}),oj({arrowWidth:M,arrowHeight:A}),T&&Z4({strategy:"referenceHidden",...V})]}),[pe,S]=VR($),Q=Gr(R);$r(()=>{le&&Q?.()},[le,Q]);const ce=se.arrow?.x,fe=se.arrow?.y,de=se.arrow?.centerOffset!==0,[Ee,ve]=I.useState();return $r(()=>{L&&ve(window.getComputedStyle(L).zIndex)},[L]),b.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...ye,transform:le?ye.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(" "),...se.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:b.jsx(nj,{scope:n,placedSide:pe,onArrowChange:K,arrowX:ce,arrowY:fe,shouldHideArrow:de,children:b.jsx(pn.div,{"data-side":pe,"data-align":S,...P,ref:B,style:{...P.style,animation:le?void 0:"none"}})})})});OR.displayName=vb;var MR="PopperArrow",ij={top:"bottom",right:"left",bottom:"top",left:"right"},kR=I.forwardRef(function(e,n){const{__scopePopper:s,...o}=e,l=sj(MR,s),c=ij[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:b.jsx(tj,{...o,ref:n,style:{...o.style,display:"block"}})})});kR.displayName=MR;function rj(t){return t!==null}var oj=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:s,middlewareData:o}=e,c=o.arrow?.centerOffset!==0,f=c?0:t.arrowWidth,d=c?0:t.arrowHeight,[m,g]=VR(n),v={start:"0%",center:"50%",end:"100%"}[g],T=(o.arrow?.x??0)+f/2,E=(o.arrow?.y??0)+d/2;let R="",P="";return m==="bottom"?(R=c?v:`${T}px`,P=`${-d}px`):m==="top"?(R=c?v:`${T}px`,P=`${s.floating.height+d}px`):m==="right"?(R=`${-d}px`,P=c?v:`${E}px`):m==="left"&&(R=`${s.floating.width+d}px`,P=c?v:`${E}px`),{data:{x:R,y:P}}}});function VR(t){const[e,n="center"]=t.split("-");return[e,n]}var aj=DR,lj=OR,cj=kR,[Tm]=Qu("Tooltip",[IR]),bb=IR(),jR="TooltipProvider",uj=700,sE="tooltip.open",[fj,LR]=Tm(jR),UR=t=>{const{__scopeTooltip:e,delayDuration:n=uj,skipDelayDuration:s=300,disableHoverableContent:o=!1,children:l}=t,c=I.useRef(!0),f=I.useRef(!1),d=I.useRef(0);return I.useEffect(()=>{const m=d.current;return()=>window.clearTimeout(m)},[]),b.jsx(fj,{scope:e,isOpenDelayedRef:c,delayDuration:n,onOpen:I.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:I.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,s)},[s]),isPointerInTransitRef:f,onPointerInTransitChange:I.useCallback(m=>{f.current=m},[]),disableHoverableContent:o,children:l})};UR.displayName=jR;var zR="Tooltip",[aG,Xu]=Tm(zR),nv="TooltipTrigger",hj=I.forwardRef((t,e)=>{const{__scopeTooltip:n,...s}=t,o=Xu(nv,n),l=LR(nv,n),c=bb(n),f=I.useRef(null),d=$n(e,f,o.onTriggerChange),m=I.useRef(!1),g=I.useRef(!1),v=I.useCallback(()=>m.current=!1,[]);return I.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),b.jsx(aj,{asChild:!0,...c,children:b.jsx(pn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...s,ref:d,onPointerMove:Dt(t.onPointerMove,T=>{T.pointerType!=="touch"&&!g.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:Dt(t.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:Dt(t.onPointerDown,()=>{o.open&&o.onClose(),m.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:Dt(t.onFocus,()=>{m.current||o.onOpen()}),onBlur:Dt(t.onBlur,o.onClose),onClick:Dt(t.onClick,o.onClose)})})});hj.displayName=nv;var _b="TooltipPortal",[dj,mj]=Tm(_b,{forceMount:void 0}),BR=t=>{const{__scopeTooltip:e,forceMount:n,children:s,container:o}=t,l=Xu(_b,e);return b.jsx(dj,{scope:e,forceMount:n,children:b.jsx(fm,{present:n||l.open,children:b.jsx(ob,{asChild:!0,container:o,children:s})})})};BR.displayName=_b;var Rl="TooltipContent",FR=I.forwardRef((t,e)=>{const n=mj(Rl,t.__scopeTooltip),{forceMount:s=n.forceMount,side:o="top",...l}=t,c=Xu(Rl,t.__scopeTooltip);return b.jsx(fm,{present:s||c.open,children:c.disableHoverableContent?b.jsx(qR,{side:o,...l,ref:e}):b.jsx(pj,{side:o,...l,ref:e})})}),pj=I.forwardRef((t,e)=>{const n=Xu(Rl,t.__scopeTooltip),s=LR(Rl,t.__scopeTooltip),o=I.useRef(null),l=$n(e,o),[c,f]=I.useState(null),{trigger:d,onClose:m}=n,g=o.current,{onPointerInTransitChange:v}=s,T=I.useCallback(()=>{f(null),v(!1)},[v]),E=I.useCallback((R,P)=>{const N=R.currentTarget,L={x:R.clientX,y:R.clientY},z=_j(L,N.getBoundingClientRect()),B=Tj(L,z),H=wj(P.getBoundingClientRect()),K=Ej([...B,...H]);f(K),v(!0)},[v]);return I.useEffect(()=>()=>T(),[T]),I.useEffect(()=>{if(d&&g){const R=N=>E(N,g),P=N=>E(N,d);return d.addEventListener("pointerleave",R),g.addEventListener("pointerleave",P),()=>{d.removeEventListener("pointerleave",R),g.removeEventListener("pointerleave",P)}}},[d,g,E,T]),I.useEffect(()=>{if(c){const R=P=>{const N=P.target,L={x:P.clientX,y:P.clientY},z=d?.contains(N)||g?.contains(N),B=!xj(L,c);z?T():B&&(T(),m())};return document.addEventListener("pointermove",R),()=>document.removeEventListener("pointermove",R)}},[d,g,c,m,T]),b.jsx(qR,{...t,ref:l})}),[gj,yj]=Tm(zR,{isInside:!1}),vj=mM("TooltipContent"),qR=I.forwardRef((t,e)=>{const{__scopeTooltip:n,children:s,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:c,...f}=t,d=Xu(Rl,n),m=bb(n),{onClose:g}=d;return I.useEffect(()=>(document.addEventListener(sE,g),()=>document.removeEventListener(sE,g)),[g]),I.useEffect(()=>{if(d.trigger){const v=T=>{T.target?.contains(d.trigger)&&g()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[d.trigger,g]),b.jsx(rb,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:v=>v.preventDefault(),onDismiss:g,children:b.jsxs(lj,{"data-state":d.stateAttribute,...m,...f,ref:e,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx(vj,{children:s}),b.jsx(gj,{scope:n,isInside:!0,children:b.jsx(LM,{id:d.contentId,role:"tooltip",children:o||s})})]})})});FR.displayName=Rl;var HR="TooltipArrow",bj=I.forwardRef((t,e)=>{const{__scopeTooltip:n,...s}=t,o=bb(n);return yj(HR,n).isInside?null:b.jsx(cj,{...o,...s,ref:e})});bj.displayName=HR;function _j(t,e){const n=Math.abs(e.top-t.y),s=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),l=Math.abs(e.left-t.x);switch(Math.min(n,s,o,l)){case l:return"left";case o:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function Tj(t,e,n=5){const s=[];switch(e){case"top":s.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":s.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":s.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":s.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return s}function wj(t){const{top:e,right:n,bottom:s,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:s},{x:o,y:s}]}function xj(t,e){const{x:n,y:s}=t;let o=!1;for(let l=0,c=e.length-1;ls!=T>s&&n<(v-m)*(s-g)/(T-g)+m&&(o=!o)}return o}function Ej(t){const e=t.slice();return e.sort((n,s)=>n.xs.x?1:n.ys.y?1:0),Sj(e)}function Sj(t){if(t.length<=1)return t.slice();const e=[];for(let s=0;s=2;){const l=e[e.length-1],c=e[e.length-2];if((l.x-c.x)*(o.y-c.y)>=(l.y-c.y)*(o.x-c.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let s=t.length-1;s>=0;s--){const o=t[s];for(;n.length>=2;){const l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(o.y-c.y)>=(l.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Aj=UR,Rj=BR,GR=FR;const Cj=Aj,Ij=I.forwardRef(({className:t,sideOffset:e=4,...n},s)=>b.jsx(Rj,{children:b.jsx(GR,{ref:s,sideOffset:e,className:Yt("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...n})}));Ij.displayName=GR.displayName;const $R=I.forwardRef(({className:t,...e},n)=>b.jsx("div",{ref:n,className:Yt("rounded-xl border bg-card text-card-foreground shadow",t),...e}));$R.displayName="Card";const Nj=I.forwardRef(({className:t,...e},n)=>b.jsx("div",{ref:n,className:Yt("flex flex-col space-y-1.5 p-6",t),...e}));Nj.displayName="CardHeader";const Pj=I.forwardRef(({className:t,...e},n)=>b.jsx("div",{ref:n,className:Yt("font-semibold leading-none tracking-tight",t),...e}));Pj.displayName="CardTitle";const Dj=I.forwardRef(({className:t,...e},n)=>b.jsx("div",{ref:n,className:Yt("text-sm text-muted-foreground",t),...e}));Dj.displayName="CardDescription";const KR=I.forwardRef(({className:t,...e},n)=>b.jsx("div",{ref:n,className:Yt("p-6 pt-0",t),...e}));KR.displayName="CardContent";const Oj=I.forwardRef(({className:t,...e},n)=>b.jsx("div",{ref:n,className:Yt("flex items-center p-6 pt-0",t),...e}));Oj.displayName="CardFooter";function Mj(){return b.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:b.jsx($R,{className:"w-full max-w-md mx-4",children:b.jsxs(KR,{className:"pt-6",children:[b.jsxs("div",{className:"flex mb-4 gap-2",children:[b.jsx(vk,{className:"h-8 w-8 text-red-500"}),b.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),b.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function kj({cartCount:t}){const[e]=io(),n=[{href:"/",icon:Dk,label:"الرئيسية"},{href:"/cart",icon:pm,label:"السلة",badge:t},{href:"/account",icon:gm,label:"الحساب"}];return b.jsx("div",{className:"fixed bottom-0 w-full bg-background border-t border-border pb-safe pt-2 px-6 flex justify-between items-center z-50 md:hidden",children:n.map(s=>{const o=s.icon,l=e===s.href;return b.jsx(AO,{href:s.href,className:"flex-1",children:b.jsxs("div",{className:Yt("flex flex-col items-center gap-1 cursor-pointer transition-colors py-2",l?"text-primary":"text-muted-foreground"),children:[b.jsxs("div",{className:"relative",children:[b.jsx(o,{className:"w-6 h-6"}),s.badge!==void 0&&s.badge>0&&b.jsx("span",{className:"absolute -top-1 -right-2 bg-destructive text-destructive-foreground text-[10px] font-bold px-1.5 py-0.5 rounded-full min-w-[18px] text-center",children:s.badge})]}),b.jsx("span",{className:"text-[10px] font-bold",children:s.label})]})},s.href)})})}var QR={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},iE=Tn.createContext&&Tn.createContext(QR),Vj=["attr","size","title"];function jj(t,e){if(t==null)return{};var n,s,o=Lj(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(s=0;sTn.createElement(e.tag,Nd({key:n},e.attr),YR(e.child)))}function wm(t){return e=>Tn.createElement(Fj,Id({attr:Nd({},t.attr)},e),YR(t.child))}function Fj(t){var e=n=>{var{attr:s,size:o,title:l}=t,c=jj(t,Vj),f=o||n.size||"1em",d;return n.className&&(d=n.className),t.className&&(d=(d?d+" ":"")+t.className),Tn.createElement("svg",Id({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,c,{className:d,style:Nd(Nd({color:t.color||n.color},n.style),t.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),l&&Tn.createElement("title",null,l),t.children)};return iE!==void 0?Tn.createElement(iE.Consumer,null,n=>e(n)):e(QR)}function qj(t){return wm({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"},child:[]}]})(t)}function Hj(t){return wm({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"},child:[]}]})(t)}function Gj(t){return wm({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},child:[]}]})(t)}function $j(t){return wm({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"},child:[]}]})(t)}const Kj=[{label:"واتساب",icon:Hj,href:"https://wa.me/966500000000",color:"hover:text-[#25D366]"},{label:"تيك توك",icon:Gj,href:"https://tiktok.com/@pr7store",color:"hover:text-foreground"},{label:"X (تويتر)",icon:qj,href:"https://x.com/pr7store",color:"hover:text-foreground"},{label:"ايميل",icon:K1,href:"mailto:support@pr7store.com",color:"hover:text-foreground"}];function Qj(){return b.jsx("footer",{className:"border-t border-border bg-card mt-8 pb-24 md:pb-8","data-testid":"footer",children:b.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col items-center gap-6",children:[b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"font-black text-xl tracking-wide",children:"Pr7 Store"}),b.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"متجر فلوس GTA الموثوق"})]}),b.jsx("div",{className:"flex items-center gap-6",children:Kj.map(({label:t,icon:e,href:n,color:s})=>b.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",title:t,"data-testid":`link-social-${t}`,className:`text-muted-foreground transition-colors ${s} flex flex-col items-center gap-1`,children:[b.jsx(e,{className:"w-6 h-6"}),b.jsx("span",{className:"text-[10px] font-semibold",children:t})]},t))}),b.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-sm leading-relaxed",children:"التسليم يتم مباشرة داخل اللعبة عبر واتساب — لا يوجد شحن أو توصيل فعلي"}),b.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["© ",new Date().getFullYear()," Pr7 Store — جميع الحقوق محفوظة"]})]})})}const Tb=I.createContext({});function wb(t){const e=I.useRef(null);return e.current===null&&(e.current=t()),e.current}const Yj=typeof window<"u",WR=Yj?I.useLayoutEffect:I.useEffect,xm=I.createContext(null);function xb(t,e){t.indexOf(e)===-1&&t.push(e)}function Pd(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ai=(t,e,n)=>n>e?e:n{};const Yr={},XR=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function ZR(t){return typeof t=="object"&&t!==null}const JR=t=>/^0[^.\s]+$/u.test(t);function eC(t){let e;return()=>(e===void 0&&(e=t()),e)}const cs=t=>t,Wj=(t,e)=>n=>e(t(n)),Zu=(...t)=>t.reduce(Wj),Pu=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Sb{constructor(){this.subscriptions=[]}add(e){return xb(this.subscriptions,e),()=>Pd(this.subscriptions,e)}notify(e,n,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,s);else for(let l=0;lt*1e3,ls=t=>t/1e3;function tC(t,e){return e?t*(1e3/e):0}const nC=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Xj=1e-7,Zj=12;function Jj(t,e,n,s,o){let l,c,f=0;do c=e+(n-e)/2,l=nC(c,s,o)-t,l>0?n=c:e=c;while(Math.abs(l)>Xj&&++fJj(l,0,1,t,n);return l=>l===0||l===1?l:nC(o(l),e,s)}const sC=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,iC=t=>e=>1-t(1-e),rC=Ju(.33,1.53,.69,.99),Ab=iC(rC),oC=sC(Ab),aC=t=>t>=1?1:(t*=2)<1?.5*Ab(t):.5*(2-Math.pow(2,-10*(t-1))),Rb=t=>1-Math.sin(Math.acos(t)),lC=iC(Rb),cC=sC(Rb),eL=Ju(.42,0,1,1),tL=Ju(0,0,.58,1),uC=Ju(.42,0,.58,1),nL=t=>Array.isArray(t)&&typeof t[0]!="number",fC=t=>Array.isArray(t)&&typeof t[0]=="number",sL={linear:cs,easeIn:eL,easeInOut:uC,easeOut:tL,circIn:Rb,circInOut:cC,circOut:lC,backIn:Ab,backInOut:oC,backOut:rC,anticipate:aC},iL=t=>typeof t=="string",oE=t=>{if(fC(t)){Eb(t.length===4);const[e,n,s,o]=t;return Ju(e,n,s,o)}else if(iL(t))return sL[t];return t},qh=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rL(t,e){let n=new Set,s=new Set,o=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(g){c.has(g)&&(m.schedule(g),t()),g(f)}const m={schedule:(g,v=!1,T=!1)=>{const R=T&&o?n:s;return v&&c.add(g),R.add(g),g},cancel:g=>{s.delete(g),c.delete(g)},process:g=>{if(f=g,o){l=!0;return}o=!0;const v=n;n=s,s=v,n.forEach(d),n.clear(),o=!1,l&&(l=!1,m.process(g))}};return m}const oL=40;function hC(t,e){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=qh.reduce((B,H)=>(B[H]=rL(l),B),{}),{setup:f,read:d,resolveKeyframes:m,preUpdate:g,update:v,preRender:T,render:E,postRender:R}=c,P=()=>{const B=Yr.useManualTiming,H=B?o.timestamp:performance.now();n=!1,B||(o.delta=s?1e3/60:Math.max(Math.min(H-o.timestamp,oL),1)),o.timestamp=H,o.isProcessing=!0,f.process(o),d.process(o),m.process(o),g.process(o),v.process(o),T.process(o),E.process(o),R.process(o),o.isProcessing=!1,n&&e&&(s=!1,t(P))},N=()=>{n=!0,s=!0,o.isProcessing||t(P)};return{schedule:qh.reduce((B,H)=>{const K=c[H];return B[H]=(te,M=!1,A=!1)=>(n||N(),K.schedule(te,M,A)),B},{}),cancel:B=>{for(let H=0;H(id===void 0&&xn.set(en.isProcessing||Yr.useManualTiming?en.timestamp:performance.now()),id),set:t=>{id=t,queueMicrotask(aL)}},dC=t=>e=>typeof e=="string"&&e.startsWith(t),mC=dC("--"),lL=dC("var(--"),Cb=t=>lL(t)?cL.test(t.split("/*")[0].trim()):!1,cL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function aE(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ul={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Du={...Ul,transform:t=>ai(0,1,t)},Hh={...Ul,default:1},pu=t=>Math.round(t*1e5)/1e5,Ib=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uL(t){return t==null}const fL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Nb=(t,e)=>n=>!!(typeof n=="string"&&fL.test(n)&&n.startsWith(t)||e&&!uL(n)&&Object.prototype.hasOwnProperty.call(n,e)),pC=(t,e,n)=>s=>{if(typeof s!="string")return s;const[o,l,c,f]=s.match(Ib);return{[t]:parseFloat(o),[e]:parseFloat(l),[n]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},hL=t=>ai(0,255,t),dy={...Ul,transform:t=>Math.round(hL(t))},ta={test:Nb("rgb","red"),parse:pC("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+dy.transform(t)+", "+dy.transform(e)+", "+dy.transform(n)+", "+pu(Du.transform(s))+")"};function dL(t){let e="",n="",s="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const sv={test:Nb("#"),parse:dL,transform:ta.transform},ef=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),kr=ef("deg"),ni=ef("%"),Te=ef("px"),mL=ef("vh"),pL=ef("vw"),lE={...ni,parse:t=>ni.parse(t)/100,transform:t=>ni.transform(t*100)},ml={test:Nb("hsl","hue"),parse:pC("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ni.transform(pu(e))+", "+ni.transform(pu(n))+", "+pu(Du.transform(s))+")"},Pt={test:t=>ta.test(t)||sv.test(t)||ml.test(t),parse:t=>ta.test(t)?ta.parse(t):ml.test(t)?ml.parse(t):sv.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ta.transform(t):ml.transform(t),getAnimatableNone:t=>{const e=Pt.parse(t);return e.alpha=0,Pt.transform(e)}},gL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yL(t){return isNaN(t)&&typeof t=="string"&&(t.match(Ib)?.length||0)+(t.match(gL)?.length||0)>0}const gC="number",yC="color",vL="var",bL="var(",cE="${}",_L=/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 Cl(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},o=[];let l=0;const f=e.replace(_L,d=>(Pt.test(d)?(s.color.push(l),o.push(yC),n.push(Pt.parse(d))):d.startsWith(bL)?(s.var.push(l),o.push(vL),n.push(d)):(s.number.push(l),o.push(gC),n.push(parseFloat(d))),++l,cE)).split(cE);return{values:n,split:f,indexes:s,types:o}}function TL(t){return Cl(t).values}function vC({split:t,types:e}){const n=t.length;return s=>{let o="";for(let l=0;ltypeof t=="number"?0:Pt.test(t)?Pt.getAnimatableNone(t):t,EL=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:xL(t);function SL(t){const e=Cl(t);return vC(e)(e.values.map((s,o)=>EL(s,e.split[o])))}const Rs={test:yL,parse:TL,createTransformer:wL,getAnimatableNone:SL};function my(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function AL({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let o=0,l=0,c=0;if(!e)o=l=c=n;else{const f=n<.5?n*(1+e):n+e-n*e,d=2*n-f;o=my(d,f,t+1/3),l=my(d,f,t),c=my(d,f,t-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:s}}function Dd(t,e){return n=>n>0?e:t}const ht=(t,e,n)=>t+(e-t)*n,py=(t,e,n)=>{const s=t*t,o=n*(e*e-s)+s;return o<0?0:Math.sqrt(o)},RL=[sv,ta,ml],CL=t=>RL.find(e=>e.test(t));function uE(t){const e=CL(t);if(!e)return!1;let n=e.parse(t);return e===ml&&(n=AL(n)),n}const fE=(t,e)=>{const n=uE(t),s=uE(e);if(!n||!s)return Dd(t,e);const o={...n};return l=>(o.red=py(n.red,s.red,l),o.green=py(n.green,s.green,l),o.blue=py(n.blue,s.blue,l),o.alpha=ht(n.alpha,s.alpha,l),ta.transform(o))},iv=new Set(["none","hidden"]);function IL(t,e){return iv.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function NL(t,e){return n=>ht(t,e,n)}function Pb(t){return typeof t=="number"?NL:typeof t=="string"?Cb(t)?Dd:Pt.test(t)?fE:OL:Array.isArray(t)?bC:typeof t=="object"?Pt.test(t)?fE:PL:Dd}function bC(t,e){const n=[...t],s=n.length,o=t.map((l,c)=>Pb(l)(l,e[c]));return l=>{for(let c=0;c{for(const l in s)n[l]=s[l](o);return n}}function DL(t,e){const n=[],s={color:0,var:0,number:0};for(let o=0;o{const n=Rs.createTransformer(e),s=Cl(t),o=Cl(e);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?iv.has(t)&&!o.values.length||iv.has(e)&&!s.values.length?IL(t,e):Zu(bC(DL(s,o),o.values),n):Dd(t,e)};function _C(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?ht(t,e,n):Pb(t)(t,e)}const ML=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>ot.update(e,n),stop:()=>Wr(e),now:()=>en.isProcessing?en.timestamp:xn.now()}},TC=(t,e,n=10)=>{let s="";const o=Math.max(Math.round(e/n),2);for(let l=0;l=Od?1/0:e}function kL(t,e=100,n){const s=n({...t,keyframes:[0,e]}),o=Math.min(Db(s),Od);return{type:"keyframes",ease:l=>s.next(o*l).value/e,duration:ls(o)}}const bt={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};function rv(t,e){return t*Math.sqrt(1-e*e)}const VL=12;function jL(t,e,n){let s=n;for(let o=1;o{const g=m*c,v=g*t,T=g-n,E=rv(m,c),R=Math.exp(-v);return gy-T/E*R},l=m=>{const v=m*c*t,T=v*n+n,E=Math.pow(c,2)*Math.pow(m,2)*t,R=Math.exp(-v),P=rv(Math.pow(m,2),c);return(-o(m)+gy>0?-1:1)*((T-E)*R)/P}):(o=m=>{const g=Math.exp(-m*t),v=(m-n)*t+1;return-gy+g*v},l=m=>{const g=Math.exp(-m*t),v=(n-m)*(t*t);return g*v});const f=5/t,d=jL(o,l,f);if(t=Gn(t),isNaN(d))return{stiffness:bt.stiffness,damping:bt.damping,duration:t};{const m=Math.pow(d,2)*s;return{stiffness:m,damping:c*2*Math.sqrt(s*m),duration:t}}}const UL=["duration","bounce"],zL=["stiffness","damping","mass"];function hE(t,e){return e.some(n=>t[n]!==void 0)}function BL(t){let e={velocity:bt.velocity,stiffness:bt.stiffness,damping:bt.damping,mass:bt.mass,isResolvedFromDuration:!1,...t};if(!hE(t,zL)&&hE(t,UL))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),o=s*s,l=2*ai(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:bt.mass,stiffness:o,damping:l}}else{const n=LL({...t,velocity:0});e={...e,...n,mass:bt.mass},e.isResolvedFromDuration=!0}return e}function Md(t=bt.visualDuration,e=bt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const l=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:m,mass:g,duration:v,velocity:T,isResolvedFromDuration:E}=BL({...n,velocity:-ls(n.velocity||0)}),R=T||0,P=m/(2*Math.sqrt(d*g)),N=c-l,L=ls(Math.sqrt(d/g)),z=Math.abs(N)<5;s||(s=z?bt.restSpeed.granular:bt.restSpeed.default),o||(o=z?bt.restDelta.granular:bt.restDelta.default);let B,H,K,te,M,A;if(P<1)K=rv(L,P),te=(R+P*L*N)/K,B=k=>{const j=Math.exp(-P*L*k);return c-j*(te*Math.sin(K*k)+N*Math.cos(K*k))},M=P*L*te+N*K,A=P*L*N-te*K,H=k=>Math.exp(-P*L*k)*(M*Math.sin(K*k)+A*Math.cos(K*k));else if(P===1){B=j=>c-Math.exp(-L*j)*(N+(R+L*N)*j);const k=R+L*N;H=j=>Math.exp(-L*j)*(L*k*j-R)}else{const k=L*Math.sqrt(P*P-1);B=ue=>{const ye=Math.exp(-P*L*ue),$=Math.min(k*ue,300);return c-ye*((R+P*L*N)*Math.sinh($)+k*N*Math.cosh($))/k};const j=(R+P*L*N)/k,F=P*L*j-N*k,V=P*L*N-j*k;H=ue=>{const ye=Math.exp(-P*L*ue),$=Math.min(k*ue,300);return ye*(F*Math.sinh($)+V*Math.cosh($))}}const O={calculatedDuration:E&&v||null,velocity:k=>Gn(H(k)),next:k=>{if(!E&&P<1){const F=Math.exp(-P*L*k),V=Math.sin(K*k),ue=Math.cos(K*k),ye=c-F*(te*V+N*ue),$=Gn(F*(M*V+A*ue));return f.done=Math.abs($)<=s&&Math.abs(c-ye)<=o,f.value=f.done?c:ye,f}const j=B(k);if(E)f.done=k>=v;else{const F=Gn(H(k));f.done=Math.abs(F)<=s&&Math.abs(c-j)<=o}return f.value=f.done?c:j,f},toString:()=>{const k=Math.min(Db(O),Od),j=TC(F=>O.next(k*F).value,k,30);return k+"ms "+j},toTransition:()=>{}};return O}Md.applyToOptions=t=>{const e=kL(t,100,Md);return t.ease=e.ease,t.duration=Gn(e.duration),t.type="keyframes",t};const FL=5;function wC(t,e,n){const s=Math.max(e-FL,0);return tC(n-t(s),e-s)}function ov({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:m=.5,restSpeed:g}){const v=t[0],T={done:!1,value:v},E=A=>f!==void 0&&Ad,R=A=>f===void 0?d:d===void 0||Math.abs(f-A)-P*Math.exp(-A/s),B=A=>L+z(A),H=A=>{const O=z(A),k=B(A);T.done=Math.abs(O)<=m,T.value=T.done?L:k};let K,te;const M=A=>{E(T.value)&&(K=A,te=Md({keyframes:[T.value,R(T.value)],velocity:wC(B,A,T.value),damping:o,stiffness:l,restDelta:m,restSpeed:g}))};return M(0),{calculatedDuration:null,next:A=>{let O=!1;return!te&&K===void 0&&(O=!0,H(A),M(A)),K!==void 0&&A>=K?te.next(A-K):(!O&&H(A),T)}}}function qL(t,e,n){const s=[],o=n||Yr.mix||_C,l=t.length-1;for(let c=0;ce[0];if(l===2&&e[0]===e[1])return()=>e[1];const c=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const f=qL(e,s,o),d=f.length,m=g=>{if(c&&g1)for(;vm(ai(t[0],t[l-1],g)):m}function GL(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const o=Pu(0,e,s);t.push(ht(n,1,o))}}function $L(t){const e=[0];return GL(e,t.length-1),e}function KL(t,e){return t.map(n=>n*e)}function QL(t,e){return t.map(()=>e||uC).splice(0,t.length-1)}function gu({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const o=nL(s)?s.map(oE):oE(s),l={done:!1,value:e[0]},c=KL(n&&n.length===e.length?n:$L(e),t),f=HL(c,e,{ease:Array.isArray(o)?o:QL(e,o)});return{calculatedDuration:t,next:d=>(l.value=f(d),l.done=d>=t,l)}}const YL=t=>t!==null;function Em(t,{repeat:e,repeatType:n="loop"},s,o=1){const l=t.filter(YL),f=o<0||e&&n!=="loop"&&e%2===1?0:l.length-1;return!f||s===void 0?l[f]:s}const WL={decay:ov,inertia:ov,tween:gu,keyframes:gu,spring:Md};function xC(t){typeof t.type=="string"&&(t.type=WL[t.type])}class Ob{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const XL=t=>t/100;class kd extends Ob{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==xn.now()&&this.tick(xn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;xC(e);const{type:n=gu,repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=e;let{keyframes:f}=e;const d=n||gu;d!==gu&&typeof f[0]!="number"&&(this.mixKeyframes=Zu(XL,_C(f[0],f[1])),f=[0,100]);const m=d({...e,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...e,keyframes:[...f].reverse(),velocity:-c})),m.calculatedDuration===null&&(m.calculatedDuration=Db(m));const{calculatedDuration:g}=m;this.calculatedDuration=g,this.resolvedDuration=g+o,this.totalDuration=this.resolvedDuration*(s+1)-o,this.generator=m}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:o,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return s.next(0);const{delay:m=0,keyframes:g,repeat:v,repeatType:T,repeatDelay:E,type:R,onUpdate:P,finalKeyframe:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-o/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const L=this.currentTime-m*(this.playbackSpeed>=0?1:-1),z=this.playbackSpeed>=0?L<0:L>o;this.currentTime=Math.max(L,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let B=this.currentTime,H=s;if(v){const A=Math.min(this.currentTime,o)/f;let O=Math.floor(A),k=A%1;!k&&A>=1&&(k=1),k===1&&O--,O=Math.min(O,v+1),O%2&&(T==="reverse"?(k=1-k,E&&(k-=E/f)):T==="mirror"&&(H=c)),B=ai(0,1,k)*f}let K;z?(this.delayState.value=g[0],K=this.delayState):K=H.next(B),l&&!z&&(K.value=l(K.value));let{done:te}=K;!z&&d!==null&&(te=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&te);return M&&R!==ov&&(K.value=Em(g,this.options,N,this.speed)),P&&P(K.value),M&&this.finish(),K}then(e,n){return this.finished.then(e,n)}get duration(){return ls(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ls(e)}get time(){return ls(this.currentTime)}set time(e){e=Gn(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return wC(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(xn.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=ls(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=ML,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(xn.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(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function ZL(t){for(let e=1;et*180/Math.PI,av=t=>{const e=na(Math.atan2(t[1],t[0]));return lv(e)},JL={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:av,rotateZ:av,skewX:t=>na(Math.atan(t[1])),skewY:t=>na(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},lv=t=>(t=t%360,t<0&&(t+=360),t),dE=av,mE=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),pE=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),e3={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mE,scaleY:pE,scale:t=>(mE(t)+pE(t))/2,rotateX:t=>lv(na(Math.atan2(t[6],t[5]))),rotateY:t=>lv(na(Math.atan2(-t[2],t[0]))),rotateZ:dE,rotate:dE,skewX:t=>na(Math.atan(t[4])),skewY:t=>na(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function cv(t){return t.includes("scale")?1:0}function uv(t,e){if(!t||t==="none")return cv(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,o;if(n)s=e3,o=n;else{const f=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=JL,o=f}if(!o)return cv(e);const l=s[e],c=o[1].split(",").map(n3);return typeof l=="function"?l(c):c[l]}const t3=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return uv(n,e)};function n3(t){return parseFloat(t.trim())}const zl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bl=new Set(zl),gE=t=>t===Ul||t===Te,s3=new Set(["x","y","z"]),i3=zl.filter(t=>!s3.has(t));function r3(t){const e=[];return i3.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Ur={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const o=t.max-t.min;return s==="border-box"?o:o-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const o=t.max-t.min;return s==="border-box"?o:o-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>uv(e,"x"),y:(t,{transform:e})=>uv(e,"y")};Ur.translateX=Ur.x;Ur.translateY=Ur.y;const ra=new Set;let fv=!1,hv=!1,dv=!1;function EC(){if(hv){const t=Array.from(ra).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const o=r3(s);o.length&&(n.set(s,o),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const o=n.get(s);o&&o.forEach(([l,c])=>{s.getValue(l)?.set(c)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hv=!1,fv=!1,ra.forEach(t=>t.complete(dv)),ra.clear()}function SC(){ra.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(hv=!0)})}function o3(){dv=!0,SC(),EC(),dv=!1}class Mb{constructor(e,n,s,o,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(ra.add(this),fv||(fv=!0,ot.read(SC),ot.resolveKeyframes(EC))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:o}=this;if(e[0]===null){const l=o?.get(),c=e[e.length-1];if(l!==void 0)e[0]=l;else if(s&&n){const f=s.readValue(n,c);f!=null&&(e[0]=f)}e[0]===void 0&&(e[0]=c),o&&l===void 0&&o.set(e[0])}ZL(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ra.delete(this)}cancel(){this.state==="scheduled"&&(ra.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const a3=t=>t.startsWith("--");function AC(t,e,n){a3(e)?t.style.setProperty(e,n):t.style[e]=n}const l3={};function RC(t,e){const n=eC(t);return()=>l3[e]??n()}const c3=RC(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),CC=RC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),au=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,yE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:au([0,.65,.55,1]),circOut:au([.55,0,1,.45]),backIn:au([.31,.01,.66,-.59]),backOut:au([.33,1.53,.69,.99])};function IC(t,e){if(t)return typeof t=="function"?CC()?TC(t,e):"ease-out":fC(t)?au(t):Array.isArray(t)?t.map(n=>IC(n,e)||yE.easeOut):yE[t]}function u3(t,e,n,{delay:s=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},m=void 0){const g={[e]:n};d&&(g.offset=d);const v=IC(f,o);Array.isArray(v)&&(g.easing=v);const T={delay:s,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return m&&(T.pseudoElement=m),t.animate(g,T)}function NC(t){return typeof t=="function"&&"applyToOptions"in t}function f3({type:t,...e}){return NC(t)&&CC()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class PC extends Ob{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:o,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=e;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=e,Eb(typeof e.type!="string");const m=f3(e);this.animation=u3(n,s,o,m,l),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const g=Em(o,this.options,f,this.speed);this.updateMotionValue&&this.updateMotionValue(g),AC(n,s,g),this.animation.cancel()}d?.(),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:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ls(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ls(e)}get time(){return ls(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Gn(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&c3()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),cs):o(this)}}const DC={anticipate:aC,backInOut:oC,circInOut:cC};function h3(t){return t in DC}function d3(t){typeof t.ease=="string"&&h3(t.ease)&&(t.ease=DC[t.ease])}const yy=10;class m3 extends PC{constructor(e){d3(e),xC(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:o,element:l,...c}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const f=new kd({...c,autoplay:!1}),d=Math.max(yy,xn.now()-this.startTime),m=ai(0,yy,d-yy),g=f.sample(d).value,{name:v}=this.options;l&&v&&AC(l,v,g),n.setWithVelocity(f.sample(Math.max(0,d-m)).value,g,m),f.stop()}}const vE=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Rs.test(t)||t==="0")&&!t.startsWith("url("));function p3(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function T3(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:o,damping:l,type:c,keyframes:f}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=e.owner.getProps();return _3()&&n&&(OC.has(n)||b3.has(n)&&v3(f))&&(n!=="transform"||!g)&&!m&&!s&&o!=="mirror"&&l!==0&&c!=="inertia"}const w3=40;class x3 extends Ob{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:m,element:g,...v}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=xn.now();const T={autoplay:e,delay:n,type:s,repeat:o,repeatDelay:l,repeatType:c,name:d,motionValue:m,element:g,...v},E=g?.KeyframeResolver||Mb;this.keyframeResolver=new E(f,(R,P,N)=>this.onKeyframesResolved(R,P,T,!N),d,m,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,o){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:m,onUpdate:g}=s;this.resolvedAt=xn.now();let v=!0;g3(e,l,c,f)||(v=!1,(Yr.instantAnimations||!d)&&g?.(Em(e,s,n)),e[0]=e[e.length-1],mv(s),s.repeat=0);const E={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>w3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},R=v&&!m&&T3(E),P=E.motionValue?.owner?.current;let N;if(R)try{N=new m3({...E,element:P})}catch{N=new kd(E)}else N=new kd(E);N.finished.then(()=>{this.notifyFinished()}).catch(cs),this.pendingTimeline&&(this.stopTimeline=N.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=N}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),o3()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function MC(t,e,n,s=0,o=1){const l=Array.from(t).sort((m,g)=>m.sortNodePosition(g)).indexOf(e),c=t.size,f=(c-1)*s;return typeof n=="function"?n(l,c):o===1?l*s:f-l*s}const E3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function S3(t){const e=E3.exec(t);if(!e)return[,];const[,n,s,o]=e;return[`--${n??s}`,o]}function kC(t,e,n=1){const[s,o]=S3(t);if(!s)return;const l=window.getComputedStyle(e).getPropertyValue(s);if(l){const c=l.trim();return XR(c)?parseFloat(c):c}return Cb(o)?kC(o,e,n+1):o}const A3={type:"spring",stiffness:500,damping:25,restSpeed:10},R3=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),C3={type:"keyframes",duration:.8},I3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},N3=(t,{keyframes:e})=>e.length>2?C3:Bl.has(t)?t.startsWith("scale")?R3(e[1]):A3:I3;function VC(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function kb(t,e){const n=t?.[e]??t?.default??t;return n!==t?VC(n,t):n}const P3=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function D3(t){for(const e in t)if(!P3.has(e))return!0;return!1}const Vb=(t,e,n,s={},o,l)=>c=>{const f=kb(s,t)||{},d=f.delay||s.delay||0;let{elapsed:m=0}=s;m=m-Gn(d);const g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...f,delay:-m,onUpdate:T=>{e.set(T),f.onUpdate&&f.onUpdate(T)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:t,motionValue:e,element:l?void 0:o};D3(f)||Object.assign(g,N3(t,g)),g.duration&&(g.duration=Gn(g.duration)),g.repeatDelay&&(g.repeatDelay=Gn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let v=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(mv(g),g.delay===0&&(v=!0)),(Yr.instantAnimations||Yr.skipAnimations||o?.shouldSkipAnimations)&&(v=!0,mv(g),g.delay=0),g.allowFlatten=!f.type&&!f.ease,v&&!l&&e.get()!==void 0){const T=Em(g.keyframes,f);if(T!==void 0){ot.update(()=>{g.onUpdate(T),g.onComplete()});return}}return f.isSync?new kd(g):new x3(g)};function bE(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function jb(t,e,n,s){if(typeof e=="function"){const[o,l]=bE(s);e=e(n!==void 0?n:t.custom,o,l)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,l]=bE(s);e=e(n!==void 0?n:t.custom,o,l)}return e}function oa(t,e,n){const s=t.getProps();return jb(s,e,n!==void 0?n:s.custom,t)}const jC=new Set(["width","height","top","left","right","bottom",...zl]),_E=30,O3=t=>!isNaN(parseFloat(t));class M3{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const o=xn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=xn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=O3(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Sb);const s=this.events[e].add(n);return e==="change"?()=>{s(),ot.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=xn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>_E)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_E);return tC(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Il(t,e){return new M3(t,e)}const pv=t=>Array.isArray(t);function k3(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Il(n))}function V3(t){return pv(t)?t[t.length-1]||0:t}function j3(t,e){const n=oa(t,e);let{transitionEnd:s={},transition:o={},...l}=n||{};l={...l,...s};for(const c in l){const f=V3(l[c]);k3(t,c,f)}}const sn=t=>!!(t&&t.getVelocity);function L3(t){return!!(sn(t)&&t.add)}function gv(t,e){const n=t.getValue("willChange");if(L3(n))return n.add(e);if(!n&&Yr.WillChange){const s=new Yr.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Lb(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const U3="framerAppearId",LC="data-"+Lb(U3);function UC(t){return t.props[LC]}function z3({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function zC(t,e,{delay:n=0,transitionOverride:s,type:o}={}){let{transition:l,transitionEnd:c,...f}=e;const d=t.getDefaultTransition();l=l?VC(l,d):d;const m=l?.reduceMotion;s&&(l=s);const g=[],v=o&&t.animationState&&t.animationState.getState()[o];for(const T in f){const E=t.getValue(T,t.latestValues[T]??null),R=f[T];if(R===void 0||v&&z3(v,T))continue;const P={delay:n,...kb(l||{},T)},N=E.get();if(N!==void 0&&!E.isAnimating()&&!Array.isArray(R)&&R===N&&!P.velocity){ot.update(()=>E.set(R));continue}let L=!1;if(window.MotionHandoffAnimation){const H=UC(t);if(H){const K=window.MotionHandoffAnimation(H,T,ot);K!==null&&(P.startTime=K,L=!0)}}gv(t,T);const z=m??t.shouldReduceMotion;E.start(Vb(T,E,R,z&&jC.has(T)?{type:!1}:P,t,L));const B=E.animation;B&&g.push(B)}if(c){const T=()=>ot.update(()=>{c&&j3(t,c)});g.length?Promise.all(g).then(T):T()}return g}function yv(t,e,n={}){const s=oa(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const l=s?()=>Promise.all(zC(t,s,n)):()=>Promise.resolve(),c=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:m=0,staggerChildren:g,staggerDirection:v}=o;return B3(t,e,d,m,g,v,n)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,m]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>m())}else return Promise.all([l(),c(n.delay)])}function B3(t,e,n=0,s=0,o=0,l=1,c){const f=[];for(const d of t.variantChildren)d.notify("AnimationStart",e),f.push(yv(d,e,{...c,delay:n+(typeof s=="function"?0:s)+MC(t.variantChildren,d,s,o,l)}).then(()=>d.notify("AnimationComplete",e)));return Promise.all(f)}function F3(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const o=e.map(l=>yv(t,l,n));s=Promise.all(o)}else if(typeof e=="string")s=yv(t,e,n);else{const o=typeof e=="function"?oa(t,e,n.custom):e;s=Promise.all(zC(t,o,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const q3={test:t=>t==="auto",parse:t=>t},BC=t=>e=>e.test(t),FC=[Ul,Te,ni,kr,pL,mL,q3],TE=t=>FC.find(BC(t));function H3(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||JR(t):!0}const G3=new Set(["brightness","contrast","saturate","opacity"]);function $3(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ib)||[];if(!s)return t;const o=n.replace(s,"");let l=G3.has(e)?1:0;return s!==n&&(l*=100),e+"("+l+o+")"}const K3=/\b([a-z-]*)\(.*?\)/gu,vv={...Rs,getAnimatableNone:t=>{const e=t.match(K3);return e?e.map($3).join(" "):t}},bv={...Rs,getAnimatableNone:t=>{const e=Rs.parse(t);return Rs.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},wE={...Ul,transform:Math.round},Q3={rotate:kr,rotateX:kr,rotateY:kr,rotateZ:kr,scale:Hh,scaleX:Hh,scaleY:Hh,scaleZ:Hh,skew:kr,skewX:kr,skewY:kr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:Du,originX:lE,originY:lE,originZ:Te},Ub={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,inset:Te,insetBlock:Te,insetBlockStart:Te,insetBlockEnd:Te,insetInline:Te,insetInlineStart:Te,insetInlineEnd:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,paddingBlock:Te,paddingBlockStart:Te,paddingBlockEnd:Te,paddingInline:Te,paddingInlineStart:Te,paddingInlineEnd:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,marginBlock:Te,marginBlockStart:Te,marginBlockEnd:Te,marginInline:Te,marginInlineStart:Te,marginInlineEnd:Te,fontSize:Te,backgroundPositionX:Te,backgroundPositionY:Te,...Q3,zIndex:wE,fillOpacity:Du,strokeOpacity:Du,numOctaves:wE},Y3={...Ub,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:vv,WebkitFilter:vv,mask:bv,WebkitMask:bv},qC=t=>Y3[t],W3=new Set([vv,bv]);function HC(t,e){let n=qC(t);return W3.has(n)||(n=Rs),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const X3=new Set(["auto","none","0"]);function Z3(t,e,n){let s=0,o;for(;s{e.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function GC(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const o=n?.[t]??s.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t).filter(s=>s!=null)}const $C=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function rd(t){return ZR(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:zb}=hC(queueMicrotask,!1),Es={x:!1,y:!1};function KC(){return Es.x||Es.y}function e6(t){return t==="x"||t==="y"?Es[t]?null:(Es[t]=!0,()=>{Es[t]=!1}):Es.x||Es.y?null:(Es.x=Es.y=!0,()=>{Es.x=Es.y=!1})}function QC(t,e){const n=GC(t),s=new AbortController,o={passive:!0,...e,signal:s.signal};return[n,o,()=>s.abort()]}function t6(t){return!(t.pointerType==="touch"||KC())}function n6(t,e,n={}){const[s,o,l]=QC(t,n);return s.forEach(c=>{let f=!1,d=!1,m;const g=()=>{c.removeEventListener("pointerleave",R)},v=N=>{m&&(m(N),m=void 0),g()},T=N=>{f=!1,window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T),d&&(d=!1,v(N))},E=()=>{f=!0,window.addEventListener("pointerup",T,o),window.addEventListener("pointercancel",T,o)},R=N=>{if(N.pointerType!=="touch"){if(f){d=!0;return}v(N)}},P=N=>{if(!t6(N))return;d=!1;const L=e(c,N);typeof L=="function"&&(m=L,c.addEventListener("pointerleave",R,o))};c.addEventListener("pointerenter",P,o),c.addEventListener("pointerdown",E,o)}),l}const YC=(t,e)=>e?t===e?!0:YC(t,e.parentElement):!1,Bb=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,s6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function i6(t){return s6.has(t.tagName)||t.isContentEditable===!0}const r6=new Set(["INPUT","SELECT","TEXTAREA"]);function o6(t){return r6.has(t.tagName)||t.isContentEditable===!0}const od=new WeakSet;function xE(t){return e=>{e.key==="Enter"&&t(e)}}function vy(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const a6=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=xE(()=>{if(od.has(n))return;vy(n,"down");const o=xE(()=>{vy(n,"up")}),l=()=>vy(n,"cancel");n.addEventListener("keyup",o,e),n.addEventListener("blur",l,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function EE(t){return Bb(t)&&!KC()}const SE=new WeakSet;function l6(t,e,n={}){const[s,o,l]=QC(t,n),c=f=>{const d=f.currentTarget;if(!EE(f)||SE.has(f))return;od.add(d),n.stopPropagation&&SE.add(f);const m=e(d,f),g=(E,R)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",T),od.has(d)&&od.delete(d),EE(E)&&typeof m=="function"&&m(E,{success:R})},v=E=>{g(E,d===window||d===document||n.useGlobalTarget||YC(d,E.target))},T=E=>{g(E,!1)};window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",T,o)};return s.forEach(f=>{(n.useGlobalTarget?window:f).addEventListener("pointerdown",c,o),rd(f)&&(f.addEventListener("focus",m=>a6(m,o)),!i6(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function Fb(t){return ZR(t)&&"ownerSVGElement"in t}const ad=new WeakMap;let ld;const WC=(t,e,n)=>(s,o)=>o&&o[0]?o[0][t+"Size"]:Fb(s)&&"getBBox"in s?s.getBBox()[e]:s[n],c6=WC("inline","width","offsetWidth"),u6=WC("block","height","offsetHeight");function f6({target:t,borderBoxSize:e}){ad.get(t)?.forEach(n=>{n(t,{get width(){return c6(t,e)},get height(){return u6(t,e)}})})}function h6(t){t.forEach(f6)}function d6(){typeof ResizeObserver>"u"||(ld=new ResizeObserver(h6))}function m6(t,e){ld||d6();const n=GC(t);return n.forEach(s=>{let o=ad.get(s);o||(o=new Set,ad.set(s,o)),o.add(e),ld?.observe(s)}),()=>{n.forEach(s=>{const o=ad.get(s);o?.delete(e),o?.size||ld?.unobserve(s)})}}const cd=new Set;let pl;function p6(){pl=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};cd.forEach(e=>e(t))},window.addEventListener("resize",pl)}function g6(t){return cd.add(t),pl||p6(),()=>{cd.delete(t),!cd.size&&typeof pl=="function"&&(window.removeEventListener("resize",pl),pl=void 0)}}function AE(t,e){return typeof t=="function"?g6(t):m6(t,e)}function y6(t){return Fb(t)&&t.tagName==="svg"}const v6=[...FC,Pt,Rs],b6=t=>v6.find(BC(t)),RE=()=>({translate:0,scale:1,origin:0,originPoint:0}),gl=()=>({x:RE(),y:RE()}),CE=()=>({min:0,max:0}),zt=()=>({x:CE(),y:CE()}),_6=new WeakMap;function Sm(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ou(t){return typeof t=="string"||Array.isArray(t)}const qb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hb=["initial",...qb];function Am(t){return Sm(t.animate)||Hb.some(e=>Ou(t[e]))}function XC(t){return!!(Am(t)||t.variants)}function T6(t,e,n){for(const s in e){const o=e[s],l=n[s];if(sn(o))t.addValue(s,o);else if(sn(l))t.addValue(s,Il(o,{owner:t}));else if(l!==o)if(t.hasValue(s)){const c=t.getValue(s);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=t.getStaticValue(s);t.addValue(s,Il(c!==void 0?c:o,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const _v={current:null},ZC={current:!1},w6=typeof window<"u";function x6(){if(ZC.current=!0,!!w6)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_v.current=t.matches;t.addEventListener("change",e),e()}else _v.current=!1}const IE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Vd={};function JC(t){Vd=t}function E6(){return Vd}class S6{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:o,skipAnimations:l,blockInitialAnimation:c,visualState:f},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Mb,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=xn.now();this.renderScheduledAtthis.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ZC.current||x6(),this.shouldReduceMotion=_v.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Wr(this.notifyUpdate),Wr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&OC.has(e)&&this.current instanceof HTMLElement){const{factory:c,keyframes:f,times:d,ease:m,duration:g}=n.accelerate,v=new PC({element:this.current,name:e,keyframes:f,times:d,ease:m,duration:Gn(g)}),T=c(v);this.valueSubscriptions.set(e,()=>{T(),v.cancel()});return}const s=Bl.has(e);s&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[e]=c,this.props.onUpdate&&ot.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{o(),l&&l(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Vd){const n=Vd[e];if(!n)continue;const{isEnabled:s,Feature:o}=n;if(!this.features[e]&&o&&s(this.props)&&(this.features[e]=new o(this)),this.features[e]){const l=this.features[e];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Il(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(XR(s)||JR(s))?s=parseFloat(s):!b6(s)&&Rs.test(n)&&(s=HC(e,n)),this.setBaseTarget(e,sn(s)?s.get():s)),sn(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const l=jb(this.props,n,this.presenceContext?.custom);l&&(s=l[e])}if(n&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!sn(o)?o:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Sb),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){zb.render(this.render)}}class e2 extends S6{constructor(){super(...arguments),this.KeyframeResolver=J3}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;sn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class oo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function t2({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function A6({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function R6(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function by(t){return t===void 0||t===1}function Tv({scale:t,scaleX:e,scaleY:n}){return!by(t)||!by(e)||!by(n)}function Zo(t){return Tv(t)||n2(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function n2(t){return NE(t.x)||NE(t.y)}function NE(t){return t&&t!=="0%"}function jd(t,e,n){const s=t-n,o=e*s;return n+o}function PE(t,e,n,s,o){return o!==void 0&&(t=jd(t,o,s)),jd(t,n,s)+e}function wv(t,e=0,n=1,s,o){t.min=PE(t.min,e,n,s,o),t.max=PE(t.max,e,n,s,o)}function s2(t,{x:e,y:n}){wv(t.x,e.translate,e.scale,e.originPoint),wv(t.y,n.translate,n.scale,n.originPoint)}const DE=.999999999999,OE=1.0000000000001;function C6(t,e,n,s=!1){const o=n.length;if(!o)return;e.x=e.y=1;let l,c;for(let f=0;fDE&&(e.x=1),e.yDE&&(e.y=1)}function Js(t,e){t.min+=e,t.max+=e}function ME(t,e,n,s,o=.5){const l=ht(t.min,t.max,o);wv(t,e,n,l,s)}function kE(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function ud(t,e,n){const s=n??t;ME(t.x,kE(e.x,s.x),e.scaleX,e.scale,e.originX),ME(t.y,kE(e.y,s.y),e.scaleY,e.scale,e.originY)}function i2(t,e){return t2(R6(t.getBoundingClientRect(),e))}function I6(t,e,n){const s=i2(t,n),{scroll:o}=e;return o&&(Js(s.x,o.offset.x),Js(s.y,o.offset.y)),s}const N6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},P6=zl.length;function D6(t,e,n){let s="",o=!0;for(let l=0;l{if(!e.target)return t;if(typeof t=="string")if(Te.test(t))t=parseFloat(t);else return t;const n=VE(t,e.target.x),s=VE(t,e.target.y);return`${n}% ${s}%`}},O6={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=Rs.parse(t);if(o.length>5)return s;const l=Rs.createTransformer(t),c=typeof o[0]!="number"?1:0,f=n.x.scale*e.x,d=n.y.scale*e.y;o[0+c]/=f,o[1+c]/=d;const m=ht(f,d,.5);return typeof o[2+c]=="number"&&(o[2+c]/=m),typeof o[3+c]=="number"&&(o[3+c]/=m),l(o)}},xv={borderRadius:{...su,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:su,borderTopRightRadius:su,borderBottomLeftRadius:su,borderBottomRightRadius:su,boxShadow:O6};function o2(t,{layout:e,layoutId:n}){return Bl.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!xv[t]||t==="opacity")}function $b(t,e,n){const s=t.style,o=e?.style,l={};if(!s)return l;for(const c in s)(sn(s[c])||o&&sn(o[c])||o2(c,t)||n?.getValue(c)?.liveStyle!==void 0)&&(l[c]=s[c]);return l}function M6(t){return window.getComputedStyle(t)}class k6 extends e2{constructor(){super(...arguments),this.type="html",this.renderInstance=r2}readValueFromInstance(e,n){if(Bl.has(n))return this.projection?.isProjecting?cv(n):t3(e,n);{const s=M6(e),o=(mC(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return i2(e,n)}build(e,n,s){Gb(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return $b(e,n,s)}}const V6={offset:"stroke-dashoffset",array:"stroke-dasharray"},j6={offset:"strokeDashoffset",array:"strokeDasharray"};function L6(t,e,n=1,s=0,o=!0){t.pathLength=1;const l=o?V6:j6;t[l.offset]=`${-s}`,t[l.array]=`${e} ${n}`}const U6=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function a2(t,{attrX:e,attrY:n,attrScale:s,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...f},d,m,g){if(Gb(t,f,m),d){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:v,style:T}=t;v.transform&&(T.transform=v.transform,delete v.transform),(T.transform||v.transformOrigin)&&(T.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),T.transform&&(T.transformBox=g?.transformBox??"fill-box",delete v.transformBox);for(const E of U6)v[E]!==void 0&&(T[E]=v[E],delete v[E]);e!==void 0&&(v.x=e),n!==void 0&&(v.y=n),s!==void 0&&(v.scale=s),o!==void 0&&L6(v,o,l,c,!1)}const l2=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"]),c2=t=>typeof t=="string"&&t.toLowerCase()==="svg";function z6(t,e,n,s){r2(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(l2.has(o)?o:Lb(o),e.attrs[o])}function u2(t,e,n){const s=$b(t,e,n);for(const o in t)if(sn(t[o])||sn(e[o])){const l=zl.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=t[o]}return s}class B6 extends e2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Bl.has(n)){const s=qC(n);return s&&s.default||0}return n=l2.has(n)?n:Lb(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return u2(e,n,s)}build(e,n,s){a2(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,o){z6(e,n,s,o)}mount(e){this.isSVGTag=c2(e.tagName),super.mount(e)}}const F6=Hb.length;function f2(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?f2(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:s})=>F3(t,n,s)))}function $6(t){let e=G6(t),n=jE(),s=!0,o=!1;const l=m=>(g,v)=>{const T=oa(t,v,m==="exit"?t.presenceContext?.custom:void 0);if(T){const{transition:E,transitionEnd:R,...P}=T;g={...g,...P,...R}}return g};function c(m){e=m(t)}function f(m){const{props:g}=t,v=f2(t.parent)||{},T=[],E=new Set;let R={},P=1/0;for(let L=0;L