@ouro.bot/cli 0.1.0-alpha.313 → 0.1.0-alpha.315
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.json +12 -0
- package/dist/heart/daemon/cli-exec.js +41 -1
- package/dist/heart/daemon/startup-tui.js +69 -25
- package/dist/heart/outlook/outlook-read.js +55 -78
- package/dist/heart/outlook/outlook-types.js +20 -0
- package/dist/heart/session-activity.js +33 -15
- package/dist/heart/session-events.js +673 -0
- package/dist/heart/session-recall.js +23 -77
- package/dist/heart/start-of-turn-packet.js +2 -0
- package/dist/mind/context.js +67 -182
- package/dist/mind/prompt.js +14 -2
- package/dist/nerves/coverage/file-completeness.js +4 -0
- package/dist/outlook-ui/assets/{index-Ck8agNeO.js → index-BiYn3Fwj.js} +13 -13
- package/dist/outlook-ui/index.html +1 -1
- package/dist/senses/bluebubbles/index.js +1 -0
- package/dist/senses/cli.js +4 -0
- package/dist/senses/pipeline.js +4 -0
- package/dist/senses/shared-turn.js +1 -0
- package/dist/senses/teams.js +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function oT(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(o,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>o[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(u){if(u.ep)return;u.ep=!0;const d=l(u);fetch(u.href,d)}})();function rT(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var lf={exports:{}},Ql={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ function aT(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var lv;function uT(){if(lv)return Ql;lv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(o,u,d){var f=null;if(d!==void 0&&(f=""+d),u.key!==void 0&&(f=""+u.key),"key"in u){d={};for(var h in u)h!=="key"&&(d[h]=u[h])}else d=u;return u=d.ref,{$$typeof:n,type:o,key:f,ref:u!==void 0?u:null,props:d}}return Ql.Fragment=a,Ql.jsx=l,Ql.jsxs=l,Ql}var sv;function cT(){return sv||(sv=1,lf.exports=uT()),lf.exports}var m=cT(),sf={exports:{}},ce={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ function aT(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ov;function fT(){if(ov)return ce;ov=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),T=Symbol.iterator;function S(A){return A===null||typeof A!="object"?null:(A=T&&A[T]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,M={};function C(A,q,X){this.props=A,this.context=q,this.refs=M,this.updater=X||E}C.prototype.isReactComponent={},C.prototype.setState=function(A,q){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,q,"setState")},C.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function R(){}R.prototype=C.prototype;function _(A,q,X){this.props=A,this.context=q,this.refs=M,this.updater=X||E}var z=_.prototype=new R;z.constructor=_,D(z,C.prototype),z.isPureReactComponent=!0;var Y=Array.isArray;function I(){}var Z={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function F(A,q,X){var W=X.ref;return{$$typeof:n,type:A,key:q,ref:W!==void 0?W:null,props:X}}function K(A,q){return F(A.type,q,A.props)}function te(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function ie(A){var q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(X){return q[X]})}var Te=/\/+/g;function Ae(A,q){return typeof A=="object"&&A!==null&&A.key!=null?ie(""+A.key):q.toString(36)}function Ne(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(I,I):(A.status="pending",A.then(function(q){A.status==="pending"&&(A.status="fulfilled",A.value=q)},function(q){A.status==="pending"&&(A.status="rejected",A.reason=q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function B(A,q,X,W,re){var me=typeof A;(me==="undefined"||me==="boolean")&&(A=null);var be=!1;if(A===null)be=!0;else switch(me){case"bigint":case"string":case"number":be=!0;break;case"object":switch(A.$$typeof){case n:case a:be=!0;break;case y:return be=A._init,B(be(A._payload),q,X,W,re)}}if(be)return re=re(A),be=W===""?"."+Ae(A,0):W,Y(re)?(X="",be!=null&&(X=be.replace(Te,"$&/")+"/"),B(re,q,X,"",function(nl){return nl})):re!=null&&(te(re)&&(re=K(re,X+(re.key==null||A&&A.key===re.key?"":(""+re.key).replace(Te,"$&/")+"/")+be)),q.push(re)),1;be=0;var Ze=W===""?".":W+":";if(Y(A))for(var ke=0;ke<A.length;ke++)W=A[ke],me=Ze+Ae(W,ke),be+=B(W,q,X,me,re);else if(ke=S(A),typeof ke=="function")for(A=ke.call(A),ke=0;!(W=A.next()).done;)W=W.value,me=Ze+Ae(W,ke++),be+=B(W,q,X,me,re);else if(me==="object"){if(typeof A.then=="function")return B(Ne(A),q,X,W,re);throw q=String(A),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return be}function Q(A,q,X){if(A==null)return A;var W=[],re=0;return B(A,W,"","",function(me){return q.call(X,me,re++)}),W}function P(A){if(A._status===-1){var q=A._result;q=q(),q.then(function(X){(A._status===0||A._status===-1)&&(A._status=1,A._result=X)},function(X){(A._status===0||A._status===-1)&&(A._status=2,A._result=X)}),A._status===-1&&(A._status=0,A._result=q)}if(A._status===1)return A._result.default;throw A._result}var oe=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},he={map:Q,forEach:function(A,q,X){Q(A,function(){q.apply(this,arguments)},X)},count:function(A){var q=0;return Q(A,function(){q++}),q},toArray:function(A){return Q(A,function(q){return q})||[]},only:function(A){if(!te(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ce.Activity=x,ce.Children=he,ce.Component=C,ce.Fragment=l,ce.Profiler=u,ce.PureComponent=_,ce.StrictMode=o,ce.Suspense=g,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,ce.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},ce.cache=function(A){return function(){return A.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(A,q,X){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var W=D({},A.props),re=A.key;if(q!=null)for(me in q.key!==void 0&&(re=""+q.key),q)!J.call(q,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&q.ref===void 0||(W[me]=q[me]);var me=arguments.length-2;if(me===1)W.children=X;else if(1<me){for(var be=Array(me),Ze=0;Ze<me;Ze++)be[Ze]=arguments[Ze+2];W.children=be}return F(A.type,re,W)},ce.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},ce.createElement=function(A,q,X){var W,re={},me=null;if(q!=null)for(W in q.key!==void 0&&(me=""+q.key),q)J.call(q,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(re[W]=q[W]);var be=arguments.length-2;if(be===1)re.children=X;else if(1<be){for(var Ze=Array(be),ke=0;ke<be;ke++)Ze[ke]=arguments[ke+2];re.children=Ze}if(A&&A.defaultProps)for(W in be=A.defaultProps,be)re[W]===void 0&&(re[W]=be[W]);return F(A,me,re)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(A){return{$$typeof:h,render:A}},ce.isValidElement=te,ce.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:P}},ce.memo=function(A,q){return{$$typeof:p,type:A,compare:q===void 0?null:q}},ce.startTransition=function(A){var q=Z.T,X={};Z.T=X;try{var W=A(),re=Z.S;re!==null&&re(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(I,oe)}catch(me){oe(me)}finally{q!==null&&X.types!==null&&(q.types=X.types),Z.T=q}},ce.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},ce.use=function(A){return Z.H.use(A)},ce.useActionState=function(A,q,X){return Z.H.useActionState(A,q,X)},ce.useCallback=function(A,q){return Z.H.useCallback(A,q)},ce.useContext=function(A){return Z.H.useContext(A)},ce.useDebugValue=function(){},ce.useDeferredValue=function(A,q){return Z.H.useDeferredValue(A,q)},ce.useEffect=function(A,q){return Z.H.useEffect(A,q)},ce.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},ce.useId=function(){return Z.H.useId()},ce.useImperativeHandle=function(A,q,X){return Z.H.useImperativeHandle(A,q,X)},ce.useInsertionEffect=function(A,q){return Z.H.useInsertionEffect(A,q)},ce.useLayoutEffect=function(A,q){return Z.H.useLayoutEffect(A,q)},ce.useMemo=function(A,q){return Z.H.useMemo(A,q)},ce.useOptimistic=function(A,q){return Z.H.useOptimistic(A,q)},ce.useReducer=function(A,q,X){return Z.H.useReducer(A,q,X)},ce.useRef=function(A){return Z.H.useRef(A)},ce.useState=function(A){return Z.H.useState(A)},ce.useSyncExternalStore=function(A,q,X){return Z.H.useSyncExternalStore(A,q,X)},ce.useTransition=function(){return Z.H.useTransition()},ce.version="19.2.4",ce}var rv;function jr(){return rv||(rv=1,sf.exports=fT()),sf.exports}var w=jr();const ue=rT(w),uv=oT({__proto__:null,default:ue},[w]);var of={exports:{}},Pl={},rf={exports:{}},uf={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ function aT(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var cv;function dT(){return cv||(cv=1,(function(n){function a(B,Q){var P=B.length;B.push(Q);e:for(;0<P;){var oe=P-1>>>1,he=B[oe];if(0<u(he,Q))B[oe]=Q,B[P]=he,P=oe;else break e}}function l(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var Q=B[0],P=B.pop();if(P!==Q){B[0]=P;e:for(var oe=0,he=B.length,A=he>>>1;oe<A;){var q=2*(oe+1)-1,X=B[q],W=q+1,re=B[W];if(0>u(X,P))W<he&&0>u(re,X)?(B[oe]=re,B[W]=P,oe=W):(B[oe]=X,B[q]=P,oe=q);else if(W<he&&0>u(re,P))B[oe]=re,B[W]=P,oe=W;else break e}}return Q}function u(B,Q){var P=B.sortIndex-Q.sortIndex;return P!==0?P:B.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var g=[],p=[],y=1,x=null,T=3,S=!1,E=!1,D=!1,M=!1,C=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function z(B){for(var Q=l(p);Q!==null;){if(Q.callback===null)o(p);else if(Q.startTime<=B)o(p),Q.sortIndex=Q.expirationTime,a(g,Q);else break;Q=l(p)}}function Y(B){if(D=!1,z(B),!E)if(l(g)!==null)E=!0,I||(I=!0,ie());else{var Q=l(p);Q!==null&&Ne(Y,Q.startTime-B)}}var I=!1,Z=-1,J=5,F=-1;function K(){return M?!0:!(n.unstable_now()-F<J)}function te(){if(M=!1,I){var B=n.unstable_now();F=B;var Q=!0;try{e:{E=!1,D&&(D=!1,R(Z),Z=-1),S=!0;var P=T;try{t:{for(z(B),x=l(g);x!==null&&!(x.expirationTime>B&&K());){var oe=x.callback;if(typeof oe=="function"){x.callback=null,T=x.priorityLevel;var he=oe(x.expirationTime<=B);if(B=n.unstable_now(),typeof he=="function"){x.callback=he,z(B),Q=!0;break t}x===l(g)&&o(g),z(B)}else o(g);x=l(g)}if(x!==null)Q=!0;else{var A=l(p);A!==null&&Ne(Y,A.startTime-B),Q=!1}}break e}finally{x=null,T=P,S=!1}Q=void 0}}finally{Q?ie():I=!1}}}var ie;if(typeof _=="function")ie=function(){_(te)};else if(typeof MessageChannel<"u"){var Te=new MessageChannel,Ae=Te.port2;Te.port1.onmessage=te,ie=function(){Ae.postMessage(null)}}else ie=function(){C(te,0)};function Ne(B,Q){Z=C(function(){B(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(B){switch(T){case 1:case 2:case 3:var Q=3;break;default:Q=T}var P=T;T=Q;try{return B()}finally{T=P}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var P=T;T=B;try{return Q()}finally{T=P}},n.unstable_scheduleCallback=function(B,Q,P){var oe=n.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?oe+P:oe):P=oe,B){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=P+he,B={id:y++,callback:Q,priorityLevel:B,startTime:P,expirationTime:he,sortIndex:-1},P>oe?(B.sortIndex=P,a(p,B),l(g)===null&&B===l(p)&&(D?(R(Z),Z=-1):D=!0,Ne(Y,P-oe))):(B.sortIndex=he,a(g,B),E||S||(E=!0,I||(I=!0,ie()))),B},n.unstable_shouldYield=K,n.unstable_wrapCallback=function(B){var Q=T;return function(){var P=T;T=Q;try{return B.apply(this,arguments)}finally{T=P}}}})(uf)),uf}var fv;function hT(){return fv||(fv=1,rf.exports=dT()),rf.exports}var cf={exports:{}},ht={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ function aT(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var dv;function mT(){if(dv)return ht;dv=1;var n=jr();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},u=Symbol.for("react.portal");function d(g,p,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:g,containerInfo:p,implementation:y}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ht.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return d(g,p,null,y)},ht.flushSync=function(g){var p=f.T,y=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=p,o.p=y,o.d.f()}},ht.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(g,p))},ht.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},ht.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,x=h(y,p.crossOrigin),T=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?o.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:T,fetchPriority:S}):y==="script"&&o.d.X(g,{crossOrigin:x,integrity:T,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ht.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=h(p.as,p.crossOrigin);o.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(g)},ht.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,x=h(y,p.crossOrigin);o.d.L(g,y,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},ht.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=h(p.as,p.crossOrigin);o.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(g)},ht.requestFormReset=function(g){o.d.r(g)},ht.unstable_batchedUpdates=function(g,p){return g(p)},ht.useFormState=function(g,p,y){return f.H.useFormState(g,p,y)},ht.useFormStatus=function(){return f.H.useHostTransitionStatus()},ht.version="19.2.4",ht}var hv;function W0(){if(hv)return cf.exports;hv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),cf.exports=mT(),cf.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,18 +38,18 @@ function aT(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var
|
|
41
|
+
*/var mv;function pT(){if(mv)return Pl;mv=1;var n=hT(),a=jr(),l=W0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(d(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var c=r.alternate;if(c===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===i)return g(r),e;if(c===s)return g(r),t;c=c.sibling}throw Error(o(188))}if(i.return!==s.return)i=r,s=c;else{for(var v=!1,b=r.child;b;){if(b===i){v=!0,i=r,s=c;break}if(b===s){v=!0,s=r,i=c;break}b=b.sibling}if(!v){for(b=c.child;b;){if(b===i){v=!0,i=c,s=r;break}if(b===s){v=!0,s=c,i=r;break}b=b.sibling}if(!v)throw Error(o(189))}}if(i.alternate!==s)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,T=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),_=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Symbol.for("react.client.reference");function Ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case C:return"Profiler";case M:return"StrictMode";case Y:return"Suspense";case I:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case _:return e.displayName||"Context";case R:return(e._context.displayName||"Context")+".Consumer";case z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Ae(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return Ae(e(t))}catch{}}return null}var Ne=Array.isArray,B=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},oe=[],he=-1;function A(e){return{current:e}}function q(e){0>he||(e.current=oe[he],oe[he]=null,he--)}function X(e,t){he++,oe[he]=e.current,e.current=t}var W=A(null),re=A(null),me=A(null),be=A(null);function Ze(e,t){switch(X(me,t),X(re,e),X(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cg(t),e=Mg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(W),X(W,e)}function ke(){q(W),q(re),q(me)}function nl(e){e.memoizedState!==null&&X(be,e);var t=W.current,i=Mg(t,e.type);t!==i&&(X(re,e),X(W,i))}function Ns(e){re.current===e&&(q(W),q(re)),be.current===e&&(q(be),Xl._currentValue=P)}var Hr,ih;function Ta(e){if(Hr===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Hr=t&&t[1]||"",ih=-1<i.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+
|
|
43
|
+
`+Hr+e+ih}var $r=!1;function qr(e,t){if(!e||$r)return"";$r=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(U){var V=U}Reflect.construct(e,[],G)}else{try{G.call()}catch(U){V=U}e.call(G.prototype)}}else{try{throw Error()}catch(U){V=U}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(U){if(U&&V&&typeof U.stack=="string")return[U.stack,V.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),v=c[0],b=c[1];if(v&&b){var j=v.split(`
|
|
44
44
|
`),k=b.split(`
|
|
45
45
|
`);for(r=s=0;s<j.length&&!j[s].includes("DetermineComponentFrameRoot");)s++;for(;r<k.length&&!k[r].includes("DetermineComponentFrameRoot");)r++;if(s===j.length||r===k.length)for(s=j.length-1,r=k.length-1;1<=s&&0<=r&&j[s]!==k[r];)r--;for(;1<=s&&0<=r;s--,r--)if(j[s]!==k[r]){if(s!==1||r!==1)do if(s--,r--,0>r||j[s]!==k[r]){var H=`
|
|
46
|
-
`+j[s].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=s&&0<=r);break}}}finally{
|
|
46
|
+
`+j[s].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=s&&0<=r);break}}}finally{$r=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ta(i):""}function Ub(e,t){switch(e.tag){case 26:case 27:case 5:return Ta(e.type);case 16:return Ta("Lazy");case 13:return e.child!==t&&t!==null?Ta("Suspense Fallback"):Ta("Suspense");case 19:return Ta("SuspenseList");case 0:case 15:return qr(e.type,!1);case 11:return qr(e.type.render,!1);case 1:return qr(e.type,!0);case 31:return Ta("Activity");default:return""}}function lh(e){try{var t="",i=null;do t+=Ub(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
47
|
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Hr=Object.prototype.hasOwnProperty,$r=n.unstable_scheduleCallback,Gr=n.unstable_cancelCallback,kb=n.unstable_shouldYield,Vb=n.unstable_requestPaint,Ct=n.unstable_now,_b=n.unstable_getCurrentPriorityLevel,ah=n.unstable_ImmediatePriority,ih=n.unstable_UserBlockingPriority,js=n.unstable_NormalPriority,Ub=n.unstable_LowPriority,lh=n.unstable_IdlePriority,Bb=n.log,Hb=n.unstable_setDisableYieldValue,nl=null,Mt=null;function Bn(e){if(typeof Bb=="function"&&Hb(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(nl,e)}catch{}}var Dt=Math.clz32?Math.clz32:Yb,$b=Math.log,Gb=Math.LN2;function Yb(e){return e>>>=0,e===0?32:31-($b(e)/Gb|0)|0}var As=256,Ns=262144,Cs=4194304;function wa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ms(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~c,s!==0?r=wa(s):(v&=b,v!==0?r=wa(v):i||(i=b&~e,i!==0&&(r=wa(i))))):(b=s&~c,b!==0?r=wa(b):v!==0?r=wa(v):i||(i=s&~e,i!==0&&(r=wa(i)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,i=t&-t,c>=i||c===32&&(i&4194048)!==0)?t:r}function al(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qb(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sh(){var e=Cs;return Cs<<=1,(Cs&62914560)===0&&(Cs=4194304),e}function Yr(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xb(e,t,i,s,r,c){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,j=e.expirationTimes,k=e.hiddenUpdates;for(i=v&~i;0<i;){var H=31-Dt(i),Y=1<<H;b[H]=0,j[H]=-1;var V=k[H];if(V!==null)for(k[H]=null,H=0;H<V.length;H++){var U=V[H];U!==null&&(U.lane&=-536870913)}i&=~Y}s!==0&&oh(e,s,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function oh(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Dt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function rh(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Dt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function uh(e,t){var i=t&-t;return i=(i&42)!==0?1:qr(i),(i&(e.suspendedLanes|t))!==0?0:i}function qr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ch(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Qg(e.type))}function fh(e,t){var i=Q.p;try{return Q.p=e,t()}finally{Q.p=i}}var Hn=Math.random().toString(36).slice(2),it="__reactFiber$"+Hn,yt="__reactProps$"+Hn,ni="__reactContainer$"+Hn,Kr="__reactEvents$"+Hn,Kb="__reactListeners$"+Hn,Fb="__reactHandles$"+Hn,dh="__reactResources$"+Hn,ll="__reactMarker$"+Hn;function Fr(e){delete e[it],delete e[yt],delete e[Kr],delete e[Kb],delete e[Fb]}function ai(e){var t=e[it];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ni]||i[it]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Rg(e);e!==null;){if(i=e[it])return i;e=Rg(e)}return t}e=i,i=e.parentNode}return null}function ii(e){if(e=e[it]||e[ni]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function sl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function li(e){var t=e[dh];return t||(t=e[dh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[ll]=!0}var hh=new Set,mh={};function Ea(e,t){si(e,t),si(e+"Capture",t)}function si(e,t){for(mh[e]=t,e=0;e<t.length;e++)hh.add(t[e])}var Zb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ph={},gh={};function Qb(e){return Hr.call(gh,e)?!0:Hr.call(ph,e)?!1:Zb.test(e)?gh[e]=!0:(ph[e]=!0,!1)}function Ds(e,t,i){if(Qb(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Os(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function vn(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pb(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,c=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(v){i=""+v,c.call(this,v)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zr(e){if(!e._valueTracker){var t=vh(e)?"checked":"value";e._valueTracker=Pb(e,t,""+e[t])}}function yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=vh(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function zs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Jb=/[\n"\\]/g;function Ht(e){return e.replace(Jb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qr(e,t,i,s,r,c,v,b){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Pr(e,v,Bt(t)):i!=null?Pr(e,v,Bt(i)):s!=null&&e.removeAttribute("value"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Bt(b):e.removeAttribute("name")}function xh(e,t,i,s,r,c,v,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||i!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Zr(e);return}i=i!=null?""+Bt(i):"",t=t!=null?""+Bt(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Zr(e)}function Pr(e,t,i){t==="number"&&zs(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function oi(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Bt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function bh(e,t,i){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Bt(i):""}function Sh(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(o(92));if(Ne(s)){if(1<s.length)throw Error(o(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Bt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Zr(e)}function ri(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Wb=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Th(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||Wb.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function wh(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&Th(e,r,s)}else for(var c in t)t.hasOwnProperty(c)&&Th(e,c,t[c])}function Jr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ib=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),e1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Rs(e){return e1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yn(){}var Wr=null;function Ir(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,ci=null;function Eh(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qr(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[yt]||null;if(!r)throw Error(o(90));Qr(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&yh(s)}break e;case"textarea":bh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&oi(e,!!i.multiple,t,!1)}}}var eu=!1;function jh(e,t,i){if(eu)return e(t,i);eu=!0;try{var s=e(t);return s}finally{if(eu=!1,(ui!==null||ci!==null)&&(So(),ui&&(t=ui,e=ci,ci=ui=null,Eh(t),e)))for(t=0;t<e.length;t++)Eh(e[t])}}function ol(e,t){var i=e.stateNode;if(i===null)return null;var s=i[yt]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=!1;if(xn)try{var rl={};Object.defineProperty(rl,"passive",{get:function(){tu=!0}}),window.addEventListener("test",rl,rl),window.removeEventListener("test",rl,rl)}catch{tu=!1}var $n=null,nu=null,Ls=null;function Ah(){if(Ls)return Ls;var e,t=nu,i=t.length,s,r="value"in $n?$n.value:$n.textContent,c=r.length;for(e=0;e<i&&t[e]===r[e];e++);var v=i-e;for(s=1;s<=v&&t[i-s]===r[c-s];s++);return Ls=r.slice(e,1<s?1-s:void 0)}function ks(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vs(){return!0}function Nh(){return!1}function xt(e){function t(i,s,r,c,v){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=c,this.target=v,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Vs:Nh,this.isPropagationStopped=Nh,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Vs)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Vs)},persist:function(){},isPersistent:Vs}),t}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_s=xt(ja),ul=x({},ja,{view:0,detail:0}),t1=xt(ul),au,iu,cl,Us=x({},ul,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cl&&(cl&&e.type==="mousemove"?(au=e.screenX-cl.screenX,iu=e.screenY-cl.screenY):iu=au=0,cl=e),au)},movementY:function(e){return"movementY"in e?e.movementY:iu}}),Ch=xt(Us),n1=x({},Us,{dataTransfer:0}),a1=xt(n1),i1=x({},ul,{relatedTarget:0}),lu=xt(i1),l1=x({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),s1=xt(l1),o1=x({},ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),r1=xt(o1),u1=x({},ja,{data:0}),Mh=xt(u1),c1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},d1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function h1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=d1[e])?!!t[e]:!1}function su(){return h1}var m1=x({},ul,{key:function(e){if(e.key){var t=c1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ks(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,charCode:function(e){return e.type==="keypress"?ks(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ks(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),p1=xt(m1),g1=x({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dh=xt(g1),v1=x({},ul,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),y1=xt(v1),x1=x({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),b1=xt(x1),S1=x({},Us,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),T1=xt(S1),w1=x({},ja,{newState:0,oldState:0}),E1=xt(w1),j1=[9,13,27,32],ou=xn&&"CompositionEvent"in window,fl=null;xn&&"documentMode"in document&&(fl=document.documentMode);var A1=xn&&"TextEvent"in window&&!fl,Oh=xn&&(!ou||fl&&8<fl&&11>=fl),zh=" ",Rh=!1;function Lh(e,t){switch(e){case"keyup":return j1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function N1(e,t){switch(e){case"compositionend":return kh(t);case"keypress":return t.which!==32?null:(Rh=!0,zh);case"textInput":return e=t.data,e===zh&&Rh?null:e;default:return null}}function C1(e,t){if(fi)return e==="compositionend"||!ou&&Lh(e,t)?(e=Ah(),Ls=nu=$n=null,fi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Oh&&t.locale!=="ko"?null:t.data;default:return null}}var M1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!M1[e.type]:t==="textarea"}function _h(e,t,i,s){ui?ci?ci.push(s):ci=[s]:ui=s,t=Co(t,"onChange"),0<t.length&&(i=new _s("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var dl=null,hl=null;function D1(e){xg(e,0)}function Bs(e){var t=sl(e);if(yh(t))return e}function Uh(e,t){if(e==="change")return t}var Bh=!1;if(xn){var ru;if(xn){var uu="oninput"in document;if(!uu){var Hh=document.createElement("div");Hh.setAttribute("oninput","return;"),uu=typeof Hh.oninput=="function"}ru=uu}else ru=!1;Bh=ru&&(!document.documentMode||9<document.documentMode)}function $h(){dl&&(dl.detachEvent("onpropertychange",Gh),hl=dl=null)}function Gh(e){if(e.propertyName==="value"&&Bs(hl)){var t=[];_h(t,hl,e,Ir(e)),jh(D1,t)}}function O1(e,t,i){e==="focusin"?($h(),dl=t,hl=i,dl.attachEvent("onpropertychange",Gh)):e==="focusout"&&$h()}function z1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bs(hl)}function R1(e,t){if(e==="click")return Bs(t)}function L1(e,t){if(e==="input"||e==="change")return Bs(t)}function k1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:k1;function ml(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!Hr.call(t,r)||!Ot(e[r],t[r]))return!1}return!0}function Yh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qh(e,t){var i=Yh(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Yh(i)}}function Xh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zs(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=zs(e.document)}return t}function cu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var V1=xn&&"documentMode"in document&&11>=document.documentMode,di=null,fu=null,pl=null,du=!1;function Fh(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;du||di==null||di!==zs(s)||(s=di,"selectionStart"in s&&cu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),pl&&ml(pl,s)||(pl=s,s=Co(fu,"onSelect"),0<s.length&&(t=new _s("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=di)))}function Aa(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var hi={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionrun:Aa("Transition","TransitionRun"),transitionstart:Aa("Transition","TransitionStart"),transitioncancel:Aa("Transition","TransitionCancel"),transitionend:Aa("Transition","TransitionEnd")},hu={},Zh={};xn&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);function Na(e){if(hu[e])return hu[e];if(!hi[e])return e;var t=hi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Zh)return hu[e]=t[i];return e}var Qh=Na("animationend"),Ph=Na("animationiteration"),Jh=Na("animationstart"),_1=Na("transitionrun"),U1=Na("transitionstart"),B1=Na("transitioncancel"),Wh=Na("transitionend"),Ih=new Map,mu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mu.push("scrollEnd");function Wt(e,t){Ih.set(e,t),Ea(t,[e])}var Hs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},$t=[],mi=0,pu=0;function $s(){for(var e=mi,t=pu=mi=0;t<e;){var i=$t[t];$t[t++]=null;var s=$t[t];$t[t++]=null;var r=$t[t];$t[t++]=null;var c=$t[t];if($t[t++]=null,s!==null&&r!==null){var v=s.pending;v===null?r.next=r:(r.next=v.next,v.next=r),s.pending=r}c!==0&&em(i,r,c)}}function Gs(e,t,i,s){$t[mi++]=e,$t[mi++]=t,$t[mi++]=i,$t[mi++]=s,pu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function gu(e,t,i,s){return Gs(e,t,i,s),Ys(e)}function Ca(e,t){return Gs(e,null,null,t),Ys(e)}function em(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,c=e.return;c!==null;)c.childLanes|=i,s=c.alternate,s!==null&&(s.childLanes|=i),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-Dt(i),e=c.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),c):null}function Ys(e){if(50<_l)throw _l=0,jc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function H1(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,i,s){return new H1(e,t,i,s)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bn(e,t){var i=e.alternate;return i===null?(i=zt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function tm(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function qs(e,t,i,s,r,c){var v=0;if(s=e,typeof e=="function")vu(e)&&(v=1);else if(typeof e=="string")v=XS(e,i,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=zt(31,i,t,r),e.elementType=F,e.lanes=c,e;case D:return Ma(i.children,r,c,t);case M:v=8,r|=24;break;case C:return e=zt(12,i,t,r|2),e.elementType=C,e.lanes=c,e;case q:return e=zt(13,i,t,r),e.elementType=q,e.lanes=c,e;case I:return e=zt(19,i,t,r),e.elementType=I,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:v=10;break e;case R:v=9;break e;case z:v=11;break e;case Z:v=14;break e;case J:v=16,s=null;break e}v=29,i=Error(o(130,e===null?"null":typeof e,"")),s=null}return t=zt(v,i,t,r),t.elementType=e,t.type=s,t.lanes=c,t}function Ma(e,t,i,s){return e=zt(7,e,s,t),e.lanes=i,e}function yu(e,t,i){return e=zt(6,e,null,t),e.lanes=i,e}function nm(e){var t=zt(18,null,null,0);return t.stateNode=e,t}function xu(e,t,i){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var am=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var i=am.get(e);return i!==void 0?i:(t={value:e,source:t,stack:nh(t)},am.set(e,t),t)}return{value:e,source:t,stack:nh(t)}}var gi=[],vi=0,Xs=null,gl=0,Yt=[],qt=0,Gn=null,sn=1,on="";function Sn(e,t){gi[vi++]=gl,gi[vi++]=Xs,Xs=e,gl=t}function im(e,t,i){Yt[qt++]=sn,Yt[qt++]=on,Yt[qt++]=Gn,Gn=e;var s=sn;e=on;var r=32-Dt(s)-1;s&=~(1<<r),i+=1;var c=32-Dt(t)+r;if(30<c){var v=r-r%5;c=(s&(1<<v)-1).toString(32),s>>=v,r-=v,sn=1<<32-Dt(t)+r|i<<r|s,on=c+e}else sn=1<<c|i<<r|s,on=e}function bu(e){e.return!==null&&(Sn(e,1),im(e,1,0))}function Su(e){for(;e===Xs;)Xs=gi[--vi],gi[vi]=null,gl=gi[--vi],gi[vi]=null;for(;e===Gn;)Gn=Yt[--qt],Yt[qt]=null,on=Yt[--qt],Yt[qt]=null,sn=Yt[--qt],Yt[qt]=null}function lm(e,t){Yt[qt++]=sn,Yt[qt++]=on,Yt[qt++]=Gn,sn=t.id,on=t.overflow,Gn=e}var lt=null,_e=null,xe=!1,Yn=null,Xt=!1,Tu=Error(o(519));function qn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vl(Gt(t,e)),Tu}function sm(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[it]=e,t[yt]=s,i){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(i=0;i<Bl.length;i++)ge(Bl[i],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),xh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),Sh(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||wg(t.textContent,i)?(s.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),s.onScroll!=null&&ge("scroll",t),s.onScrollEnd!=null&&ge("scrollend",t),s.onClick!=null&&(t.onclick=yn),t=!0):t=!1,t||qn(e,!0)}function om(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:lt=lt.return}}function yi(e){if(e!==lt)return!1;if(!xe)return om(e),xe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Hc(e.type,e.memoizedProps)),i=!i),i&&_e&&qn(e),om(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_e=zg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_e=zg(e)}else t===27?(t=_e,ia(e.type)?(e=Xc,Xc=null,_e=e):_e=t):_e=lt?Ft(e.stateNode.nextSibling):null;return!0}function Da(){_e=lt=null,xe=!1}function wu(){var e=Yn;return e!==null&&(wt===null?wt=e:wt.push.apply(wt,e),Yn=null),e}function vl(e){Yn===null?Yn=[e]:Yn.push(e)}var Eu=A(null),Oa=null,Tn=null;function Xn(e,t,i){X(Eu,t._currentValue),t._currentValue=i}function wn(e){e._currentValue=Eu.current,G(Eu)}function ju(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Au(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var v=r.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=r;for(var j=0;j<t.length;j++)if(b.context===t[j]){c.lanes|=i,b=c.alternate,b!==null&&(b.lanes|=i),ju(c.return,i,e),s||(v=null);break e}c=b.next}}else if(r.tag===18){if(v=r.return,v===null)throw Error(o(341));v.lanes|=i,c=v.alternate,c!==null&&(c.lanes|=i),ju(v,i,e),v=null}else v=r.child;if(v!==null)v.return=r;else for(v=r;v!==null;){if(v===e){v=null;break}if(r=v.sibling,r!==null){r.return=v.return,v=r;break}v=v.return}r=v}}function xi(e,t,i,s){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var v=r.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var b=r.type;Ot(r.pendingProps.value,v.value)||(e!==null?e.push(b):e=[b])}}else if(r===be.current){if(v=r.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ql):e=[ql])}r=r.return}e!==null&&Au(t,e,i,s),t.flags|=262144}function Ks(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){Oa=e,Tn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function st(e){return rm(Oa,e)}function Fs(e,t){return Oa===null&&za(e),rm(e,t)}function rm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Tn===null){if(e===null)throw Error(o(308));Tn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Tn=Tn.next=t;return i}var $1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},G1=n.unstable_scheduleCallback,Y1=n.unstable_NormalPriority,Qe={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new $1,data:new Map,refCount:0}}function yl(e){e.refCount--,e.refCount===0&&G1(Y1,function(){e.controller.abort()})}var xl=null,Cu=0,bi=0,Si=null;function q1(e,t){if(xl===null){var i=xl=[];Cu=0,bi=Oc(),Si={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Cu++,t.then(um,um),t}function um(){if(--Cu===0&&xl!==null){Si!==null&&(Si.status="fulfilled");var e=xl;xl=null,bi=0,Si=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function X1(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var cm=B.S;B.S=function(e,t){Fp=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&q1(e,t),cm!==null&&cm(e,t)};var Ra=A(null);function Mu(){var e=Ra.current;return e!==null?e:Ve.pooledCache}function Zs(e,t){t===null?X(Ra,Ra.current):X(Ra,t.pool)}function fm(){var e=Mu();return e===null?null:{parent:Qe._currentValue,pool:e}}var Ti=Error(o(460)),Du=Error(o(474)),Qs=Error(o(542)),Ps={then:function(){}};function dm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hm(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(yn,yn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pm(e),e;default:if(typeof t.status=="string")t.then(yn,yn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pm(e),e}throw ka=t,Ti}}function La(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ka=i,Ti):i}}var ka=null;function mm(){if(ka===null)throw Error(o(459));var e=ka;return ka=null,e}function pm(e){if(e===Ti||e===Qs)throw Error(o(483))}var wi=null,bl=0;function Js(e){var t=bl;return bl+=1,wi===null&&(wi=[]),hm(wi,e,t)}function Sl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ws(e,t){throw t.$$typeof===T?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function gm(e){function t(O,N){if(e){var L=O.deletions;L===null?(O.deletions=[N],O.flags|=16):L.push(N)}}function i(O,N){if(!e)return null;for(;N!==null;)t(O,N),N=N.sibling;return null}function s(O){for(var N=new Map;O!==null;)O.key!==null?N.set(O.key,O):N.set(O.index,O),O=O.sibling;return N}function r(O,N){return O=bn(O,N),O.index=0,O.sibling=null,O}function c(O,N,L){return O.index=L,e?(L=O.alternate,L!==null?(L=L.index,L<N?(O.flags|=67108866,N):L):(O.flags|=67108866,N)):(O.flags|=1048576,N)}function v(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,N,L,$){return N===null||N.tag!==6?(N=yu(L,O.mode,$),N.return=O,N):(N=r(N,L),N.return=O,N)}function j(O,N,L,$){var le=L.type;return le===D?H(O,N,L.props.children,$,L.key):N!==null&&(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===J&&La(le)===N.type)?(N=r(N,L.props),Sl(N,L),N.return=O,N):(N=qs(L.type,L.key,L.props,null,O.mode,$),Sl(N,L),N.return=O,N)}function k(O,N,L,$){return N===null||N.tag!==4||N.stateNode.containerInfo!==L.containerInfo||N.stateNode.implementation!==L.implementation?(N=xu(L,O.mode,$),N.return=O,N):(N=r(N,L.children||[]),N.return=O,N)}function H(O,N,L,$,le){return N===null||N.tag!==7?(N=Ma(L,O.mode,$,le),N.return=O,N):(N=r(N,L),N.return=O,N)}function Y(O,N,L){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=yu(""+N,O.mode,L),N.return=O,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case S:return L=qs(N.type,N.key,N.props,null,O.mode,L),Sl(L,N),L.return=O,L;case E:return N=xu(N,O.mode,L),N.return=O,N;case J:return N=La(N),Y(O,N,L)}if(Ne(N)||ie(N))return N=Ma(N,O.mode,L,null),N.return=O,N;if(typeof N.then=="function")return Y(O,Js(N),L);if(N.$$typeof===_)return Y(O,Fs(O,N),L);Ws(O,N)}return null}function V(O,N,L,$){var le=N!==null?N.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return le!==null?null:b(O,N,""+L,$);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case S:return L.key===le?j(O,N,L,$):null;case E:return L.key===le?k(O,N,L,$):null;case J:return L=La(L),V(O,N,L,$)}if(Ne(L)||ie(L))return le!==null?null:H(O,N,L,$,null);if(typeof L.then=="function")return V(O,N,Js(L),$);if(L.$$typeof===_)return V(O,N,Fs(O,L),$);Ws(O,L)}return null}function U(O,N,L,$,le){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return O=O.get(L)||null,b(N,O,""+$,le);if(typeof $=="object"&&$!==null){switch($.$$typeof){case S:return O=O.get($.key===null?L:$.key)||null,j(N,O,$,le);case E:return O=O.get($.key===null?L:$.key)||null,k(N,O,$,le);case J:return $=La($),U(O,N,L,$,le)}if(Ne($)||ie($))return O=O.get(L)||null,H(N,O,$,le,null);if(typeof $.then=="function")return U(O,N,L,Js($),le);if($.$$typeof===_)return U(O,N,L,Fs(N,$),le);Ws(N,$)}return null}function ee(O,N,L,$){for(var le=null,we=null,ae=N,de=N=0,ye=null;ae!==null&&de<L.length;de++){ae.index>de?(ye=ae,ae=null):ye=ae.sibling;var Ee=V(O,ae,L[de],$);if(Ee===null){ae===null&&(ae=ye);break}e&&ae&&Ee.alternate===null&&t(O,ae),N=c(Ee,N,de),we===null?le=Ee:we.sibling=Ee,we=Ee,ae=ye}if(de===L.length)return i(O,ae),xe&&Sn(O,de),le;if(ae===null){for(;de<L.length;de++)ae=Y(O,L[de],$),ae!==null&&(N=c(ae,N,de),we===null?le=ae:we.sibling=ae,we=ae);return xe&&Sn(O,de),le}for(ae=s(ae);de<L.length;de++)ye=U(ae,O,de,L[de],$),ye!==null&&(e&&ye.alternate!==null&&ae.delete(ye.key===null?de:ye.key),N=c(ye,N,de),we===null?le=ye:we.sibling=ye,we=ye);return e&&ae.forEach(function(ua){return t(O,ua)}),xe&&Sn(O,de),le}function se(O,N,L,$){if(L==null)throw Error(o(151));for(var le=null,we=null,ae=N,de=N=0,ye=null,Ee=L.next();ae!==null&&!Ee.done;de++,Ee=L.next()){ae.index>de?(ye=ae,ae=null):ye=ae.sibling;var ua=V(O,ae,Ee.value,$);if(ua===null){ae===null&&(ae=ye);break}e&&ae&&ua.alternate===null&&t(O,ae),N=c(ua,N,de),we===null?le=ua:we.sibling=ua,we=ua,ae=ye}if(Ee.done)return i(O,ae),xe&&Sn(O,de),le;if(ae===null){for(;!Ee.done;de++,Ee=L.next())Ee=Y(O,Ee.value,$),Ee!==null&&(N=c(Ee,N,de),we===null?le=Ee:we.sibling=Ee,we=Ee);return xe&&Sn(O,de),le}for(ae=s(ae);!Ee.done;de++,Ee=L.next())Ee=U(ae,O,de,Ee.value,$),Ee!==null&&(e&&Ee.alternate!==null&&ae.delete(Ee.key===null?de:Ee.key),N=c(Ee,N,de),we===null?le=Ee:we.sibling=Ee,we=Ee);return e&&ae.forEach(function(nT){return t(O,nT)}),xe&&Sn(O,de),le}function Re(O,N,L,$){if(typeof L=="object"&&L!==null&&L.type===D&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case S:e:{for(var le=L.key;N!==null;){if(N.key===le){if(le=L.type,le===D){if(N.tag===7){i(O,N.sibling),$=r(N,L.props.children),$.return=O,O=$;break e}}else if(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===J&&La(le)===N.type){i(O,N.sibling),$=r(N,L.props),Sl($,L),$.return=O,O=$;break e}i(O,N);break}else t(O,N);N=N.sibling}L.type===D?($=Ma(L.props.children,O.mode,$,L.key),$.return=O,O=$):($=qs(L.type,L.key,L.props,null,O.mode,$),Sl($,L),$.return=O,O=$)}return v(O);case E:e:{for(le=L.key;N!==null;){if(N.key===le)if(N.tag===4&&N.stateNode.containerInfo===L.containerInfo&&N.stateNode.implementation===L.implementation){i(O,N.sibling),$=r(N,L.children||[]),$.return=O,O=$;break e}else{i(O,N);break}else t(O,N);N=N.sibling}$=xu(L,O.mode,$),$.return=O,O=$}return v(O);case J:return L=La(L),Re(O,N,L,$)}if(Ne(L))return ee(O,N,L,$);if(ie(L)){if(le=ie(L),typeof le!="function")throw Error(o(150));return L=le.call(L),se(O,N,L,$)}if(typeof L.then=="function")return Re(O,N,Js(L),$);if(L.$$typeof===_)return Re(O,N,Fs(O,L),$);Ws(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,N!==null&&N.tag===6?(i(O,N.sibling),$=r(N,L),$.return=O,O=$):(i(O,N),$=yu(L,O.mode,$),$.return=O,O=$),v(O)):i(O,N)}return function(O,N,L,$){try{bl=0;var le=Re(O,N,L,$);return wi=null,le}catch(ae){if(ae===Ti||ae===Qs)throw ae;var we=zt(29,ae,null,O.mode);return we.lanes=$,we.return=O,we}finally{}}}var Va=gm(!0),vm=gm(!1),Kn=!1;function Ou(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Ys(e),em(e,null,i),t}return Gs(e,s,t,i),Ys(e)}function Tl(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,rh(e,i)}}function Ru(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,c=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};c===null?r=c=v:c=c.next=v,i=i.next}while(i!==null);c===null?r=c=t:c=c.next=t}else r=c=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Lu=!1;function wl(){if(Lu){var e=Si;if(e!==null)throw e}}function El(e,t,i,s){Lu=!1;var r=e.updateQueue;Kn=!1;var c=r.firstBaseUpdate,v=r.lastBaseUpdate,b=r.shared.pending;if(b!==null){r.shared.pending=null;var j=b,k=j.next;j.next=null,v===null?c=k:v.next=k,v=j;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==v&&(b===null?H.firstBaseUpdate=k:b.next=k,H.lastBaseUpdate=j))}if(c!==null){var Y=r.baseState;v=0,H=k=j=null,b=c;do{var V=b.lane&-536870913,U=V!==b.lane;if(U?(ve&V)===V:(s&V)===V){V!==0&&V===bi&&(Lu=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ee=e,se=b;V=t;var Re=i;switch(se.tag){case 1:if(ee=se.payload,typeof ee=="function"){Y=ee.call(Re,Y,V);break e}Y=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=se.payload,V=typeof ee=="function"?ee.call(Re,Y,V):ee,V==null)break e;Y=x({},Y,V);break e;case 2:Kn=!0}}V=b.callback,V!==null&&(e.flags|=64,U&&(e.flags|=8192),U=r.callbacks,U===null?r.callbacks=[V]:U.push(V))}else U={lane:V,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(k=H=U,j=Y):H=H.next=U,v|=V;if(b=b.next,b===null){if(b=r.shared.pending,b===null)break;U=b,b=U.next,U.next=null,r.lastBaseUpdate=U,r.shared.pending=null}}while(!0);H===null&&(j=Y),r.baseState=j,r.firstBaseUpdate=k,r.lastBaseUpdate=H,c===null&&(r.shared.lanes=0),In|=v,e.lanes=v,e.memoizedState=Y}}function ym(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function xm(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ym(i[e],t)}var Ei=A(null),Is=A(0);function bm(e,t){e=zn,X(Is,e),X(Ei,t),zn=e|t.baseLanes}function ku(){X(Is,zn),X(Ei,Ei.current)}function Vu(){zn=Is.current,G(Ei),G(Is)}var Rt=A(null),Kt=null;function Qn(e){var t=e.alternate;X(Xe,Xe.current&1),X(Rt,e),Kt===null&&(t===null||Ei.current!==null||t.memoizedState!==null)&&(Kt=e)}function _u(e){X(Xe,Xe.current),X(Rt,e),Kt===null&&(Kt=e)}function Sm(e){e.tag===22?(X(Xe,Xe.current),X(Rt,e),Kt===null&&(Kt=e)):Pn()}function Pn(){X(Xe,Xe.current),X(Rt,Rt.current)}function Lt(e){G(Rt),Kt===e&&(Kt=null),G(Xe)}var Xe=A(0);function eo(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Yc(i)||qc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var En=0,fe=null,Oe=null,Pe=null,to=!1,ji=!1,_a=!1,no=0,jl=0,Ai=null,K1=0;function Ge(){throw Error(o(321))}function Uu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ot(e[i],t[i]))return!1;return!0}function Bu(e,t,i,s,r,c){return En=c,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?ip:ec,_a=!1,c=i(s,r),_a=!1,ji&&(c=wm(t,i,s,r)),Tm(e),c}function Tm(e){B.H=Cl;var t=Oe!==null&&Oe.next!==null;if(En=0,Pe=Oe=fe=null,to=!1,jl=0,Ai=null,t)throw Error(o(300));e===null||Je||(e=e.dependencies,e!==null&&Ks(e)&&(Je=!0))}function wm(e,t,i,s){fe=e;var r=0;do{if(ji&&(Ai=null),jl=0,ji=!1,25<=r)throw Error(o(301));if(r+=1,Pe=Oe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}B.H=lp,c=t(i,s)}while(ji);return c}function F1(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Al(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(fe.flags|=1024),t}function Hu(){var e=no!==0;return no=0,e}function $u(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Gu(e){if(to){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}to=!1}En=0,Pe=Oe=fe=null,ji=!1,jl=no=0,Ai=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?fe.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Ke(){if(Oe===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Pe===null?fe.memoizedState:Pe.next;if(t!==null)Pe=t,Oe=e;else{if(e===null)throw fe.alternate===null?Error(o(467)):Error(o(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Pe===null?fe.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function ao(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Al(e){var t=jl;return jl+=1,Ai===null&&(Ai=[]),e=hm(Ai,e,t),t=fe,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?ip:ec),e}function io(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Al(e);if(e.$$typeof===_)return st(e)}throw Error(o(438,String(e)))}function Yu(e){var t=null,i=fe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=fe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ao(),fe.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=K;return t.index++,i}function jn(e,t){return typeof t=="function"?t(e):t}function lo(e){var t=Ke();return qu(t,Oe,e)}function qu(e,t,i){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=i;var r=e.baseQueue,c=s.pending;if(c!==null){if(r!==null){var v=r.next;r.next=c.next,c.next=v}t.baseQueue=r=c,s.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var b=v=null,j=null,k=t,H=!1;do{var Y=k.lane&-536870913;if(Y!==k.lane?(ve&Y)===Y:(En&Y)===Y){var V=k.revertLane;if(V===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),Y===bi&&(H=!0);else if((En&V)===V){k=k.next,V===bi&&(H=!0);continue}else Y={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},j===null?(b=j=Y,v=c):j=j.next=Y,fe.lanes|=V,In|=V;Y=k.action,_a&&i(c,Y),c=k.hasEagerState?k.eagerState:i(c,Y)}else V={lane:Y,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},j===null?(b=j=V,v=c):j=j.next=V,fe.lanes|=Y,In|=Y;k=k.next}while(k!==null&&k!==t);if(j===null?v=c:j.next=b,!Ot(c,e.memoizedState)&&(Je=!0,H&&(i=Si,i!==null)))throw i;e.memoizedState=c,e.baseState=v,e.baseQueue=j,s.lastRenderedState=c}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Xu(e){var t=Ke(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,c=t.memoizedState;if(r!==null){i.pending=null;var v=r=r.next;do c=e(c,v.action),v=v.next;while(v!==r);Ot(c,t.memoizedState)||(Je=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),i.lastRenderedState=c}return[c,s]}function Em(e,t,i){var s=fe,r=Ke(),c=xe;if(c){if(i===void 0)throw Error(o(407));i=i()}else i=t();var v=!Ot((Oe||r).memoizedState,i);if(v&&(r.memoizedState=i,Je=!0),r=r.queue,Zu(Nm.bind(null,s,r,e),[e]),r.getSnapshot!==t||v||Pe!==null&&Pe.memoizedState.tag&1){if(s.flags|=2048,Ni(9,{destroy:void 0},Am.bind(null,s,r,i,t),null),Ve===null)throw Error(o(349));c||(En&127)!==0||jm(s,t,i)}return i}function jm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=fe.updateQueue,t===null?(t=ao(),fe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Am(e,t,i,s){t.value=i,t.getSnapshot=s,Cm(t)&&Mm(e)}function Nm(e,t,i){return i(function(){Cm(t)&&Mm(e)})}function Cm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function Mm(e){var t=Ca(e,2);t!==null&&Et(t,e,2)}function Ku(e){var t=mt();if(typeof e=="function"){var i=e;if(e=i(),_a){Bn(!0);try{i()}finally{Bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:e},t}function Dm(e,t,i,s){return e.baseState=i,qu(e,Oe,typeof s=="function"?s:jn)}function Z1(e,t,i,s,r){if(ro(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){c.listeners.push(v)}};B.T!==null?i(!0):c.isTransition=!1,s(c),i=t.pending,i===null?(c.next=t.pending=c,Om(t,c)):(c.next=i.next,t.pending=i.next=c)}}function Om(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var c=B.T,v={};B.T=v;try{var b=i(r,s),j=B.S;j!==null&&j(v,b),zm(e,t,b)}catch(k){Fu(e,t,k)}finally{c!==null&&v.types!==null&&(c.types=v.types),B.T=c}}else try{c=i(r,s),zm(e,t,c)}catch(k){Fu(e,t,k)}}function zm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Rm(e,t,s)},function(s){return Fu(e,t,s)}):Rm(e,t,i)}function Rm(e,t,i){t.status="fulfilled",t.value=i,Lm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Om(e,i)))}function Fu(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Lm(t),t=t.next;while(t!==s)}e.action=null}function Lm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function km(e,t){return t}function Vm(e,t){if(xe){var i=Ve.formState;if(i!==null){e:{var s=fe;if(xe){if(_e){t:{for(var r=_e,c=Xt;r.nodeType!==8;){if(!c){r=null;break t}if(r=Ft(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){_e=Ft(r.nextSibling),s=r.data==="F!";break e}}qn(s)}s=!1}s&&(t=i[0])}}return i=mt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:km,lastRenderedState:t},i.queue=s,i=tp.bind(null,fe,s),s.dispatch=i,s=Ku(!1),c=Iu.bind(null,fe,!1,s.queue),s=mt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=Z1.bind(null,fe,r,c,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function _m(e){var t=Ke();return Um(t,Oe,e)}function Um(e,t,i){if(t=qu(e,t,km)[0],e=lo(jn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Al(t)}catch(v){throw v===Ti?Qs:v}else s=t;t=Ke();var r=t.queue,c=r.dispatch;return i!==t.memoizedState&&(fe.flags|=2048,Ni(9,{destroy:void 0},Q1.bind(null,r,i),null)),[s,c,e]}function Q1(e,t){e.action=t}function Bm(e){var t=Ke(),i=Oe;if(i!==null)return Um(t,i,e);Ke(),t=t.memoizedState,i=Ke();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ni(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=fe.updateQueue,t===null&&(t=ao(),fe.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Hm(){return Ke().memoizedState}function so(e,t,i,s){var r=mt();fe.flags|=e,r.memoizedState=Ni(1|t,{destroy:void 0},i,s===void 0?null:s)}function oo(e,t,i,s){var r=Ke();s=s===void 0?null:s;var c=r.memoizedState.inst;Oe!==null&&s!==null&&Uu(s,Oe.memoizedState.deps)?r.memoizedState=Ni(t,c,i,s):(fe.flags|=e,r.memoizedState=Ni(1|t,c,i,s))}function $m(e,t){so(8390656,8,e,t)}function Zu(e,t){oo(2048,8,e,t)}function P1(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=ao(),fe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Gm(e){var t=Ke().memoizedState;return P1({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Ym(e,t){return oo(4,2,e,t)}function qm(e,t){return oo(4,4,e,t)}function Xm(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Km(e,t,i){i=i!=null?i.concat([e]):null,oo(4,4,Xm.bind(null,t,e),i)}function Qu(){}function Fm(e,t){var i=Ke();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Uu(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Zm(e,t){var i=Ke();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Uu(t,s[1]))return s[0];if(s=e(),_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[s,t],s}function Pu(e,t,i){return i===void 0||(En&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Qp(),fe.lanes|=e,In|=e,i)}function Qm(e,t,i,s){return Ot(i,t)?i:Ei.current!==null?(e=Pu(e,i,s),Ot(e,t)||(Je=!0),e):(En&42)===0||(En&1073741824)!==0&&(ve&261930)===0?(Je=!0,e.memoizedState=i):(e=Qp(),fe.lanes|=e,In|=e,t)}function Pm(e,t,i,s,r){var c=Q.p;Q.p=c!==0&&8>c?c:8;var v=B.T,b={};B.T=b,Iu(e,!1,t,i);try{var j=r(),k=B.S;if(k!==null&&k(b,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=X1(j,s);Nl(e,t,H,_t(e))}else Nl(e,t,s,_t(e))}catch(Y){Nl(e,t,{then:function(){},status:"rejected",reason:Y},_t())}finally{Q.p=c,v!==null&&b.types!==null&&(v.types=b.types),B.T=v}}function J1(){}function Ju(e,t,i,s){if(e.tag!==5)throw Error(o(476));var r=Jm(e).queue;Pm(e,r,t,P,i===null?J1:function(){return Wm(e),i(s)})}function Jm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:P},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wm(e){var t=Jm(e);t.next===null&&(t=e.alternate.memoizedState),Nl(e,t.next.queue,{},_t())}function Wu(){return st(ql)}function Im(){return Ke().memoizedState}function ep(){return Ke().memoizedState}function W1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=Fn(i);var s=Zn(t,e,i);s!==null&&(Et(s,t,i),Tl(s,t,i)),t={cache:Nu()},e.payload=t;return}t=t.return}}function I1(e,t,i){var s=_t();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},ro(e)?np(t,i):(i=gu(e,t,i,s),i!==null&&(Et(i,e,s),ap(i,t,s)))}function tp(e,t,i){var s=_t();Nl(e,t,i,s)}function Nl(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(ro(e))np(t,r);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var v=t.lastRenderedState,b=c(v,i);if(r.hasEagerState=!0,r.eagerState=b,Ot(b,v))return Gs(e,t,r,0),Ve===null&&$s(),!1}catch{}finally{}if(i=gu(e,t,r,s),i!==null)return Et(i,e,s),ap(i,t,s),!0}return!1}function Iu(e,t,i,s){if(s={lane:2,revertLane:Oc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},ro(e)){if(t)throw Error(o(479))}else t=gu(e,i,s,2),t!==null&&Et(t,e,2)}function ro(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function np(e,t){ji=to=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ap(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,rh(e,i)}}var Cl={readContext:st,use:io,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Cl.useEffectEvent=Ge;var ip={readContext:st,use:io,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:$m,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,so(4194308,4,Xm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return so(4194308,4,e,t)},useInsertionEffect:function(e,t){so(4,2,e,t)},useMemo:function(e,t){var i=mt();t=t===void 0?null:t;var s=e();if(_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=mt();if(i!==void 0){var r=i(t);if(_a){Bn(!0);try{i(t)}finally{Bn(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=I1.bind(null,fe,e),[s.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ku(e);var t=e.queue,i=tp.bind(null,fe,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Qu,useDeferredValue:function(e,t){var i=mt();return Pu(i,e,t)},useTransition:function(){var e=Ku(!1);return e=Pm.bind(null,fe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=fe,r=mt();if(xe){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),Ve===null)throw Error(o(349));(ve&127)!==0||jm(s,t,i)}r.memoizedState=i;var c={value:i,getSnapshot:t};return r.queue=c,$m(Nm.bind(null,s,c,e),[e]),s.flags|=2048,Ni(9,{destroy:void 0},Am.bind(null,s,c,i,t),null),i},useId:function(){var e=mt(),t=Ve.identifierPrefix;if(xe){var i=on,s=sn;i=(s&~(1<<32-Dt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=no++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=K1++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Wu,useFormState:Vm,useActionState:Vm,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Iu.bind(null,fe,!0,i),i.dispatch=t,[e,t]},useMemoCache:Yu,useCacheRefresh:function(){return mt().memoizedState=W1.bind(null,fe)},useEffectEvent:function(e){var t=mt(),i={impl:e};return t.memoizedState=i,function(){if((je&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},ec={readContext:st,use:io,useCallback:Fm,useContext:st,useEffect:Zu,useImperativeHandle:Km,useInsertionEffect:Ym,useLayoutEffect:qm,useMemo:Zm,useReducer:lo,useRef:Hm,useState:function(){return lo(jn)},useDebugValue:Qu,useDeferredValue:function(e,t){var i=Ke();return Qm(i,Oe.memoizedState,e,t)},useTransition:function(){var e=lo(jn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Al(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Wu,useFormState:_m,useActionState:_m,useOptimistic:function(e,t){var i=Ke();return Dm(i,Oe,e,t)},useMemoCache:Yu,useCacheRefresh:ep};ec.useEffectEvent=Gm;var lp={readContext:st,use:io,useCallback:Fm,useContext:st,useEffect:Zu,useImperativeHandle:Km,useInsertionEffect:Ym,useLayoutEffect:qm,useMemo:Zm,useReducer:Xu,useRef:Hm,useState:function(){return Xu(jn)},useDebugValue:Qu,useDeferredValue:function(e,t){var i=Ke();return Oe===null?Pu(i,e,t):Qm(i,Oe.memoizedState,e,t)},useTransition:function(){var e=Xu(jn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Al(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Wu,useFormState:Bm,useActionState:Bm,useOptimistic:function(e,t){var i=Ke();return Oe!==null?Dm(i,Oe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Yu,useCacheRefresh:ep};lp.useEffectEvent=Gm;function tc(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:x({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var nc={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=_t(),r=Fn(s);r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,s),t!==null&&(Et(t,e,s),Tl(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=_t(),r=Fn(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,s),t!==null&&(Et(t,e,s),Tl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),s=Fn(i);s.tag=2,t!=null&&(s.callback=t),t=Zn(e,s,i),t!==null&&(Et(t,e,i),Tl(t,e,i))}};function sp(e,t,i,s,r,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,v):t.prototype&&t.prototype.isPureReactComponent?!ml(i,s)||!ml(r,c):!0}function op(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&nc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=x({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function rp(e){Hs(e)}function up(e){console.error(e)}function cp(e){Hs(e)}function uo(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function fp(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function ac(e,t,i){return i=Fn(i),i.tag=3,i.payload={element:null},i.callback=function(){uo(e,t)},i}function dp(e){return e=Fn(e),e.tag=3,e}function hp(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var c=s.value;e.payload=function(){return r(c)},e.callback=function(){fp(t,i,s)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){fp(t,i,s),typeof r!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function eS(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&xi(t,i,r,!0),i=Rt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?To():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Ps?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Cc(e,s,r)),!1;case 22:return i.flags|=65536,s===Ps?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Cc(e,s,r)),!1}throw Error(o(435,i.tag))}return Cc(e,s,r),To(),!1}if(xe)return t=Rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Tu&&(e=Error(o(422),{cause:s}),vl(Gt(e,i)))):(s!==Tu&&(t=Error(o(423),{cause:s}),vl(Gt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Gt(s,i),r=ac(e.stateNode,s,r),Ru(e,r),Ye!==4&&(Ye=2)),!1;var c=Error(o(520),{cause:s});if(c=Gt(c,i),Vl===null?Vl=[c]:Vl.push(c),Ye!==4&&(Ye=2),t===null)return!0;s=Gt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=ac(i.stateNode,s,e),Ru(i,e),!1;case 1:if(t=i.type,c=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ea===null||!ea.has(c))))return i.flags|=65536,r&=-r,i.lanes|=r,r=dp(r),hp(r,e,i,s),Ru(i,r),!1}i=i.return}while(i!==null);return!1}var ic=Error(o(461)),Je=!1;function ot(e,t,i,s){t.child=e===null?vm(t,null,i,s):Va(t,e.child,i,s)}function mp(e,t,i,s,r){i=i.render;var c=t.ref;if("ref"in s){var v={};for(var b in s)b!=="ref"&&(v[b]=s[b])}else v=s;return za(t),s=Bu(e,t,i,v,c,r),b=Hu(),e!==null&&!Je?($u(e,t,r),An(e,t,r)):(xe&&b&&bu(t),t.flags|=1,ot(e,t,s,r),t.child)}function pp(e,t,i,s,r){if(e===null){var c=i.type;return typeof c=="function"&&!vu(c)&&c.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=c,gp(e,t,c,s,r)):(e=qs(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!dc(e,r)){var v=c.memoizedProps;if(i=i.compare,i=i!==null?i:ml,i(v,s)&&e.ref===t.ref)return An(e,t,r)}return t.flags|=1,e=bn(c,s),e.ref=t.ref,e.return=t,t.child=e}function gp(e,t,i,s,r){if(e!==null){var c=e.memoizedProps;if(ml(c,s)&&e.ref===t.ref)if(Je=!1,t.pendingProps=s=c,dc(e,r))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,An(e,t,r)}return lc(e,t,i,s,r)}function vp(e,t,i,s){var r=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~c}else s=0,t.child=null;return yp(e,t,c,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zs(t,c!==null?c.cachePool:null),c!==null?bm(t,c):ku(),Sm(t);else return s=t.lanes=536870912,yp(e,t,c!==null?c.baseLanes|i:i,i,s)}else c!==null?(Zs(t,c.cachePool),bm(t,c),Pn(),t.memoizedState=null):(e!==null&&Zs(t,null),ku(),Pn());return ot(e,t,r,i),t.child}function Ml(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yp(e,t,i,s,r){var c=Mu();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:i,cachePool:c},e!==null&&Zs(t,null),ku(),Sm(t),e!==null&&xi(e,t,s,!0),t.childLanes=r,null}function co(e,t){return t=ho({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xp(e,t,i){return Va(t,e.child,null,i),e=co(t,t.pendingProps),e.flags|=2,Lt(t),t.memoizedState=null,e}function tS(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(xe){if(s.mode==="hidden")return e=co(t,s),t.lanes=536870912,Ml(null,e);if(_u(t),(e=_e)?(e=Og(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gn!==null?{id:sn,overflow:on}:null,retryLane:536870912,hydrationErrors:null},i=nm(e),i.return=t,t.child=i,lt=t,_e=null)):e=null,e===null)throw qn(t);return t.lanes=536870912,null}return co(t,s)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if(_u(t),r)if(t.flags&256)t.flags&=-257,t=xp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Je||xi(e,t,i,!1),r=(i&e.childLanes)!==0,Je||r){if(s=Ve,s!==null&&(v=uh(s,i),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ca(e,v),Et(s,e,v),ic;To(),t=xp(e,t,i)}else e=c.treeContext,_e=Ft(v.nextSibling),lt=t,xe=!0,Yn=null,Xt=!1,e!==null&&lm(t,e),t=co(t,s),t.flags|=4096;return t}return e=bn(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fo(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function lc(e,t,i,s,r){return za(t),i=Bu(e,t,i,s,void 0,r),s=Hu(),e!==null&&!Je?($u(e,t,r),An(e,t,r)):(xe&&s&&bu(t),t.flags|=1,ot(e,t,i,r),t.child)}function bp(e,t,i,s,r,c){return za(t),t.updateQueue=null,i=wm(t,s,i,r),Tm(e),s=Hu(),e!==null&&!Je?($u(e,t,c),An(e,t,c)):(xe&&s&&bu(t),t.flags|=1,ot(e,t,i,c),t.child)}function Sp(e,t,i,s,r){if(za(t),t.stateNode===null){var c=pi,v=i.contextType;typeof v=="object"&&v!==null&&(c=st(v)),c=new i(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=nc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},Ou(t),v=i.contextType,c.context=typeof v=="object"&&v!==null?st(v):pi,c.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(tc(t,i,v,s),c.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(v=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),v!==c.state&&nc.enqueueReplaceState(c,c.state,null),El(t,s,c,r),wl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,j=Ua(i,b);c.props=j;var k=c.context,H=i.contextType;v=pi,typeof H=="object"&&H!==null&&(v=st(H));var Y=i.getDerivedStateFromProps;H=typeof Y=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,H||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||k!==v)&&op(t,c,s,v),Kn=!1;var V=t.memoizedState;c.state=V,El(t,s,c,r),wl(),k=t.memoizedState,b||V!==k||Kn?(typeof Y=="function"&&(tc(t,i,Y,s),k=t.memoizedState),(j=Kn||sp(t,i,j,s,V,k,v))?(H||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=k),c.props=s,c.state=k,c.context=v,s=j):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,zu(e,t),v=t.memoizedProps,H=Ua(i,v),c.props=H,Y=t.pendingProps,V=c.context,k=i.contextType,j=pi,typeof k=="object"&&k!==null&&(j=st(k)),b=i.getDerivedStateFromProps,(k=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==Y||V!==j)&&op(t,c,s,j),Kn=!1,V=t.memoizedState,c.state=V,El(t,s,c,r),wl();var U=t.memoizedState;v!==Y||V!==U||Kn||e!==null&&e.dependencies!==null&&Ks(e.dependencies)?(typeof b=="function"&&(tc(t,i,b,s),U=t.memoizedState),(H=Kn||sp(t,i,H,s,V,U,j)||e!==null&&e.dependencies!==null&&Ks(e.dependencies))?(k||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,U,j),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,U,j)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=U),c.props=s,c.state=U,c.context=j,s=H):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),s=!1)}return c=s,fo(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(t.child=Va(t,e.child,null,r),t.child=Va(t,null,i,r)):ot(e,t,i,r),t.memoizedState=c.state,e=t.child):e=An(e,t,r),e}function Tp(e,t,i,s){return Da(),t.flags|=256,ot(e,t,i,s),t.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oc(e){return{baseLanes:e,cachePool:fm()}}function rc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Vt),e}function wp(e,t,i){var s=t.pendingProps,r=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),v&&(r=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(r?Qn(t):Pn(),(e=_e)?(e=Og(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gn!==null?{id:sn,overflow:on}:null,retryLane:536870912,hydrationErrors:null},i=nm(e),i.return=t,t.child=i,lt=t,_e=null)):e=null,e===null)throw qn(t);return qc(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,r?(Pn(),r=t.mode,b=ho({mode:"hidden",children:b},r),s=Ma(s,r,i,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=oc(i),s.childLanes=rc(e,v,i),t.memoizedState=sc,Ml(null,s)):(Qn(t),uc(t,b))}var j=e.memoizedState;if(j!==null&&(b=j.dehydrated,b!==null)){if(c)t.flags&256?(Qn(t),t.flags&=-257,t=cc(e,t,i)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),b=s.fallback,r=t.mode,s=ho({mode:"visible",children:s.children},r),b=Ma(b,r,i,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Va(t,e.child,null,i),s=t.child,s.memoizedState=oc(i),s.childLanes=rc(e,v,i),t.memoizedState=sc,t=Ml(null,s));else if(Qn(t),qc(b)){if(v=b.nextSibling&&b.nextSibling.dataset,v)var k=v.dgst;v=k,s=Error(o(419)),s.stack="",s.digest=v,vl({value:s,source:null,stack:null}),t=cc(e,t,i)}else if(Je||xi(e,t,i,!1),v=(i&e.childLanes)!==0,Je||v){if(v=Ve,v!==null&&(s=uh(v,i),s!==0&&s!==j.retryLane))throw j.retryLane=s,Ca(e,s),Et(v,e,s),ic;Yc(b)||To(),t=cc(e,t,i)}else Yc(b)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,_e=Ft(b.nextSibling),lt=t,xe=!0,Yn=null,Xt=!1,e!==null&&lm(t,e),t=uc(t,s.children),t.flags|=4096);return t}return r?(Pn(),b=s.fallback,r=t.mode,j=e.child,k=j.sibling,s=bn(j,{mode:"hidden",children:s.children}),s.subtreeFlags=j.subtreeFlags&65011712,k!==null?b=bn(k,b):(b=Ma(b,r,i,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,Ml(null,s),s=t.child,b=e.child.memoizedState,b===null?b=oc(i):(r=b.cachePool,r!==null?(j=Qe._currentValue,r=r.parent!==j?{parent:j,pool:j}:r):r=fm(),b={baseLanes:b.baseLanes|i,cachePool:r}),s.memoizedState=b,s.childLanes=rc(e,v,i),t.memoizedState=sc,Ml(e.child,s)):(Qn(t),i=e.child,e=i.sibling,i=bn(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=i,t.memoizedState=null,i)}function uc(e,t){return t=ho({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ho(e,t){return e=zt(22,e,null,t),e.lanes=0,e}function cc(e,t,i){return Va(t,e.child,null,i),e=uc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ep(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ju(e.return,t,i)}function fc(e,t,i,s,r,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=i,v.tailMode=r,v.treeForkCount=c)}function jp(e,t,i){var s=t.pendingProps,r=s.revealOrder,c=s.tail;s=s.children;var v=Xe.current,b=(v&2)!==0;if(b?(v=v&1|2,t.flags|=128):v&=1,X(Xe,v),ot(e,t,s,i),s=xe?gl:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ep(e,i,t);else if(e.tag===19)Ep(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&eo(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),fc(t,!1,r,i,c,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&eo(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}fc(t,!0,i,null,c,s);break;case"together":fc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function An(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),In|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(xi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=bn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ks(e)))}function nS(e,t,i){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),Xn(t,Qe,e.memoizedState.cache),Da();break;case 27:case 5:tl(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:Xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_u(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Qn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?wp(e,t,i):(Qn(t),e=An(e,t,i),e!==null?e.sibling:null);Qn(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(xi(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return jp(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),X(Xe,Xe.current),s)break;return null;case 22:return t.lanes=0,vp(e,t,i,t.pendingProps);case 24:Xn(t,Qe,e.memoizedState.cache)}return An(e,t,i)}function Ap(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!dc(e,i)&&(t.flags&128)===0)return Je=!1,nS(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,xe&&(t.flags&1048576)!==0&&im(t,gl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=La(t.elementType),t.type=e,typeof e=="function")vu(e)?(s=Ua(e,s),t.tag=1,t=Sp(null,t,e,s,i)):(t.tag=0,t=lc(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===z){t.tag=11,t=mp(null,t,e,s,i);break e}else if(r===Z){t.tag=14,t=pp(null,t,e,s,i);break e}}throw t=Ae(e)||e,Error(o(306,t,""))}}return t;case 0:return lc(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Ua(s,t.pendingProps),Sp(e,t,s,r,i);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));s=t.pendingProps;var c=t.memoizedState;r=c.element,zu(e,t),El(t,s,null,i);var v=t.memoizedState;if(s=v.cache,Xn(t,Qe,s),s!==c.cache&&Au(t,[Qe],i,!0),wl(),s=v.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Tp(e,t,s,i);break e}else if(s!==r){r=Gt(Error(o(424)),t),vl(r),t=Tp(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_e=Ft(e.firstChild),lt=t,xe=!0,Yn=null,Xt=!0,i=vm(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Da(),s===r){t=An(e,t,i);break e}ot(e,t,s,i)}t=t.child}return t;case 26:return fo(e,t),e===null?(i=_g(t.type,null,t.pendingProps,null))?t.memoizedState=i:xe||(i=t.type,e=t.pendingProps,s=Mo(me.current).createElement(i),s[it]=t,s[yt]=e,rt(s,i,e),nt(s),t.stateNode=s):t.memoizedState=_g(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return tl(t),e===null&&xe&&(s=t.stateNode=Lg(t.type,t.pendingProps,me.current),lt=t,Xt=!0,r=_e,ia(t.type)?(Xc=r,_e=Ft(s.firstChild)):_e=r),ot(e,t,t.pendingProps.children,i),fo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((r=s=_e)&&(s=zS(s,t.type,t.pendingProps,Xt),s!==null?(t.stateNode=s,lt=t,_e=Ft(s.firstChild),Xt=!1,r=!0):r=!1),r||qn(t)),tl(t),r=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,s=c.children,Hc(r,c)?s=null:v!==null&&Hc(r,v)&&(t.flags|=32),t.memoizedState!==null&&(r=Bu(e,t,F1,null,null,i),ql._currentValue=r),fo(e,t),ot(e,t,s,i),t.child;case 6:return e===null&&xe&&((e=i=_e)&&(i=RS(i,t.pendingProps,Xt),i!==null?(t.stateNode=i,lt=t,_e=null,e=!0):e=!1),e||qn(t)),null;case 13:return wp(e,t,i);case 4:return Ze(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Va(t,null,s,i):ot(e,t,s,i),t.child;case 11:return mp(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Xn(t,t.type,s.value),ot(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,za(t),r=st(r),s=s(r),t.flags|=1,ot(e,t,s,i),t.child;case 14:return pp(e,t,t.type,t.pendingProps,i);case 15:return gp(e,t,t.type,t.pendingProps,i);case 19:return jp(e,t,i);case 31:return tS(e,t,i);case 22:return vp(e,t,i,t.pendingProps);case 24:return za(t),s=st(Qe),e===null?(r=Mu(),r===null&&(r=Ve,c=Nu(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=i),r=c),t.memoizedState={parent:s,cache:r},Ou(t),Xn(t,Qe,r)):((e.lanes&i)!==0&&(zu(e,t),El(t,null,null,i),wl()),r=e.memoizedState,c=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Xn(t,Qe,s)):(s=c.cache,Xn(t,Qe,s),s!==r.cache&&Au(t,[Qe],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Nn(e){e.flags|=4}function hc(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Ip())e.flags|=8192;else throw ka=Ps,Du}else e.flags&=-16777217}function Np(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gg(t))if(Ip())e.flags|=8192;else throw ka=Ps,Du}function mo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?sh():536870912,e.lanes|=t,Oi|=t)}function Dl(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function aS(e,t,i){var s=t.pendingProps;switch(Su(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),wn(Qe),ke(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(yi(t)?Nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wu())),Ue(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(Nn(t),c!==null?(Ue(t),Np(t,c)):(Ue(t),hc(t,r,null,s,i))):c?c!==e.memoizedState?(Nn(t),Ue(t),Np(t,c)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Nn(t),Ue(t),hc(t,r,e,s,i)),null;case 27:if(Es(t),i=me.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}e=W.current,yi(t)?sm(t):(e=Lg(r,s,i),t.stateNode=e,Nn(t))}return Ue(t),null;case 5:if(Es(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}if(c=W.current,yi(t))sm(t);else{var v=Mo(me.current);switch(c){case 1:c=v.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=v.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=v.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=v.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=v.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?v.createElement(r,{is:s.is}):v.createElement(r)}}c[it]=t,c[yt]=s;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)c.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=c;e:switch(rt(c,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Nn(t)}}return Ue(t),hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,yi(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=lt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[it]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||wg(e.nodeValue,i)),e||qn(t,!0)}else e=Mo(e).createTextNode(s),e[it]=t,t.stateNode=e}return Ue(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=yi(t),i!==null){if(e===null){if(!s)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[it]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else i=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Lt(t),t):(Lt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ue(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=yi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[it]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),r=!1}else r=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Lt(t),t):(Lt(t),null)}return Lt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),mo(t,t.updateQueue),Ue(t),null);case 4:return ke(),e===null&&kc(t.stateNode.containerInfo),Ue(t),null;case 10:return wn(t.type),Ue(t),null;case 19:if(G(Xe),s=t.memoizedState,s===null)return Ue(t),null;if(r=(t.flags&128)!==0,c=s.rendering,c===null)if(r)Dl(s,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=eo(e),c!==null){for(t.flags|=128,Dl(s,!1),e=c.updateQueue,t.updateQueue=e,mo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)tm(i,e),i=i.sibling;return X(Xe,Xe.current&1|2),xe&&Sn(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ct()>xo&&(t.flags|=128,r=!0,Dl(s,!1),t.lanes=4194304)}else{if(!r)if(e=eo(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,mo(t,e),Dl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!xe)return Ue(t),null}else 2*Ct()-s.renderingStartTime>xo&&i!==536870912&&(t.flags|=128,r=!0,Dl(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ct(),e.sibling=null,i=Xe.current,X(Xe,r?i&1|2:i&1),xe&&Sn(t,s.treeForkCount),e):(Ue(t),null);case 22:case 23:return Lt(t),Vu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),i=t.updateQueue,i!==null&&mo(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&G(Ra),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),wn(Qe),Ue(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function iS(e,t){switch(Su(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wn(Qe),ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Es(t),null;case 31:if(t.memoizedState!==null){if(Lt(t),t.alternate===null)throw Error(o(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Lt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Xe),null;case 4:return ke(),null;case 10:return wn(t.type),null;case 22:case 23:return Lt(t),Vu(),e!==null&&G(Ra),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return wn(Qe),null;case 25:return null;default:return null}}function Cp(e,t){switch(Su(t),t.tag){case 3:wn(Qe),ke();break;case 26:case 27:case 5:Es(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Lt(t);break;case 13:Lt(t);break;case 19:G(Xe);break;case 10:wn(t.type);break;case 22:case 23:Lt(t),Vu(),e!==null&&G(Ra);break;case 24:wn(Qe)}}function Ol(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var c=i.create,v=i.inst;s=c(),v.destroy=s}i=i.next}while(i!==r)}}catch(b){Me(t,t.return,b)}}function Jn(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var c=r.next;s=c;do{if((s.tag&e)===e){var v=s.inst,b=v.destroy;if(b!==void 0){v.destroy=void 0,r=t;var j=i,k=b;try{k()}catch(H){Me(r,j,H)}}}s=s.next}while(s!==c)}}catch(H){Me(t,t.return,H)}}function Mp(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{xm(t,i)}catch(s){Me(e,e.return,s)}}}function Dp(e,t,i){i.props=Ua(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Me(e,t,s)}}function zl(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Me(e,t,r)}}function rn(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Me(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){Me(e,t,r)}else i.current=null}function Op(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){Me(e,e.return,r)}}function mc(e,t,i){try{var s=e.stateNode;AS(s,e.type,i,t),s[yt]=t}catch(r){Me(e,e.return,r)}}function zp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ia(e.type)||e.tag===4}function pc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ia(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gc(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=yn));else if(s!==4&&(s===27&&ia(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(gc(e,t,i),e=e.sibling;e!==null;)gc(e,t,i),e=e.sibling}function po(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ia(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(po(e,t,i),e=e.sibling;e!==null;)po(e,t,i),e=e.sibling}function Rp(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);rt(t,s,i),t[it]=e,t[yt]=i}catch(c){Me(e,e.return,c)}}var Cn=!1,We=!1,vc=!1,Lp=typeof WeakSet=="function"?WeakSet:Set,at=null;function lS(e,t){if(e=e.containerInfo,Uc=Vo,e=Kh(e),cu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{i.nodeType,c.nodeType}catch{i=null;break e}var v=0,b=-1,j=-1,k=0,H=0,Y=e,V=null;t:for(;;){for(var U;Y!==i||r!==0&&Y.nodeType!==3||(b=v+r),Y!==c||s!==0&&Y.nodeType!==3||(j=v+s),Y.nodeType===3&&(v+=Y.nodeValue.length),(U=Y.firstChild)!==null;)V=Y,Y=U;for(;;){if(Y===e)break t;if(V===i&&++k===r&&(b=v),V===c&&++H===s&&(j=v),(U=Y.nextSibling)!==null)break;Y=V,V=Y.parentNode}Y=U}i=b===-1||j===-1?null:{start:b,end:j}}else i=null}i=i||{start:0,end:0}}else i=null;for(Bc={focusedElem:e,selectionRange:i},Vo=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){switch(t=at,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,i=t,r=c.memoizedProps,c=c.memoizedState,s=i.stateNode;try{var ee=Ua(i.type,r);e=s.getSnapshotBeforeUpdate(ee,c),s.__reactInternalSnapshotBeforeUpdate=e}catch(se){Me(i,i.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Gc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}}function kp(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Dn(e,i),s&4&&Ol(5,i);break;case 1:if(Dn(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(v){Me(i,i.return,v)}else{var r=Ua(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Me(i,i.return,v)}}s&64&&Mp(i),s&512&&zl(i,i.return);break;case 3:if(Dn(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{xm(e,t)}catch(v){Me(i,i.return,v)}}break;case 27:t===null&&s&4&&Rp(i);case 26:case 5:Dn(e,i),t===null&&s&4&&Op(i),s&512&&zl(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),s&4&&Up(e,i);break;case 13:Dn(e,i),s&4&&Bp(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=mS.bind(null,i),LS(e,i))));break;case 22:if(s=i.memoizedState!==null||Cn,!s){t=t!==null&&t.memoizedState!==null||We,r=Cn;var c=We;Cn=s,(We=t)&&!c?On(e,i,(i.subtreeFlags&8772)!==0):Dn(e,i),Cn=r,We=c}break;case 30:break;default:Dn(e,i)}}function Vp(e){var t=e.alternate;t!==null&&(e.alternate=null,Vp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,bt=!1;function Mn(e,t,i){for(i=i.child;i!==null;)_p(e,t,i),i=i.sibling}function _p(e,t,i){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(nl,i)}catch{}switch(i.tag){case 26:We||rn(i,t),Mn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:We||rn(i,t);var s=He,r=bt;ia(i.type)&&(He=i.stateNode,bt=!1),Mn(e,t,i),$l(i.stateNode),He=s,bt=r;break;case 5:We||rn(i,t);case 6:if(s=He,r=bt,He=null,Mn(e,t,i),He=s,bt=r,He!==null)if(bt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(i.stateNode)}catch(c){Me(i,t,c)}else try{He.removeChild(i.stateNode)}catch(c){Me(i,t,c)}break;case 18:He!==null&&(bt?(e=He,Mg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):Mg(He,i.stateNode));break;case 4:s=He,r=bt,He=i.stateNode.containerInfo,bt=!0,Mn(e,t,i),He=s,bt=r;break;case 0:case 11:case 14:case 15:Jn(2,i,t),We||Jn(4,i,t),Mn(e,t,i);break;case 1:We||(rn(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Dp(i,t,s)),Mn(e,t,i);break;case 21:Mn(e,t,i);break;case 22:We=(s=We)||i.memoizedState!==null,Mn(e,t,i),We=s;break;default:Mn(e,t,i)}}function Up(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bi(e)}catch(i){Me(t,t.return,i)}}}function Bp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bi(e)}catch(i){Me(t,t.return,i)}}function sS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lp),t;default:throw Error(o(435,e.tag))}}function go(e,t){var i=sS(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=pS.bind(null,e,s);s.then(r,r)}})}function St(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],c=e,v=t,b=v;e:for(;b!==null;){switch(b.tag){case 27:if(ia(b.type)){He=b.stateNode,bt=!1;break e}break;case 5:He=b.stateNode,bt=!1;break e;case 3:case 4:He=b.stateNode.containerInfo,bt=!0;break e}b=b.return}if(He===null)throw Error(o(160));_p(c,v,r),He=null,bt=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Hp(t,e),t=t.sibling}var It=null;function Hp(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),Tt(e),s&4&&(Jn(3,e,e.return),Ol(3,e),Jn(5,e,e.return));break;case 1:St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),s&64&&Cn&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=It;if(St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),s&4){var c=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":c=r.getElementsByTagName("title")[0],(!c||c[ll]||c[it]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(s),r.head.insertBefore(c,r.querySelector("head > title"))),rt(c,s,i),c[it]=e,nt(c),s=c;break e;case"link":var v=Hg("link","href",r).get(s+(i.href||""));if(v){for(var b=0;b<v.length;b++)if(c=v[b],c.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&c.getAttribute("rel")===(i.rel==null?null:i.rel)&&c.getAttribute("title")===(i.title==null?null:i.title)&&c.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(b,1);break t}}c=r.createElement(s),rt(c,s,i),r.head.appendChild(c);break;case"meta":if(v=Hg("meta","content",r).get(s+(i.content||""))){for(b=0;b<v.length;b++)if(c=v[b],c.getAttribute("content")===(i.content==null?null:""+i.content)&&c.getAttribute("name")===(i.name==null?null:i.name)&&c.getAttribute("property")===(i.property==null?null:i.property)&&c.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&c.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(b,1);break t}}c=r.createElement(s),rt(c,s,i),r.head.appendChild(c);break;default:throw Error(o(468,s))}c[it]=e,nt(c),s=c}e.stateNode=s}else $g(r,e.type,e.stateNode);else e.stateNode=Bg(r,s,e.memoizedProps);else c!==s?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,s===null?$g(r,e.type,e.stateNode):Bg(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&mc(e,e.memoizedProps,i.memoizedProps)}break;case 27:St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),i!==null&&s&4&&mc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),e.flags&32){r=e.stateNode;try{ri(r,"")}catch(ee){Me(e,e.return,ee)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,mc(e,r,i!==null?i.memoizedProps:r)),s&1024&&(vc=!0);break;case 6:if(St(t,e),Tt(e),s&4){if(e.stateNode===null)throw Error(o(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ee){Me(e,e.return,ee)}}break;case 3:if(zo=null,r=It,It=Do(t.containerInfo),St(t,e),It=r,Tt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(ee){Me(e,e.return,ee)}vc&&(vc=!1,$p(e));break;case 4:s=It,It=Do(e.stateNode.containerInfo),St(t,e),Tt(e),It=s;break;case 12:St(t,e),Tt(e);break;case 31:St(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,go(e,s)));break;case 13:St(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(yo=Ct()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,go(e,s)));break;case 22:r=e.memoizedState!==null;var j=i!==null&&i.memoizedState!==null,k=Cn,H=We;if(Cn=k||r,We=H||j,St(t,e),We=H,Cn=k,Tt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||j||Cn||We||Ba(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){j=i=t;try{if(c=j.stateNode,r)v=c.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{b=j.stateNode;var Y=j.memoizedProps.style,V=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;b.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(ee){Me(j,j.return,ee)}}}else if(t.tag===6){if(i===null){j=t;try{j.stateNode.nodeValue=r?"":j.memoizedProps}catch(ee){Me(j,j.return,ee)}}}else if(t.tag===18){if(i===null){j=t;try{var U=j.stateNode;r?Dg(U,!0):Dg(j.stateNode,!1)}catch(ee){Me(j,j.return,ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,go(e,i))));break;case 19:St(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,go(e,s)));break;case 30:break;case 21:break;default:St(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(zp(s)){i=s;break}s=s.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var r=i.stateNode,c=pc(e);po(e,c,r);break;case 5:var v=i.stateNode;i.flags&32&&(ri(v,""),i.flags&=-33);var b=pc(e);po(e,b,v);break;case 3:case 4:var j=i.stateNode.containerInfo,k=pc(e);gc(e,k,j);break;default:throw Error(o(161))}}catch(H){Me(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $p(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$p(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kp(e,t.alternate,t),t=t.sibling}function Ba(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jn(4,t,t.return),Ba(t);break;case 1:rn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Dp(t,t.return,i),Ba(t);break;case 27:$l(t.stateNode);case 26:case 5:rn(t,t.return),Ba(t);break;case 22:t.memoizedState===null&&Ba(t);break;case 30:Ba(t);break;default:Ba(t)}e=e.sibling}}function On(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:On(r,c,i),Ol(4,c);break;case 1:if(On(r,c,i),s=c,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(k){Me(s,s.return,k)}if(s=c,r=s.updateQueue,r!==null){var b=s.stateNode;try{var j=r.shared.hiddenCallbacks;if(j!==null)for(r.shared.hiddenCallbacks=null,r=0;r<j.length;r++)ym(j[r],b)}catch(k){Me(s,s.return,k)}}i&&v&64&&Mp(c),zl(c,c.return);break;case 27:Rp(c);case 26:case 5:On(r,c,i),i&&s===null&&v&4&&Op(c),zl(c,c.return);break;case 12:On(r,c,i);break;case 31:On(r,c,i),i&&v&4&&Up(r,c);break;case 13:On(r,c,i),i&&v&4&&Bp(r,c);break;case 22:c.memoizedState===null&&On(r,c,i),zl(c,c.return);break;case 30:break;default:On(r,c,i)}t=t.sibling}}function yc(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&yl(i))}function xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yl(e))}function en(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gp(e,t,i,s),t=t.sibling}function Gp(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,i,s),r&2048&&Ol(9,t);break;case 1:en(e,t,i,s);break;case 3:en(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yl(e)));break;case 12:if(r&2048){en(e,t,i,s),e=t.stateNode;try{var c=t.memoizedProps,v=c.id,b=c.onPostCommit;typeof b=="function"&&b(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Me(t,t.return,j)}}else en(e,t,i,s);break;case 31:en(e,t,i,s);break;case 13:en(e,t,i,s);break;case 23:break;case 22:c=t.stateNode,v=t.alternate,t.memoizedState!==null?c._visibility&2?en(e,t,i,s):Rl(e,t):c._visibility&2?en(e,t,i,s):(c._visibility|=2,Ci(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&yc(v,t);break;case 24:en(e,t,i,s),r&2048&&xc(t.alternate,t);break;default:en(e,t,i,s)}}function Ci(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,v=t,b=i,j=s,k=v.flags;switch(v.tag){case 0:case 11:case 15:Ci(c,v,b,j,r),Ol(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?Ci(c,v,b,j,r):Rl(c,v):(H._visibility|=2,Ci(c,v,b,j,r)),r&&k&2048&&yc(v.alternate,v);break;case 24:Ci(c,v,b,j,r),r&&k&2048&&xc(v.alternate,v);break;default:Ci(c,v,b,j,r)}t=t.sibling}}function Rl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Rl(i,s),r&2048&&yc(s.alternate,s);break;case 24:Rl(i,s),r&2048&&xc(s.alternate,s);break;default:Rl(i,s)}t=t.sibling}}var Ll=8192;function Mi(e,t,i){if(e.subtreeFlags&Ll)for(e=e.child;e!==null;)Yp(e,t,i),e=e.sibling}function Yp(e,t,i){switch(e.tag){case 26:Mi(e,t,i),e.flags&Ll&&e.memoizedState!==null&&KS(i,It,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,t,i);break;case 3:case 4:var s=It;It=Do(e.stateNode.containerInfo),Mi(e,t,i),It=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Ll,Ll=16777216,Mi(e,t,i),Ll=s):Mi(e,t,i));break;default:Mi(e,t,i)}}function qp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function kl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];at=s,Kp(s,e)}qp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xp(e),e=e.sibling}function Xp(e){switch(e.tag){case 0:case 11:case 15:kl(e),e.flags&2048&&Jn(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vo(e)):kl(e);break;default:kl(e)}}function vo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];at=s,Kp(s,e)}qp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),vo(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,vo(t));break;default:vo(t)}e=e.sibling}}function Kp(e,t){for(;at!==null;){var i=at;switch(i.tag){case 0:case 11:case 15:Jn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:yl(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,at=s;else e:for(i=e;at!==null;){s=at;var r=s.sibling,c=s.return;if(Vp(s),s===i){at=null;break e}if(r!==null){r.return=c,at=r;break e}at=c}}}var oS={getCacheForType:function(e){var t=st(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return st(Qe).controller.signal}},rS=typeof WeakMap=="function"?WeakMap:Map,je=0,Ve=null,pe=null,ve=0,Ce=0,kt=null,Wn=!1,Di=!1,bc=!1,zn=0,Ye=0,In=0,Ha=0,Sc=0,Vt=0,Oi=0,Vl=null,wt=null,Tc=!1,yo=0,Fp=0,xo=1/0,bo=null,ea=null,et=0,ta=null,zi=null,Rn=0,wc=0,Ec=null,Zp=null,_l=0,jc=null;function _t(){return(je&2)!==0&&ve!==0?ve&-ve:B.T!==null?Oc():ch()}function Qp(){if(Vt===0)if((ve&536870912)===0||xe){var e=Ns;Ns<<=1,(Ns&3932160)===0&&(Ns=262144),Vt=e}else Vt=536870912;return e=Rt.current,e!==null&&(e.flags|=32),Vt}function Et(e,t,i){(e===Ve&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ri(e,0),na(e,ve,Vt,!1)),il(e,i),((je&2)===0||e!==Ve)&&(e===Ve&&((je&2)===0&&(Ha|=i),Ye===4&&na(e,ve,Vt,!1)),un(e))}function Pp(e,t,i){if((je&6)!==0)throw Error(o(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||al(e,t),r=s?fS(e,t):Nc(e,t,!0),c=s;do{if(r===0){Di&&!s&&na(e,t,0,!1);break}else{if(i=e.current.alternate,c&&!uS(i)){r=Nc(e,t,!1),c=!1;continue}if(r===2){if(c=t,e.errorRecoveryDisabledLanes&c)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var b=e;r=Vl;var j=b.current.memoizedState.isDehydrated;if(j&&(Ri(b,v).flags|=256),v=Nc(b,v,!1),v!==2){if(bc&&!j){b.errorRecoveryDisabledLanes|=c,Ha|=c,r=4;break e}c=wt,wt=r,c!==null&&(wt===null?wt=c:wt.push.apply(wt,c))}r=v}if(c=!1,r!==2)continue}}if(r===1){Ri(e,0),na(e,t,0,!0);break}e:{switch(s=e,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:na(s,t,Vt,!Wn);break e;case 2:wt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=yo+300-Ct(),10<r)){if(na(s,t,Vt,!Wn),Ms(s,0,!0)!==0)break e;Rn=t,s.timeoutHandle=Ng(Jp.bind(null,s,i,wt,bo,Tc,t,Vt,Ha,Oi,Wn,c,"Throttled",-0,0),r);break e}Jp(s,i,wt,bo,Tc,t,Vt,Ha,Oi,Wn,c,null,-0,0)}}break}while(!0);un(e)}function Jp(e,t,i,s,r,c,v,b,j,k,H,Y,V,U){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yn},Yp(t,c,Y);var ee=(c&62914560)===c?yo-Ct():(c&4194048)===c?Fp-Ct():0;if(ee=FS(Y,ee),ee!==null){Rn=c,e.cancelPendingCommit=ee(lg.bind(null,e,t,c,i,s,r,v,b,j,H,Y,null,V,U)),na(e,c,v,!k);return}}lg(e,t,c,i,s,r,v,b,j)}function uS(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],c=r.getSnapshot;r=r.value;try{if(!Ot(c(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function na(e,t,i,s){t&=~Sc,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var c=31-Dt(r),v=1<<c;s[c]=-1,r&=~v}i!==0&&oh(e,i,t)}function So(){return(je&6)===0?(Ul(0),!1):!0}function Ac(){if(pe!==null){if(Ce===0)var e=pe.return;else e=pe,Tn=Oa=null,Gu(e),wi=null,bl=0,e=pe;for(;e!==null;)Cp(e.alternate,e),e=e.return;pe=null}}function Ri(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,MS(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Rn=0,Ac(),Ve=e,pe=i=bn(e.current,null),ve=t,Ce=0,kt=null,Wn=!1,Di=al(e,t),bc=!1,Oi=Vt=Sc=Ha=In=Ye=0,wt=Vl=null,Tc=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Dt(s),c=1<<r;t|=e[r],s&=~c}return zn=t,$s(),i}function Wp(e,t){fe=null,B.H=Cl,t===Ti||t===Qs?(t=mm(),Ce=3):t===Du?(t=mm(),Ce=4):Ce=t===ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,kt=t,pe===null&&(Ye=1,uo(e,Gt(t,e.current)))}function Ip(){var e=Rt.current;return e===null?!0:(ve&4194048)===ve?Kt===null:(ve&62914560)===ve||(ve&536870912)!==0?e===Kt:!1}function eg(){var e=B.H;return B.H=Cl,e===null?Cl:e}function tg(){var e=B.A;return B.A=oS,e}function To(){Ye=4,Wn||(ve&4194048)!==ve&&Rt.current!==null||(Di=!0),(In&134217727)===0&&(Ha&134217727)===0||Ve===null||na(Ve,ve,Vt,!1)}function Nc(e,t,i){var s=je;je|=2;var r=eg(),c=tg();(Ve!==e||ve!==t)&&(bo=null,Ri(e,t)),t=!1;var v=Ye;e:do try{if(Ce!==0&&pe!==null){var b=pe,j=kt;switch(Ce){case 8:Ac(),v=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var k=Ce;if(Ce=0,kt=null,Li(e,b,j,k),i&&Di){v=0;break e}break;default:k=Ce,Ce=0,kt=null,Li(e,b,j,k)}}cS(),v=Ye;break}catch(H){Wp(e,H)}while(!0);return t&&e.shellSuspendCounter++,Tn=Oa=null,je=s,B.H=r,B.A=c,pe===null&&(Ve=null,ve=0,$s()),v}function cS(){for(;pe!==null;)ng(pe)}function fS(e,t){var i=je;je|=2;var s=eg(),r=tg();Ve!==e||ve!==t?(bo=null,xo=Ct()+500,Ri(e,t)):Di=al(e,t);e:do try{if(Ce!==0&&pe!==null){t=pe;var c=kt;t:switch(Ce){case 1:Ce=0,kt=null,Li(e,t,c,1);break;case 2:case 9:if(dm(c)){Ce=0,kt=null,ag(t);break}t=function(){Ce!==2&&Ce!==9||Ve!==e||(Ce=7),un(e)},c.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:dm(c)?(Ce=0,kt=null,ag(t)):(Ce=0,kt=null,Li(e,t,c,7));break;case 5:var v=null;switch(pe.tag){case 26:v=pe.memoizedState;case 5:case 27:var b=pe;if(v?Gg(v):b.stateNode.complete){Ce=0,kt=null;var j=b.sibling;if(j!==null)pe=j;else{var k=b.return;k!==null?(pe=k,wo(k)):pe=null}break t}}Ce=0,kt=null,Li(e,t,c,5);break;case 6:Ce=0,kt=null,Li(e,t,c,6);break;case 8:Ac(),Ye=6;break e;default:throw Error(o(462))}}dS();break}catch(H){Wp(e,H)}while(!0);return Tn=Oa=null,B.H=s,B.A=r,je=i,pe!==null?0:(Ve=null,ve=0,$s(),Ye)}function dS(){for(;pe!==null&&!kb();)ng(pe)}function ng(e){var t=Ap(e.alternate,e,zn);e.memoizedProps=e.pendingProps,t===null?wo(e):pe=t}function ag(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=bp(i,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=bp(i,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:Gu(t);default:Cp(i,t),t=pe=tm(t,zn),t=Ap(i,t,zn)}e.memoizedProps=e.pendingProps,t===null?wo(e):pe=t}function Li(e,t,i,s){Tn=Oa=null,Gu(t),wi=null,bl=0;var r=t.return;try{if(eS(e,r,t,i,ve)){Ye=1,uo(e,Gt(i,e.current)),pe=null;return}}catch(c){if(r!==null)throw pe=r,c;Ye=1,uo(e,Gt(i,e.current)),pe=null;return}t.flags&32768?(xe||s===1?e=!0:Di||(ve&536870912)!==0?e=!1:(Wn=e=!0,(s===2||s===9||s===3||s===6)&&(s=Rt.current,s!==null&&s.tag===13&&(s.flags|=16384))),ig(t,e)):wo(t)}function wo(e){var t=e;do{if((t.flags&32768)!==0){ig(t,Wn);return}e=t.return;var i=aS(t.alternate,t,zn);if(i!==null){pe=i;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);Ye===0&&(Ye=5)}function ig(e,t){do{var i=iS(e.alternate,e);if(i!==null){i.flags&=32767,pe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){pe=e;return}pe=e=i}while(e!==null);Ye=6,pe=null}function lg(e,t,i,s,r,c,v,b,j){e.cancelPendingCommit=null;do Eo();while(et!==0);if((je&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=pu,Xb(e,i,c,v,b,j),e===Ve&&(pe=Ve=null,ve=0),zi=t,ta=e,Rn=i,wc=c,Ec=r,Zp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,gS(js,function(){return cg(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,r=Q.p,Q.p=2,v=je,je|=4;try{lS(e,t,i)}finally{je=v,Q.p=r,B.T=s}}et=1,sg(),og(),rg()}}function sg(){if(et===1){et=0;var e=ta,t=zi,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var s=Q.p;Q.p=2;var r=je;je|=4;try{Hp(t,e);var c=Bc,v=Kh(e.containerInfo),b=c.focusedElem,j=c.selectionRange;if(v!==b&&b&&b.ownerDocument&&Xh(b.ownerDocument.documentElement,b)){if(j!==null&&cu(b)){var k=j.start,H=j.end;if(H===void 0&&(H=k),"selectionStart"in b)b.selectionStart=k,b.selectionEnd=Math.min(H,b.value.length);else{var Y=b.ownerDocument||document,V=Y&&Y.defaultView||window;if(V.getSelection){var U=V.getSelection(),ee=b.textContent.length,se=Math.min(j.start,ee),Re=j.end===void 0?se:Math.min(j.end,ee);!U.extend&&se>Re&&(v=Re,Re=se,se=v);var O=qh(b,se),N=qh(b,Re);if(O&&N&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==N.node||U.focusOffset!==N.offset)){var L=Y.createRange();L.setStart(O.node,O.offset),U.removeAllRanges(),se>Re?(U.addRange(L),U.extend(N.node,N.offset)):(L.setEnd(N.node,N.offset),U.addRange(L))}}}}for(Y=[],U=b;U=U.parentNode;)U.nodeType===1&&Y.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Y.length;b++){var $=Y[b];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}Vo=!!Uc,Bc=Uc=null}finally{je=r,Q.p=s,B.T=i}}e.current=t,et=2}}function og(){if(et===2){et=0;var e=ta,t=zi,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var s=Q.p;Q.p=2;var r=je;je|=4;try{kp(e,t.alternate,t)}finally{je=r,Q.p=s,B.T=i}}et=3}}function rg(){if(et===4||et===3){et=0,Vb();var e=ta,t=zi,i=Rn,s=Zp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,zi=ta=null,ug(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ea=null),Xr(i),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(nl,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=B.T,r=Q.p,Q.p=2,B.T=null;try{for(var c=e.onRecoverableError,v=0;v<s.length;v++){var b=s[v];c(b.value,{componentStack:b.stack})}}finally{B.T=t,Q.p=r}}(Rn&3)!==0&&Eo(),un(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===jc?_l++:(_l=0,jc=e):_l=0,Ul(0)}}function ug(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,yl(t)))}function Eo(){return sg(),og(),rg(),cg()}function cg(){if(et!==5)return!1;var e=ta,t=wc;wc=0;var i=Xr(Rn),s=B.T,r=Q.p;try{Q.p=32>i?32:i,B.T=null,i=Ec,Ec=null;var c=ta,v=Rn;if(et=0,zi=ta=null,Rn=0,(je&6)!==0)throw Error(o(331));var b=je;if(je|=4,Xp(c.current),Gp(c,c.current,v,i),je=b,Ul(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(nl,c)}catch{}return!0}finally{Q.p=r,B.T=s,ug(e,t)}}function fg(e,t,i){t=Gt(i,t),t=ac(e.stateNode,t,2),e=Zn(e,t,2),e!==null&&(il(e,2),un(e))}function Me(e,t,i){if(e.tag===3)fg(e,e,i);else for(;t!==null;){if(t.tag===3){fg(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ea===null||!ea.has(s))){e=Gt(i,e),i=dp(2),s=Zn(t,i,2),s!==null&&(hp(i,s,t,e),il(s,2),un(s));break}}t=t.return}}function Cc(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new rS;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(bc=!0,r.add(i),e=hS.bind(null,e,t,i),t.then(e,e))}function hS(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ve===e&&(ve&i)===i&&(Ye===4||Ye===3&&(ve&62914560)===ve&&300>Ct()-yo?(je&2)===0&&Ri(e,0):Sc|=i,Oi===ve&&(Oi=0)),un(e)}function dg(e,t){t===0&&(t=sh()),e=Ca(e,t),e!==null&&(il(e,t),un(e))}function mS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),dg(e,i)}function pS(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(t),dg(e,i)}function gS(e,t){return $r(e,t)}var jo=null,ki=null,Mc=!1,Ao=!1,Dc=!1,aa=0;function un(e){e!==ki&&e.next===null&&(ki===null?jo=ki=e:ki=ki.next=e),Ao=!0,Mc||(Mc=!0,yS())}function Ul(e,t){if(!Dc&&Ao){Dc=!0;do for(var i=!1,s=jo;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var c=0;else{var v=s.suspendedLanes,b=s.pingedLanes;c=(1<<31-Dt(42|e)+1)-1,c&=r&~(v&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(i=!0,gg(s,c))}else c=ve,c=Ms(s,s===Ve?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||al(s,c)||(i=!0,gg(s,c));s=s.next}while(i);Dc=!1}}function vS(){hg()}function hg(){Ao=Mc=!1;var e=0;aa!==0&&CS()&&(e=aa);for(var t=Ct(),i=null,s=jo;s!==null;){var r=s.next,c=mg(s,t);c===0?(s.next=null,i===null?jo=r:i.next=r,r===null&&(ki=i)):(i=s,(e!==0||(c&3)!==0)&&(Ao=!0)),s=r}et!==0&&et!==5||Ul(e),aa!==0&&(aa=0)}function mg(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Dt(c),b=1<<v,j=r[v];j===-1?((b&i)===0||(b&s)!==0)&&(r[v]=qb(b,t)):j<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ve,i=ve,i=Ms(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Gr(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||al(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Gr(s),Xr(i)){case 2:case 8:i=ih;break;case 32:i=js;break;case 268435456:i=lh;break;default:i=js}return s=pg.bind(null,e),i=$r(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Gr(s),e.callbackPriority=2,e.callbackNode=null,2}function pg(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Eo()&&e.callbackNode!==i)return null;var s=ve;return s=Ms(e,e===Ve?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Pp(e,s,t),mg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?pg.bind(null,e):null)}function gg(e,t){if(Eo())return null;Pp(e,t,!0)}function yS(){DS(function(){(je&6)!==0?$r(ah,vS):hg()})}function Oc(){if(aa===0){var e=bi;e===0&&(e=As,As<<=1,(As&261888)===0&&(As=256)),aa=e}return aa}function vg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function yg(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function xS(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var c=vg((r[yt]||null).action),v=s.submitter;v&&(t=(t=v[yt]||null)?vg(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var b=new _s("action","action",null,s,r);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(aa!==0){var j=v?yg(r,v):new FormData(r);Ju(i,{pending:!0,data:j,method:r.method,action:c},null,j)}}else typeof c=="function"&&(b.preventDefault(),j=v?yg(r,v):new FormData(r),Ju(i,{pending:!0,data:j,method:r.method,action:c},c,j))},currentTarget:r}]})}}for(var zc=0;zc<mu.length;zc++){var Rc=mu[zc],bS=Rc.toLowerCase(),SS=Rc[0].toUpperCase()+Rc.slice(1);Wt(bS,"on"+SS)}Wt(Qh,"onAnimationEnd"),Wt(Ph,"onAnimationIteration"),Wt(Jh,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(_1,"onTransitionRun"),Wt(U1,"onTransitionStart"),Wt(B1,"onTransitionCancel"),Wt(Wh,"onTransitionEnd"),si("onMouseEnter",["mouseout","mouseover"]),si("onMouseLeave",["mouseout","mouseover"]),si("onPointerEnter",["pointerout","pointerover"]),si("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bl));function xg(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var v=s.length-1;0<=v;v--){var b=s[v],j=b.instance,k=b.currentTarget;if(b=b.listener,j!==c&&r.isPropagationStopped())break e;c=b,r.currentTarget=k;try{c(r)}catch(H){Hs(H)}r.currentTarget=null,c=j}else for(v=0;v<s.length;v++){if(b=s[v],j=b.instance,k=b.currentTarget,b=b.listener,j!==c&&r.isPropagationStopped())break e;c=b,r.currentTarget=k;try{c(r)}catch(H){Hs(H)}r.currentTarget=null,c=j}}}}function ge(e,t){var i=t[Kr];i===void 0&&(i=t[Kr]=new Set);var s=e+"__bubble";i.has(s)||(bg(t,e,2,!1),i.add(s))}function Lc(e,t,i){var s=0;t&&(s|=4),bg(i,e,s,t)}var No="_reactListening"+Math.random().toString(36).slice(2);function kc(e){if(!e[No]){e[No]=!0,hh.forEach(function(i){i!=="selectionchange"&&(TS.has(i)||Lc(i,!1,e),Lc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[No]||(t[No]=!0,Lc("selectionchange",!1,t))}}function bg(e,t,i,s){switch(Qg(t)){case 2:var r=PS;break;case 8:r=JS;break;default:r=Pc}i=r.bind(null,t,i,e),r=void 0,!tu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Vc(e,t,i,s,r){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var b=s.stateNode.containerInfo;if(b===r)break;if(v===4)for(v=s.return;v!==null;){var j=v.tag;if((j===3||j===4)&&v.stateNode.containerInfo===r)return;v=v.return}for(;b!==null;){if(v=ai(b),v===null)return;if(j=v.tag,j===5||j===6||j===26||j===27){s=c=v;continue e}b=b.parentNode}}s=s.return}jh(function(){var k=c,H=Ir(i),Y=[];e:{var V=Ih.get(e);if(V!==void 0){var U=_s,ee=e;switch(e){case"keypress":if(ks(i)===0)break e;case"keydown":case"keyup":U=p1;break;case"focusin":ee="focus",U=lu;break;case"focusout":ee="blur",U=lu;break;case"beforeblur":case"afterblur":U=lu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=Ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=a1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=y1;break;case Qh:case Ph:case Jh:U=s1;break;case Wh:U=b1;break;case"scroll":case"scrollend":U=t1;break;case"wheel":U=T1;break;case"copy":case"cut":case"paste":U=r1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Dh;break;case"toggle":case"beforetoggle":U=E1}var se=(t&4)!==0,Re=!se&&(e==="scroll"||e==="scrollend"),O=se?V!==null?V+"Capture":null:V;se=[];for(var N=k,L;N!==null;){var $=N;if(L=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||L===null||O===null||($=ol(N,O),$!=null&&se.push(Hl(N,$,L))),Re)break;N=N.return}0<se.length&&(V=new U(V,ee,null,i,H),Y.push({event:V,listeners:se}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",V&&i!==Wr&&(ee=i.relatedTarget||i.fromElement)&&(ai(ee)||ee[ni]))break e;if((U||V)&&(V=H.window===H?H:(V=H.ownerDocument)?V.defaultView||V.parentWindow:window,U?(ee=i.relatedTarget||i.toElement,U=k,ee=ee?ai(ee):null,ee!==null&&(Re=d(ee),se=ee.tag,ee!==Re||se!==5&&se!==27&&se!==6)&&(ee=null)):(U=null,ee=k),U!==ee)){if(se=Ch,$="onMouseLeave",O="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(se=Dh,$="onPointerLeave",O="onPointerEnter",N="pointer"),Re=U==null?V:sl(U),L=ee==null?V:sl(ee),V=new se($,N+"leave",U,i,H),V.target=Re,V.relatedTarget=L,$=null,ai(H)===k&&(se=new se(O,N+"enter",ee,i,H),se.target=L,se.relatedTarget=Re,$=se),Re=$,U&&ee)t:{for(se=wS,O=U,N=ee,L=0,$=O;$;$=se($))L++;$=0;for(var le=N;le;le=se(le))$++;for(;0<L-$;)O=se(O),L--;for(;0<$-L;)N=se(N),$--;for(;L--;){if(O===N||N!==null&&O===N.alternate){se=O;break t}O=se(O),N=se(N)}se=null}else se=null;U!==null&&Sg(Y,V,U,se,!1),ee!==null&&Re!==null&&Sg(Y,Re,ee,se,!0)}}e:{if(V=k?sl(k):window,U=V.nodeName&&V.nodeName.toLowerCase(),U==="select"||U==="input"&&V.type==="file")var we=Uh;else if(Vh(V))if(Bh)we=L1;else{we=z1;var ae=O1}else U=V.nodeName,!U||U.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?k&&Jr(k.elementType)&&(we=Uh):we=R1;if(we&&(we=we(e,k))){_h(Y,we,i,H);break e}ae&&ae(e,V,k),e==="focusout"&&k&&V.type==="number"&&k.memoizedProps.value!=null&&Pr(V,"number",V.value)}switch(ae=k?sl(k):window,e){case"focusin":(Vh(ae)||ae.contentEditable==="true")&&(di=ae,fu=k,pl=null);break;case"focusout":pl=fu=di=null;break;case"mousedown":du=!0;break;case"contextmenu":case"mouseup":case"dragend":du=!1,Fh(Y,i,H);break;case"selectionchange":if(V1)break;case"keydown":case"keyup":Fh(Y,i,H)}var de;if(ou)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else fi?Lh(e,i)&&(ye="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ye="onCompositionStart");ye&&(Oh&&i.locale!=="ko"&&(fi||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&fi&&(de=Ah()):($n=H,nu="value"in $n?$n.value:$n.textContent,fi=!0)),ae=Co(k,ye),0<ae.length&&(ye=new Mh(ye,e,null,i,H),Y.push({event:ye,listeners:ae}),de?ye.data=de:(de=kh(i),de!==null&&(ye.data=de)))),(de=A1?N1(e,i):C1(e,i))&&(ye=Co(k,"onBeforeInput"),0<ye.length&&(ae=new Mh("onBeforeInput","beforeinput",null,i,H),Y.push({event:ae,listeners:ye}),ae.data=de)),xS(Y,e,k,i,H)}xg(Y,t)})}function Hl(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Co(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=ol(e,i),r!=null&&s.unshift(Hl(e,r,c)),r=ol(e,t),r!=null&&s.push(Hl(e,r,c))),e.tag===3)return s;e=e.return}return[]}function wS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sg(e,t,i,s,r){for(var c=t._reactName,v=[];i!==null&&i!==s;){var b=i,j=b.alternate,k=b.stateNode;if(b=b.tag,j!==null&&j===s)break;b!==5&&b!==26&&b!==27||k===null||(j=k,r?(k=ol(i,c),k!=null&&v.unshift(Hl(i,k,j))):r||(k=ol(i,c),k!=null&&v.push(Hl(i,k,j)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var ES=/\r\n?/g,jS=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(ES,`
|
|
49
|
-
`).replace(jS,"")}function wg(e,t){return t=Tg(t),Tg(e)===t}function ze(e,t,i,s,r,c){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ri(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ri(e,""+s);break;case"className":Os(e,"class",s);break;case"tabIndex":Os(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Os(e,i,s);break;case"style":wh(e,s,c);break;case"data":if(t!=="object"){Os(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Rs(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(i==="formAction"?(t!=="input"&&ze(e,t,"name",r.name,r,null),ze(e,t,"formEncType",r.formEncType,r,null),ze(e,t,"formMethod",r.formMethod,r,null),ze(e,t,"formTarget",r.formTarget,r,null)):(ze(e,t,"encType",r.encType,r,null),ze(e,t,"method",r.method,r,null),ze(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Rs(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=yn);break;case"onScroll":s!=null&&ge("scroll",e);break;case"onScrollEnd":s!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=Rs(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":ge("beforetoggle",e),ge("toggle",e),Ds(e,"popover",s);break;case"xlinkActuate":vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":vn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":vn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":vn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":vn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ds(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Ib.get(i)||i,Ds(e,i,s))}}function _c(e,t,i,s,r,c){switch(i){case"style":wh(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ri(e,s):(typeof s=="number"||typeof s=="bigint")&&ri(e,""+s);break;case"onScroll":s!=null&&ge("scroll",e);break;case"onScrollEnd":s!=null&&ge("scrollend",e);break;case"onClick":s!=null&&(e.onclick=yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),c=e[yt]||null,c=c!=null?c[i]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof s=="function")){typeof c!="function"&&c!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Ds(e,i,s)}}}function rt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",e),ge("load",e);var s=!1,r=!1,c;for(c in i)if(i.hasOwnProperty(c)){var v=i[c];if(v!=null)switch(c){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,c,v,i,null)}}r&&ze(e,t,"srcSet",i.srcSet,i,null),s&&ze(e,t,"src",i.src,i,null);return;case"input":ge("invalid",e);var b=c=v=r=null,j=null,k=null;for(s in i)if(i.hasOwnProperty(s)){var H=i[s];if(H!=null)switch(s){case"name":r=H;break;case"type":v=H;break;case"checked":j=H;break;case"defaultChecked":k=H;break;case"value":c=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,t));break;default:ze(e,t,s,H,i,null)}}xh(e,c,b,j,k,v,r,!1);return;case"select":ge("invalid",e),s=v=c=null;for(r in i)if(i.hasOwnProperty(r)&&(b=i[r],b!=null))switch(r){case"value":c=b;break;case"defaultValue":v=b;break;case"multiple":s=b;default:ze(e,t,r,b,i,null)}t=c,i=v,e.multiple=!!s,t!=null?oi(e,!!s,t,!1):i!=null&&oi(e,!!s,i,!0);return;case"textarea":ge("invalid",e),c=r=s=null;for(v in i)if(i.hasOwnProperty(v)&&(b=i[v],b!=null))switch(v){case"value":s=b;break;case"defaultValue":r=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:ze(e,t,v,b,i,null)}Sh(e,s,r,c);return;case"option":for(j in i)if(i.hasOwnProperty(j)&&(s=i[j],s!=null))switch(j){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ze(e,t,j,s,i,null)}return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(s=0;s<Bl.length;s++)ge(Bl[s],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(k in i)if(i.hasOwnProperty(k)&&(s=i[k],s!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,k,s,i,null)}return;default:if(Jr(t)){for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!==void 0&&_c(e,t,H,s,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(s=i[b],s!=null&&ze(e,t,b,s,i,null))}function AS(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,v=null,b=null,j=null,k=null,H=null;for(U in i){var Y=i[U];if(i.hasOwnProperty(U)&&Y!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":j=Y;default:s.hasOwnProperty(U)||ze(e,t,U,null,s,Y)}}for(var V in s){var U=s[V];if(Y=i[V],s.hasOwnProperty(V)&&(U!=null||Y!=null))switch(V){case"type":c=U;break;case"name":r=U;break;case"checked":k=U;break;case"defaultChecked":H=U;break;case"value":v=U;break;case"defaultValue":b=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:U!==Y&&ze(e,t,V,U,s,Y)}}Qr(e,v,b,j,k,H,c,r);return;case"select":U=v=b=V=null;for(c in i)if(j=i[c],i.hasOwnProperty(c)&&j!=null)switch(c){case"value":break;case"multiple":U=j;default:s.hasOwnProperty(c)||ze(e,t,c,null,s,j)}for(r in s)if(c=s[r],j=i[r],s.hasOwnProperty(r)&&(c!=null||j!=null))switch(r){case"value":V=c;break;case"defaultValue":b=c;break;case"multiple":v=c;default:c!==j&&ze(e,t,r,c,s,j)}t=b,i=v,s=U,V!=null?oi(e,!!i,V,!1):!!s!=!!i&&(t!=null?oi(e,!!i,t,!0):oi(e,!!i,i?[]:"",!1));return;case"textarea":U=V=null;for(b in i)if(r=i[b],i.hasOwnProperty(b)&&r!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:ze(e,t,b,null,s,r)}for(v in s)if(r=s[v],c=i[v],s.hasOwnProperty(v)&&(r!=null||c!=null))switch(v){case"value":V=r;break;case"defaultValue":U=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&ze(e,t,v,r,s,c)}bh(e,V,U);return;case"option":for(var ee in i)if(V=i[ee],i.hasOwnProperty(ee)&&V!=null&&!s.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:ze(e,t,ee,null,s,V)}for(j in s)if(V=s[j],U=i[j],s.hasOwnProperty(j)&&V!==U&&(V!=null||U!=null))switch(j){case"selected":e.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:ze(e,t,j,V,s,U)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in i)V=i[se],i.hasOwnProperty(se)&&V!=null&&!s.hasOwnProperty(se)&&ze(e,t,se,null,s,V);for(k in s)if(V=s[k],U=i[k],s.hasOwnProperty(k)&&V!==U&&(V!=null||U!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:ze(e,t,k,V,s,U)}return;default:if(Jr(t)){for(var Re in i)V=i[Re],i.hasOwnProperty(Re)&&V!==void 0&&!s.hasOwnProperty(Re)&&_c(e,t,Re,void 0,s,V);for(H in s)V=s[H],U=i[H],!s.hasOwnProperty(H)||V===U||V===void 0&&U===void 0||_c(e,t,H,V,s,U);return}}for(var O in i)V=i[O],i.hasOwnProperty(O)&&V!=null&&!s.hasOwnProperty(O)&&ze(e,t,O,null,s,V);for(Y in s)V=s[Y],U=i[Y],!s.hasOwnProperty(Y)||V===U||V==null&&U==null||ze(e,t,Y,V,s,U)}function Eg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function NS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],c=r.transferSize,v=r.initiatorType,b=r.duration;if(c&&b&&Eg(v)){for(v=0,b=r.responseEnd,s+=1;s<i.length;s++){var j=i[s],k=j.startTime;if(k>b)break;var H=j.transferSize,Y=j.initiatorType;H&&Eg(Y)&&(j=j.responseEnd,v+=H*(j<b?1:(b-k)/(j-k)))}if(--s,t+=8*(c+v)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Uc=null,Bc=null;function Mo(e){return e.nodeType===9?e:e.ownerDocument}function jg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ag(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Hc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $c=null;function CS(){var e=window.event;return e&&e.type==="popstate"?e===$c?!1:($c=e,!0):($c=null,!1)}var Ng=typeof setTimeout=="function"?setTimeout:void 0,MS=typeof clearTimeout=="function"?clearTimeout:void 0,Cg=typeof Promise=="function"?Promise:void 0,DS=typeof queueMicrotask=="function"?queueMicrotask:typeof Cg<"u"?function(e){return Cg.resolve(null).then(e).catch(OS)}:Ng;function OS(e){setTimeout(function(){throw e})}function ia(e){return e==="head"}function Mg(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Bi(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")$l(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,$l(i);for(var c=i.firstChild;c;){var v=c.nextSibling,b=c.nodeName;c[ll]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||i.removeChild(c),c=v}}else i==="body"&&$l(e.ownerDocument.body);i=r}while(i);Bi(t)}function Dg(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Gc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Gc(i),Fr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function zS(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[ll])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function RS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ft(e.nextSibling),e===null))return null;return e}function Og(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ft(e.nextSibling),e===null))return null;return e}function Yc(e){return e.data==="$?"||e.data==="$~"}function qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function LS(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ft(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Xc=null;function zg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ft(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Rg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Lg(e,t,i){switch(t=Mo(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function $l(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fr(e)}var Zt=new Map,kg=new Set;function Do(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ln=Q.d;Q.d={f:kS,r:VS,D:_S,C:US,L:BS,m:HS,X:GS,S:$S,M:YS};function kS(){var e=Ln.f(),t=So();return e||t}function VS(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?Wm(t):Ln.r(e)}var Vi=typeof document>"u"?null:document;function Vg(e,t,i){var s=Vi;if(s&&typeof t=="string"&&t){var r=Ht(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),kg.has(r)||(kg.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),rt(t,"link",e),nt(t),s.head.appendChild(t)))}}function _S(e){Ln.D(e),Vg("dns-prefetch",e,null)}function US(e,t){Ln.C(e,t),Vg("preconnect",e,t)}function BS(e,t,i){Ln.L(e,t,i);var s=Vi;if(s&&e&&t){var r='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ht(i.imageSizes)+'"]')):r+='[href="'+Ht(e)+'"]';var c=r;switch(t){case"style":c=_i(e);break;case"script":c=Ui(e)}Zt.has(c)||(e=x({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(c,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Gl(c))||t==="script"&&s.querySelector(Yl(c))||(t=s.createElement("link"),rt(t,"link",e),nt(t),s.head.appendChild(t)))}}function HS(e,t){Ln.m(e,t);var i=Vi;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ht(s)+'"][href="'+Ht(e)+'"]',c=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ui(e)}if(!Zt.has(c)&&(e=x({rel:"modulepreload",href:e},t),Zt.set(c,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Yl(c)))return}s=i.createElement("link"),rt(s,"link",e),nt(s),i.head.appendChild(s)}}}function $S(e,t,i){Ln.S(e,t,i);var s=Vi;if(s&&e){var r=li(s).hoistableStyles,c=_i(e);t=t||"default";var v=r.get(c);if(!v){var b={loading:0,preload:null};if(v=s.querySelector(Gl(c)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(c))&&Kc(e,i);var j=v=s.createElement("link");nt(j),rt(j,"link",e),j._p=new Promise(function(k,H){j.onload=k,j.onerror=H}),j.addEventListener("load",function(){b.loading|=1}),j.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Oo(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:b},r.set(c,v)}}}function GS(e,t){Ln.X(e,t);var i=Vi;if(i&&e){var s=li(i).hoistableScripts,r=Ui(e),c=s.get(r);c||(c=i.querySelector(Yl(r)),c||(e=x({src:e,async:!0},t),(t=Zt.get(r))&&Fc(e,t),c=i.createElement("script"),nt(c),rt(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function YS(e,t){Ln.M(e,t);var i=Vi;if(i&&e){var s=li(i).hoistableScripts,r=Ui(e),c=s.get(r);c||(c=i.querySelector(Yl(r)),c||(e=x({src:e,async:!0,type:"module"},t),(t=Zt.get(r))&&Fc(e,t),c=i.createElement("script"),nt(c),rt(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function _g(e,t,i,s){var r=(r=me.current)?Do(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=_i(i.href),i=li(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=_i(i.href);var c=li(r).hoistableStyles,v=c.get(e);if(v||(r=r.ownerDocument||r,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,v),(c=r.querySelector(Gl(e)))&&!c._p&&(v.instance=c,v.state.loading=5),Zt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Zt.set(e,i),c||qS(r,e,i,v.state))),t&&s===null)throw Error(o(528,""));return v}if(t&&s!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(i),i=li(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function _i(e){return'href="'+Ht(e)+'"'}function Gl(e){return'link[rel="stylesheet"]['+e+"]"}function Ug(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function qS(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),rt(t,"link",i),nt(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Ht(e)+'"]'}function Yl(e){return"script[async]"+e}function Bg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(s)return t.instance=s,nt(s),s;var r=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),nt(s),rt(s,"style",r),Oo(s,i.precedence,e),t.instance=s;case"stylesheet":r=_i(i.href);var c=e.querySelector(Gl(r));if(c)return t.state.loading|=4,t.instance=c,nt(c),c;s=Ug(i),(r=Zt.get(r))&&Kc(s,r),c=(e.ownerDocument||e).createElement("link"),nt(c);var v=c;return v._p=new Promise(function(b,j){v.onload=b,v.onerror=j}),rt(c,"link",s),t.state.loading|=4,Oo(c,i.precedence,e),t.instance=c;case"script":return c=Ui(i.src),(r=e.querySelector(Yl(c)))?(t.instance=r,nt(r),r):(s=i,(r=Zt.get(c))&&(s=x({},i),Fc(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),nt(r),rt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Oo(s,i.precedence,e));return t.instance}function Oo(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,c=r,v=0;v<s.length;v++){var b=s[v];if(b.dataset.precedence===t)c=b;else if(c!==r)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Kc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var zo=null;function Hg(e,t,i){if(zo===null){var s=new Map,r=zo=new Map;r.set(i,s)}else r=zo,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var c=i[r];if(!(c[ll]||c[it]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var v=c.getAttribute(t)||"";v=e+v;var b=s.get(v);b?b.push(c):s.set(v,[c])}}return s}function $g(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function XS(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Gg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function KS(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=_i(s.href),c=t.querySelector(Gl(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ro.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=c,nt(c);return}c=t.ownerDocument||t,s=Ug(s),(r=Zt.get(r))&&Kc(s,r),c=c.createElement("link"),nt(c);var v=c;v._p=new Promise(function(b,j){v.onload=b,v.onerror=j}),rt(c,"link",s),i.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ro.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Zc=0;function FS(e,t){return e.stylesheets&&e.count===0&&ko(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ko(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Zc===0&&(Zc=62500*NS());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ko(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Zc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Ro(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ko(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Lo=null;function ko(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Lo=new Map,t.forEach(ZS,e),Lo=null,Ro.call(e))}function ZS(e,t){if(!(t.state.loading&4)){var i=Lo.get(e);if(i)var s=i.get(null);else{i=new Map,Lo.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var v=r[c];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),s=v)}s&&i.set(null,s)}r=t.instance,v=r.getAttribute("data-precedence"),c=i.get(v)||s,c===s&&i.set(null,r),i.set(v,r),this.count++,s=Ro.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ql={$$typeof:_,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function QS(e,t,i,s,r,c,v,b,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Yr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yr(0),this.hiddenUpdates=Yr(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Yg(e,t,i,s,r,c,v,b,j,k,H,Y){return e=new QS(e,t,i,v,j,k,H,Y,b),t=1,c===!0&&(t|=24),c=zt(3,null,null,t),e.current=c,c.stateNode=e,t=Nu(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:i,cache:t},Ou(c),e}function qg(e){return e?(e=pi,e):pi}function Xg(e,t,i,s,r,c){r=qg(r),s.context===null?s.context=r:s.pendingContext=r,s=Fn(t),s.payload={element:i},c=c===void 0?null:c,c!==null&&(s.callback=c),i=Zn(e,s,t),i!==null&&(Et(i,e,t),Tl(i,e,t))}function Kg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Qc(e,t){Kg(e,t),(e=e.alternate)&&Kg(e,t)}function Fg(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Et(t,e,67108864),Qc(e,67108864)}}function Zg(e){if(e.tag===13||e.tag===31){var t=_t();t=qr(t);var i=Ca(e,t);i!==null&&Et(i,e,t),Qc(e,t)}}var Vo=!0;function PS(e,t,i,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=2,Pc(e,t,i,s)}finally{Q.p=c,B.T=r}}function JS(e,t,i,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=8,Pc(e,t,i,s)}finally{Q.p=c,B.T=r}}function Pc(e,t,i,s){if(Vo){var r=Jc(s);if(r===null)Vc(e,t,s,_o,i),Pg(e,s);else if(IS(r,e,t,i,s))s.stopPropagation();else if(Pg(e,s),t&4&&-1<WS.indexOf(e)){for(;r!==null;){var c=ii(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var v=wa(c.pendingLanes);if(v!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;v;){var j=1<<31-Dt(v);b.entanglements[1]|=j,v&=~j}un(c),(je&6)===0&&(xo=Ct()+500,Ul(0))}}break;case 31:case 13:b=Ca(c,2),b!==null&&Et(b,c,2),So(),Qc(c,2)}if(c=Jc(s),c===null&&Vc(e,t,s,_o,i),c===r)break;r=c}r!==null&&s.stopPropagation()}else Vc(e,t,s,null,i)}}function Jc(e){return e=Ir(e),Wc(e)}var _o=null;function Wc(e){if(_o=null,e=ai(e),e!==null){var t=d(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=h(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _o=e,null}function Qg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(_b()){case ah:return 2;case ih:return 8;case js:case Ub:return 32;case lh:return 268435456;default:return 32}default:return 32}}var Ic=!1,la=null,sa=null,oa=null,Xl=new Map,Kl=new Map,ra=[],WS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Pg(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":sa=null;break;case"mouseover":case"mouseout":oa=null;break;case"pointerover":case"pointerout":Xl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kl.delete(t.pointerId)}}function Fl(e,t,i,s,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:c,targetContainers:[r]},t!==null&&(t=ii(t),t!==null&&Fg(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function IS(e,t,i,s,r){switch(t){case"focusin":return la=Fl(la,e,t,i,s,r),!0;case"dragenter":return sa=Fl(sa,e,t,i,s,r),!0;case"mouseover":return oa=Fl(oa,e,t,i,s,r),!0;case"pointerover":var c=r.pointerId;return Xl.set(c,Fl(Xl.get(c)||null,e,t,i,s,r)),!0;case"gotpointercapture":return c=r.pointerId,Kl.set(c,Fl(Kl.get(c)||null,e,t,i,s,r)),!0}return!1}function Jg(e){var t=ai(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,fh(e.priority,function(){Zg(i)});return}}else if(t===31){if(t=h(i),t!==null){e.blockedOn=t,fh(e.priority,function(){Zg(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Uo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Jc(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Wr=s,i.target.dispatchEvent(s),Wr=null}else return t=ii(i),t!==null&&Fg(t),e.blockedOn=i,!1;t.shift()}return!0}function Wg(e,t,i){Uo(e)&&i.delete(t)}function eT(){Ic=!1,la!==null&&Uo(la)&&(la=null),sa!==null&&Uo(sa)&&(sa=null),oa!==null&&Uo(oa)&&(oa=null),Xl.forEach(Wg),Kl.forEach(Wg)}function Bo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ic||(Ic=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,eT)))}var Ho=null;function Ig(e){Ho!==e&&(Ho=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ho===e&&(Ho=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(Wc(s||i)===null)continue;break}var c=ii(i);c!==null&&(e.splice(t,3),t-=3,Ju(c,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Bi(e){function t(j){return Bo(j,e)}la!==null&&Bo(la,e),sa!==null&&Bo(sa,e),oa!==null&&Bo(oa,e),Xl.forEach(t),Kl.forEach(t);for(var i=0;i<ra.length;i++){var s=ra[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ra.length&&(i=ra[0],i.blockedOn===null);)Jg(i),i.blockedOn===null&&ra.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],c=i[s+1],v=r[yt]||null;if(typeof c=="function")v||Ig(i);else if(v){var b=null;if(c&&c.hasAttribute("formAction")){if(r=c,v=c[yt]||null)b=v.formAction;else if(Wc(r)!==null)continue}else b=v.action;typeof b=="function"?i[s+1]=b:(i.splice(s,3),s-=3),Ig(i)}}}function ev(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(v){return r=v})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function ef(e){this._internalRoot=e}$o.prototype.render=ef.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,s=_t();Xg(i,s,e,t,null,null)},$o.prototype.unmount=ef.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xg(e.current,2,null,e,null,null),So(),t[ni]=null}};function $o(e){this._internalRoot=e}$o.prototype.unstable_scheduleHydration=function(e){if(e){var t=ch();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ra.length&&t!==0&&t<ra[i].priority;i++);ra.splice(i,0,e),i===0&&Jg(e)}};var tv=a.version;if(tv!=="19.2.4")throw Error(o(527,tv,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var tT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Go=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Go.isDisabled&&Go.supportsFiber)try{nl=Go.inject(tT),Mt=Go}catch{}}return Ql.createRoot=function(e,t){if(!u(e))throw Error(o(299));var i=!1,s="",r=rp,c=up,v=cp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Yg(e,1,!1,null,null,i,s,null,r,c,v,ev),e[ni]=t.current,kc(e),new ef(t)},Ql.hydrateRoot=function(e,t,i){if(!u(e))throw Error(o(299));var s=!1,r="",c=rp,v=up,b=cp,j=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(c=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(j=i.formState)),t=Yg(e,1,!0,t,i??null,s,r,j,c,v,b,ev),t.context=qg(null),i=t.current,s=_t(),s=qr(s),r=Fn(s),r.callback=null,Zn(i,r,s),i=s,t.current.lanes=i,il(t,i),un(t),e[ni]=t.current,kc(e),new $o(t)},Ql.version="19.2.4",Ql}var dv;function dT(){if(dv)return af.exports;dv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),af.exports=fT(),af.exports}var hT=dT();const P0="/api";async function $e(n){const a=await fetch(`${P0}${n}`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function mT(n){const a=new EventSource(`${P0}/events`);return a.addEventListener("state-changed",l=>{try{const o=JSON.parse(l.data);n("state-changed",o)}catch{n("state-changed",{})}}),a.onerror=()=>{},()=>a.close()}function ct(n){if(!n)return"unknown";const a=Date.now()-new Date(n).getTime();return a<0||a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function jt(n,a){if(!n)return"";if(n.length<=a)return n;const l=n.lastIndexOf(" ",a);return(l>a*.6?n.slice(0,l):n.slice(0,a))+"…"}const J0=w.createContext(()=>{});function Qi(){return w.useContext(J0)}const pT=new Set(["overview","sessions","work","connections","inner","memory","runtime"]);function W0(n){const a=n.replace(/^#\/?/,"");if(!a.startsWith("agent/"))return null;const l=a.split("/"),o=l[1]?decodeURIComponent(l[1]):"";if(!o)return null;const u=l[2]??"overview",d=pT.has(u)?u:"overview",f=l.slice(3),h=f.length>0?f.map(decodeURIComponent).join("/"):void 0;return{agent:o,tab:d,focus:h}}function Lf(n){let a=`#/agent/${encodeURIComponent(n.agent)}`;return(n.tab!=="overview"||n.focus)&&(a+=`/${n.tab}`),n.focus&&(a+=`/${n.focus.split("/").map(encodeURIComponent).join("/")}`),a}const gT=typeof document<"u"?ue.useLayoutEffect:()=>{},ba=n=>{var a;return(a=n==null?void 0:n.ownerDocument)!==null&&a!==void 0?a:document},Xa=n=>n&&"window"in n&&n.window===n?n:ba(n).defaultView||window;function vT(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function yT(n){return vT(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let xT=!1;function yd(){return xT}function Ka(n,a){if(!yd())return a&&n?n.contains(a):!1;if(!n||!a)return!1;let l=a;for(;l!==null;){if(l===n)return!0;l.tagName==="SLOT"&&l.assignedSlot?l=l.assignedSlot.parentNode:yT(l)?l=l.host:l=l.parentNode}return!1}const Ki=(n=document)=>{var a;if(!yd())return n.activeElement;let l=n.activeElement;for(;l&&"shadowRoot"in l&&(!((a=l.shadowRoot)===null||a===void 0)&&a.activeElement);)l=l.shadowRoot.activeElement;return l};function pt(n){if(yd()&&n.target instanceof Element&&n.target.shadowRoot){var a,l;if("composedPath"in n)return(a=n.composedPath()[0])!==null&&a!==void 0?a:null;if("composedPath"in n.nativeEvent)return(l=n.nativeEvent.composedPath()[0])!==null&&l!==void 0?l:null}return n.target}function I0(n){var a,l,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(a=0;a<u;a++)n[a]&&(l=I0(n[a]))&&(o&&(o+=" "),o+=l)}else for(l in n)n[l]&&(o&&(o+=" "),o+=l);return o}function Fe(){for(var n,a,l=0,o="",u=arguments.length;l<u;l++)(n=arguments[l])&&(a=I0(n))&&(o&&(o+=" "),o+=a);return o}function bT(n){if(ST())n.focus({preventScroll:!0});else{let a=TT(n);n.focus(),wT(a)}}let Yo=null;function ST(){if(Yo==null){Yo=!1;try{document.createElement("div").focus({get preventScroll(){return Yo=!0,!0}})}catch{}}return Yo}function TT(n){let a=n.parentNode,l=[],o=document.scrollingElement||document.documentElement;for(;a instanceof HTMLElement&&a!==o;)(a.offsetHeight<a.scrollHeight||a.offsetWidth<a.scrollWidth)&&l.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),a=a.parentNode;return o instanceof HTMLElement&&l.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),l}function wT(n){for(let{element:a,scrollTop:l,scrollLeft:o}of n)a.scrollTop=l,a.scrollLeft=o}function wr(n){var a;if(typeof window>"u"||window.navigator==null)return!1;let l=(a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands;return Array.isArray(l)&&l.some(o=>n.test(o.brand))||n.test(window.navigator.userAgent)}function ey(n){var a;return typeof window<"u"&&window.navigator!=null?n.test(((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.platform)||window.navigator.platform):!1}function Pi(n){let a=null;return()=>(a==null&&(a=n()),a)}const or=Pi(function(){return ey(/^Mac/i)}),ET=Pi(function(){return ey(/^iPad/i)||or()&&navigator.maxTouchPoints>1}),jT=Pi(function(){return wr(/AppleWebKit/i)&&!AT()}),AT=Pi(function(){return wr(/Chrome/i)}),NT=Pi(function(){return wr(/Android/i)}),CT=Pi(function(){return wr(/Firefox/i)});function fs(n,a,l=!0){var o,u;let{metaKey:d,ctrlKey:f,altKey:h,shiftKey:g}=a;CT()&&(!((u=window.event)===null||u===void 0||(o=u.type)===null||o===void 0)&&o.startsWith("key"))&&n.target==="_blank"&&(or()?d=!0:f=!0);let p=jT()&&or()&&!ET()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:d,ctrlKey:f,altKey:h,shiftKey:g}):new MouseEvent("click",{metaKey:d,ctrlKey:f,altKey:h,shiftKey:g,detail:1,bubbles:!0,cancelable:!0});fs.isOpening=l,bT(n),n.dispatchEvent(p),fs.isOpening=!1}fs.isOpening=!1;function ty(){let n=w.useRef(new Map),a=w.useCallback((u,d,f,h)=>{let g=h!=null&&h.once?(...p)=>{n.current.delete(f),f(...p)}:f;n.current.set(f,{type:d,eventTarget:u,fn:g,options:h}),u.addEventListener(d,g,h)},[]),l=w.useCallback((u,d,f,h)=>{var g;let p=((g=n.current.get(f))===null||g===void 0?void 0:g.fn)||f;u.removeEventListener(d,p,h),n.current.delete(f)},[]),o=w.useCallback(()=>{n.current.forEach((u,d)=>{l(u.eventTarget,u.type,d,u.options)})},[l]);return w.useEffect(()=>o,[o]),{addGlobalListener:a,removeGlobalListener:l,removeAllGlobalListeners:o}}function MT(n){return n.pointerType===""&&n.isTrusted?!0:NT()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}var DT=Q0();function ny(n){let a=n;return a.nativeEvent=n,a.isDefaultPrevented=()=>a.defaultPrevented,a.isPropagationStopped=()=>a.cancelBubble,a.persist=()=>{},a}function OT(n,a){Object.defineProperty(n,"target",{value:a}),Object.defineProperty(n,"currentTarget",{value:a})}function ay(n){let a=w.useRef({isFocused:!1,observer:null});return gT(()=>{const l=a.current;return()=>{l.observer&&(l.observer.disconnect(),l.observer=null)}},[]),w.useCallback(l=>{let o=pt(l);if(o instanceof HTMLButtonElement||o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement){a.current.isFocused=!0;let u=o,d=f=>{if(a.current.isFocused=!1,u.disabled){let h=ny(f);n==null||n(h)}a.current.observer&&(a.current.observer.disconnect(),a.current.observer=null)};u.addEventListener("focusout",d,{once:!0}),a.current.observer=new MutationObserver(()=>{if(a.current.isFocused&&u.disabled){var f;(f=a.current.observer)===null||f===void 0||f.disconnect();let h=u===Ki()?null:Ki();u.dispatchEvent(new FocusEvent("blur",{relatedTarget:h})),u.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:h}))}}),a.current.observer.observe(u,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let zT=!1,gs=null;const kf=new Set;let as=new Map,Wa=!1,Vf=!1;const RT={Tab:!0,Escape:!0};function xd(n,a){for(let l of kf)l(n,a)}function LT(n){return!(n.metaKey||!or()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function rr(n){Wa=!0,!fs.isOpening&<(n)&&(gs="keyboard",xd("keyboard",n))}function Xi(n){gs="pointer","pointerType"in n&&n.pointerType,(n.type==="mousedown"||n.type==="pointerdown")&&(Wa=!0,xd("pointer",n))}function iy(n){!fs.isOpening&&MT(n)&&(Wa=!0,gs="virtual")}function ly(n){pt(n)===window||pt(n)===document||zT||!n.isTrusted||(!Wa&&!Vf&&(gs="virtual",xd("virtual",n)),Wa=!1,Vf=!1)}function sy(){Wa=!1,Vf=!0}function _f(n){if(typeof window>"u"||typeof document>"u"||as.get(Xa(n)))return;const a=Xa(n),l=ba(n);let o=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){Wa=!0,o.apply(this,arguments)},l.addEventListener("keydown",rr,!0),l.addEventListener("keyup",rr,!0),l.addEventListener("click",iy,!0),a.addEventListener("focus",ly,!0),a.addEventListener("blur",sy,!1),typeof PointerEvent<"u"&&(l.addEventListener("pointerdown",Xi,!0),l.addEventListener("pointermove",Xi,!0),l.addEventListener("pointerup",Xi,!0)),a.addEventListener("beforeunload",()=>{oy(n)},{once:!0}),as.set(a,{focus:o})}const oy=(n,a)=>{const l=Xa(n),o=ba(n);a&&o.removeEventListener("DOMContentLoaded",a),as.has(l)&&(l.HTMLElement.prototype.focus=as.get(l).focus,o.removeEventListener("keydown",rr,!0),o.removeEventListener("keyup",rr,!0),o.removeEventListener("click",iy,!0),l.removeEventListener("focus",ly,!0),l.removeEventListener("blur",sy,!1),typeof PointerEvent<"u"&&(o.removeEventListener("pointerdown",Xi,!0),o.removeEventListener("pointermove",Xi,!0),o.removeEventListener("pointerup",Xi,!0)),as.delete(l))};function kT(n){const a=ba(n);let l;return a.readyState!=="loading"?_f(n):(l=()=>{_f(n)},a.addEventListener("DOMContentLoaded",l)),()=>oy(n,l)}typeof document<"u"&&kT();function Uf(){return gs!=="pointer"}const VT=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _T(n,a,l){let o=ba(l?pt(l):void 0),u=l?pt(l):void 0;const d=typeof window<"u"?Xa(u).HTMLInputElement:HTMLInputElement,f=typeof window<"u"?Xa(u).HTMLTextAreaElement:HTMLTextAreaElement,h=typeof window<"u"?Xa(u).HTMLElement:HTMLElement,g=typeof window<"u"?Xa(u).KeyboardEvent:KeyboardEvent;let p=Ki(o);return n=n||p instanceof d&&!VT.has(p.type)||p instanceof f||p instanceof h&&p.isContentEditable,!(n&&a==="keyboard"&&l instanceof g&&!RT[l.key])}function UT(n,a,l){_f(),w.useEffect(()=>{if((l==null?void 0:l.enabled)===!1)return;let o=(u,d)=>{_T(!!(l!=null&&l.isTextInput),u,d)&&n(Uf())};return kf.add(o),()=>{kf.delete(o)}},a)}function BT(n){let{isDisabled:a,onFocus:l,onBlur:o,onFocusChange:u}=n;const d=w.useCallback(g=>{if(pt(g)===g.currentTarget)return o&&o(g),u&&u(!1),!0},[o,u]),f=ay(d),h=w.useCallback(g=>{let p=pt(g);const y=ba(p),x=y?Ki(y):Ki();p===g.currentTarget&&p===x&&(l&&l(g),u&&u(!0),f(g))},[u,l,f]);return{focusProps:{onFocus:!a&&(l||u||o)?h:void 0,onBlur:!a&&(o||u)?d:void 0}}}function HT(n){let{isDisabled:a,onBlurWithin:l,onFocusWithin:o,onFocusWithinChange:u}=n,d=w.useRef({isFocusWithin:!1}),{addGlobalListener:f,removeAllGlobalListeners:h}=ty(),g=w.useCallback(x=>{Ka(x.currentTarget,pt(x))&&d.current.isFocusWithin&&!Ka(x.currentTarget,x.relatedTarget)&&(d.current.isFocusWithin=!1,h(),l&&l(x),u&&u(!1))},[l,u,d,h]),p=ay(g),y=w.useCallback(x=>{if(!Ka(x.currentTarget,pt(x)))return;let T=pt(x);const S=ba(T),E=Ki(S);if(!d.current.isFocusWithin&&E===T){o&&o(x),u&&u(!0),d.current.isFocusWithin=!0,p(x);let D=x.currentTarget;f(S,"focus",M=>{let C=pt(M);if(d.current.isFocusWithin&&!Ka(D,C)){let R=new S.defaultView.FocusEvent("blur",{relatedTarget:C});OT(R,D);let _=ny(R);g(_)}},{capture:!0})}},[o,u,p,f,g]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:g}}}let Bf=!1,qo=0;function $T(){Bf=!0,setTimeout(()=>{Bf=!1},50)}function hv(n){n.pointerType==="touch"&&$T()}function GT(){if(!(typeof document>"u"))return qo===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",hv),qo++,()=>{qo--,!(qo>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",hv)}}function ry(n){let{onHoverStart:a,onHoverChange:l,onHoverEnd:o,isDisabled:u}=n,[d,f]=w.useState(!1),h=w.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;w.useEffect(GT,[]);let{addGlobalListener:g,removeAllGlobalListeners:p}=ty(),{hoverProps:y,triggerHoverEnd:x}=w.useMemo(()=>{let T=(D,M)=>{if(h.pointerType=M,u||M==="touch"||h.isHovered||!Ka(D.currentTarget,pt(D)))return;h.isHovered=!0;let C=D.currentTarget;h.target=C,g(ba(pt(D)),"pointerover",R=>{h.isHovered&&h.target&&!Ka(h.target,pt(R))&&S(R,R.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:C,pointerType:M}),l&&l(!0),f(!0)},S=(D,M)=>{let C=h.target;h.pointerType="",h.target=null,!(M==="touch"||!h.isHovered||!C)&&(h.isHovered=!1,p(),o&&o({type:"hoverend",target:C,pointerType:M}),l&&l(!1),f(!1))},E={};return typeof PointerEvent<"u"&&(E.onPointerEnter=D=>{Bf&&D.pointerType==="mouse"||T(D,D.pointerType)},E.onPointerLeave=D=>{!u&&Ka(D.currentTarget,pt(D))&&S(D,D.pointerType)}),{hoverProps:E,triggerHoverEnd:S}},[a,l,o,u,h,g,p]);return w.useEffect(()=>{u&&x({currentTarget:h.target},h.pointerType)},[u]),{hoverProps:y,isHovered:d}}function uy(n={}){let{autoFocus:a=!1,isTextInput:l,within:o}=n,u=w.useRef({isFocused:!1,isFocusVisible:a||Uf()}),[d,f]=w.useState(!1),[h,g]=w.useState(()=>u.current.isFocused&&u.current.isFocusVisible),p=w.useCallback(()=>g(u.current.isFocused&&u.current.isFocusVisible),[]),y=w.useCallback(S=>{u.current.isFocused=S,u.current.isFocusVisible=Uf(),f(S),p()},[p]);UT(S=>{u.current.isFocusVisible=S,p()},[l,d],{enabled:d,isTextInput:l});let{focusProps:x}=BT({isDisabled:o,onFocusChange:y}),{focusWithinProps:T}=HT({isDisabled:!o,onFocusWithinChange:y});return{isFocused:d,isFocusVisible:h,focusProps:o?T:x}}var YT=Object.defineProperty,qT=(n,a,l)=>a in n?YT(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l,rf=(n,a,l)=>(qT(n,typeof a!="symbol"?a+"":a,l),l);let XT=class{constructor(){rf(this,"current",this.detect()),rf(this,"handoffState","pending"),rf(this,"currentId",0)}set(a){this.current!==a&&(this.handoffState="pending",this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},hn=new XT;function Ji(n){var a;return hn.isServer?null:n==null?document:(a=n==null?void 0:n.ownerDocument)!=null?a:document}function Hf(n){var a,l;return hn.isServer?null:n==null?document:(l=(a=n==null?void 0:n.getRootNode)==null?void 0:a.call(n))!=null?l:document}function cy(n){var a,l;return(l=(a=Hf(n))==null?void 0:a.activeElement)!=null?l:null}function KT(n){return cy(n)===n}function Er(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(a=>setTimeout(()=>{throw a}))}function Un(){let n=[],a={addEventListener(l,o,u,d){return l.addEventListener(o,u,d),a.add(()=>l.removeEventListener(o,u,d))},requestAnimationFrame(...l){let o=requestAnimationFrame(...l);return a.add(()=>cancelAnimationFrame(o))},nextFrame(...l){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...l))},setTimeout(...l){let o=setTimeout(...l);return a.add(()=>clearTimeout(o))},microTask(...l){let o={current:!0};return Er(()=>{o.current&&l[0]()}),a.add(()=>{o.current=!1})},style(l,o,u){let d=l.style.getPropertyValue(o);return Object.assign(l.style,{[o]:u}),this.add(()=>{Object.assign(l.style,{[o]:d})})},group(l){let o=Un();return l(o),this.add(()=>o.dispose())},add(l){return n.includes(l)||n.push(l),()=>{let o=n.indexOf(l);if(o>=0)for(let u of n.splice(o,1))u()}},dispose(){for(let l of n.splice(0))l()}};return a}function vs(){let[n]=w.useState(Un);return w.useEffect(()=>()=>n.dispose(),[n]),n}let At=(n,a)=>{hn.isServer?w.useEffect(n,a):w.useLayoutEffect(n,a)};function ei(n){let a=w.useRef(n);return At(()=>{a.current=n},[n]),a}let De=function(n){let a=ei(n);return ue.useCallback((...l)=>a.current(...l),[a])};function FT(n){let a=n.width/2,l=n.height/2;return{top:n.clientY-l,right:n.clientX+a,bottom:n.clientY+l,left:n.clientX-a}}function ZT(n,a){return!(!n||!a||n.right<a.left||n.left>a.right||n.bottom<a.top||n.top>a.bottom)}function fy({disabled:n=!1}={}){let a=w.useRef(null),[l,o]=w.useState(!1),u=vs(),d=De(()=>{a.current=null,o(!1),u.dispose()}),f=De(h=>{if(u.dispose(),a.current===null){a.current=h.currentTarget,o(!0);{let g=Ji(h.currentTarget);u.addEventListener(g,"pointerup",d,!1),u.addEventListener(g,"pointermove",p=>{if(a.current){let y=FT(p);o(ZT(y,a.current.getBoundingClientRect()))}},!1),u.addEventListener(g,"pointercancel",d,!1)}}});return{pressed:l,pressProps:n?{}:{onPointerDown:f,onPointerUp:d,onClick:d}}}function ti(n){return w.useMemo(()=>n,Object.values(n))}let QT=w.createContext(void 0);function dy(){return w.useContext(QT)}function $f(...n){return Array.from(new Set(n.flatMap(a=>typeof a=="string"?a.split(" "):[]))).filter(Boolean).join(" ")}function _n(n,a,...l){if(n in a){let u=a[n];return typeof u=="function"?u(...l):u}let o=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_n),o}var ur=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(ur||{}),ha=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(ha||{});function Nt(){let n=JT();return w.useCallback(a=>PT({mergeRefs:n,...a}),[n])}function PT({ourProps:n,theirProps:a,slot:l,defaultTag:o,features:u,visible:d=!0,name:f,mergeRefs:h}){h=h??WT;let g=hy(a,n);if(d)return Xo(g,l,o,f,h);let p=u??0;if(p&2){let{static:y=!1,...x}=g;if(y)return Xo(x,l,o,f,h)}if(p&1){let{unmount:y=!0,...x}=g;return _n(y?0:1,{0(){return null},1(){return Xo({...x,hidden:!0,style:{display:"none"}},l,o,f,h)}})}return Xo(g,l,o,f,h)}function Xo(n,a={},l,o,u){let{as:d=l,children:f,refName:h="ref",...g}=uf(n,["unmount","static"]),p=n.ref!==void 0?{[h]:n.ref}:{},y=typeof f=="function"?f(a):f;"className"in g&&g.className&&typeof g.className=="function"&&(g.className=g.className(a)),g["aria-labelledby"]&&g["aria-labelledby"]===g.id&&(g["aria-labelledby"]=void 0);let x={};if(a){let T=!1,S=[];for(let[E,D]of Object.entries(a))typeof D=="boolean"&&(T=!0),D===!0&&S.push(E.replace(/([A-Z])/g,M=>`-${M.toLowerCase()}`));if(T){x["data-headlessui-state"]=S.join(" ");for(let E of S)x[`data-${E}`]=""}}if(is(d)&&(Object.keys(Ga(g)).length>0||Object.keys(Ga(x)).length>0))if(!w.isValidElement(y)||Array.isArray(y)&&y.length>1||e2(y)){if(Object.keys(Ga(g)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ga(g)).concat(Object.keys(Ga(x))).map(T=>` - ${T}`).join(`
|
|
48
|
+
`+s.stack}}var Gr=Object.prototype.hasOwnProperty,Yr=n.unstable_scheduleCallback,Xr=n.unstable_cancelCallback,Bb=n.unstable_shouldYield,Hb=n.unstable_requestPaint,Ct=n.unstable_now,$b=n.unstable_getCurrentPriorityLevel,sh=n.unstable_ImmediatePriority,oh=n.unstable_UserBlockingPriority,Cs=n.unstable_NormalPriority,qb=n.unstable_LowPriority,rh=n.unstable_IdlePriority,Gb=n.log,Yb=n.unstable_setDisableYieldValue,al=null,Mt=null;function Bn(e){if(typeof Gb=="function"&&Yb(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(al,e)}catch{}}var Dt=Math.clz32?Math.clz32:Fb,Xb=Math.log,Kb=Math.LN2;function Fb(e){return e>>>=0,e===0?32:31-(Xb(e)/Kb|0)|0}var Ms=256,Ds=262144,Os=4194304;function wa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function zs(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~c,s!==0?r=wa(s):(v&=b,v!==0?r=wa(v):i||(i=b&~e,i!==0&&(r=wa(i))))):(b=s&~c,b!==0?r=wa(b):v!==0?r=wa(v):i||(i=s&~e,i!==0&&(r=wa(i)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,i=t&-t,c>=i||c===32&&(i&4194048)!==0)?t:r}function il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Zb(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uh(){var e=Os;return Os<<=1,(Os&62914560)===0&&(Os=4194304),e}function Kr(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ll(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qb(e,t,i,s,r,c){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,j=e.expirationTimes,k=e.hiddenUpdates;for(i=v&~i;0<i;){var H=31-Dt(i),G=1<<H;b[H]=0,j[H]=-1;var V=k[H];if(V!==null)for(k[H]=null,H=0;H<V.length;H++){var U=V[H];U!==null&&(U.lane&=-536870913)}i&=~G}s!==0&&ch(e,s,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function ch(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Dt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function fh(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Dt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function dh(e,t){var i=t&-t;return i=(i&42)!==0?1:Fr(i),(i&(e.suspendedLanes|t))!==0?0:i}function Fr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Zr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function hh(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Wg(e.type))}function mh(e,t){var i=Q.p;try{return Q.p=e,t()}finally{Q.p=i}}var Hn=Math.random().toString(36).slice(2),it="__reactFiber$"+Hn,yt="__reactProps$"+Hn,ni="__reactContainer$"+Hn,Qr="__reactEvents$"+Hn,Pb="__reactListeners$"+Hn,Jb="__reactHandles$"+Hn,ph="__reactResources$"+Hn,sl="__reactMarker$"+Hn;function Pr(e){delete e[it],delete e[yt],delete e[Qr],delete e[Pb],delete e[Jb]}function ai(e){var t=e[it];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ni]||i[it]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Vg(e);e!==null;){if(i=e[it])return i;e=Vg(e)}return t}e=i,i=e.parentNode}return null}function ii(e){if(e=e[it]||e[ni]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ol(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function li(e){var t=e[ph];return t||(t=e[ph]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[sl]=!0}var gh=new Set,vh={};function Ea(e,t){si(e,t),si(e+"Capture",t)}function si(e,t){for(vh[e]=t,e=0;e<t.length;e++)gh.add(t[e])}var Wb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),yh={},xh={};function Ib(e){return Gr.call(xh,e)?!0:Gr.call(yh,e)?!1:Wb.test(e)?xh[e]=!0:(yh[e]=!0,!1)}function Rs(e,t,i){if(Ib(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Ls(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function vn(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function e1(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,c=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(v){i=""+v,c.call(this,v)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jr(e){if(!e._valueTracker){var t=bh(e)?"checked":"value";e._valueTracker=e1(e,t,""+e[t])}}function Sh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=bh(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function ks(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var t1=/[\n"\\]/g;function Ht(e){return e.replace(t1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wr(e,t,i,s,r,c,v,b){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Ir(e,v,Bt(t)):i!=null?Ir(e,v,Bt(i)):s!=null&&e.removeAttribute("value"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Bt(b):e.removeAttribute("name")}function Th(e,t,i,s,r,c,v,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||i!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Jr(e);return}i=i!=null?""+Bt(i):"",t=t!=null?""+Bt(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Jr(e)}function Ir(e,t,i){t==="number"&&ks(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function oi(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Bt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function wh(e,t,i){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Bt(i):""}function Eh(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(o(92));if(Ne(s)){if(1<s.length)throw Error(o(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Bt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Jr(e)}function ri(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var n1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function jh(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||n1.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Ah(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&jh(e,r,s)}else for(var c in t)t.hasOwnProperty(c)&&jh(e,c,t[c])}function eu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var a1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),i1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Vs(e){return i1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yn(){}var tu=null;function nu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,ci=null;function Nh(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wr(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[yt]||null;if(!r)throw Error(o(90));Wr(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Sh(s)}break e;case"textarea":wh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&oi(e,!!i.multiple,t,!1)}}}var au=!1;function Ch(e,t,i){if(au)return e(t,i);au=!0;try{var s=e(t);return s}finally{if(au=!1,(ui!==null||ci!==null)&&(Eo(),ui&&(t=ui,e=ci,ci=ui=null,Nh(t),e)))for(t=0;t<e.length;t++)Nh(e[t])}}function rl(e,t){var i=e.stateNode;if(i===null)return null;var s=i[yt]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iu=!1;if(xn)try{var ul={};Object.defineProperty(ul,"passive",{get:function(){iu=!0}}),window.addEventListener("test",ul,ul),window.removeEventListener("test",ul,ul)}catch{iu=!1}var $n=null,lu=null,_s=null;function Mh(){if(_s)return _s;var e,t=lu,i=t.length,s,r="value"in $n?$n.value:$n.textContent,c=r.length;for(e=0;e<i&&t[e]===r[e];e++);var v=i-e;for(s=1;s<=v&&t[i-s]===r[c-s];s++);return _s=r.slice(e,1<s?1-s:void 0)}function Us(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Bs(){return!0}function Dh(){return!1}function xt(e){function t(i,s,r,c,v){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=c,this.target=v,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Bs:Dh,this.isPropagationStopped=Dh,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Bs)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Bs)},persist:function(){},isPersistent:Bs}),t}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hs=xt(ja),cl=x({},ja,{view:0,detail:0}),l1=xt(cl),su,ou,fl,$s=x({},cl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fl&&(fl&&e.type==="mousemove"?(su=e.screenX-fl.screenX,ou=e.screenY-fl.screenY):ou=su=0,fl=e),su)},movementY:function(e){return"movementY"in e?e.movementY:ou}}),Oh=xt($s),s1=x({},$s,{dataTransfer:0}),o1=xt(s1),r1=x({},cl,{relatedTarget:0}),ru=xt(r1),u1=x({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),c1=xt(u1),f1=x({},ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),d1=xt(f1),h1=x({},ja,{data:0}),zh=xt(h1),m1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},p1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},g1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=g1[e])?!!t[e]:!1}function uu(){return v1}var y1=x({},cl,{key:function(e){if(e.key){var t=m1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Us(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?p1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(e){return e.type==="keypress"?Us(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Us(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),x1=xt(y1),b1=x({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rh=xt(b1),S1=x({},cl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),T1=xt(S1),w1=x({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),E1=xt(w1),j1=x({},$s,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),A1=xt(j1),N1=x({},ja,{newState:0,oldState:0}),C1=xt(N1),M1=[9,13,27,32],cu=xn&&"CompositionEvent"in window,dl=null;xn&&"documentMode"in document&&(dl=document.documentMode);var D1=xn&&"TextEvent"in window&&!dl,Lh=xn&&(!cu||dl&&8<dl&&11>=dl),kh=" ",Vh=!1;function _h(e,t){switch(e){case"keyup":return M1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function O1(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(Vh=!0,kh);case"textInput":return e=t.data,e===kh&&Vh?null:e;default:return null}}function z1(e,t){if(fi)return e==="compositionend"||!cu&&_h(e,t)?(e=Mh(),_s=lu=$n=null,fi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Lh&&t.locale!=="ko"?null:t.data;default:return null}}var R1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Bh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!R1[e.type]:t==="textarea"}function Hh(e,t,i,s){ui?ci?ci.push(s):ci=[s]:ui=s,t=Oo(t,"onChange"),0<t.length&&(i=new Hs("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var hl=null,ml=null;function L1(e){Tg(e,0)}function qs(e){var t=ol(e);if(Sh(t))return e}function $h(e,t){if(e==="change")return t}var qh=!1;if(xn){var fu;if(xn){var du="oninput"in document;if(!du){var Gh=document.createElement("div");Gh.setAttribute("oninput","return;"),du=typeof Gh.oninput=="function"}fu=du}else fu=!1;qh=fu&&(!document.documentMode||9<document.documentMode)}function Yh(){hl&&(hl.detachEvent("onpropertychange",Xh),ml=hl=null)}function Xh(e){if(e.propertyName==="value"&&qs(ml)){var t=[];Hh(t,ml,e,nu(e)),Ch(L1,t)}}function k1(e,t,i){e==="focusin"?(Yh(),hl=t,ml=i,hl.attachEvent("onpropertychange",Xh)):e==="focusout"&&Yh()}function V1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qs(ml)}function _1(e,t){if(e==="click")return qs(t)}function U1(e,t){if(e==="input"||e==="change")return qs(t)}function B1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:B1;function pl(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!Gr.call(t,r)||!Ot(e[r],t[r]))return!1}return!0}function Kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fh(e,t){var i=Kh(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Kh(i)}}function Zh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ks(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=ks(e.document)}return t}function hu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var H1=xn&&"documentMode"in document&&11>=document.documentMode,di=null,mu=null,gl=null,pu=!1;function Ph(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;pu||di==null||di!==ks(s)||(s=di,"selectionStart"in s&&hu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),gl&&pl(gl,s)||(gl=s,s=Oo(mu,"onSelect"),0<s.length&&(t=new Hs("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=di)))}function Aa(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var hi={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionrun:Aa("Transition","TransitionRun"),transitionstart:Aa("Transition","TransitionStart"),transitioncancel:Aa("Transition","TransitionCancel"),transitionend:Aa("Transition","TransitionEnd")},gu={},Jh={};xn&&(Jh=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);function Na(e){if(gu[e])return gu[e];if(!hi[e])return e;var t=hi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Jh)return gu[e]=t[i];return e}var Wh=Na("animationend"),Ih=Na("animationiteration"),em=Na("animationstart"),$1=Na("transitionrun"),q1=Na("transitionstart"),G1=Na("transitioncancel"),tm=Na("transitionend"),nm=new Map,vu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vu.push("scrollEnd");function Wt(e,t){nm.set(e,t),Ea(t,[e])}var Gs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},$t=[],mi=0,yu=0;function Ys(){for(var e=mi,t=yu=mi=0;t<e;){var i=$t[t];$t[t++]=null;var s=$t[t];$t[t++]=null;var r=$t[t];$t[t++]=null;var c=$t[t];if($t[t++]=null,s!==null&&r!==null){var v=s.pending;v===null?r.next=r:(r.next=v.next,v.next=r),s.pending=r}c!==0&&am(i,r,c)}}function Xs(e,t,i,s){$t[mi++]=e,$t[mi++]=t,$t[mi++]=i,$t[mi++]=s,yu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function xu(e,t,i,s){return Xs(e,t,i,s),Ks(e)}function Ca(e,t){return Xs(e,null,null,t),Ks(e)}function am(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,c=e.return;c!==null;)c.childLanes|=i,s=c.alternate,s!==null&&(s.childLanes|=i),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-Dt(i),e=c.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),c):null}function Ks(e){if(50<Ul)throw Ul=0,Cc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function Y1(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,i,s){return new Y1(e,t,i,s)}function bu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bn(e,t){var i=e.alternate;return i===null?(i=zt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function im(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Fs(e,t,i,s,r,c){var v=0;if(s=e,typeof e=="function")bu(e)&&(v=1);else if(typeof e=="string")v=QS(e,i,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=zt(31,i,t,r),e.elementType=F,e.lanes=c,e;case D:return Ma(i.children,r,c,t);case M:v=8,r|=24;break;case C:return e=zt(12,i,t,r|2),e.elementType=C,e.lanes=c,e;case Y:return e=zt(13,i,t,r),e.elementType=Y,e.lanes=c,e;case I:return e=zt(19,i,t,r),e.elementType=I,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:v=10;break e;case R:v=9;break e;case z:v=11;break e;case Z:v=14;break e;case J:v=16,s=null;break e}v=29,i=Error(o(130,e===null?"null":typeof e,"")),s=null}return t=zt(v,i,t,r),t.elementType=e,t.type=s,t.lanes=c,t}function Ma(e,t,i,s){return e=zt(7,e,s,t),e.lanes=i,e}function Su(e,t,i){return e=zt(6,e,null,t),e.lanes=i,e}function lm(e){var t=zt(18,null,null,0);return t.stateNode=e,t}function Tu(e,t,i){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var sm=new WeakMap;function qt(e,t){if(typeof e=="object"&&e!==null){var i=sm.get(e);return i!==void 0?i:(t={value:e,source:t,stack:lh(t)},sm.set(e,t),t)}return{value:e,source:t,stack:lh(t)}}var gi=[],vi=0,Zs=null,vl=0,Gt=[],Yt=0,qn=null,sn=1,on="";function Sn(e,t){gi[vi++]=vl,gi[vi++]=Zs,Zs=e,vl=t}function om(e,t,i){Gt[Yt++]=sn,Gt[Yt++]=on,Gt[Yt++]=qn,qn=e;var s=sn;e=on;var r=32-Dt(s)-1;s&=~(1<<r),i+=1;var c=32-Dt(t)+r;if(30<c){var v=r-r%5;c=(s&(1<<v)-1).toString(32),s>>=v,r-=v,sn=1<<32-Dt(t)+r|i<<r|s,on=c+e}else sn=1<<c|i<<r|s,on=e}function wu(e){e.return!==null&&(Sn(e,1),om(e,1,0))}function Eu(e){for(;e===Zs;)Zs=gi[--vi],gi[vi]=null,vl=gi[--vi],gi[vi]=null;for(;e===qn;)qn=Gt[--Yt],Gt[Yt]=null,on=Gt[--Yt],Gt[Yt]=null,sn=Gt[--Yt],Gt[Yt]=null}function rm(e,t){Gt[Yt++]=sn,Gt[Yt++]=on,Gt[Yt++]=qn,sn=t.id,on=t.overflow,qn=e}var lt=null,_e=null,xe=!1,Gn=null,Xt=!1,ju=Error(o(519));function Yn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yl(qt(t,e)),ju}function um(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[it]=e,t[yt]=s,i){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(i=0;i<Hl.length;i++)ge(Hl[i],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),Th(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),Eh(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||Ag(t.textContent,i)?(s.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),s.onScroll!=null&&ge("scroll",t),s.onScrollEnd!=null&&ge("scrollend",t),s.onClick!=null&&(t.onclick=yn),t=!0):t=!1,t||Yn(e,!0)}function cm(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:lt=lt.return}}function yi(e){if(e!==lt)return!1;if(!xe)return cm(e),xe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Gc(e.type,e.memoizedProps)),i=!i),i&&_e&&Yn(e),cm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_e=kg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_e=kg(e)}else t===27?(t=_e,ia(e.type)?(e=Zc,Zc=null,_e=e):_e=t):_e=lt?Ft(e.stateNode.nextSibling):null;return!0}function Da(){_e=lt=null,xe=!1}function Au(){var e=Gn;return e!==null&&(wt===null?wt=e:wt.push.apply(wt,e),Gn=null),e}function yl(e){Gn===null?Gn=[e]:Gn.push(e)}var Nu=A(null),Oa=null,Tn=null;function Xn(e,t,i){X(Nu,t._currentValue),t._currentValue=i}function wn(e){e._currentValue=Nu.current,q(Nu)}function Cu(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Mu(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var v=r.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=r;for(var j=0;j<t.length;j++)if(b.context===t[j]){c.lanes|=i,b=c.alternate,b!==null&&(b.lanes|=i),Cu(c.return,i,e),s||(v=null);break e}c=b.next}}else if(r.tag===18){if(v=r.return,v===null)throw Error(o(341));v.lanes|=i,c=v.alternate,c!==null&&(c.lanes|=i),Cu(v,i,e),v=null}else v=r.child;if(v!==null)v.return=r;else for(v=r;v!==null;){if(v===e){v=null;break}if(r=v.sibling,r!==null){r.return=v.return,v=r;break}v=v.return}r=v}}function xi(e,t,i,s){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var v=r.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var b=r.type;Ot(r.pendingProps.value,v.value)||(e!==null?e.push(b):e=[b])}}else if(r===be.current){if(v=r.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Xl):e=[Xl])}r=r.return}e!==null&&Mu(t,e,i,s),t.flags|=262144}function Qs(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){Oa=e,Tn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function st(e){return fm(Oa,e)}function Ps(e,t){return Oa===null&&za(e),fm(e,t)}function fm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Tn===null){if(e===null)throw Error(o(308));Tn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Tn=Tn.next=t;return i}var X1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},K1=n.unstable_scheduleCallback,F1=n.unstable_NormalPriority,Qe={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Du(){return{controller:new X1,data:new Map,refCount:0}}function xl(e){e.refCount--,e.refCount===0&&K1(F1,function(){e.controller.abort()})}var bl=null,Ou=0,bi=0,Si=null;function Z1(e,t){if(bl===null){var i=bl=[];Ou=0,bi=Lc(),Si={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Ou++,t.then(dm,dm),t}function dm(){if(--Ou===0&&bl!==null){Si!==null&&(Si.status="fulfilled");var e=bl;bl=null,bi=0,Si=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Q1(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var hm=B.S;B.S=function(e,t){Pp=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Z1(e,t),hm!==null&&hm(e,t)};var Ra=A(null);function zu(){var e=Ra.current;return e!==null?e:Ve.pooledCache}function Js(e,t){t===null?X(Ra,Ra.current):X(Ra,t.pool)}function mm(){var e=zu();return e===null?null:{parent:Qe._currentValue,pool:e}}var Ti=Error(o(460)),Ru=Error(o(474)),Ws=Error(o(542)),Is={then:function(){}};function pm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gm(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(yn,yn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ym(e),e;default:if(typeof t.status=="string")t.then(yn,yn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ym(e),e}throw ka=t,Ti}}function La(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ka=i,Ti):i}}var ka=null;function vm(){if(ka===null)throw Error(o(459));var e=ka;return ka=null,e}function ym(e){if(e===Ti||e===Ws)throw Error(o(483))}var wi=null,Sl=0;function eo(e){var t=Sl;return Sl+=1,wi===null&&(wi=[]),gm(wi,e,t)}function Tl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function to(e,t){throw t.$$typeof===T?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function xm(e){function t(O,N){if(e){var L=O.deletions;L===null?(O.deletions=[N],O.flags|=16):L.push(N)}}function i(O,N){if(!e)return null;for(;N!==null;)t(O,N),N=N.sibling;return null}function s(O){for(var N=new Map;O!==null;)O.key!==null?N.set(O.key,O):N.set(O.index,O),O=O.sibling;return N}function r(O,N){return O=bn(O,N),O.index=0,O.sibling=null,O}function c(O,N,L){return O.index=L,e?(L=O.alternate,L!==null?(L=L.index,L<N?(O.flags|=67108866,N):L):(O.flags|=67108866,N)):(O.flags|=1048576,N)}function v(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,N,L,$){return N===null||N.tag!==6?(N=Su(L,O.mode,$),N.return=O,N):(N=r(N,L),N.return=O,N)}function j(O,N,L,$){var le=L.type;return le===D?H(O,N,L.props.children,$,L.key):N!==null&&(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===J&&La(le)===N.type)?(N=r(N,L.props),Tl(N,L),N.return=O,N):(N=Fs(L.type,L.key,L.props,null,O.mode,$),Tl(N,L),N.return=O,N)}function k(O,N,L,$){return N===null||N.tag!==4||N.stateNode.containerInfo!==L.containerInfo||N.stateNode.implementation!==L.implementation?(N=Tu(L,O.mode,$),N.return=O,N):(N=r(N,L.children||[]),N.return=O,N)}function H(O,N,L,$,le){return N===null||N.tag!==7?(N=Ma(L,O.mode,$,le),N.return=O,N):(N=r(N,L),N.return=O,N)}function G(O,N,L){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Su(""+N,O.mode,L),N.return=O,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case S:return L=Fs(N.type,N.key,N.props,null,O.mode,L),Tl(L,N),L.return=O,L;case E:return N=Tu(N,O.mode,L),N.return=O,N;case J:return N=La(N),G(O,N,L)}if(Ne(N)||ie(N))return N=Ma(N,O.mode,L,null),N.return=O,N;if(typeof N.then=="function")return G(O,eo(N),L);if(N.$$typeof===_)return G(O,Ps(O,N),L);to(O,N)}return null}function V(O,N,L,$){var le=N!==null?N.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return le!==null?null:b(O,N,""+L,$);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case S:return L.key===le?j(O,N,L,$):null;case E:return L.key===le?k(O,N,L,$):null;case J:return L=La(L),V(O,N,L,$)}if(Ne(L)||ie(L))return le!==null?null:H(O,N,L,$,null);if(typeof L.then=="function")return V(O,N,eo(L),$);if(L.$$typeof===_)return V(O,N,Ps(O,L),$);to(O,L)}return null}function U(O,N,L,$,le){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return O=O.get(L)||null,b(N,O,""+$,le);if(typeof $=="object"&&$!==null){switch($.$$typeof){case S:return O=O.get($.key===null?L:$.key)||null,j(N,O,$,le);case E:return O=O.get($.key===null?L:$.key)||null,k(N,O,$,le);case J:return $=La($),U(O,N,L,$,le)}if(Ne($)||ie($))return O=O.get(L)||null,H(N,O,$,le,null);if(typeof $.then=="function")return U(O,N,L,eo($),le);if($.$$typeof===_)return U(O,N,L,Ps(N,$),le);to(N,$)}return null}function ee(O,N,L,$){for(var le=null,we=null,ae=N,de=N=0,ye=null;ae!==null&&de<L.length;de++){ae.index>de?(ye=ae,ae=null):ye=ae.sibling;var Ee=V(O,ae,L[de],$);if(Ee===null){ae===null&&(ae=ye);break}e&&ae&&Ee.alternate===null&&t(O,ae),N=c(Ee,N,de),we===null?le=Ee:we.sibling=Ee,we=Ee,ae=ye}if(de===L.length)return i(O,ae),xe&&Sn(O,de),le;if(ae===null){for(;de<L.length;de++)ae=G(O,L[de],$),ae!==null&&(N=c(ae,N,de),we===null?le=ae:we.sibling=ae,we=ae);return xe&&Sn(O,de),le}for(ae=s(ae);de<L.length;de++)ye=U(ae,O,de,L[de],$),ye!==null&&(e&&ye.alternate!==null&&ae.delete(ye.key===null?de:ye.key),N=c(ye,N,de),we===null?le=ye:we.sibling=ye,we=ye);return e&&ae.forEach(function(ua){return t(O,ua)}),xe&&Sn(O,de),le}function se(O,N,L,$){if(L==null)throw Error(o(151));for(var le=null,we=null,ae=N,de=N=0,ye=null,Ee=L.next();ae!==null&&!Ee.done;de++,Ee=L.next()){ae.index>de?(ye=ae,ae=null):ye=ae.sibling;var ua=V(O,ae,Ee.value,$);if(ua===null){ae===null&&(ae=ye);break}e&&ae&&ua.alternate===null&&t(O,ae),N=c(ua,N,de),we===null?le=ua:we.sibling=ua,we=ua,ae=ye}if(Ee.done)return i(O,ae),xe&&Sn(O,de),le;if(ae===null){for(;!Ee.done;de++,Ee=L.next())Ee=G(O,Ee.value,$),Ee!==null&&(N=c(Ee,N,de),we===null?le=Ee:we.sibling=Ee,we=Ee);return xe&&Sn(O,de),le}for(ae=s(ae);!Ee.done;de++,Ee=L.next())Ee=U(ae,O,de,Ee.value,$),Ee!==null&&(e&&Ee.alternate!==null&&ae.delete(Ee.key===null?de:Ee.key),N=c(Ee,N,de),we===null?le=Ee:we.sibling=Ee,we=Ee);return e&&ae.forEach(function(sT){return t(O,sT)}),xe&&Sn(O,de),le}function Re(O,N,L,$){if(typeof L=="object"&&L!==null&&L.type===D&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case S:e:{for(var le=L.key;N!==null;){if(N.key===le){if(le=L.type,le===D){if(N.tag===7){i(O,N.sibling),$=r(N,L.props.children),$.return=O,O=$;break e}}else if(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===J&&La(le)===N.type){i(O,N.sibling),$=r(N,L.props),Tl($,L),$.return=O,O=$;break e}i(O,N);break}else t(O,N);N=N.sibling}L.type===D?($=Ma(L.props.children,O.mode,$,L.key),$.return=O,O=$):($=Fs(L.type,L.key,L.props,null,O.mode,$),Tl($,L),$.return=O,O=$)}return v(O);case E:e:{for(le=L.key;N!==null;){if(N.key===le)if(N.tag===4&&N.stateNode.containerInfo===L.containerInfo&&N.stateNode.implementation===L.implementation){i(O,N.sibling),$=r(N,L.children||[]),$.return=O,O=$;break e}else{i(O,N);break}else t(O,N);N=N.sibling}$=Tu(L,O.mode,$),$.return=O,O=$}return v(O);case J:return L=La(L),Re(O,N,L,$)}if(Ne(L))return ee(O,N,L,$);if(ie(L)){if(le=ie(L),typeof le!="function")throw Error(o(150));return L=le.call(L),se(O,N,L,$)}if(typeof L.then=="function")return Re(O,N,eo(L),$);if(L.$$typeof===_)return Re(O,N,Ps(O,L),$);to(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,N!==null&&N.tag===6?(i(O,N.sibling),$=r(N,L),$.return=O,O=$):(i(O,N),$=Su(L,O.mode,$),$.return=O,O=$),v(O)):i(O,N)}return function(O,N,L,$){try{Sl=0;var le=Re(O,N,L,$);return wi=null,le}catch(ae){if(ae===Ti||ae===Ws)throw ae;var we=zt(29,ae,null,O.mode);return we.lanes=$,we.return=O,we}finally{}}}var Va=xm(!0),bm=xm(!1),Kn=!1;function Lu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Ks(e),am(e,null,i),t}return Xs(e,s,t,i),Ks(e)}function wl(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,fh(e,i)}}function Vu(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,c=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};c===null?r=c=v:c=c.next=v,i=i.next}while(i!==null);c===null?r=c=t:c=c.next=t}else r=c=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var _u=!1;function El(){if(_u){var e=Si;if(e!==null)throw e}}function jl(e,t,i,s){_u=!1;var r=e.updateQueue;Kn=!1;var c=r.firstBaseUpdate,v=r.lastBaseUpdate,b=r.shared.pending;if(b!==null){r.shared.pending=null;var j=b,k=j.next;j.next=null,v===null?c=k:v.next=k,v=j;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==v&&(b===null?H.firstBaseUpdate=k:b.next=k,H.lastBaseUpdate=j))}if(c!==null){var G=r.baseState;v=0,H=k=j=null,b=c;do{var V=b.lane&-536870913,U=V!==b.lane;if(U?(ve&V)===V:(s&V)===V){V!==0&&V===bi&&(_u=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ee=e,se=b;V=t;var Re=i;switch(se.tag){case 1:if(ee=se.payload,typeof ee=="function"){G=ee.call(Re,G,V);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=se.payload,V=typeof ee=="function"?ee.call(Re,G,V):ee,V==null)break e;G=x({},G,V);break e;case 2:Kn=!0}}V=b.callback,V!==null&&(e.flags|=64,U&&(e.flags|=8192),U=r.callbacks,U===null?r.callbacks=[V]:U.push(V))}else U={lane:V,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(k=H=U,j=G):H=H.next=U,v|=V;if(b=b.next,b===null){if(b=r.shared.pending,b===null)break;U=b,b=U.next,U.next=null,r.lastBaseUpdate=U,r.shared.pending=null}}while(!0);H===null&&(j=G),r.baseState=j,r.firstBaseUpdate=k,r.lastBaseUpdate=H,c===null&&(r.shared.lanes=0),In|=v,e.lanes=v,e.memoizedState=G}}function Sm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Tm(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Sm(i[e],t)}var Ei=A(null),no=A(0);function wm(e,t){e=zn,X(no,e),X(Ei,t),zn=e|t.baseLanes}function Uu(){X(no,zn),X(Ei,Ei.current)}function Bu(){zn=no.current,q(Ei),q(no)}var Rt=A(null),Kt=null;function Qn(e){var t=e.alternate;X(Xe,Xe.current&1),X(Rt,e),Kt===null&&(t===null||Ei.current!==null||t.memoizedState!==null)&&(Kt=e)}function Hu(e){X(Xe,Xe.current),X(Rt,e),Kt===null&&(Kt=e)}function Em(e){e.tag===22?(X(Xe,Xe.current),X(Rt,e),Kt===null&&(Kt=e)):Pn()}function Pn(){X(Xe,Xe.current),X(Rt,Rt.current)}function Lt(e){q(Rt),Kt===e&&(Kt=null),q(Xe)}var Xe=A(0);function ao(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Kc(i)||Fc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var En=0,fe=null,Oe=null,Pe=null,io=!1,ji=!1,_a=!1,lo=0,Al=0,Ai=null,P1=0;function qe(){throw Error(o(321))}function $u(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ot(e[i],t[i]))return!1;return!0}function qu(e,t,i,s,r,c){return En=c,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?op:ac,_a=!1,c=i(s,r),_a=!1,ji&&(c=Am(t,i,s,r)),jm(e),c}function jm(e){B.H=Ml;var t=Oe!==null&&Oe.next!==null;if(En=0,Pe=Oe=fe=null,io=!1,Al=0,Ai=null,t)throw Error(o(300));e===null||Je||(e=e.dependencies,e!==null&&Qs(e)&&(Je=!0))}function Am(e,t,i,s){fe=e;var r=0;do{if(ji&&(Ai=null),Al=0,ji=!1,25<=r)throw Error(o(301));if(r+=1,Pe=Oe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}B.H=rp,c=t(i,s)}while(ji);return c}function J1(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Nl(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(fe.flags|=1024),t}function Gu(){var e=lo!==0;return lo=0,e}function Yu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Xu(e){if(io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}io=!1}En=0,Pe=Oe=fe=null,ji=!1,Al=lo=0,Ai=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?fe.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Ke(){if(Oe===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Pe===null?fe.memoizedState:Pe.next;if(t!==null)Pe=t,Oe=e;else{if(e===null)throw fe.alternate===null?Error(o(467)):Error(o(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Pe===null?fe.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function so(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nl(e){var t=Al;return Al+=1,Ai===null&&(Ai=[]),e=gm(Ai,e,t),t=fe,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?op:ac),e}function oo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Nl(e);if(e.$$typeof===_)return st(e)}throw Error(o(438,String(e)))}function Ku(e){var t=null,i=fe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=fe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=so(),fe.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=K;return t.index++,i}function jn(e,t){return typeof t=="function"?t(e):t}function ro(e){var t=Ke();return Fu(t,Oe,e)}function Fu(e,t,i){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=i;var r=e.baseQueue,c=s.pending;if(c!==null){if(r!==null){var v=r.next;r.next=c.next,c.next=v}t.baseQueue=r=c,s.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var b=v=null,j=null,k=t,H=!1;do{var G=k.lane&-536870913;if(G!==k.lane?(ve&G)===G:(En&G)===G){var V=k.revertLane;if(V===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),G===bi&&(H=!0);else if((En&V)===V){k=k.next,V===bi&&(H=!0);continue}else G={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},j===null?(b=j=G,v=c):j=j.next=G,fe.lanes|=V,In|=V;G=k.action,_a&&i(c,G),c=k.hasEagerState?k.eagerState:i(c,G)}else V={lane:G,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},j===null?(b=j=V,v=c):j=j.next=V,fe.lanes|=G,In|=G;k=k.next}while(k!==null&&k!==t);if(j===null?v=c:j.next=b,!Ot(c,e.memoizedState)&&(Je=!0,H&&(i=Si,i!==null)))throw i;e.memoizedState=c,e.baseState=v,e.baseQueue=j,s.lastRenderedState=c}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Zu(e){var t=Ke(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,c=t.memoizedState;if(r!==null){i.pending=null;var v=r=r.next;do c=e(c,v.action),v=v.next;while(v!==r);Ot(c,t.memoizedState)||(Je=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),i.lastRenderedState=c}return[c,s]}function Nm(e,t,i){var s=fe,r=Ke(),c=xe;if(c){if(i===void 0)throw Error(o(407));i=i()}else i=t();var v=!Ot((Oe||r).memoizedState,i);if(v&&(r.memoizedState=i,Je=!0),r=r.queue,Ju(Dm.bind(null,s,r,e),[e]),r.getSnapshot!==t||v||Pe!==null&&Pe.memoizedState.tag&1){if(s.flags|=2048,Ni(9,{destroy:void 0},Mm.bind(null,s,r,i,t),null),Ve===null)throw Error(o(349));c||(En&127)!==0||Cm(s,t,i)}return i}function Cm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=fe.updateQueue,t===null?(t=so(),fe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Mm(e,t,i,s){t.value=i,t.getSnapshot=s,Om(t)&&zm(e)}function Dm(e,t,i){return i(function(){Om(t)&&zm(e)})}function Om(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function zm(e){var t=Ca(e,2);t!==null&&Et(t,e,2)}function Qu(e){var t=mt();if(typeof e=="function"){var i=e;if(e=i(),_a){Bn(!0);try{i()}finally{Bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:e},t}function Rm(e,t,i,s){return e.baseState=i,Fu(e,Oe,typeof s=="function"?s:jn)}function W1(e,t,i,s,r){if(fo(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){c.listeners.push(v)}};B.T!==null?i(!0):c.isTransition=!1,s(c),i=t.pending,i===null?(c.next=t.pending=c,Lm(t,c)):(c.next=i.next,t.pending=i.next=c)}}function Lm(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var c=B.T,v={};B.T=v;try{var b=i(r,s),j=B.S;j!==null&&j(v,b),km(e,t,b)}catch(k){Pu(e,t,k)}finally{c!==null&&v.types!==null&&(c.types=v.types),B.T=c}}else try{c=i(r,s),km(e,t,c)}catch(k){Pu(e,t,k)}}function km(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Vm(e,t,s)},function(s){return Pu(e,t,s)}):Vm(e,t,i)}function Vm(e,t,i){t.status="fulfilled",t.value=i,_m(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Lm(e,i)))}function Pu(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,_m(t),t=t.next;while(t!==s)}e.action=null}function _m(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Um(e,t){return t}function Bm(e,t){if(xe){var i=Ve.formState;if(i!==null){e:{var s=fe;if(xe){if(_e){t:{for(var r=_e,c=Xt;r.nodeType!==8;){if(!c){r=null;break t}if(r=Ft(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){_e=Ft(r.nextSibling),s=r.data==="F!";break e}}Yn(s)}s=!1}s&&(t=i[0])}}return i=mt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Um,lastRenderedState:t},i.queue=s,i=ip.bind(null,fe,s),s.dispatch=i,s=Qu(!1),c=nc.bind(null,fe,!1,s.queue),s=mt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=W1.bind(null,fe,r,c,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function Hm(e){var t=Ke();return $m(t,Oe,e)}function $m(e,t,i){if(t=Fu(e,t,Um)[0],e=ro(jn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Nl(t)}catch(v){throw v===Ti?Ws:v}else s=t;t=Ke();var r=t.queue,c=r.dispatch;return i!==t.memoizedState&&(fe.flags|=2048,Ni(9,{destroy:void 0},I1.bind(null,r,i),null)),[s,c,e]}function I1(e,t){e.action=t}function qm(e){var t=Ke(),i=Oe;if(i!==null)return $m(t,i,e);Ke(),t=t.memoizedState,i=Ke();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ni(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=fe.updateQueue,t===null&&(t=so(),fe.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Gm(){return Ke().memoizedState}function uo(e,t,i,s){var r=mt();fe.flags|=e,r.memoizedState=Ni(1|t,{destroy:void 0},i,s===void 0?null:s)}function co(e,t,i,s){var r=Ke();s=s===void 0?null:s;var c=r.memoizedState.inst;Oe!==null&&s!==null&&$u(s,Oe.memoizedState.deps)?r.memoizedState=Ni(t,c,i,s):(fe.flags|=e,r.memoizedState=Ni(1|t,c,i,s))}function Ym(e,t){uo(8390656,8,e,t)}function Ju(e,t){co(2048,8,e,t)}function eS(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=so(),fe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Xm(e){var t=Ke().memoizedState;return eS({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Km(e,t){return co(4,2,e,t)}function Fm(e,t){return co(4,4,e,t)}function Zm(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qm(e,t,i){i=i!=null?i.concat([e]):null,co(4,4,Zm.bind(null,t,e),i)}function Wu(){}function Pm(e,t){var i=Ke();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&$u(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Jm(e,t){var i=Ke();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&$u(t,s[1]))return s[0];if(s=e(),_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[s,t],s}function Iu(e,t,i){return i===void 0||(En&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Wp(),fe.lanes|=e,In|=e,i)}function Wm(e,t,i,s){return Ot(i,t)?i:Ei.current!==null?(e=Iu(e,i,s),Ot(e,t)||(Je=!0),e):(En&42)===0||(En&1073741824)!==0&&(ve&261930)===0?(Je=!0,e.memoizedState=i):(e=Wp(),fe.lanes|=e,In|=e,t)}function Im(e,t,i,s,r){var c=Q.p;Q.p=c!==0&&8>c?c:8;var v=B.T,b={};B.T=b,nc(e,!1,t,i);try{var j=r(),k=B.S;if(k!==null&&k(b,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=Q1(j,s);Cl(e,t,H,_t(e))}else Cl(e,t,s,_t(e))}catch(G){Cl(e,t,{then:function(){},status:"rejected",reason:G},_t())}finally{Q.p=c,v!==null&&b.types!==null&&(v.types=b.types),B.T=v}}function tS(){}function ec(e,t,i,s){if(e.tag!==5)throw Error(o(476));var r=ep(e).queue;Im(e,r,t,P,i===null?tS:function(){return tp(e),i(s)})}function ep(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:P},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tp(e){var t=ep(e);t.next===null&&(t=e.alternate.memoizedState),Cl(e,t.next.queue,{},_t())}function tc(){return st(Xl)}function np(){return Ke().memoizedState}function ap(){return Ke().memoizedState}function nS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=Fn(i);var s=Zn(t,e,i);s!==null&&(Et(s,t,i),wl(s,t,i)),t={cache:Du()},e.payload=t;return}t=t.return}}function aS(e,t,i){var s=_t();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},fo(e)?lp(t,i):(i=xu(e,t,i,s),i!==null&&(Et(i,e,s),sp(i,t,s)))}function ip(e,t,i){var s=_t();Cl(e,t,i,s)}function Cl(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(fo(e))lp(t,r);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var v=t.lastRenderedState,b=c(v,i);if(r.hasEagerState=!0,r.eagerState=b,Ot(b,v))return Xs(e,t,r,0),Ve===null&&Ys(),!1}catch{}finally{}if(i=xu(e,t,r,s),i!==null)return Et(i,e,s),sp(i,t,s),!0}return!1}function nc(e,t,i,s){if(s={lane:2,revertLane:Lc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},fo(e)){if(t)throw Error(o(479))}else t=xu(e,i,s,2),t!==null&&Et(t,e,2)}function fo(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function lp(e,t){ji=io=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function sp(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,fh(e,i)}}var Ml={readContext:st,use:oo,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useInsertionEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useSyncExternalStore:qe,useId:qe,useHostTransitionStatus:qe,useFormState:qe,useActionState:qe,useOptimistic:qe,useMemoCache:qe,useCacheRefresh:qe};Ml.useEffectEvent=qe;var op={readContext:st,use:oo,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Ym,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,uo(4194308,4,Zm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return uo(4194308,4,e,t)},useInsertionEffect:function(e,t){uo(4,2,e,t)},useMemo:function(e,t){var i=mt();t=t===void 0?null:t;var s=e();if(_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=mt();if(i!==void 0){var r=i(t);if(_a){Bn(!0);try{i(t)}finally{Bn(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=aS.bind(null,fe,e),[s.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Qu(e);var t=e.queue,i=ip.bind(null,fe,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Wu,useDeferredValue:function(e,t){var i=mt();return Iu(i,e,t)},useTransition:function(){var e=Qu(!1);return e=Im.bind(null,fe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=fe,r=mt();if(xe){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),Ve===null)throw Error(o(349));(ve&127)!==0||Cm(s,t,i)}r.memoizedState=i;var c={value:i,getSnapshot:t};return r.queue=c,Ym(Dm.bind(null,s,c,e),[e]),s.flags|=2048,Ni(9,{destroy:void 0},Mm.bind(null,s,c,i,t),null),i},useId:function(){var e=mt(),t=Ve.identifierPrefix;if(xe){var i=on,s=sn;i=(s&~(1<<32-Dt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=lo++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=P1++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Bm,useActionState:Bm,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=nc.bind(null,fe,!0,i),i.dispatch=t,[e,t]},useMemoCache:Ku,useCacheRefresh:function(){return mt().memoizedState=nS.bind(null,fe)},useEffectEvent:function(e){var t=mt(),i={impl:e};return t.memoizedState=i,function(){if((je&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},ac={readContext:st,use:oo,useCallback:Pm,useContext:st,useEffect:Ju,useImperativeHandle:Qm,useInsertionEffect:Km,useLayoutEffect:Fm,useMemo:Jm,useReducer:ro,useRef:Gm,useState:function(){return ro(jn)},useDebugValue:Wu,useDeferredValue:function(e,t){var i=Ke();return Wm(i,Oe.memoizedState,e,t)},useTransition:function(){var e=ro(jn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Nl(e),t]},useSyncExternalStore:Nm,useId:np,useHostTransitionStatus:tc,useFormState:Hm,useActionState:Hm,useOptimistic:function(e,t){var i=Ke();return Rm(i,Oe,e,t)},useMemoCache:Ku,useCacheRefresh:ap};ac.useEffectEvent=Xm;var rp={readContext:st,use:oo,useCallback:Pm,useContext:st,useEffect:Ju,useImperativeHandle:Qm,useInsertionEffect:Km,useLayoutEffect:Fm,useMemo:Jm,useReducer:Zu,useRef:Gm,useState:function(){return Zu(jn)},useDebugValue:Wu,useDeferredValue:function(e,t){var i=Ke();return Oe===null?Iu(i,e,t):Wm(i,Oe.memoizedState,e,t)},useTransition:function(){var e=Zu(jn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Nl(e),t]},useSyncExternalStore:Nm,useId:np,useHostTransitionStatus:tc,useFormState:qm,useActionState:qm,useOptimistic:function(e,t){var i=Ke();return Oe!==null?Rm(i,Oe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ku,useCacheRefresh:ap};rp.useEffectEvent=Xm;function ic(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:x({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var lc={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=_t(),r=Fn(s);r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,s),t!==null&&(Et(t,e,s),wl(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=_t(),r=Fn(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,s),t!==null&&(Et(t,e,s),wl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),s=Fn(i);s.tag=2,t!=null&&(s.callback=t),t=Zn(e,s,i),t!==null&&(Et(t,e,i),wl(t,e,i))}};function up(e,t,i,s,r,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,v):t.prototype&&t.prototype.isPureReactComponent?!pl(i,s)||!pl(r,c):!0}function cp(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&lc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=x({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function fp(e){Gs(e)}function dp(e){console.error(e)}function hp(e){Gs(e)}function ho(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function mp(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function sc(e,t,i){return i=Fn(i),i.tag=3,i.payload={element:null},i.callback=function(){ho(e,t)},i}function pp(e){return e=Fn(e),e.tag=3,e}function gp(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var c=s.value;e.payload=function(){return r(c)},e.callback=function(){mp(t,i,s)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){mp(t,i,s),typeof r!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function iS(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&xi(t,i,r,!0),i=Rt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?jo():i.alternate===null&&Ge===0&&(Ge=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Is?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Oc(e,s,r)),!1;case 22:return i.flags|=65536,s===Is?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Oc(e,s,r)),!1}throw Error(o(435,i.tag))}return Oc(e,s,r),jo(),!1}if(xe)return t=Rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==ju&&(e=Error(o(422),{cause:s}),yl(qt(e,i)))):(s!==ju&&(t=Error(o(423),{cause:s}),yl(qt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=qt(s,i),r=sc(e.stateNode,s,r),Vu(e,r),Ge!==4&&(Ge=2)),!1;var c=Error(o(520),{cause:s});if(c=qt(c,i),_l===null?_l=[c]:_l.push(c),Ge!==4&&(Ge=2),t===null)return!0;s=qt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=sc(i.stateNode,s,e),Vu(i,e),!1;case 1:if(t=i.type,c=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ea===null||!ea.has(c))))return i.flags|=65536,r&=-r,i.lanes|=r,r=pp(r),gp(r,e,i,s),Vu(i,r),!1}i=i.return}while(i!==null);return!1}var oc=Error(o(461)),Je=!1;function ot(e,t,i,s){t.child=e===null?bm(t,null,i,s):Va(t,e.child,i,s)}function vp(e,t,i,s,r){i=i.render;var c=t.ref;if("ref"in s){var v={};for(var b in s)b!=="ref"&&(v[b]=s[b])}else v=s;return za(t),s=qu(e,t,i,v,c,r),b=Gu(),e!==null&&!Je?(Yu(e,t,r),An(e,t,r)):(xe&&b&&wu(t),t.flags|=1,ot(e,t,s,r),t.child)}function yp(e,t,i,s,r){if(e===null){var c=i.type;return typeof c=="function"&&!bu(c)&&c.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=c,xp(e,t,c,s,r)):(e=Fs(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!pc(e,r)){var v=c.memoizedProps;if(i=i.compare,i=i!==null?i:pl,i(v,s)&&e.ref===t.ref)return An(e,t,r)}return t.flags|=1,e=bn(c,s),e.ref=t.ref,e.return=t,t.child=e}function xp(e,t,i,s,r){if(e!==null){var c=e.memoizedProps;if(pl(c,s)&&e.ref===t.ref)if(Je=!1,t.pendingProps=s=c,pc(e,r))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,An(e,t,r)}return rc(e,t,i,s,r)}function bp(e,t,i,s){var r=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~c}else s=0,t.child=null;return Sp(e,t,c,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Js(t,c!==null?c.cachePool:null),c!==null?wm(t,c):Uu(),Em(t);else return s=t.lanes=536870912,Sp(e,t,c!==null?c.baseLanes|i:i,i,s)}else c!==null?(Js(t,c.cachePool),wm(t,c),Pn(),t.memoizedState=null):(e!==null&&Js(t,null),Uu(),Pn());return ot(e,t,r,i),t.child}function Dl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sp(e,t,i,s,r){var c=zu();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:i,cachePool:c},e!==null&&Js(t,null),Uu(),Em(t),e!==null&&xi(e,t,s,!0),t.childLanes=r,null}function mo(e,t){return t=go({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tp(e,t,i){return Va(t,e.child,null,i),e=mo(t,t.pendingProps),e.flags|=2,Lt(t),t.memoizedState=null,e}function lS(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(xe){if(s.mode==="hidden")return e=mo(t,s),t.lanes=536870912,Dl(null,e);if(Hu(t),(e=_e)?(e=Lg(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:sn,overflow:on}:null,retryLane:536870912,hydrationErrors:null},i=lm(e),i.return=t,t.child=i,lt=t,_e=null)):e=null,e===null)throw Yn(t);return t.lanes=536870912,null}return mo(t,s)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if(Hu(t),r)if(t.flags&256)t.flags&=-257,t=Tp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Je||xi(e,t,i,!1),r=(i&e.childLanes)!==0,Je||r){if(s=Ve,s!==null&&(v=dh(s,i),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ca(e,v),Et(s,e,v),oc;jo(),t=Tp(e,t,i)}else e=c.treeContext,_e=Ft(v.nextSibling),lt=t,xe=!0,Gn=null,Xt=!1,e!==null&&rm(t,e),t=mo(t,s),t.flags|=4096;return t}return e=bn(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function po(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function rc(e,t,i,s,r){return za(t),i=qu(e,t,i,s,void 0,r),s=Gu(),e!==null&&!Je?(Yu(e,t,r),An(e,t,r)):(xe&&s&&wu(t),t.flags|=1,ot(e,t,i,r),t.child)}function wp(e,t,i,s,r,c){return za(t),t.updateQueue=null,i=Am(t,s,i,r),jm(e),s=Gu(),e!==null&&!Je?(Yu(e,t,c),An(e,t,c)):(xe&&s&&wu(t),t.flags|=1,ot(e,t,i,c),t.child)}function Ep(e,t,i,s,r){if(za(t),t.stateNode===null){var c=pi,v=i.contextType;typeof v=="object"&&v!==null&&(c=st(v)),c=new i(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=lc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},Lu(t),v=i.contextType,c.context=typeof v=="object"&&v!==null?st(v):pi,c.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(ic(t,i,v,s),c.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(v=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),v!==c.state&&lc.enqueueReplaceState(c,c.state,null),jl(t,s,c,r),El(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,j=Ua(i,b);c.props=j;var k=c.context,H=i.contextType;v=pi,typeof H=="object"&&H!==null&&(v=st(H));var G=i.getDerivedStateFromProps;H=typeof G=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,H||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||k!==v)&&cp(t,c,s,v),Kn=!1;var V=t.memoizedState;c.state=V,jl(t,s,c,r),El(),k=t.memoizedState,b||V!==k||Kn?(typeof G=="function"&&(ic(t,i,G,s),k=t.memoizedState),(j=Kn||up(t,i,j,s,V,k,v))?(H||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=k),c.props=s,c.state=k,c.context=v,s=j):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,ku(e,t),v=t.memoizedProps,H=Ua(i,v),c.props=H,G=t.pendingProps,V=c.context,k=i.contextType,j=pi,typeof k=="object"&&k!==null&&(j=st(k)),b=i.getDerivedStateFromProps,(k=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==G||V!==j)&&cp(t,c,s,j),Kn=!1,V=t.memoizedState,c.state=V,jl(t,s,c,r),El();var U=t.memoizedState;v!==G||V!==U||Kn||e!==null&&e.dependencies!==null&&Qs(e.dependencies)?(typeof b=="function"&&(ic(t,i,b,s),U=t.memoizedState),(H=Kn||up(t,i,H,s,V,U,j)||e!==null&&e.dependencies!==null&&Qs(e.dependencies))?(k||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,U,j),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,U,j)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=U),c.props=s,c.state=U,c.context=j,s=H):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),s=!1)}return c=s,po(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(t.child=Va(t,e.child,null,r),t.child=Va(t,null,i,r)):ot(e,t,i,r),t.memoizedState=c.state,e=t.child):e=An(e,t,r),e}function jp(e,t,i,s){return Da(),t.flags|=256,ot(e,t,i,s),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cc(e){return{baseLanes:e,cachePool:mm()}}function fc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Vt),e}function Ap(e,t,i){var s=t.pendingProps,r=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),v&&(r=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(r?Qn(t):Pn(),(e=_e)?(e=Lg(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:sn,overflow:on}:null,retryLane:536870912,hydrationErrors:null},i=lm(e),i.return=t,t.child=i,lt=t,_e=null)):e=null,e===null)throw Yn(t);return Fc(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,r?(Pn(),r=t.mode,b=go({mode:"hidden",children:b},r),s=Ma(s,r,i,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=cc(i),s.childLanes=fc(e,v,i),t.memoizedState=uc,Dl(null,s)):(Qn(t),dc(t,b))}var j=e.memoizedState;if(j!==null&&(b=j.dehydrated,b!==null)){if(c)t.flags&256?(Qn(t),t.flags&=-257,t=hc(e,t,i)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),b=s.fallback,r=t.mode,s=go({mode:"visible",children:s.children},r),b=Ma(b,r,i,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Va(t,e.child,null,i),s=t.child,s.memoizedState=cc(i),s.childLanes=fc(e,v,i),t.memoizedState=uc,t=Dl(null,s));else if(Qn(t),Fc(b)){if(v=b.nextSibling&&b.nextSibling.dataset,v)var k=v.dgst;v=k,s=Error(o(419)),s.stack="",s.digest=v,yl({value:s,source:null,stack:null}),t=hc(e,t,i)}else if(Je||xi(e,t,i,!1),v=(i&e.childLanes)!==0,Je||v){if(v=Ve,v!==null&&(s=dh(v,i),s!==0&&s!==j.retryLane))throw j.retryLane=s,Ca(e,s),Et(v,e,s),oc;Kc(b)||jo(),t=hc(e,t,i)}else Kc(b)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,_e=Ft(b.nextSibling),lt=t,xe=!0,Gn=null,Xt=!1,e!==null&&rm(t,e),t=dc(t,s.children),t.flags|=4096);return t}return r?(Pn(),b=s.fallback,r=t.mode,j=e.child,k=j.sibling,s=bn(j,{mode:"hidden",children:s.children}),s.subtreeFlags=j.subtreeFlags&65011712,k!==null?b=bn(k,b):(b=Ma(b,r,i,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,Dl(null,s),s=t.child,b=e.child.memoizedState,b===null?b=cc(i):(r=b.cachePool,r!==null?(j=Qe._currentValue,r=r.parent!==j?{parent:j,pool:j}:r):r=mm(),b={baseLanes:b.baseLanes|i,cachePool:r}),s.memoizedState=b,s.childLanes=fc(e,v,i),t.memoizedState=uc,Dl(e.child,s)):(Qn(t),i=e.child,e=i.sibling,i=bn(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=i,t.memoizedState=null,i)}function dc(e,t){return t=go({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function go(e,t){return e=zt(22,e,null,t),e.lanes=0,e}function hc(e,t,i){return Va(t,e.child,null,i),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Np(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Cu(e.return,t,i)}function mc(e,t,i,s,r,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=i,v.tailMode=r,v.treeForkCount=c)}function Cp(e,t,i){var s=t.pendingProps,r=s.revealOrder,c=s.tail;s=s.children;var v=Xe.current,b=(v&2)!==0;if(b?(v=v&1|2,t.flags|=128):v&=1,X(Xe,v),ot(e,t,s,i),s=xe?vl:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Np(e,i,t);else if(e.tag===19)Np(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&ao(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),mc(t,!1,r,i,c,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ao(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}mc(t,!0,i,null,c,s);break;case"together":mc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function An(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),In|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(xi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=bn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qs(e)))}function sS(e,t,i){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),Xn(t,Qe,e.memoizedState.cache),Da();break;case 27:case 5:nl(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:Xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Hu(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Qn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Ap(e,t,i):(Qn(t),e=An(e,t,i),e!==null?e.sibling:null);Qn(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(xi(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return Cp(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),X(Xe,Xe.current),s)break;return null;case 22:return t.lanes=0,bp(e,t,i,t.pendingProps);case 24:Xn(t,Qe,e.memoizedState.cache)}return An(e,t,i)}function Mp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!pc(e,i)&&(t.flags&128)===0)return Je=!1,sS(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,xe&&(t.flags&1048576)!==0&&om(t,vl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=La(t.elementType),t.type=e,typeof e=="function")bu(e)?(s=Ua(e,s),t.tag=1,t=Ep(null,t,e,s,i)):(t.tag=0,t=rc(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===z){t.tag=11,t=vp(null,t,e,s,i);break e}else if(r===Z){t.tag=14,t=yp(null,t,e,s,i);break e}}throw t=Ae(e)||e,Error(o(306,t,""))}}return t;case 0:return rc(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Ua(s,t.pendingProps),Ep(e,t,s,r,i);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));s=t.pendingProps;var c=t.memoizedState;r=c.element,ku(e,t),jl(t,s,null,i);var v=t.memoizedState;if(s=v.cache,Xn(t,Qe,s),s!==c.cache&&Mu(t,[Qe],i,!0),El(),s=v.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=jp(e,t,s,i);break e}else if(s!==r){r=qt(Error(o(424)),t),yl(r),t=jp(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_e=Ft(e.firstChild),lt=t,xe=!0,Gn=null,Xt=!0,i=bm(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Da(),s===r){t=An(e,t,i);break e}ot(e,t,s,i)}t=t.child}return t;case 26:return po(e,t),e===null?(i=Hg(t.type,null,t.pendingProps,null))?t.memoizedState=i:xe||(i=t.type,e=t.pendingProps,s=zo(me.current).createElement(i),s[it]=t,s[yt]=e,rt(s,i,e),nt(s),t.stateNode=s):t.memoizedState=Hg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return nl(t),e===null&&xe&&(s=t.stateNode=_g(t.type,t.pendingProps,me.current),lt=t,Xt=!0,r=_e,ia(t.type)?(Zc=r,_e=Ft(s.firstChild)):_e=r),ot(e,t,t.pendingProps.children,i),po(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((r=s=_e)&&(s=VS(s,t.type,t.pendingProps,Xt),s!==null?(t.stateNode=s,lt=t,_e=Ft(s.firstChild),Xt=!1,r=!0):r=!1),r||Yn(t)),nl(t),r=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,s=c.children,Gc(r,c)?s=null:v!==null&&Gc(r,v)&&(t.flags|=32),t.memoizedState!==null&&(r=qu(e,t,J1,null,null,i),Xl._currentValue=r),po(e,t),ot(e,t,s,i),t.child;case 6:return e===null&&xe&&((e=i=_e)&&(i=_S(i,t.pendingProps,Xt),i!==null?(t.stateNode=i,lt=t,_e=null,e=!0):e=!1),e||Yn(t)),null;case 13:return Ap(e,t,i);case 4:return Ze(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Va(t,null,s,i):ot(e,t,s,i),t.child;case 11:return vp(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Xn(t,t.type,s.value),ot(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,za(t),r=st(r),s=s(r),t.flags|=1,ot(e,t,s,i),t.child;case 14:return yp(e,t,t.type,t.pendingProps,i);case 15:return xp(e,t,t.type,t.pendingProps,i);case 19:return Cp(e,t,i);case 31:return lS(e,t,i);case 22:return bp(e,t,i,t.pendingProps);case 24:return za(t),s=st(Qe),e===null?(r=zu(),r===null&&(r=Ve,c=Du(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=i),r=c),t.memoizedState={parent:s,cache:r},Lu(t),Xn(t,Qe,r)):((e.lanes&i)!==0&&(ku(e,t),jl(t,null,null,i),El()),r=e.memoizedState,c=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Xn(t,Qe,s)):(s=c.cache,Xn(t,Qe,s),s!==r.cache&&Mu(t,[Qe],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Nn(e){e.flags|=4}function gc(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(ng())e.flags|=8192;else throw ka=Is,Ru}else e.flags&=-16777217}function Dp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Xg(t))if(ng())e.flags|=8192;else throw ka=Is,Ru}function vo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?uh():536870912,e.lanes|=t,Oi|=t)}function Ol(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function oS(e,t,i){var s=t.pendingProps;switch(Eu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),wn(Qe),ke(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(yi(t)?Nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Au())),Ue(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(Nn(t),c!==null?(Ue(t),Dp(t,c)):(Ue(t),gc(t,r,null,s,i))):c?c!==e.memoizedState?(Nn(t),Ue(t),Dp(t,c)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Nn(t),Ue(t),gc(t,r,e,s,i)),null;case 27:if(Ns(t),i=me.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}e=W.current,yi(t)?um(t):(e=_g(r,s,i),t.stateNode=e,Nn(t))}return Ue(t),null;case 5:if(Ns(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}if(c=W.current,yi(t))um(t);else{var v=zo(me.current);switch(c){case 1:c=v.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=v.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=v.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=v.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=v.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?v.createElement(r,{is:s.is}):v.createElement(r)}}c[it]=t,c[yt]=s;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)c.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=c;e:switch(rt(c,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Nn(t)}}return Ue(t),gc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,yi(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=lt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[it]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Ag(e.nodeValue,i)),e||Yn(t,!0)}else e=zo(e).createTextNode(s),e[it]=t,t.stateNode=e}return Ue(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=yi(t),i!==null){if(e===null){if(!s)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[it]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else i=Au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Lt(t),t):(Lt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ue(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=yi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[it]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),r=!1}else r=Au(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Lt(t),t):(Lt(t),null)}return Lt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),vo(t,t.updateQueue),Ue(t),null);case 4:return ke(),e===null&&Uc(t.stateNode.containerInfo),Ue(t),null;case 10:return wn(t.type),Ue(t),null;case 19:if(q(Xe),s=t.memoizedState,s===null)return Ue(t),null;if(r=(t.flags&128)!==0,c=s.rendering,c===null)if(r)Ol(s,!1);else{if(Ge!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=ao(e),c!==null){for(t.flags|=128,Ol(s,!1),e=c.updateQueue,t.updateQueue=e,vo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)im(i,e),i=i.sibling;return X(Xe,Xe.current&1|2),xe&&Sn(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ct()>To&&(t.flags|=128,r=!0,Ol(s,!1),t.lanes=4194304)}else{if(!r)if(e=ao(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,vo(t,e),Ol(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!xe)return Ue(t),null}else 2*Ct()-s.renderingStartTime>To&&i!==536870912&&(t.flags|=128,r=!0,Ol(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ct(),e.sibling=null,i=Xe.current,X(Xe,r?i&1|2:i&1),xe&&Sn(t,s.treeForkCount),e):(Ue(t),null);case 22:case 23:return Lt(t),Bu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),i=t.updateQueue,i!==null&&vo(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&q(Ra),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),wn(Qe),Ue(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function rS(e,t){switch(Eu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wn(Qe),ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ns(t),null;case 31:if(t.memoizedState!==null){if(Lt(t),t.alternate===null)throw Error(o(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Lt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(Xe),null;case 4:return ke(),null;case 10:return wn(t.type),null;case 22:case 23:return Lt(t),Bu(),e!==null&&q(Ra),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return wn(Qe),null;case 25:return null;default:return null}}function Op(e,t){switch(Eu(t),t.tag){case 3:wn(Qe),ke();break;case 26:case 27:case 5:Ns(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Lt(t);break;case 13:Lt(t);break;case 19:q(Xe);break;case 10:wn(t.type);break;case 22:case 23:Lt(t),Bu(),e!==null&&q(Ra);break;case 24:wn(Qe)}}function zl(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var c=i.create,v=i.inst;s=c(),v.destroy=s}i=i.next}while(i!==r)}}catch(b){Me(t,t.return,b)}}function Jn(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var c=r.next;s=c;do{if((s.tag&e)===e){var v=s.inst,b=v.destroy;if(b!==void 0){v.destroy=void 0,r=t;var j=i,k=b;try{k()}catch(H){Me(r,j,H)}}}s=s.next}while(s!==c)}}catch(H){Me(t,t.return,H)}}function zp(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Tm(t,i)}catch(s){Me(e,e.return,s)}}}function Rp(e,t,i){i.props=Ua(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Me(e,t,s)}}function Rl(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Me(e,t,r)}}function rn(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Me(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){Me(e,t,r)}else i.current=null}function Lp(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){Me(e,e.return,r)}}function vc(e,t,i){try{var s=e.stateNode;DS(s,e.type,i,t),s[yt]=t}catch(r){Me(e,e.return,r)}}function kp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ia(e.type)||e.tag===4}function yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ia(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xc(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=yn));else if(s!==4&&(s===27&&ia(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(xc(e,t,i),e=e.sibling;e!==null;)xc(e,t,i),e=e.sibling}function yo(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ia(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(yo(e,t,i),e=e.sibling;e!==null;)yo(e,t,i),e=e.sibling}function Vp(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);rt(t,s,i),t[it]=e,t[yt]=i}catch(c){Me(e,e.return,c)}}var Cn=!1,We=!1,bc=!1,_p=typeof WeakSet=="function"?WeakSet:Set,at=null;function uS(e,t){if(e=e.containerInfo,$c=Bo,e=Qh(e),hu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{i.nodeType,c.nodeType}catch{i=null;break e}var v=0,b=-1,j=-1,k=0,H=0,G=e,V=null;t:for(;;){for(var U;G!==i||r!==0&&G.nodeType!==3||(b=v+r),G!==c||s!==0&&G.nodeType!==3||(j=v+s),G.nodeType===3&&(v+=G.nodeValue.length),(U=G.firstChild)!==null;)V=G,G=U;for(;;){if(G===e)break t;if(V===i&&++k===r&&(b=v),V===c&&++H===s&&(j=v),(U=G.nextSibling)!==null)break;G=V,V=G.parentNode}G=U}i=b===-1||j===-1?null:{start:b,end:j}}else i=null}i=i||{start:0,end:0}}else i=null;for(qc={focusedElem:e,selectionRange:i},Bo=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){switch(t=at,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,i=t,r=c.memoizedProps,c=c.memoizedState,s=i.stateNode;try{var ee=Ua(i.type,r);e=s.getSnapshotBeforeUpdate(ee,c),s.__reactInternalSnapshotBeforeUpdate=e}catch(se){Me(i,i.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Xc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}}function Up(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Dn(e,i),s&4&&zl(5,i);break;case 1:if(Dn(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(v){Me(i,i.return,v)}else{var r=Ua(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Me(i,i.return,v)}}s&64&&zp(i),s&512&&Rl(i,i.return);break;case 3:if(Dn(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Tm(e,t)}catch(v){Me(i,i.return,v)}}break;case 27:t===null&&s&4&&Vp(i);case 26:case 5:Dn(e,i),t===null&&s&4&&Lp(i),s&512&&Rl(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),s&4&&$p(e,i);break;case 13:Dn(e,i),s&4&&qp(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=yS.bind(null,i),US(e,i))));break;case 22:if(s=i.memoizedState!==null||Cn,!s){t=t!==null&&t.memoizedState!==null||We,r=Cn;var c=We;Cn=s,(We=t)&&!c?On(e,i,(i.subtreeFlags&8772)!==0):Dn(e,i),Cn=r,We=c}break;case 30:break;default:Dn(e,i)}}function Bp(e){var t=e.alternate;t!==null&&(e.alternate=null,Bp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,bt=!1;function Mn(e,t,i){for(i=i.child;i!==null;)Hp(e,t,i),i=i.sibling}function Hp(e,t,i){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(al,i)}catch{}switch(i.tag){case 26:We||rn(i,t),Mn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:We||rn(i,t);var s=He,r=bt;ia(i.type)&&(He=i.stateNode,bt=!1),Mn(e,t,i),ql(i.stateNode),He=s,bt=r;break;case 5:We||rn(i,t);case 6:if(s=He,r=bt,He=null,Mn(e,t,i),He=s,bt=r,He!==null)if(bt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(i.stateNode)}catch(c){Me(i,t,c)}else try{He.removeChild(i.stateNode)}catch(c){Me(i,t,c)}break;case 18:He!==null&&(bt?(e=He,zg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):zg(He,i.stateNode));break;case 4:s=He,r=bt,He=i.stateNode.containerInfo,bt=!0,Mn(e,t,i),He=s,bt=r;break;case 0:case 11:case 14:case 15:Jn(2,i,t),We||Jn(4,i,t),Mn(e,t,i);break;case 1:We||(rn(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Rp(i,t,s)),Mn(e,t,i);break;case 21:Mn(e,t,i);break;case 22:We=(s=We)||i.memoizedState!==null,Mn(e,t,i),We=s;break;default:Mn(e,t,i)}}function $p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bi(e)}catch(i){Me(t,t.return,i)}}}function qp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bi(e)}catch(i){Me(t,t.return,i)}}function cS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _p),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _p),t;default:throw Error(o(435,e.tag))}}function xo(e,t){var i=cS(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=xS.bind(null,e,s);s.then(r,r)}})}function St(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],c=e,v=t,b=v;e:for(;b!==null;){switch(b.tag){case 27:if(ia(b.type)){He=b.stateNode,bt=!1;break e}break;case 5:He=b.stateNode,bt=!1;break e;case 3:case 4:He=b.stateNode.containerInfo,bt=!0;break e}b=b.return}if(He===null)throw Error(o(160));Hp(c,v,r),He=null,bt=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Gp(t,e),t=t.sibling}var It=null;function Gp(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),Tt(e),s&4&&(Jn(3,e,e.return),zl(3,e),Jn(5,e,e.return));break;case 1:St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),s&64&&Cn&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=It;if(St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),s&4){var c=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":c=r.getElementsByTagName("title")[0],(!c||c[sl]||c[it]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(s),r.head.insertBefore(c,r.querySelector("head > title"))),rt(c,s,i),c[it]=e,nt(c),s=c;break e;case"link":var v=Gg("link","href",r).get(s+(i.href||""));if(v){for(var b=0;b<v.length;b++)if(c=v[b],c.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&c.getAttribute("rel")===(i.rel==null?null:i.rel)&&c.getAttribute("title")===(i.title==null?null:i.title)&&c.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(b,1);break t}}c=r.createElement(s),rt(c,s,i),r.head.appendChild(c);break;case"meta":if(v=Gg("meta","content",r).get(s+(i.content||""))){for(b=0;b<v.length;b++)if(c=v[b],c.getAttribute("content")===(i.content==null?null:""+i.content)&&c.getAttribute("name")===(i.name==null?null:i.name)&&c.getAttribute("property")===(i.property==null?null:i.property)&&c.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&c.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(b,1);break t}}c=r.createElement(s),rt(c,s,i),r.head.appendChild(c);break;default:throw Error(o(468,s))}c[it]=e,nt(c),s=c}e.stateNode=s}else Yg(r,e.type,e.stateNode);else e.stateNode=qg(r,s,e.memoizedProps);else c!==s?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,s===null?Yg(r,e.type,e.stateNode):qg(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&vc(e,e.memoizedProps,i.memoizedProps)}break;case 27:St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),i!==null&&s&4&&vc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(St(t,e),Tt(e),s&512&&(We||i===null||rn(i,i.return)),e.flags&32){r=e.stateNode;try{ri(r,"")}catch(ee){Me(e,e.return,ee)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,vc(e,r,i!==null?i.memoizedProps:r)),s&1024&&(bc=!0);break;case 6:if(St(t,e),Tt(e),s&4){if(e.stateNode===null)throw Error(o(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ee){Me(e,e.return,ee)}}break;case 3:if(ko=null,r=It,It=Ro(t.containerInfo),St(t,e),It=r,Tt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(ee){Me(e,e.return,ee)}bc&&(bc=!1,Yp(e));break;case 4:s=It,It=Ro(e.stateNode.containerInfo),St(t,e),Tt(e),It=s;break;case 12:St(t,e),Tt(e);break;case 31:St(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,xo(e,s)));break;case 13:St(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(So=Ct()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,xo(e,s)));break;case 22:r=e.memoizedState!==null;var j=i!==null&&i.memoizedState!==null,k=Cn,H=We;if(Cn=k||r,We=H||j,St(t,e),We=H,Cn=k,Tt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||j||Cn||We||Ba(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){j=i=t;try{if(c=j.stateNode,r)v=c.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{b=j.stateNode;var G=j.memoizedProps.style,V=G!=null&&G.hasOwnProperty("display")?G.display:null;b.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(ee){Me(j,j.return,ee)}}}else if(t.tag===6){if(i===null){j=t;try{j.stateNode.nodeValue=r?"":j.memoizedProps}catch(ee){Me(j,j.return,ee)}}}else if(t.tag===18){if(i===null){j=t;try{var U=j.stateNode;r?Rg(U,!0):Rg(j.stateNode,!1)}catch(ee){Me(j,j.return,ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,xo(e,i))));break;case 19:St(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,xo(e,s)));break;case 30:break;case 21:break;default:St(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(kp(s)){i=s;break}s=s.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var r=i.stateNode,c=yc(e);yo(e,c,r);break;case 5:var v=i.stateNode;i.flags&32&&(ri(v,""),i.flags&=-33);var b=yc(e);yo(e,b,v);break;case 3:case 4:var j=i.stateNode.containerInfo,k=yc(e);xc(e,k,j);break;default:throw Error(o(161))}}catch(H){Me(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Yp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Up(e,t.alternate,t),t=t.sibling}function Ba(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jn(4,t,t.return),Ba(t);break;case 1:rn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Rp(t,t.return,i),Ba(t);break;case 27:ql(t.stateNode);case 26:case 5:rn(t,t.return),Ba(t);break;case 22:t.memoizedState===null&&Ba(t);break;case 30:Ba(t);break;default:Ba(t)}e=e.sibling}}function On(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:On(r,c,i),zl(4,c);break;case 1:if(On(r,c,i),s=c,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(k){Me(s,s.return,k)}if(s=c,r=s.updateQueue,r!==null){var b=s.stateNode;try{var j=r.shared.hiddenCallbacks;if(j!==null)for(r.shared.hiddenCallbacks=null,r=0;r<j.length;r++)Sm(j[r],b)}catch(k){Me(s,s.return,k)}}i&&v&64&&zp(c),Rl(c,c.return);break;case 27:Vp(c);case 26:case 5:On(r,c,i),i&&s===null&&v&4&&Lp(c),Rl(c,c.return);break;case 12:On(r,c,i);break;case 31:On(r,c,i),i&&v&4&&$p(r,c);break;case 13:On(r,c,i),i&&v&4&&qp(r,c);break;case 22:c.memoizedState===null&&On(r,c,i),Rl(c,c.return);break;case 30:break;default:On(r,c,i)}t=t.sibling}}function Sc(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&xl(i))}function Tc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xl(e))}function en(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Xp(e,t,i,s),t=t.sibling}function Xp(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,i,s),r&2048&&zl(9,t);break;case 1:en(e,t,i,s);break;case 3:en(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xl(e)));break;case 12:if(r&2048){en(e,t,i,s),e=t.stateNode;try{var c=t.memoizedProps,v=c.id,b=c.onPostCommit;typeof b=="function"&&b(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Me(t,t.return,j)}}else en(e,t,i,s);break;case 31:en(e,t,i,s);break;case 13:en(e,t,i,s);break;case 23:break;case 22:c=t.stateNode,v=t.alternate,t.memoizedState!==null?c._visibility&2?en(e,t,i,s):Ll(e,t):c._visibility&2?en(e,t,i,s):(c._visibility|=2,Ci(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Sc(v,t);break;case 24:en(e,t,i,s),r&2048&&Tc(t.alternate,t);break;default:en(e,t,i,s)}}function Ci(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,v=t,b=i,j=s,k=v.flags;switch(v.tag){case 0:case 11:case 15:Ci(c,v,b,j,r),zl(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?Ci(c,v,b,j,r):Ll(c,v):(H._visibility|=2,Ci(c,v,b,j,r)),r&&k&2048&&Sc(v.alternate,v);break;case 24:Ci(c,v,b,j,r),r&&k&2048&&Tc(v.alternate,v);break;default:Ci(c,v,b,j,r)}t=t.sibling}}function Ll(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Ll(i,s),r&2048&&Sc(s.alternate,s);break;case 24:Ll(i,s),r&2048&&Tc(s.alternate,s);break;default:Ll(i,s)}t=t.sibling}}var kl=8192;function Mi(e,t,i){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)Kp(e,t,i),e=e.sibling}function Kp(e,t,i){switch(e.tag){case 26:Mi(e,t,i),e.flags&kl&&e.memoizedState!==null&&PS(i,It,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,t,i);break;case 3:case 4:var s=It;It=Ro(e.stateNode.containerInfo),Mi(e,t,i),It=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=kl,kl=16777216,Mi(e,t,i),kl=s):Mi(e,t,i));break;default:Mi(e,t,i)}}function Fp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];at=s,Qp(s,e)}Fp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zp(e),e=e.sibling}function Zp(e){switch(e.tag){case 0:case 11:case 15:Vl(e),e.flags&2048&&Jn(9,e,e.return);break;case 3:Vl(e);break;case 12:Vl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bo(e)):Vl(e);break;default:Vl(e)}}function bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];at=s,Qp(s,e)}Fp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),bo(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,bo(t));break;default:bo(t)}e=e.sibling}}function Qp(e,t){for(;at!==null;){var i=at;switch(i.tag){case 0:case 11:case 15:Jn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:xl(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,at=s;else e:for(i=e;at!==null;){s=at;var r=s.sibling,c=s.return;if(Bp(s),s===i){at=null;break e}if(r!==null){r.return=c,at=r;break e}at=c}}}var fS={getCacheForType:function(e){var t=st(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return st(Qe).controller.signal}},dS=typeof WeakMap=="function"?WeakMap:Map,je=0,Ve=null,pe=null,ve=0,Ce=0,kt=null,Wn=!1,Di=!1,wc=!1,zn=0,Ge=0,In=0,Ha=0,Ec=0,Vt=0,Oi=0,_l=null,wt=null,jc=!1,So=0,Pp=0,To=1/0,wo=null,ea=null,et=0,ta=null,zi=null,Rn=0,Ac=0,Nc=null,Jp=null,Ul=0,Cc=null;function _t(){return(je&2)!==0&&ve!==0?ve&-ve:B.T!==null?Lc():hh()}function Wp(){if(Vt===0)if((ve&536870912)===0||xe){var e=Ds;Ds<<=1,(Ds&3932160)===0&&(Ds=262144),Vt=e}else Vt=536870912;return e=Rt.current,e!==null&&(e.flags|=32),Vt}function Et(e,t,i){(e===Ve&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ri(e,0),na(e,ve,Vt,!1)),ll(e,i),((je&2)===0||e!==Ve)&&(e===Ve&&((je&2)===0&&(Ha|=i),Ge===4&&na(e,ve,Vt,!1)),un(e))}function Ip(e,t,i){if((je&6)!==0)throw Error(o(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||il(e,t),r=s?pS(e,t):Dc(e,t,!0),c=s;do{if(r===0){Di&&!s&&na(e,t,0,!1);break}else{if(i=e.current.alternate,c&&!hS(i)){r=Dc(e,t,!1),c=!1;continue}if(r===2){if(c=t,e.errorRecoveryDisabledLanes&c)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var b=e;r=_l;var j=b.current.memoizedState.isDehydrated;if(j&&(Ri(b,v).flags|=256),v=Dc(b,v,!1),v!==2){if(wc&&!j){b.errorRecoveryDisabledLanes|=c,Ha|=c,r=4;break e}c=wt,wt=r,c!==null&&(wt===null?wt=c:wt.push.apply(wt,c))}r=v}if(c=!1,r!==2)continue}}if(r===1){Ri(e,0),na(e,t,0,!0);break}e:{switch(s=e,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:na(s,t,Vt,!Wn);break e;case 2:wt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=So+300-Ct(),10<r)){if(na(s,t,Vt,!Wn),zs(s,0,!0)!==0)break e;Rn=t,s.timeoutHandle=Dg(eg.bind(null,s,i,wt,wo,jc,t,Vt,Ha,Oi,Wn,c,"Throttled",-0,0),r);break e}eg(s,i,wt,wo,jc,t,Vt,Ha,Oi,Wn,c,null,-0,0)}}break}while(!0);un(e)}function eg(e,t,i,s,r,c,v,b,j,k,H,G,V,U){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yn},Kp(t,c,G);var ee=(c&62914560)===c?So-Ct():(c&4194048)===c?Pp-Ct():0;if(ee=JS(G,ee),ee!==null){Rn=c,e.cancelPendingCommit=ee(rg.bind(null,e,t,c,i,s,r,v,b,j,H,G,null,V,U)),na(e,c,v,!k);return}}rg(e,t,c,i,s,r,v,b,j)}function hS(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],c=r.getSnapshot;r=r.value;try{if(!Ot(c(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function na(e,t,i,s){t&=~Ec,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var c=31-Dt(r),v=1<<c;s[c]=-1,r&=~v}i!==0&&ch(e,i,t)}function Eo(){return(je&6)===0?(Bl(0),!1):!0}function Mc(){if(pe!==null){if(Ce===0)var e=pe.return;else e=pe,Tn=Oa=null,Xu(e),wi=null,Sl=0,e=pe;for(;e!==null;)Op(e.alternate,e),e=e.return;pe=null}}function Ri(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,RS(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Rn=0,Mc(),Ve=e,pe=i=bn(e.current,null),ve=t,Ce=0,kt=null,Wn=!1,Di=il(e,t),wc=!1,Oi=Vt=Ec=Ha=In=Ge=0,wt=_l=null,jc=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Dt(s),c=1<<r;t|=e[r],s&=~c}return zn=t,Ys(),i}function tg(e,t){fe=null,B.H=Ml,t===Ti||t===Ws?(t=vm(),Ce=3):t===Ru?(t=vm(),Ce=4):Ce=t===oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,kt=t,pe===null&&(Ge=1,ho(e,qt(t,e.current)))}function ng(){var e=Rt.current;return e===null?!0:(ve&4194048)===ve?Kt===null:(ve&62914560)===ve||(ve&536870912)!==0?e===Kt:!1}function ag(){var e=B.H;return B.H=Ml,e===null?Ml:e}function ig(){var e=B.A;return B.A=fS,e}function jo(){Ge=4,Wn||(ve&4194048)!==ve&&Rt.current!==null||(Di=!0),(In&134217727)===0&&(Ha&134217727)===0||Ve===null||na(Ve,ve,Vt,!1)}function Dc(e,t,i){var s=je;je|=2;var r=ag(),c=ig();(Ve!==e||ve!==t)&&(wo=null,Ri(e,t)),t=!1;var v=Ge;e:do try{if(Ce!==0&&pe!==null){var b=pe,j=kt;switch(Ce){case 8:Mc(),v=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var k=Ce;if(Ce=0,kt=null,Li(e,b,j,k),i&&Di){v=0;break e}break;default:k=Ce,Ce=0,kt=null,Li(e,b,j,k)}}mS(),v=Ge;break}catch(H){tg(e,H)}while(!0);return t&&e.shellSuspendCounter++,Tn=Oa=null,je=s,B.H=r,B.A=c,pe===null&&(Ve=null,ve=0,Ys()),v}function mS(){for(;pe!==null;)lg(pe)}function pS(e,t){var i=je;je|=2;var s=ag(),r=ig();Ve!==e||ve!==t?(wo=null,To=Ct()+500,Ri(e,t)):Di=il(e,t);e:do try{if(Ce!==0&&pe!==null){t=pe;var c=kt;t:switch(Ce){case 1:Ce=0,kt=null,Li(e,t,c,1);break;case 2:case 9:if(pm(c)){Ce=0,kt=null,sg(t);break}t=function(){Ce!==2&&Ce!==9||Ve!==e||(Ce=7),un(e)},c.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:pm(c)?(Ce=0,kt=null,sg(t)):(Ce=0,kt=null,Li(e,t,c,7));break;case 5:var v=null;switch(pe.tag){case 26:v=pe.memoizedState;case 5:case 27:var b=pe;if(v?Xg(v):b.stateNode.complete){Ce=0,kt=null;var j=b.sibling;if(j!==null)pe=j;else{var k=b.return;k!==null?(pe=k,Ao(k)):pe=null}break t}}Ce=0,kt=null,Li(e,t,c,5);break;case 6:Ce=0,kt=null,Li(e,t,c,6);break;case 8:Mc(),Ge=6;break e;default:throw Error(o(462))}}gS();break}catch(H){tg(e,H)}while(!0);return Tn=Oa=null,B.H=s,B.A=r,je=i,pe!==null?0:(Ve=null,ve=0,Ys(),Ge)}function gS(){for(;pe!==null&&!Bb();)lg(pe)}function lg(e){var t=Mp(e.alternate,e,zn);e.memoizedProps=e.pendingProps,t===null?Ao(e):pe=t}function sg(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=wp(i,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=wp(i,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:Xu(t);default:Op(i,t),t=pe=im(t,zn),t=Mp(i,t,zn)}e.memoizedProps=e.pendingProps,t===null?Ao(e):pe=t}function Li(e,t,i,s){Tn=Oa=null,Xu(t),wi=null,Sl=0;var r=t.return;try{if(iS(e,r,t,i,ve)){Ge=1,ho(e,qt(i,e.current)),pe=null;return}}catch(c){if(r!==null)throw pe=r,c;Ge=1,ho(e,qt(i,e.current)),pe=null;return}t.flags&32768?(xe||s===1?e=!0:Di||(ve&536870912)!==0?e=!1:(Wn=e=!0,(s===2||s===9||s===3||s===6)&&(s=Rt.current,s!==null&&s.tag===13&&(s.flags|=16384))),og(t,e)):Ao(t)}function Ao(e){var t=e;do{if((t.flags&32768)!==0){og(t,Wn);return}e=t.return;var i=oS(t.alternate,t,zn);if(i!==null){pe=i;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);Ge===0&&(Ge=5)}function og(e,t){do{var i=rS(e.alternate,e);if(i!==null){i.flags&=32767,pe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){pe=e;return}pe=e=i}while(e!==null);Ge=6,pe=null}function rg(e,t,i,s,r,c,v,b,j){e.cancelPendingCommit=null;do No();while(et!==0);if((je&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=yu,Qb(e,i,c,v,b,j),e===Ve&&(pe=Ve=null,ve=0),zi=t,ta=e,Rn=i,Ac=c,Nc=r,Jp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,bS(Cs,function(){return hg(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,r=Q.p,Q.p=2,v=je,je|=4;try{uS(e,t,i)}finally{je=v,Q.p=r,B.T=s}}et=1,ug(),cg(),fg()}}function ug(){if(et===1){et=0;var e=ta,t=zi,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var s=Q.p;Q.p=2;var r=je;je|=4;try{Gp(t,e);var c=qc,v=Qh(e.containerInfo),b=c.focusedElem,j=c.selectionRange;if(v!==b&&b&&b.ownerDocument&&Zh(b.ownerDocument.documentElement,b)){if(j!==null&&hu(b)){var k=j.start,H=j.end;if(H===void 0&&(H=k),"selectionStart"in b)b.selectionStart=k,b.selectionEnd=Math.min(H,b.value.length);else{var G=b.ownerDocument||document,V=G&&G.defaultView||window;if(V.getSelection){var U=V.getSelection(),ee=b.textContent.length,se=Math.min(j.start,ee),Re=j.end===void 0?se:Math.min(j.end,ee);!U.extend&&se>Re&&(v=Re,Re=se,se=v);var O=Fh(b,se),N=Fh(b,Re);if(O&&N&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==N.node||U.focusOffset!==N.offset)){var L=G.createRange();L.setStart(O.node,O.offset),U.removeAllRanges(),se>Re?(U.addRange(L),U.extend(N.node,N.offset)):(L.setEnd(N.node,N.offset),U.addRange(L))}}}}for(G=[],U=b;U=U.parentNode;)U.nodeType===1&&G.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<G.length;b++){var $=G[b];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}Bo=!!$c,qc=$c=null}finally{je=r,Q.p=s,B.T=i}}e.current=t,et=2}}function cg(){if(et===2){et=0;var e=ta,t=zi,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var s=Q.p;Q.p=2;var r=je;je|=4;try{Up(e,t.alternate,t)}finally{je=r,Q.p=s,B.T=i}}et=3}}function fg(){if(et===4||et===3){et=0,Hb();var e=ta,t=zi,i=Rn,s=Jp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,zi=ta=null,dg(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ea=null),Zr(i),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(al,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=B.T,r=Q.p,Q.p=2,B.T=null;try{for(var c=e.onRecoverableError,v=0;v<s.length;v++){var b=s[v];c(b.value,{componentStack:b.stack})}}finally{B.T=t,Q.p=r}}(Rn&3)!==0&&No(),un(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Cc?Ul++:(Ul=0,Cc=e):Ul=0,Bl(0)}}function dg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xl(t)))}function No(){return ug(),cg(),fg(),hg()}function hg(){if(et!==5)return!1;var e=ta,t=Ac;Ac=0;var i=Zr(Rn),s=B.T,r=Q.p;try{Q.p=32>i?32:i,B.T=null,i=Nc,Nc=null;var c=ta,v=Rn;if(et=0,zi=ta=null,Rn=0,(je&6)!==0)throw Error(o(331));var b=je;if(je|=4,Zp(c.current),Xp(c,c.current,v,i),je=b,Bl(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(al,c)}catch{}return!0}finally{Q.p=r,B.T=s,dg(e,t)}}function mg(e,t,i){t=qt(i,t),t=sc(e.stateNode,t,2),e=Zn(e,t,2),e!==null&&(ll(e,2),un(e))}function Me(e,t,i){if(e.tag===3)mg(e,e,i);else for(;t!==null;){if(t.tag===3){mg(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ea===null||!ea.has(s))){e=qt(i,e),i=pp(2),s=Zn(t,i,2),s!==null&&(gp(i,s,t,e),ll(s,2),un(s));break}}t=t.return}}function Oc(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new dS;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(wc=!0,r.add(i),e=vS.bind(null,e,t,i),t.then(e,e))}function vS(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ve===e&&(ve&i)===i&&(Ge===4||Ge===3&&(ve&62914560)===ve&&300>Ct()-So?(je&2)===0&&Ri(e,0):Ec|=i,Oi===ve&&(Oi=0)),un(e)}function pg(e,t){t===0&&(t=uh()),e=Ca(e,t),e!==null&&(ll(e,t),un(e))}function yS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),pg(e,i)}function xS(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(t),pg(e,i)}function bS(e,t){return Yr(e,t)}var Co=null,ki=null,zc=!1,Mo=!1,Rc=!1,aa=0;function un(e){e!==ki&&e.next===null&&(ki===null?Co=ki=e:ki=ki.next=e),Mo=!0,zc||(zc=!0,TS())}function Bl(e,t){if(!Rc&&Mo){Rc=!0;do for(var i=!1,s=Co;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var c=0;else{var v=s.suspendedLanes,b=s.pingedLanes;c=(1<<31-Dt(42|e)+1)-1,c&=r&~(v&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(i=!0,xg(s,c))}else c=ve,c=zs(s,s===Ve?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||il(s,c)||(i=!0,xg(s,c));s=s.next}while(i);Rc=!1}}function SS(){gg()}function gg(){Mo=zc=!1;var e=0;aa!==0&&zS()&&(e=aa);for(var t=Ct(),i=null,s=Co;s!==null;){var r=s.next,c=vg(s,t);c===0?(s.next=null,i===null?Co=r:i.next=r,r===null&&(ki=i)):(i=s,(e!==0||(c&3)!==0)&&(Mo=!0)),s=r}et!==0&&et!==5||Bl(e),aa!==0&&(aa=0)}function vg(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Dt(c),b=1<<v,j=r[v];j===-1?((b&i)===0||(b&s)!==0)&&(r[v]=Zb(b,t)):j<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ve,i=ve,i=zs(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Xr(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||il(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Xr(s),Zr(i)){case 2:case 8:i=oh;break;case 32:i=Cs;break;case 268435456:i=rh;break;default:i=Cs}return s=yg.bind(null,e),i=Yr(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Xr(s),e.callbackPriority=2,e.callbackNode=null,2}function yg(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(No()&&e.callbackNode!==i)return null;var s=ve;return s=zs(e,e===Ve?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ip(e,s,t),vg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?yg.bind(null,e):null)}function xg(e,t){if(No())return null;Ip(e,t,!0)}function TS(){LS(function(){(je&6)!==0?Yr(sh,SS):gg()})}function Lc(){if(aa===0){var e=bi;e===0&&(e=Ms,Ms<<=1,(Ms&261888)===0&&(Ms=256)),aa=e}return aa}function bg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vs(""+e)}function Sg(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function wS(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var c=bg((r[yt]||null).action),v=s.submitter;v&&(t=(t=v[yt]||null)?bg(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var b=new Hs("action","action",null,s,r);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(aa!==0){var j=v?Sg(r,v):new FormData(r);ec(i,{pending:!0,data:j,method:r.method,action:c},null,j)}}else typeof c=="function"&&(b.preventDefault(),j=v?Sg(r,v):new FormData(r),ec(i,{pending:!0,data:j,method:r.method,action:c},c,j))},currentTarget:r}]})}}for(var kc=0;kc<vu.length;kc++){var Vc=vu[kc],ES=Vc.toLowerCase(),jS=Vc[0].toUpperCase()+Vc.slice(1);Wt(ES,"on"+jS)}Wt(Wh,"onAnimationEnd"),Wt(Ih,"onAnimationIteration"),Wt(em,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt($1,"onTransitionRun"),Wt(q1,"onTransitionStart"),Wt(G1,"onTransitionCancel"),Wt(tm,"onTransitionEnd"),si("onMouseEnter",["mouseout","mouseover"]),si("onMouseLeave",["mouseout","mouseover"]),si("onPointerEnter",["pointerout","pointerover"]),si("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),AS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hl));function Tg(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var v=s.length-1;0<=v;v--){var b=s[v],j=b.instance,k=b.currentTarget;if(b=b.listener,j!==c&&r.isPropagationStopped())break e;c=b,r.currentTarget=k;try{c(r)}catch(H){Gs(H)}r.currentTarget=null,c=j}else for(v=0;v<s.length;v++){if(b=s[v],j=b.instance,k=b.currentTarget,b=b.listener,j!==c&&r.isPropagationStopped())break e;c=b,r.currentTarget=k;try{c(r)}catch(H){Gs(H)}r.currentTarget=null,c=j}}}}function ge(e,t){var i=t[Qr];i===void 0&&(i=t[Qr]=new Set);var s=e+"__bubble";i.has(s)||(wg(t,e,2,!1),i.add(s))}function _c(e,t,i){var s=0;t&&(s|=4),wg(i,e,s,t)}var Do="_reactListening"+Math.random().toString(36).slice(2);function Uc(e){if(!e[Do]){e[Do]=!0,gh.forEach(function(i){i!=="selectionchange"&&(AS.has(i)||_c(i,!1,e),_c(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Do]||(t[Do]=!0,_c("selectionchange",!1,t))}}function wg(e,t,i,s){switch(Wg(t)){case 2:var r=eT;break;case 8:r=tT;break;default:r=Ic}i=r.bind(null,t,i,e),r=void 0,!iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Bc(e,t,i,s,r){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var b=s.stateNode.containerInfo;if(b===r)break;if(v===4)for(v=s.return;v!==null;){var j=v.tag;if((j===3||j===4)&&v.stateNode.containerInfo===r)return;v=v.return}for(;b!==null;){if(v=ai(b),v===null)return;if(j=v.tag,j===5||j===6||j===26||j===27){s=c=v;continue e}b=b.parentNode}}s=s.return}Ch(function(){var k=c,H=nu(i),G=[];e:{var V=nm.get(e);if(V!==void 0){var U=Hs,ee=e;switch(e){case"keypress":if(Us(i)===0)break e;case"keydown":case"keyup":U=x1;break;case"focusin":ee="focus",U=ru;break;case"focusout":ee="blur",U=ru;break;case"beforeblur":case"afterblur":U=ru;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=Oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=o1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=T1;break;case Wh:case Ih:case em:U=c1;break;case tm:U=E1;break;case"scroll":case"scrollend":U=l1;break;case"wheel":U=A1;break;case"copy":case"cut":case"paste":U=d1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Rh;break;case"toggle":case"beforetoggle":U=C1}var se=(t&4)!==0,Re=!se&&(e==="scroll"||e==="scrollend"),O=se?V!==null?V+"Capture":null:V;se=[];for(var N=k,L;N!==null;){var $=N;if(L=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||L===null||O===null||($=rl(N,O),$!=null&&se.push($l(N,$,L))),Re)break;N=N.return}0<se.length&&(V=new U(V,ee,null,i,H),G.push({event:V,listeners:se}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",V&&i!==tu&&(ee=i.relatedTarget||i.fromElement)&&(ai(ee)||ee[ni]))break e;if((U||V)&&(V=H.window===H?H:(V=H.ownerDocument)?V.defaultView||V.parentWindow:window,U?(ee=i.relatedTarget||i.toElement,U=k,ee=ee?ai(ee):null,ee!==null&&(Re=d(ee),se=ee.tag,ee!==Re||se!==5&&se!==27&&se!==6)&&(ee=null)):(U=null,ee=k),U!==ee)){if(se=Oh,$="onMouseLeave",O="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(se=Rh,$="onPointerLeave",O="onPointerEnter",N="pointer"),Re=U==null?V:ol(U),L=ee==null?V:ol(ee),V=new se($,N+"leave",U,i,H),V.target=Re,V.relatedTarget=L,$=null,ai(H)===k&&(se=new se(O,N+"enter",ee,i,H),se.target=L,se.relatedTarget=Re,$=se),Re=$,U&&ee)t:{for(se=NS,O=U,N=ee,L=0,$=O;$;$=se($))L++;$=0;for(var le=N;le;le=se(le))$++;for(;0<L-$;)O=se(O),L--;for(;0<$-L;)N=se(N),$--;for(;L--;){if(O===N||N!==null&&O===N.alternate){se=O;break t}O=se(O),N=se(N)}se=null}else se=null;U!==null&&Eg(G,V,U,se,!1),ee!==null&&Re!==null&&Eg(G,Re,ee,se,!0)}}e:{if(V=k?ol(k):window,U=V.nodeName&&V.nodeName.toLowerCase(),U==="select"||U==="input"&&V.type==="file")var we=$h;else if(Bh(V))if(qh)we=U1;else{we=V1;var ae=k1}else U=V.nodeName,!U||U.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?k&&eu(k.elementType)&&(we=$h):we=_1;if(we&&(we=we(e,k))){Hh(G,we,i,H);break e}ae&&ae(e,V,k),e==="focusout"&&k&&V.type==="number"&&k.memoizedProps.value!=null&&Ir(V,"number",V.value)}switch(ae=k?ol(k):window,e){case"focusin":(Bh(ae)||ae.contentEditable==="true")&&(di=ae,mu=k,gl=null);break;case"focusout":gl=mu=di=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,Ph(G,i,H);break;case"selectionchange":if(H1)break;case"keydown":case"keyup":Ph(G,i,H)}var de;if(cu)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else fi?_h(e,i)&&(ye="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ye="onCompositionStart");ye&&(Lh&&i.locale!=="ko"&&(fi||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&fi&&(de=Mh()):($n=H,lu="value"in $n?$n.value:$n.textContent,fi=!0)),ae=Oo(k,ye),0<ae.length&&(ye=new zh(ye,e,null,i,H),G.push({event:ye,listeners:ae}),de?ye.data=de:(de=Uh(i),de!==null&&(ye.data=de)))),(de=D1?O1(e,i):z1(e,i))&&(ye=Oo(k,"onBeforeInput"),0<ye.length&&(ae=new zh("onBeforeInput","beforeinput",null,i,H),G.push({event:ae,listeners:ye}),ae.data=de)),wS(G,e,k,i,H)}Tg(G,t)})}function $l(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Oo(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=rl(e,i),r!=null&&s.unshift($l(e,r,c)),r=rl(e,t),r!=null&&s.push($l(e,r,c))),e.tag===3)return s;e=e.return}return[]}function NS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Eg(e,t,i,s,r){for(var c=t._reactName,v=[];i!==null&&i!==s;){var b=i,j=b.alternate,k=b.stateNode;if(b=b.tag,j!==null&&j===s)break;b!==5&&b!==26&&b!==27||k===null||(j=k,r?(k=rl(i,c),k!=null&&v.unshift($l(i,k,j))):r||(k=rl(i,c),k!=null&&v.push($l(i,k,j)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var CS=/\r\n?/g,MS=/\u0000|\uFFFD/g;function jg(e){return(typeof e=="string"?e:""+e).replace(CS,`
|
|
49
|
+
`).replace(MS,"")}function Ag(e,t){return t=jg(t),jg(e)===t}function ze(e,t,i,s,r,c){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ri(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ri(e,""+s);break;case"className":Ls(e,"class",s);break;case"tabIndex":Ls(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(e,i,s);break;case"style":Ah(e,s,c);break;case"data":if(t!=="object"){Ls(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Vs(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(i==="formAction"?(t!=="input"&&ze(e,t,"name",r.name,r,null),ze(e,t,"formEncType",r.formEncType,r,null),ze(e,t,"formMethod",r.formMethod,r,null),ze(e,t,"formTarget",r.formTarget,r,null)):(ze(e,t,"encType",r.encType,r,null),ze(e,t,"method",r.method,r,null),ze(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Vs(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=yn);break;case"onScroll":s!=null&&ge("scroll",e);break;case"onScrollEnd":s!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=Vs(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":ge("beforetoggle",e),ge("toggle",e),Rs(e,"popover",s);break;case"xlinkActuate":vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":vn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":vn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":vn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":vn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Rs(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=a1.get(i)||i,Rs(e,i,s))}}function Hc(e,t,i,s,r,c){switch(i){case"style":Ah(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ri(e,s):(typeof s=="number"||typeof s=="bigint")&&ri(e,""+s);break;case"onScroll":s!=null&&ge("scroll",e);break;case"onScrollEnd":s!=null&&ge("scrollend",e);break;case"onClick":s!=null&&(e.onclick=yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),c=e[yt]||null,c=c!=null?c[i]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof s=="function")){typeof c!="function"&&c!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Rs(e,i,s)}}}function rt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",e),ge("load",e);var s=!1,r=!1,c;for(c in i)if(i.hasOwnProperty(c)){var v=i[c];if(v!=null)switch(c){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,c,v,i,null)}}r&&ze(e,t,"srcSet",i.srcSet,i,null),s&&ze(e,t,"src",i.src,i,null);return;case"input":ge("invalid",e);var b=c=v=r=null,j=null,k=null;for(s in i)if(i.hasOwnProperty(s)){var H=i[s];if(H!=null)switch(s){case"name":r=H;break;case"type":v=H;break;case"checked":j=H;break;case"defaultChecked":k=H;break;case"value":c=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,t));break;default:ze(e,t,s,H,i,null)}}Th(e,c,b,j,k,v,r,!1);return;case"select":ge("invalid",e),s=v=c=null;for(r in i)if(i.hasOwnProperty(r)&&(b=i[r],b!=null))switch(r){case"value":c=b;break;case"defaultValue":v=b;break;case"multiple":s=b;default:ze(e,t,r,b,i,null)}t=c,i=v,e.multiple=!!s,t!=null?oi(e,!!s,t,!1):i!=null&&oi(e,!!s,i,!0);return;case"textarea":ge("invalid",e),c=r=s=null;for(v in i)if(i.hasOwnProperty(v)&&(b=i[v],b!=null))switch(v){case"value":s=b;break;case"defaultValue":r=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:ze(e,t,v,b,i,null)}Eh(e,s,r,c);return;case"option":for(j in i)if(i.hasOwnProperty(j)&&(s=i[j],s!=null))switch(j){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ze(e,t,j,s,i,null)}return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(s=0;s<Hl.length;s++)ge(Hl[s],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(k in i)if(i.hasOwnProperty(k)&&(s=i[k],s!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,k,s,i,null)}return;default:if(eu(t)){for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!==void 0&&Hc(e,t,H,s,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(s=i[b],s!=null&&ze(e,t,b,s,i,null))}function DS(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,v=null,b=null,j=null,k=null,H=null;for(U in i){var G=i[U];if(i.hasOwnProperty(U)&&G!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":j=G;default:s.hasOwnProperty(U)||ze(e,t,U,null,s,G)}}for(var V in s){var U=s[V];if(G=i[V],s.hasOwnProperty(V)&&(U!=null||G!=null))switch(V){case"type":c=U;break;case"name":r=U;break;case"checked":k=U;break;case"defaultChecked":H=U;break;case"value":v=U;break;case"defaultValue":b=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:U!==G&&ze(e,t,V,U,s,G)}}Wr(e,v,b,j,k,H,c,r);return;case"select":U=v=b=V=null;for(c in i)if(j=i[c],i.hasOwnProperty(c)&&j!=null)switch(c){case"value":break;case"multiple":U=j;default:s.hasOwnProperty(c)||ze(e,t,c,null,s,j)}for(r in s)if(c=s[r],j=i[r],s.hasOwnProperty(r)&&(c!=null||j!=null))switch(r){case"value":V=c;break;case"defaultValue":b=c;break;case"multiple":v=c;default:c!==j&&ze(e,t,r,c,s,j)}t=b,i=v,s=U,V!=null?oi(e,!!i,V,!1):!!s!=!!i&&(t!=null?oi(e,!!i,t,!0):oi(e,!!i,i?[]:"",!1));return;case"textarea":U=V=null;for(b in i)if(r=i[b],i.hasOwnProperty(b)&&r!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:ze(e,t,b,null,s,r)}for(v in s)if(r=s[v],c=i[v],s.hasOwnProperty(v)&&(r!=null||c!=null))switch(v){case"value":V=r;break;case"defaultValue":U=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&ze(e,t,v,r,s,c)}wh(e,V,U);return;case"option":for(var ee in i)if(V=i[ee],i.hasOwnProperty(ee)&&V!=null&&!s.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:ze(e,t,ee,null,s,V)}for(j in s)if(V=s[j],U=i[j],s.hasOwnProperty(j)&&V!==U&&(V!=null||U!=null))switch(j){case"selected":e.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:ze(e,t,j,V,s,U)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in i)V=i[se],i.hasOwnProperty(se)&&V!=null&&!s.hasOwnProperty(se)&&ze(e,t,se,null,s,V);for(k in s)if(V=s[k],U=i[k],s.hasOwnProperty(k)&&V!==U&&(V!=null||U!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:ze(e,t,k,V,s,U)}return;default:if(eu(t)){for(var Re in i)V=i[Re],i.hasOwnProperty(Re)&&V!==void 0&&!s.hasOwnProperty(Re)&&Hc(e,t,Re,void 0,s,V);for(H in s)V=s[H],U=i[H],!s.hasOwnProperty(H)||V===U||V===void 0&&U===void 0||Hc(e,t,H,V,s,U);return}}for(var O in i)V=i[O],i.hasOwnProperty(O)&&V!=null&&!s.hasOwnProperty(O)&&ze(e,t,O,null,s,V);for(G in s)V=s[G],U=i[G],!s.hasOwnProperty(G)||V===U||V==null&&U==null||ze(e,t,G,V,s,U)}function Ng(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],c=r.transferSize,v=r.initiatorType,b=r.duration;if(c&&b&&Ng(v)){for(v=0,b=r.responseEnd,s+=1;s<i.length;s++){var j=i[s],k=j.startTime;if(k>b)break;var H=j.transferSize,G=j.initiatorType;H&&Ng(G)&&(j=j.responseEnd,v+=H*(j<b?1:(b-k)/(j-k)))}if(--s,t+=8*(c+v)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var $c=null,qc=null;function zo(e){return e.nodeType===9?e:e.ownerDocument}function Cg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Mg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Gc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yc=null;function zS(){var e=window.event;return e&&e.type==="popstate"?e===Yc?!1:(Yc=e,!0):(Yc=null,!1)}var Dg=typeof setTimeout=="function"?setTimeout:void 0,RS=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,LS=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(kS)}:Dg;function kS(e){setTimeout(function(){throw e})}function ia(e){return e==="head"}function zg(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Bi(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")ql(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ql(i);for(var c=i.firstChild;c;){var v=c.nextSibling,b=c.nodeName;c[sl]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||i.removeChild(c),c=v}}else i==="body"&&ql(e.ownerDocument.body);i=r}while(i);Bi(t)}function Rg(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Xc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Xc(i),Pr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function VS(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[sl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function _S(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ft(e.nextSibling),e===null))return null;return e}function Lg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ft(e.nextSibling),e===null))return null;return e}function Kc(e){return e.data==="$?"||e.data==="$~"}function Fc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function US(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ft(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Zc=null;function kg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ft(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Vg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function _g(e,t,i){switch(t=zo(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ql(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pr(e)}var Zt=new Map,Ug=new Set;function Ro(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ln=Q.d;Q.d={f:BS,r:HS,D:$S,C:qS,L:GS,m:YS,X:KS,S:XS,M:FS};function BS(){var e=Ln.f(),t=Eo();return e||t}function HS(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?tp(t):Ln.r(e)}var Vi=typeof document>"u"?null:document;function Bg(e,t,i){var s=Vi;if(s&&typeof t=="string"&&t){var r=Ht(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Ug.has(r)||(Ug.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),rt(t,"link",e),nt(t),s.head.appendChild(t)))}}function $S(e){Ln.D(e),Bg("dns-prefetch",e,null)}function qS(e,t){Ln.C(e,t),Bg("preconnect",e,t)}function GS(e,t,i){Ln.L(e,t,i);var s=Vi;if(s&&e&&t){var r='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ht(i.imageSizes)+'"]')):r+='[href="'+Ht(e)+'"]';var c=r;switch(t){case"style":c=_i(e);break;case"script":c=Ui(e)}Zt.has(c)||(e=x({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(c,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Gl(c))||t==="script"&&s.querySelector(Yl(c))||(t=s.createElement("link"),rt(t,"link",e),nt(t),s.head.appendChild(t)))}}function YS(e,t){Ln.m(e,t);var i=Vi;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ht(s)+'"][href="'+Ht(e)+'"]',c=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ui(e)}if(!Zt.has(c)&&(e=x({rel:"modulepreload",href:e},t),Zt.set(c,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Yl(c)))return}s=i.createElement("link"),rt(s,"link",e),nt(s),i.head.appendChild(s)}}}function XS(e,t,i){Ln.S(e,t,i);var s=Vi;if(s&&e){var r=li(s).hoistableStyles,c=_i(e);t=t||"default";var v=r.get(c);if(!v){var b={loading:0,preload:null};if(v=s.querySelector(Gl(c)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(c))&&Qc(e,i);var j=v=s.createElement("link");nt(j),rt(j,"link",e),j._p=new Promise(function(k,H){j.onload=k,j.onerror=H}),j.addEventListener("load",function(){b.loading|=1}),j.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Lo(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:b},r.set(c,v)}}}function KS(e,t){Ln.X(e,t);var i=Vi;if(i&&e){var s=li(i).hoistableScripts,r=Ui(e),c=s.get(r);c||(c=i.querySelector(Yl(r)),c||(e=x({src:e,async:!0},t),(t=Zt.get(r))&&Pc(e,t),c=i.createElement("script"),nt(c),rt(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function FS(e,t){Ln.M(e,t);var i=Vi;if(i&&e){var s=li(i).hoistableScripts,r=Ui(e),c=s.get(r);c||(c=i.querySelector(Yl(r)),c||(e=x({src:e,async:!0,type:"module"},t),(t=Zt.get(r))&&Pc(e,t),c=i.createElement("script"),nt(c),rt(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function Hg(e,t,i,s){var r=(r=me.current)?Ro(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=_i(i.href),i=li(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=_i(i.href);var c=li(r).hoistableStyles,v=c.get(e);if(v||(r=r.ownerDocument||r,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,v),(c=r.querySelector(Gl(e)))&&!c._p&&(v.instance=c,v.state.loading=5),Zt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Zt.set(e,i),c||ZS(r,e,i,v.state))),t&&s===null)throw Error(o(528,""));return v}if(t&&s!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(i),i=li(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function _i(e){return'href="'+Ht(e)+'"'}function Gl(e){return'link[rel="stylesheet"]['+e+"]"}function $g(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function ZS(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),rt(t,"link",i),nt(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Ht(e)+'"]'}function Yl(e){return"script[async]"+e}function qg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(s)return t.instance=s,nt(s),s;var r=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),nt(s),rt(s,"style",r),Lo(s,i.precedence,e),t.instance=s;case"stylesheet":r=_i(i.href);var c=e.querySelector(Gl(r));if(c)return t.state.loading|=4,t.instance=c,nt(c),c;s=$g(i),(r=Zt.get(r))&&Qc(s,r),c=(e.ownerDocument||e).createElement("link"),nt(c);var v=c;return v._p=new Promise(function(b,j){v.onload=b,v.onerror=j}),rt(c,"link",s),t.state.loading|=4,Lo(c,i.precedence,e),t.instance=c;case"script":return c=Ui(i.src),(r=e.querySelector(Yl(c)))?(t.instance=r,nt(r),r):(s=i,(r=Zt.get(c))&&(s=x({},i),Pc(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),nt(r),rt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Lo(s,i.precedence,e));return t.instance}function Lo(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,c=r,v=0;v<s.length;v++){var b=s[v];if(b.dataset.precedence===t)c=b;else if(c!==r)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Pc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ko=null;function Gg(e,t,i){if(ko===null){var s=new Map,r=ko=new Map;r.set(i,s)}else r=ko,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var c=i[r];if(!(c[sl]||c[it]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var v=c.getAttribute(t)||"";v=e+v;var b=s.get(v);b?b.push(c):s.set(v,[c])}}return s}function Yg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function QS(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Xg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function PS(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=_i(s.href),c=t.querySelector(Gl(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Vo.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=c,nt(c);return}c=t.ownerDocument||t,s=$g(s),(r=Zt.get(r))&&Qc(s,r),c=c.createElement("link"),nt(c);var v=c;v._p=new Promise(function(b,j){v.onload=b,v.onerror=j}),rt(c,"link",s),i.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Vo.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Jc=0;function JS(e,t){return e.stylesheets&&e.count===0&&Uo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Uo(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Jc===0&&(Jc=62500*OS());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Uo(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Jc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Vo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _o=null;function Uo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_o=new Map,t.forEach(WS,e),_o=null,Vo.call(e))}function WS(e,t){if(!(t.state.loading&4)){var i=_o.get(e);if(i)var s=i.get(null);else{i=new Map,_o.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var v=r[c];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),s=v)}s&&i.set(null,s)}r=t.instance,v=r.getAttribute("data-precedence"),c=i.get(v)||s,c===s&&i.set(null,r),i.set(v,r),this.count++,s=Vo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Xl={$$typeof:_,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function IS(e,t,i,s,r,c,v,b,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Kr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kr(0),this.hiddenUpdates=Kr(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Kg(e,t,i,s,r,c,v,b,j,k,H,G){return e=new IS(e,t,i,v,j,k,H,G,b),t=1,c===!0&&(t|=24),c=zt(3,null,null,t),e.current=c,c.stateNode=e,t=Du(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:i,cache:t},Lu(c),e}function Fg(e){return e?(e=pi,e):pi}function Zg(e,t,i,s,r,c){r=Fg(r),s.context===null?s.context=r:s.pendingContext=r,s=Fn(t),s.payload={element:i},c=c===void 0?null:c,c!==null&&(s.callback=c),i=Zn(e,s,t),i!==null&&(Et(i,e,t),wl(i,e,t))}function Qg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Wc(e,t){Qg(e,t),(e=e.alternate)&&Qg(e,t)}function Pg(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Et(t,e,67108864),Wc(e,67108864)}}function Jg(e){if(e.tag===13||e.tag===31){var t=_t();t=Fr(t);var i=Ca(e,t);i!==null&&Et(i,e,t),Wc(e,t)}}var Bo=!0;function eT(e,t,i,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=2,Ic(e,t,i,s)}finally{Q.p=c,B.T=r}}function tT(e,t,i,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=8,Ic(e,t,i,s)}finally{Q.p=c,B.T=r}}function Ic(e,t,i,s){if(Bo){var r=ef(s);if(r===null)Bc(e,t,s,Ho,i),Ig(e,s);else if(aT(r,e,t,i,s))s.stopPropagation();else if(Ig(e,s),t&4&&-1<nT.indexOf(e)){for(;r!==null;){var c=ii(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var v=wa(c.pendingLanes);if(v!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;v;){var j=1<<31-Dt(v);b.entanglements[1]|=j,v&=~j}un(c),(je&6)===0&&(To=Ct()+500,Bl(0))}}break;case 31:case 13:b=Ca(c,2),b!==null&&Et(b,c,2),Eo(),Wc(c,2)}if(c=ef(s),c===null&&Bc(e,t,s,Ho,i),c===r)break;r=c}r!==null&&s.stopPropagation()}else Bc(e,t,s,null,i)}}function ef(e){return e=nu(e),tf(e)}var Ho=null;function tf(e){if(Ho=null,e=ai(e),e!==null){var t=d(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=h(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ho=e,null}function Wg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($b()){case sh:return 2;case oh:return 8;case Cs:case qb:return 32;case rh:return 268435456;default:return 32}default:return 32}}var nf=!1,la=null,sa=null,oa=null,Kl=new Map,Fl=new Map,ra=[],nT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ig(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":sa=null;break;case"mouseover":case"mouseout":oa=null;break;case"pointerover":case"pointerout":Kl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fl.delete(t.pointerId)}}function Zl(e,t,i,s,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:c,targetContainers:[r]},t!==null&&(t=ii(t),t!==null&&Pg(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function aT(e,t,i,s,r){switch(t){case"focusin":return la=Zl(la,e,t,i,s,r),!0;case"dragenter":return sa=Zl(sa,e,t,i,s,r),!0;case"mouseover":return oa=Zl(oa,e,t,i,s,r),!0;case"pointerover":var c=r.pointerId;return Kl.set(c,Zl(Kl.get(c)||null,e,t,i,s,r)),!0;case"gotpointercapture":return c=r.pointerId,Fl.set(c,Zl(Fl.get(c)||null,e,t,i,s,r)),!0}return!1}function ev(e){var t=ai(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,mh(e.priority,function(){Jg(i)});return}}else if(t===31){if(t=h(i),t!==null){e.blockedOn=t,mh(e.priority,function(){Jg(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $o(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=ef(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);tu=s,i.target.dispatchEvent(s),tu=null}else return t=ii(i),t!==null&&Pg(t),e.blockedOn=i,!1;t.shift()}return!0}function tv(e,t,i){$o(e)&&i.delete(t)}function iT(){nf=!1,la!==null&&$o(la)&&(la=null),sa!==null&&$o(sa)&&(sa=null),oa!==null&&$o(oa)&&(oa=null),Kl.forEach(tv),Fl.forEach(tv)}function qo(e,t){e.blockedOn===t&&(e.blockedOn=null,nf||(nf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,iT)))}var Go=null;function nv(e){Go!==e&&(Go=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Go===e&&(Go=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(tf(s||i)===null)continue;break}var c=ii(i);c!==null&&(e.splice(t,3),t-=3,ec(c,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Bi(e){function t(j){return qo(j,e)}la!==null&&qo(la,e),sa!==null&&qo(sa,e),oa!==null&&qo(oa,e),Kl.forEach(t),Fl.forEach(t);for(var i=0;i<ra.length;i++){var s=ra[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ra.length&&(i=ra[0],i.blockedOn===null);)ev(i),i.blockedOn===null&&ra.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],c=i[s+1],v=r[yt]||null;if(typeof c=="function")v||nv(i);else if(v){var b=null;if(c&&c.hasAttribute("formAction")){if(r=c,v=c[yt]||null)b=v.formAction;else if(tf(r)!==null)continue}else b=v.action;typeof b=="function"?i[s+1]=b:(i.splice(s,3),s-=3),nv(i)}}}function av(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(v){return r=v})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function af(e){this._internalRoot=e}Yo.prototype.render=af.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,s=_t();Zg(i,s,e,t,null,null)},Yo.prototype.unmount=af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zg(e.current,2,null,e,null,null),Eo(),t[ni]=null}};function Yo(e){this._internalRoot=e}Yo.prototype.unstable_scheduleHydration=function(e){if(e){var t=hh();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ra.length&&t!==0&&t<ra[i].priority;i++);ra.splice(i,0,e),i===0&&ev(e)}};var iv=a.version;if(iv!=="19.2.4")throw Error(o(527,iv,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var lT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xo.isDisabled&&Xo.supportsFiber)try{al=Xo.inject(lT),Mt=Xo}catch{}}return Pl.createRoot=function(e,t){if(!u(e))throw Error(o(299));var i=!1,s="",r=fp,c=dp,v=hp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Kg(e,1,!1,null,null,i,s,null,r,c,v,av),e[ni]=t.current,Uc(e),new af(t)},Pl.hydrateRoot=function(e,t,i){if(!u(e))throw Error(o(299));var s=!1,r="",c=fp,v=dp,b=hp,j=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(c=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(j=i.formState)),t=Kg(e,1,!0,t,i??null,s,r,j,c,v,b,av),t.context=Fg(null),i=t.current,s=_t(),s=Fr(s),r=Fn(s),r.callback=null,Zn(i,r,s),i=s,t.current.lanes=i,ll(t,i),un(t),e[ni]=t.current,Uc(e),new Yo(t)},Pl.version="19.2.4",Pl}var pv;function gT(){if(pv)return of.exports;pv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),of.exports=pT(),of.exports}var vT=gT();const I0="/api";async function $e(n){const a=await fetch(`${I0}${n}`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function yT(n){const a=new EventSource(`${I0}/events`);return a.addEventListener("state-changed",l=>{try{const o=JSON.parse(l.data);n("state-changed",o)}catch{n("state-changed",{})}}),a.onerror=()=>{},()=>a.close()}function ct(n){if(!n)return"unknown";const a=Date.now()-new Date(n).getTime();return a<0||a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function jt(n,a){if(!n)return"";if(n.length<=a)return n;const l=n.lastIndexOf(" ",a);return(l>a*.6?n.slice(0,l):n.slice(0,a))+"…"}const ey=w.createContext(()=>{});function Pi(){return w.useContext(ey)}const xT=new Set(["overview","sessions","work","connections","inner","memory","runtime"]);function ty(n){const a=n.replace(/^#\/?/,"");if(!a.startsWith("agent/"))return null;const l=a.split("/"),o=l[1]?decodeURIComponent(l[1]):"";if(!o)return null;const u=l[2]??"overview",d=xT.has(u)?u:"overview",f=l.slice(3),h=f.length>0?f.map(decodeURIComponent).join("/"):void 0;return{agent:o,tab:d,focus:h}}function _f(n){let a=`#/agent/${encodeURIComponent(n.agent)}`;return(n.tab!=="overview"||n.focus)&&(a+=`/${n.tab}`),n.focus&&(a+=`/${n.focus.split("/").map(encodeURIComponent).join("/")}`),a}const bT=typeof document<"u"?ue.useLayoutEffect:()=>{},ba=n=>{var a;return(a=n==null?void 0:n.ownerDocument)!==null&&a!==void 0?a:document},Xa=n=>n&&"window"in n&&n.window===n?n:ba(n).defaultView||window;function ST(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function TT(n){return ST(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let wT=!1;function Sd(){return wT}function Ka(n,a){if(!Sd())return a&&n?n.contains(a):!1;if(!n||!a)return!1;let l=a;for(;l!==null;){if(l===n)return!0;l.tagName==="SLOT"&&l.assignedSlot?l=l.assignedSlot.parentNode:TT(l)?l=l.host:l=l.parentNode}return!1}const Fi=(n=document)=>{var a;if(!Sd())return n.activeElement;let l=n.activeElement;for(;l&&"shadowRoot"in l&&(!((a=l.shadowRoot)===null||a===void 0)&&a.activeElement);)l=l.shadowRoot.activeElement;return l};function pt(n){if(Sd()&&n.target instanceof Element&&n.target.shadowRoot){var a,l;if("composedPath"in n)return(a=n.composedPath()[0])!==null&&a!==void 0?a:null;if("composedPath"in n.nativeEvent)return(l=n.nativeEvent.composedPath()[0])!==null&&l!==void 0?l:null}return n.target}function ny(n){var a,l,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(a=0;a<u;a++)n[a]&&(l=ny(n[a]))&&(o&&(o+=" "),o+=l)}else for(l in n)n[l]&&(o&&(o+=" "),o+=l);return o}function Fe(){for(var n,a,l=0,o="",u=arguments.length;l<u;l++)(n=arguments[l])&&(a=ny(n))&&(o&&(o+=" "),o+=a);return o}function ET(n){if(jT())n.focus({preventScroll:!0});else{let a=AT(n);n.focus(),NT(a)}}let Ko=null;function jT(){if(Ko==null){Ko=!1;try{document.createElement("div").focus({get preventScroll(){return Ko=!0,!0}})}catch{}}return Ko}function AT(n){let a=n.parentNode,l=[],o=document.scrollingElement||document.documentElement;for(;a instanceof HTMLElement&&a!==o;)(a.offsetHeight<a.scrollHeight||a.offsetWidth<a.scrollWidth)&&l.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),a=a.parentNode;return o instanceof HTMLElement&&l.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),l}function NT(n){for(let{element:a,scrollTop:l,scrollLeft:o}of n)a.scrollTop=l,a.scrollLeft=o}function Ar(n){var a;if(typeof window>"u"||window.navigator==null)return!1;let l=(a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands;return Array.isArray(l)&&l.some(o=>n.test(o.brand))||n.test(window.navigator.userAgent)}function ay(n){var a;return typeof window<"u"&&window.navigator!=null?n.test(((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.platform)||window.navigator.platform):!1}function Ji(n){let a=null;return()=>(a==null&&(a=n()),a)}const cr=Ji(function(){return ay(/^Mac/i)}),CT=Ji(function(){return ay(/^iPad/i)||cr()&&navigator.maxTouchPoints>1}),MT=Ji(function(){return Ar(/AppleWebKit/i)&&!DT()}),DT=Ji(function(){return Ar(/Chrome/i)}),OT=Ji(function(){return Ar(/Android/i)}),zT=Ji(function(){return Ar(/Firefox/i)});function hs(n,a,l=!0){var o,u;let{metaKey:d,ctrlKey:f,altKey:h,shiftKey:g}=a;zT()&&(!((u=window.event)===null||u===void 0||(o=u.type)===null||o===void 0)&&o.startsWith("key"))&&n.target==="_blank"&&(cr()?d=!0:f=!0);let p=MT()&&cr()&&!CT()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:d,ctrlKey:f,altKey:h,shiftKey:g}):new MouseEvent("click",{metaKey:d,ctrlKey:f,altKey:h,shiftKey:g,detail:1,bubbles:!0,cancelable:!0});hs.isOpening=l,ET(n),n.dispatchEvent(p),hs.isOpening=!1}hs.isOpening=!1;function iy(){let n=w.useRef(new Map),a=w.useCallback((u,d,f,h)=>{let g=h!=null&&h.once?(...p)=>{n.current.delete(f),f(...p)}:f;n.current.set(f,{type:d,eventTarget:u,fn:g,options:h}),u.addEventListener(d,g,h)},[]),l=w.useCallback((u,d,f,h)=>{var g;let p=((g=n.current.get(f))===null||g===void 0?void 0:g.fn)||f;u.removeEventListener(d,p,h),n.current.delete(f)},[]),o=w.useCallback(()=>{n.current.forEach((u,d)=>{l(u.eventTarget,u.type,d,u.options)})},[l]);return w.useEffect(()=>o,[o]),{addGlobalListener:a,removeGlobalListener:l,removeAllGlobalListeners:o}}function RT(n){return n.pointerType===""&&n.isTrusted?!0:OT()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}var LT=W0();function ly(n){let a=n;return a.nativeEvent=n,a.isDefaultPrevented=()=>a.defaultPrevented,a.isPropagationStopped=()=>a.cancelBubble,a.persist=()=>{},a}function kT(n,a){Object.defineProperty(n,"target",{value:a}),Object.defineProperty(n,"currentTarget",{value:a})}function sy(n){let a=w.useRef({isFocused:!1,observer:null});return bT(()=>{const l=a.current;return()=>{l.observer&&(l.observer.disconnect(),l.observer=null)}},[]),w.useCallback(l=>{let o=pt(l);if(o instanceof HTMLButtonElement||o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement){a.current.isFocused=!0;let u=o,d=f=>{if(a.current.isFocused=!1,u.disabled){let h=ly(f);n==null||n(h)}a.current.observer&&(a.current.observer.disconnect(),a.current.observer=null)};u.addEventListener("focusout",d,{once:!0}),a.current.observer=new MutationObserver(()=>{if(a.current.isFocused&&u.disabled){var f;(f=a.current.observer)===null||f===void 0||f.disconnect();let h=u===Fi()?null:Fi();u.dispatchEvent(new FocusEvent("blur",{relatedTarget:h})),u.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:h}))}}),a.current.observer.observe(u,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let VT=!1,ys=null;const Uf=new Set;let ls=new Map,Wa=!1,Bf=!1;const _T={Tab:!0,Escape:!0};function Td(n,a){for(let l of Uf)l(n,a)}function UT(n){return!(n.metaKey||!cr()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function fr(n){Wa=!0,!hs.isOpening&&UT(n)&&(ys="keyboard",Td("keyboard",n))}function Ki(n){ys="pointer","pointerType"in n&&n.pointerType,(n.type==="mousedown"||n.type==="pointerdown")&&(Wa=!0,Td("pointer",n))}function oy(n){!hs.isOpening&&RT(n)&&(Wa=!0,ys="virtual")}function ry(n){pt(n)===window||pt(n)===document||VT||!n.isTrusted||(!Wa&&!Bf&&(ys="virtual",Td("virtual",n)),Wa=!1,Bf=!1)}function uy(){Wa=!1,Bf=!0}function Hf(n){if(typeof window>"u"||typeof document>"u"||ls.get(Xa(n)))return;const a=Xa(n),l=ba(n);let o=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){Wa=!0,o.apply(this,arguments)},l.addEventListener("keydown",fr,!0),l.addEventListener("keyup",fr,!0),l.addEventListener("click",oy,!0),a.addEventListener("focus",ry,!0),a.addEventListener("blur",uy,!1),typeof PointerEvent<"u"&&(l.addEventListener("pointerdown",Ki,!0),l.addEventListener("pointermove",Ki,!0),l.addEventListener("pointerup",Ki,!0)),a.addEventListener("beforeunload",()=>{cy(n)},{once:!0}),ls.set(a,{focus:o})}const cy=(n,a)=>{const l=Xa(n),o=ba(n);a&&o.removeEventListener("DOMContentLoaded",a),ls.has(l)&&(l.HTMLElement.prototype.focus=ls.get(l).focus,o.removeEventListener("keydown",fr,!0),o.removeEventListener("keyup",fr,!0),o.removeEventListener("click",oy,!0),l.removeEventListener("focus",ry,!0),l.removeEventListener("blur",uy,!1),typeof PointerEvent<"u"&&(o.removeEventListener("pointerdown",Ki,!0),o.removeEventListener("pointermove",Ki,!0),o.removeEventListener("pointerup",Ki,!0)),ls.delete(l))};function BT(n){const a=ba(n);let l;return a.readyState!=="loading"?Hf(n):(l=()=>{Hf(n)},a.addEventListener("DOMContentLoaded",l)),()=>cy(n,l)}typeof document<"u"&&BT();function $f(){return ys!=="pointer"}const HT=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function $T(n,a,l){let o=ba(l?pt(l):void 0),u=l?pt(l):void 0;const d=typeof window<"u"?Xa(u).HTMLInputElement:HTMLInputElement,f=typeof window<"u"?Xa(u).HTMLTextAreaElement:HTMLTextAreaElement,h=typeof window<"u"?Xa(u).HTMLElement:HTMLElement,g=typeof window<"u"?Xa(u).KeyboardEvent:KeyboardEvent;let p=Fi(o);return n=n||p instanceof d&&!HT.has(p.type)||p instanceof f||p instanceof h&&p.isContentEditable,!(n&&a==="keyboard"&&l instanceof g&&!_T[l.key])}function qT(n,a,l){Hf(),w.useEffect(()=>{if((l==null?void 0:l.enabled)===!1)return;let o=(u,d)=>{$T(!!(l!=null&&l.isTextInput),u,d)&&n($f())};return Uf.add(o),()=>{Uf.delete(o)}},a)}function GT(n){let{isDisabled:a,onFocus:l,onBlur:o,onFocusChange:u}=n;const d=w.useCallback(g=>{if(pt(g)===g.currentTarget)return o&&o(g),u&&u(!1),!0},[o,u]),f=sy(d),h=w.useCallback(g=>{let p=pt(g);const y=ba(p),x=y?Fi(y):Fi();p===g.currentTarget&&p===x&&(l&&l(g),u&&u(!0),f(g))},[u,l,f]);return{focusProps:{onFocus:!a&&(l||u||o)?h:void 0,onBlur:!a&&(o||u)?d:void 0}}}function YT(n){let{isDisabled:a,onBlurWithin:l,onFocusWithin:o,onFocusWithinChange:u}=n,d=w.useRef({isFocusWithin:!1}),{addGlobalListener:f,removeAllGlobalListeners:h}=iy(),g=w.useCallback(x=>{Ka(x.currentTarget,pt(x))&&d.current.isFocusWithin&&!Ka(x.currentTarget,x.relatedTarget)&&(d.current.isFocusWithin=!1,h(),l&&l(x),u&&u(!1))},[l,u,d,h]),p=sy(g),y=w.useCallback(x=>{if(!Ka(x.currentTarget,pt(x)))return;let T=pt(x);const S=ba(T),E=Fi(S);if(!d.current.isFocusWithin&&E===T){o&&o(x),u&&u(!0),d.current.isFocusWithin=!0,p(x);let D=x.currentTarget;f(S,"focus",M=>{let C=pt(M);if(d.current.isFocusWithin&&!Ka(D,C)){let R=new S.defaultView.FocusEvent("blur",{relatedTarget:C});kT(R,D);let _=ly(R);g(_)}},{capture:!0})}},[o,u,p,f,g]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:g}}}let qf=!1,Fo=0;function XT(){qf=!0,setTimeout(()=>{qf=!1},50)}function gv(n){n.pointerType==="touch"&&XT()}function KT(){if(!(typeof document>"u"))return Fo===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",gv),Fo++,()=>{Fo--,!(Fo>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",gv)}}function fy(n){let{onHoverStart:a,onHoverChange:l,onHoverEnd:o,isDisabled:u}=n,[d,f]=w.useState(!1),h=w.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;w.useEffect(KT,[]);let{addGlobalListener:g,removeAllGlobalListeners:p}=iy(),{hoverProps:y,triggerHoverEnd:x}=w.useMemo(()=>{let T=(D,M)=>{if(h.pointerType=M,u||M==="touch"||h.isHovered||!Ka(D.currentTarget,pt(D)))return;h.isHovered=!0;let C=D.currentTarget;h.target=C,g(ba(pt(D)),"pointerover",R=>{h.isHovered&&h.target&&!Ka(h.target,pt(R))&&S(R,R.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:C,pointerType:M}),l&&l(!0),f(!0)},S=(D,M)=>{let C=h.target;h.pointerType="",h.target=null,!(M==="touch"||!h.isHovered||!C)&&(h.isHovered=!1,p(),o&&o({type:"hoverend",target:C,pointerType:M}),l&&l(!1),f(!1))},E={};return typeof PointerEvent<"u"&&(E.onPointerEnter=D=>{qf&&D.pointerType==="mouse"||T(D,D.pointerType)},E.onPointerLeave=D=>{!u&&Ka(D.currentTarget,pt(D))&&S(D,D.pointerType)}),{hoverProps:E,triggerHoverEnd:S}},[a,l,o,u,h,g,p]);return w.useEffect(()=>{u&&x({currentTarget:h.target},h.pointerType)},[u]),{hoverProps:y,isHovered:d}}function dy(n={}){let{autoFocus:a=!1,isTextInput:l,within:o}=n,u=w.useRef({isFocused:!1,isFocusVisible:a||$f()}),[d,f]=w.useState(!1),[h,g]=w.useState(()=>u.current.isFocused&&u.current.isFocusVisible),p=w.useCallback(()=>g(u.current.isFocused&&u.current.isFocusVisible),[]),y=w.useCallback(S=>{u.current.isFocused=S,u.current.isFocusVisible=$f(),f(S),p()},[p]);qT(S=>{u.current.isFocusVisible=S,p()},[l,d],{enabled:d,isTextInput:l});let{focusProps:x}=GT({isDisabled:o,onFocusChange:y}),{focusWithinProps:T}=YT({isDisabled:!o,onFocusWithinChange:y});return{isFocused:d,isFocusVisible:h,focusProps:o?T:x}}var FT=Object.defineProperty,ZT=(n,a,l)=>a in n?FT(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l,ff=(n,a,l)=>(ZT(n,typeof a!="symbol"?a+"":a,l),l);let QT=class{constructor(){ff(this,"current",this.detect()),ff(this,"handoffState","pending"),ff(this,"currentId",0)}set(a){this.current!==a&&(this.handoffState="pending",this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},hn=new QT;function Wi(n){var a;return hn.isServer?null:n==null?document:(a=n==null?void 0:n.ownerDocument)!=null?a:document}function Gf(n){var a,l;return hn.isServer?null:n==null?document:(l=(a=n==null?void 0:n.getRootNode)==null?void 0:a.call(n))!=null?l:document}function hy(n){var a,l;return(l=(a=Gf(n))==null?void 0:a.activeElement)!=null?l:null}function PT(n){return hy(n)===n}function Nr(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(a=>setTimeout(()=>{throw a}))}function Un(){let n=[],a={addEventListener(l,o,u,d){return l.addEventListener(o,u,d),a.add(()=>l.removeEventListener(o,u,d))},requestAnimationFrame(...l){let o=requestAnimationFrame(...l);return a.add(()=>cancelAnimationFrame(o))},nextFrame(...l){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...l))},setTimeout(...l){let o=setTimeout(...l);return a.add(()=>clearTimeout(o))},microTask(...l){let o={current:!0};return Nr(()=>{o.current&&l[0]()}),a.add(()=>{o.current=!1})},style(l,o,u){let d=l.style.getPropertyValue(o);return Object.assign(l.style,{[o]:u}),this.add(()=>{Object.assign(l.style,{[o]:d})})},group(l){let o=Un();return l(o),this.add(()=>o.dispose())},add(l){return n.includes(l)||n.push(l),()=>{let o=n.indexOf(l);if(o>=0)for(let u of n.splice(o,1))u()}},dispose(){for(let l of n.splice(0))l()}};return a}function xs(){let[n]=w.useState(Un);return w.useEffect(()=>()=>n.dispose(),[n]),n}let At=(n,a)=>{hn.isServer?w.useEffect(n,a):w.useLayoutEffect(n,a)};function ei(n){let a=w.useRef(n);return At(()=>{a.current=n},[n]),a}let De=function(n){let a=ei(n);return ue.useCallback((...l)=>a.current(...l),[a])};function JT(n){let a=n.width/2,l=n.height/2;return{top:n.clientY-l,right:n.clientX+a,bottom:n.clientY+l,left:n.clientX-a}}function WT(n,a){return!(!n||!a||n.right<a.left||n.left>a.right||n.bottom<a.top||n.top>a.bottom)}function my({disabled:n=!1}={}){let a=w.useRef(null),[l,o]=w.useState(!1),u=xs(),d=De(()=>{a.current=null,o(!1),u.dispose()}),f=De(h=>{if(u.dispose(),a.current===null){a.current=h.currentTarget,o(!0);{let g=Wi(h.currentTarget);u.addEventListener(g,"pointerup",d,!1),u.addEventListener(g,"pointermove",p=>{if(a.current){let y=JT(p);o(WT(y,a.current.getBoundingClientRect()))}},!1),u.addEventListener(g,"pointercancel",d,!1)}}});return{pressed:l,pressProps:n?{}:{onPointerDown:f,onPointerUp:d,onClick:d}}}function ti(n){return w.useMemo(()=>n,Object.values(n))}let IT=w.createContext(void 0);function py(){return w.useContext(IT)}function Yf(...n){return Array.from(new Set(n.flatMap(a=>typeof a=="string"?a.split(" "):[]))).filter(Boolean).join(" ")}function _n(n,a,...l){if(n in a){let u=a[n];return typeof u=="function"?u(...l):u}let o=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_n),o}var dr=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(dr||{}),ha=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(ha||{});function Nt(){let n=tw();return w.useCallback(a=>ew({mergeRefs:n,...a}),[n])}function ew({ourProps:n,theirProps:a,slot:l,defaultTag:o,features:u,visible:d=!0,name:f,mergeRefs:h}){h=h??nw;let g=gy(a,n);if(d)return Zo(g,l,o,f,h);let p=u??0;if(p&2){let{static:y=!1,...x}=g;if(y)return Zo(x,l,o,f,h)}if(p&1){let{unmount:y=!0,...x}=g;return _n(y?0:1,{0(){return null},1(){return Zo({...x,hidden:!0,style:{display:"none"}},l,o,f,h)}})}return Zo(g,l,o,f,h)}function Zo(n,a={},l,o,u){let{as:d=l,children:f,refName:h="ref",...g}=df(n,["unmount","static"]),p=n.ref!==void 0?{[h]:n.ref}:{},y=typeof f=="function"?f(a):f;"className"in g&&g.className&&typeof g.className=="function"&&(g.className=g.className(a)),g["aria-labelledby"]&&g["aria-labelledby"]===g.id&&(g["aria-labelledby"]=void 0);let x={};if(a){let T=!1,S=[];for(let[E,D]of Object.entries(a))typeof D=="boolean"&&(T=!0),D===!0&&S.push(E.replace(/([A-Z])/g,M=>`-${M.toLowerCase()}`));if(T){x["data-headlessui-state"]=S.join(" ");for(let E of S)x[`data-${E}`]=""}}if(ss(d)&&(Object.keys(qa(g)).length>0||Object.keys(qa(x)).length>0))if(!w.isValidElement(y)||Array.isArray(y)&&y.length>1||iw(y)){if(Object.keys(qa(g)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qa(g)).concat(Object.keys(qa(x))).map(T=>` - ${T}`).join(`
|
|
50
50
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(T=>` - ${T}`).join(`
|
|
51
51
|
`)].join(`
|
|
52
|
-
`))}else{let T=y.props,S=T==null?void 0:T.className,E=typeof S=="function"?(...C)
|
|
52
|
+
`))}else{let T=y.props,S=T==null?void 0:T.className,E=typeof S=="function"?(...C)=>Yf(S(...C),g.className):Yf(S,g.className),D=E?{className:E}:{},M=gy(y.props,qa(df(g,["ref"])));for(let C in x)C in M&&delete x[C];return w.cloneElement(y,Object.assign({},M,x,p,{ref:u(aw(y),p.ref)},D))}return w.createElement(d,Object.assign({},df(g,["ref"]),!ss(d)&&p,!ss(d)&&x),y)}function tw(){let n=w.useRef([]),a=w.useCallback(l=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(l):o.current=l)},[]);return(...l)=>{if(!l.every(o=>o==null))return n.current=l,a}}function nw(...n){return n.every(a=>a==null)?void 0:a=>{for(let l of n)l!=null&&(typeof l=="function"?l(a):l.current=a)}}function gy(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},l={};for(let o of n)for(let u in o)u.startsWith("on")&&typeof o[u]=="function"?(l[u]!=null||(l[u]=[]),l[u].push(o[u])):a[u]=o[u];if(a.disabled||a["aria-disabled"])for(let o in l)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(o)&&(l[o]=[u=>{var d;return(d=u==null?void 0:u.preventDefault)==null?void 0:d.call(u)}]);for(let o in l)Object.assign(a,{[o](u,...d){let f=l[o];for(let h of f){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;h(u,...d)}}});return a}function wd(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},l={};for(let o of n)for(let u in o)u.startsWith("on")&&typeof o[u]=="function"?(l[u]!=null||(l[u]=[]),l[u].push(o[u])):a[u]=o[u];for(let o in l)Object.assign(a,{[o](...u){let d=l[o];for(let f of d)f==null||f(...u)}});return a}function dt(n){var a;return Object.assign(w.forwardRef(n),{displayName:(a=n.displayName)!=null?a:n.name})}function qa(n){let a=Object.assign({},n);for(let l in a)a[l]===void 0&&delete a[l];return a}function df(n,a=[]){let l=Object.assign({},n);for(let o of a)o in l&&delete l[o];return l}function aw(n){return ue.version.split(".")[0]>="19"?n.props.ref:n.ref}function ss(n){return n===w.Fragment||n===Symbol.for("react.fragment")}function iw(n){return ss(n.type)}let lw="button";function sw(n,a){var l;let o=py(),{disabled:u=o||!1,autoFocus:d=!1,...f}=n,{isFocusVisible:h,focusProps:g}=dy({autoFocus:d}),{isHovered:p,hoverProps:y}=fy({isDisabled:u}),{pressed:x,pressProps:T}=my({disabled:u}),S=wd({ref:a,type:(l=f.type)!=null?l:"button",disabled:u||void 0,autoFocus:d},g,y,T),E=ti({disabled:u,hover:p,focus:h,active:x,autofocus:d});return Nt()({ourProps:S,theirProps:f,slot:E,defaultTag:lw,name:"Button"})}let bs=dt(sw),ow="span";var hr=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(hr||{});function rw(n,a){var l;let{features:o=1,...u}=n,d={ref:a,"aria-hidden":(o&2)===2?!0:(l=u["aria-hidden"])!=null?l:void 0,hidden:(o&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(o&4)===4&&(o&2)!==2&&{display:"none"}}};return Nt()({ourProps:d,theirProps:u,slot:{},defaultTag:ow,name:"Hidden"})}let Xf=dt(rw);function uw(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function ga(n){return uw(n)&&"tagName"in n}function Ia(n){return ga(n)&&"accessKey"in n}function ma(n){return ga(n)&&"tabIndex"in n}function cw(n){return ga(n)&&"style"in n}function fw(n){return Ia(n)&&n.nodeName==="IFRAME"}function dw(n){return Ia(n)&&n.nodeName==="INPUT"}let vy=Symbol();function hw(n,a=!0){return Object.assign(n,{[vy]:a})}function gn(...n){let a=w.useRef(n);w.useEffect(()=>{a.current=n},[n]);let l=De(o=>{for(let u of a.current)u!=null&&(typeof u=="function"?u(o):u.current=o)});return n.every(o=>o==null||(o==null?void 0:o[vy]))?void 0:l}let Ed=w.createContext(null);Ed.displayName="DescriptionContext";function yy(){let n=w.useContext(Ed);if(n===null){let a=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(a,yy),a}return n}function mw(){let[n,a]=w.useState([]);return[n.length>0?n.join(" "):void 0,w.useMemo(()=>function(l){let o=De(d=>(a(f=>[...f,d]),()=>a(f=>{let h=f.slice(),g=h.indexOf(d);return g!==-1&&h.splice(g,1),h}))),u=w.useMemo(()=>({register:o,slot:l.slot,name:l.name,props:l.props,value:l.value}),[o,l.slot,l.name,l.props,l.value]);return ue.createElement(Ed.Provider,{value:u},l.children)},[a])]}let pw="p";function gw(n,a){let l=w.useId(),o=py(),{id:u=`headlessui-description-${l}`,...d}=n,f=yy(),h=gn(a);At(()=>f.register(u),[u,f.register]);let g=ti({...f.slot,disabled:o||!1}),p={ref:h,...f.props,id:u};return Nt()({ourProps:p,theirProps:d,slot:g,defaultTag:pw,name:f.name||"Description"})}let vw=dt(gw),yw=Object.assign(vw,{});var xy=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(xy||{});let by=w.createContext(()=>{});function xw(){return w.useContext(by)}function bw({value:n,children:a}){return ue.createElement(by.Provider,{value:n},a)}function Sw(n,a){let l=xw();return ue.createElement(bs,{ref:a,...wd({onClick:l},n)})}let Sy=dt(Sw),Ty=class extends Map{constructor(a){super(),this.factory=a}get(a){let l=super.get(a);return l===void 0&&(l=this.factory(a),this.set(a,l)),l}};var Tw=Object.defineProperty,ww=(n,a,l)=>a in n?Tw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l,Ew=(n,a,l)=>(ww(n,a+"",l),l),wy=(n,a,l)=>{if(!a.has(n))throw TypeError("Cannot "+l)},Qt=(n,a,l)=>(wy(n,a,"read from private field"),l?l.call(n):a.get(n)),hf=(n,a,l)=>{if(a.has(n))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(n):a.set(n,l)},vv=(n,a,l,o)=>(wy(n,a,"write to private field"),a.set(n,l),l),cn,ts,ns;let jw=class{constructor(a){hf(this,cn,{}),hf(this,ts,new Ty(()=>new Set)),hf(this,ns,new Set),Ew(this,"disposables",Un()),vv(this,cn,a),hn.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Qt(this,cn)}subscribe(a,l){if(hn.isServer)return()=>{};let o={selector:a,callback:l,current:a(Qt(this,cn))};return Qt(this,ns).add(o),this.disposables.add(()=>{Qt(this,ns).delete(o)})}on(a,l){return hn.isServer?()=>{}:(Qt(this,ts).get(a).add(l),this.disposables.add(()=>{Qt(this,ts).get(a).delete(l)}))}send(a){let l=this.reduce(Qt(this,cn),a);if(l!==Qt(this,cn)){vv(this,cn,l);for(let o of Qt(this,ns)){let u=o.selector(Qt(this,cn));Ey(o.current,u)||(o.current=u,o.callback(u))}for(let o of Qt(this,ts).get(a.type))o(Qt(this,cn),a)}}};cn=new WeakMap,ts=new WeakMap,ns=new WeakMap;function Ey(n,a){return Object.is(n,a)?!0:typeof n!="object"||n===null||typeof a!="object"||a===null?!1:Array.isArray(n)&&Array.isArray(a)?n.length!==a.length?!1:mf(n[Symbol.iterator](),a[Symbol.iterator]()):n instanceof Map&&a instanceof Map||n instanceof Set&&a instanceof Set?n.size!==a.size?!1:mf(n.entries(),a.entries()):yv(n)&&yv(a)?mf(Object.entries(n)[Symbol.iterator](),Object.entries(a)[Symbol.iterator]()):!1}function mf(n,a){do{let l=n.next(),o=a.next();if(l.done&&o.done)return!0;if(l.done||o.done||!Object.is(l.value,o.value))return!1}while(!0)}function yv(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let a=Object.getPrototypeOf(n);return a===null||Object.getPrototypeOf(a)===null}var Aw=Object.defineProperty,Nw=(n,a,l)=>a in n?Aw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l,xv=(n,a,l)=>(Nw(n,typeof a!="symbol"?a+"":a,l),l),Cw=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(Cw||{});let Mw={0(n,a){let l=a.id,o=n.stack,u=n.stack.indexOf(l);if(u!==-1){let d=n.stack.slice();return d.splice(u,1),d.push(l),o=d,{...n,stack:o}}return{...n,stack:[...n.stack,l]}},1(n,a){let l=a.id,o=n.stack.indexOf(l);if(o===-1)return n;let u=n.stack.slice();return u.splice(o,1),{...n,stack:u}}},Dw=class jy extends jw{constructor(){super(...arguments),xv(this,"actions",{push:a=>this.send({type:0,id:a}),pop:a=>this.send({type:1,id:a})}),xv(this,"selectors",{isTop:(a,l)=>a.stack[a.stack.length-1]===l,inStack:(a,l)=>a.stack.includes(l)})}static new(){return new jy({stack:[]})}reduce(a,l){return _n(l.type,Mw,a,l)}};const Ay=new Ty(()=>Dw.new());var pf={exports:{}},gf={};/**
|
|
53
53
|
* @license React
|
|
54
54
|
* use-sync-external-store-with-selector.production.js
|
|
55
55
|
*
|
|
@@ -57,5 +57,5 @@ Error generating stack: `+s.message+`
|
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the MIT license found in the
|
|
59
59
|
* LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/var vv;function N2(){if(vv)return hf;vv=1;var n=Tr();function a(g,p){return g===p&&(g!==0||1/g===1/p)||g!==g&&p!==p}var l=typeof Object.is=="function"?Object.is:a,o=n.useSyncExternalStore,u=n.useRef,d=n.useEffect,f=n.useMemo,h=n.useDebugValue;return hf.useSyncExternalStoreWithSelector=function(g,p,y,x,T){var S=u(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=f(function(){function M(q){if(!C){if(C=!0,R=q,q=x(q),T!==void 0&&E.hasValue){var I=E.value;if(T(I,q))return _=I}return _=q}if(I=_,l(R,q))return I;var Z=x(q);return T!==void 0&&T(I,Z)?(R=q,I):(R=q,_=Z)}var C=!1,R,_,z=y===void 0?null:y;return[function(){return M(p())},z===null?void 0:function(){return M(z())}]},[p,y,x,T]);var D=o(g,S[0],S[1]);return d(function(){E.hasValue=!0,E.value=D},[D]),h(D),D},hf}var yv;function C2(){return yv||(yv=1,df.exports=N2()),df.exports}var M2=C2();function Ey(n,a,l=Sy){return M2.useSyncExternalStoreWithSelector(De(o=>n.subscribe(D2,o)),De(()=>n.state),De(()=>n.state),De(a),l)}function D2(n){return n}function xs(n,a){let l=w.useId(),o=wy.get(a),[u,d]=Ey(o,w.useCallback(f=>[o.selectors.isTop(f,l),o.selectors.inStack(f,l)],[o,l]));return At(()=>{if(n)return o.actions.push(l),()=>o.actions.pop(l)},[o,n,l]),n?d?u:!0:!1}let Yf=new Map,ls=new Map;function xv(n){var a;let l=(a=ls.get(n))!=null?a:0;return ls.set(n,l+1),l!==0?()=>bv(n):(Yf.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>bv(n))}function bv(n){var a;let l=(a=ls.get(n))!=null?a:1;if(l===1?ls.delete(n):ls.set(n,l-1),l!==1)return;let o=Yf.get(n);o&&(o["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",o["aria-hidden"]),n.inert=o.inert,Yf.delete(n))}function O2(n,{allowed:a,disallowed:l}={}){let o=xs(n,"inert-others");At(()=>{var u,d;if(!o)return;let f=Un();for(let g of(u=l==null?void 0:l())!=null?u:[])g&&f.add(xv(g));let h=(d=a==null?void 0:a())!=null?d:[];for(let g of h){if(!g)continue;let p=Ji(g);if(!p)continue;let y=g.parentElement;for(;y&&y!==p.body;){for(let x of y.children)h.some(T=>x.contains(T))||f.add(xv(x));y=y.parentElement}}return f.dispose},[o,a,l])}function z2(n,a,l){let o=ei(u=>{let d=u.getBoundingClientRect();d.x===0&&d.y===0&&d.width===0&&d.height===0&&l()});w.useEffect(()=>{if(!n)return;let u=a===null?null:Ia(a)?a:a.current;if(!u)return;let d=Un();if(typeof ResizeObserver<"u"){let f=new ResizeObserver(()=>o.current(u));f.observe(u),d.add(()=>f.disconnect())}if(typeof IntersectionObserver<"u"){let f=new IntersectionObserver(()=>o.current(u));f.observe(u),d.add(()=>f.disconnect())}return()=>d.dispose()},[a,o,n])}let fr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),R2=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var kn=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(kn||{}),qf=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(qf||{}),L2=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(L2||{});function k2(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(fr)).sort((a,l)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(l.tabIndex||Number.MAX_SAFE_INTEGER)))}function V2(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(R2)).sort((a,l)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(l.tabIndex||Number.MAX_SAFE_INTEGER)))}var jy=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(jy||{});function _2(n,a=0){var l;return n===((l=Ji(n))==null?void 0:l.body)?!1:_n(a,{0(){return n.matches(fr)},1(){let o=n;for(;o!==null;){if(o.matches(fr))return!0;o=o.parentElement}return!1}})}var U2=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(U2||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Vn(n){n==null||n.focus({preventScroll:!0})}let B2=["textarea","input"].join(",");function H2(n){var a,l;return(l=(a=n==null?void 0:n.matches)==null?void 0:a.call(n,B2))!=null?l:!1}function $2(n,a=l=>l){return n.slice().sort((l,o)=>{let u=a(l),d=a(o);if(u===null||d===null)return 0;let f=u.compareDocumentPosition(d);return f&Node.DOCUMENT_POSITION_FOLLOWING?-1:f&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function ss(n,a,{sorted:l=!0,relativeTo:o=null,skipElements:u=[]}={}){let d=Array.isArray(n)?n.length>0?Hf(n[0]):document:Hf(n),f=Array.isArray(n)?l?$2(n):n:a&64?V2(n):k2(n);u.length>0&&f.length>1&&(f=f.filter(S=>!u.some(E=>E!=null&&"current"in E?(E==null?void 0:E.current)===S:E===S))),o=o??(d==null?void 0:d.activeElement);let h=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,f.indexOf(o))-1;if(a&4)return Math.max(0,f.indexOf(o))+1;if(a&8)return f.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=a&32?{preventScroll:!0}:{},y=0,x=f.length,T;do{if(y>=x||y+x<=0)return 0;let S=g+y;if(a&16)S=(S+x)%x;else{if(S<0)return 3;if(S>=x)return 1}T=f[S],T==null||T.focus(p),y+=h}while(T!==cy(T));return a&6&&H2(T)&&T.select(),2}function Ay(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function G2(){return/Android/gi.test(window.navigator.userAgent)}function Sv(){return Ay()||G2()}function Ko(n,a,l,o){let u=ei(l);w.useEffect(()=>{if(!n)return;function d(f){u.current(f)}return document.addEventListener(a,d,o),()=>document.removeEventListener(a,d,o)},[n,a,o])}function Ny(n,a,l,o){let u=ei(l);w.useEffect(()=>{if(!n)return;function d(f){u.current(f)}return window.addEventListener(a,d,o),()=>window.removeEventListener(a,d,o)},[n,a,o])}const Tv=30;function Y2(n,a,l){let o=ei(l),u=w.useCallback(function(h,g){if(h.defaultPrevented)return;let p=g(h);if(p===null||!p.getRootNode().contains(p)||!p.isConnected)return;let y=(function x(T){return typeof T=="function"?x(T()):Array.isArray(T)||T instanceof Set?T:[T]})(a);for(let x of y)if(x!==null&&(x.contains(p)||h.composed&&h.composedPath().includes(x)))return;return!_2(p,jy.Loose)&&p.tabIndex!==-1&&h.preventDefault(),o.current(h,p)},[o,a]),d=w.useRef(null);Ko(n,"pointerdown",h=>{var g,p;Sv()||(d.current=((p=(g=h.composedPath)==null?void 0:g.call(h))==null?void 0:p[0])||h.target)},!0),Ko(n,"pointerup",h=>{if(Sv()||!d.current)return;let g=d.current;return d.current=null,u(h,()=>g)},!0);let f=w.useRef({x:0,y:0});Ko(n,"touchstart",h=>{f.current.x=h.touches[0].clientX,f.current.y=h.touches[0].clientY},!0),Ko(n,"touchend",h=>{let g={x:h.changedTouches[0].clientX,y:h.changedTouches[0].clientY};if(!(Math.abs(g.x-f.current.x)>=Tv||Math.abs(g.y-f.current.y)>=Tv))return u(h,()=>ma(h.target)?h.target:null)},!0),Ny(n,"blur",h=>u(h,()=>o2(window.document.activeElement)?window.document.activeElement:null),!0)}function Td(...n){return w.useMemo(()=>Ji(...n),[...n])}function Cy(n,a,l,o){let u=ei(l);w.useEffect(()=>{n=n??window;function d(f){u.current(f)}return n.addEventListener(a,d,o),()=>n.removeEventListener(a,d,o)},[n,a,o])}function q2(n){return w.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function X2(n,a){let l=n(),o=new Set;return{getSnapshot(){return l},subscribe(u){return o.add(u),()=>o.delete(u)},dispatch(u,...d){let f=a[u].call(l,...d);f&&(l=f,o.forEach(h=>h()))}}}function K2(){let n;return{before({doc:a}){var l;let o=a.documentElement,u=(l=a.defaultView)!=null?l:window;n=Math.max(0,u.innerWidth-o.clientWidth)},after({doc:a,d:l}){let o=a.documentElement,u=Math.max(0,o.clientWidth-o.offsetWidth),d=Math.max(0,n-u);l.style(o,"paddingRight",`${d}px`)}}}function F2(){return Ay()?{before({doc:n,d:a,meta:l}){function o(u){for(let d of l().containers)for(let f of d())if(f.contains(u))return!0;return!1}a.microTask(()=>{var u;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let h=Un();h.style(n.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>h.dispose()))}let d=(u=window.scrollY)!=null?u:window.pageYOffset,f=null;a.addEventListener(n,"click",h=>{if(ma(h.target))try{let g=h.target.closest("a");if(!g)return;let{hash:p}=new URL(g.href),y=n.querySelector(p);ma(y)&&!o(y)&&(f=y)}catch{}},!0),a.group(h=>{a.addEventListener(n,"touchstart",g=>{if(h.dispose(),ma(g.target)&&s2(g.target))if(o(g.target)){let p=g.target;for(;p.parentElement&&o(p.parentElement);)p=p.parentElement;h.style(p,"overscrollBehavior","contain")}else h.style(g.target,"touchAction","none")})}),a.addEventListener(n,"touchmove",h=>{if(ma(h.target)){if(r2(h.target))return;if(o(h.target)){let g=h.target;for(;g.parentElement&&g.dataset.headlessuiPortal!==""&&!(g.scrollHeight>g.clientHeight||g.scrollWidth>g.clientWidth);)g=g.parentElement;g.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()}},{passive:!1}),a.add(()=>{var h;let g=(h=window.scrollY)!=null?h:window.pageYOffset;d!==g&&window.scrollTo(0,d),f&&f.isConnected&&(f.scrollIntoView({block:"nearest"}),f=null)})})}}:{}}function Z2(){return{before({doc:n,d:a}){a.style(n.documentElement,"overflow","hidden")}}}function wv(n){let a={};for(let l of n)Object.assign(a,l(a));return a}let Fa=X2(()=>new Map,{PUSH(n,a){var l;let o=(l=this.get(n))!=null?l:{doc:n,count:0,d:Un(),meta:new Set,computedMeta:{}};return o.count++,o.meta.add(a),o.computedMeta=wv(o.meta),this.set(n,o),this},POP(n,a){let l=this.get(n);return l&&(l.count--,l.meta.delete(a),l.computedMeta=wv(l.meta)),this},SCROLL_PREVENT(n){let a={doc:n.doc,d:n.d,meta(){return n.computedMeta}},l=[F2(),K2(),Z2()];l.forEach(({before:o})=>o==null?void 0:o(a)),l.forEach(({after:o})=>o==null?void 0:o(a))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Fa.subscribe(()=>{let n=Fa.getSnapshot(),a=new Map;for(let[l]of n)a.set(l,l.documentElement.style.overflow);for(let l of n.values()){let o=a.get(l.doc)==="hidden",u=l.count!==0;(u&&!o||!u&&o)&&Fa.dispatch(l.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",l),l.count===0&&Fa.dispatch("TEARDOWN",l)}});function Q2(n,a,l=()=>({containers:[]})){let o=q2(Fa),u=a?o.get(a):void 0,d=u?u.count>0:!1;return At(()=>{if(!(!a||!n))return Fa.dispatch("PUSH",a,l),()=>Fa.dispatch("POP",a,l)},[n,a]),d}function P2(n,a,l=()=>[document.body]){let o=xs(n,"scroll-lock");Q2(o,a,u=>{var d;return{containers:[...(d=u.containers)!=null?d:[],l]}})}function J2(n=0){let[a,l]=w.useState(n),o=w.useCallback(g=>l(g),[]),u=w.useCallback(g=>l(p=>p|g),[]),d=w.useCallback(g=>(a&g)===g,[a]),f=w.useCallback(g=>l(p=>p&~g),[]),h=w.useCallback(g=>l(p=>p^g),[]);return{flags:a,setFlag:o,addFlag:u,hasFlag:d,removeFlag:f,toggleFlag:h}}var W2={},Ev,jv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ev=process==null?void 0:W2)==null?void 0:Ev.NODE_ENV)==="test"&&typeof((jv=Element==null?void 0:Element.prototype)==null?void 0:jv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
61
|
-
`)),[]});var I2=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(I2||{});function ew(n){let a={};for(let l in n)n[l]===!0&&(a[`data-${l}`]="");return a}function tw(n,a,l,o){let[u,d]=w.useState(l),{hasFlag:f,addFlag:h,removeFlag:g}=J2(n&&u?3:0),p=w.useRef(!1),y=w.useRef(!1),x=vs();return At(()=>{var T;if(n){if(l&&d(!0),!a){l&&h(3);return}return(T=o==null?void 0:o.start)==null||T.call(o,l),nw(a,{inFlight:p,prepare(){y.current?y.current=!1:y.current=p.current,p.current=!0,!y.current&&(l?(h(3),g(4)):(h(4),g(2)))},run(){y.current?l?(g(3),h(4)):(g(4),h(3)):l?g(1):h(1)},done(){var S;y.current&&lw(a)||(p.current=!1,g(7),l||d(!1),(S=o==null?void 0:o.end)==null||S.call(o,l))}})}},[n,l,a,x]),n?[u,{closed:f(1),enter:f(2),leave:f(4),transition:f(2)||f(4)}]:[l,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function nw(n,{prepare:a,run:l,done:o,inFlight:u}){let d=Un();return iw(n,{prepare:a,inFlight:u}),d.nextFrame(()=>{l(),d.requestAnimationFrame(()=>{d.add(aw(n,o))})}),d.dispose}function aw(n,a){var l,o;let u=Un();if(!n)return u.dispose;let d=!1;u.add(()=>{d=!0});let f=(o=(l=n.getAnimations)==null?void 0:l.call(n).filter(h=>h instanceof CSSTransition))!=null?o:[];return f.length===0?(a(),u.dispose):(Promise.allSettled(f.map(h=>h.finished)).then(()=>{d||a()}),u.dispose)}function iw(n,{inFlight:a,prepare:l}){if(a!=null&&a.current){l();return}let o=n.style.transition;n.style.transition="none",l(),n.offsetHeight,n.style.transition=o}function lw(n){var a,l;return((l=(a=n.getAnimations)==null?void 0:a.call(n))!=null?l:[]).some(o=>o instanceof CSSTransition&&o.playState!=="finished")}function wd(n,a){let l=w.useRef([]),o=De(n);w.useEffect(()=>{let u=[...l.current];for(let[d,f]of a.entries())if(l.current[d]!==f){let h=o(a,u);return l.current=a,h}},[o,...a])}let jr=w.createContext(null);jr.displayName="OpenClosedContext";var an=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(an||{});function Ar(){return w.useContext(jr)}function sw({value:n,children:a}){return ue.createElement(jr.Provider,{value:n},a)}function ow({children:n}){return ue.createElement(jr.Provider,{value:null},n)}function rw(n){function a(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let da=[];rw(()=>{function n(a){if(!ma(a.target)||a.target===document.body||da[0]===a.target)return;let l=a.target;l=l.closest(fr),da.unshift(l??a.target),da=da.filter(o=>o!=null&&o.isConnected),da.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function My(n){let a=De(n),l=w.useRef(!1);w.useEffect(()=>(l.current=!1,()=>{l.current=!0,Er(()=>{l.current&&a()})}),[a])}let Dy=w.createContext(!1);function uw(){return w.useContext(Dy)}function Av(n){return ue.createElement(Dy.Provider,{value:n.force},n.children)}function cw(n){let a=uw(),l=w.useContext(zy),[o,u]=w.useState(()=>{var d;if(!a&&l!==null)return(d=l.current)!=null?d:null;if(hn.isServer)return null;let f=n==null?void 0:n.getElementById("headlessui-portal-root");if(f)return f;if(n===null)return null;let h=n.createElement("div");return h.setAttribute("id","headlessui-portal-root"),n.body.appendChild(h)});return w.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),w.useEffect(()=>{a||l!==null&&u(l.current)},[l,u,a]),o}let Oy=w.Fragment,fw=dt(function(n,a){let{ownerDocument:l=null,...o}=n,u=w.useRef(null),d=gn(u2(T=>{u.current=T}),a),f=Td(u.current),h=l??f,g=cw(h),p=w.useContext(Xf),y=vs(),x=Nt();return My(()=>{var T;g&&g.childNodes.length<=0&&((T=g.parentElement)==null||T.removeChild(g))}),g?DT.createPortal(ue.createElement("div",{"data-headlessui-portal":"",ref:T=>{y.dispose(),p&&T&&y.add(p.register(T))}},x({ourProps:{ref:d},theirProps:o,slot:{},defaultTag:Oy,name:"Portal"})),g):null});function dw(n,a){let l=gn(a),{enabled:o=!0,ownerDocument:u,...d}=n,f=Nt();return o?ue.createElement(fw,{...d,ownerDocument:u,ref:l}):f({ourProps:{ref:l},theirProps:d,slot:{},defaultTag:Oy,name:"Portal"})}let hw=w.Fragment,zy=w.createContext(null);function mw(n,a){let{target:l,...o}=n,u={ref:gn(a)},d=Nt();return ue.createElement(zy.Provider,{value:l},d({ourProps:u,theirProps:o,defaultTag:hw,name:"Popover.Group"}))}let Xf=w.createContext(null);function pw(){let n=w.useContext(Xf),a=w.useRef([]),l=De(d=>(a.current.push(d),n&&n.register(d),()=>o(d))),o=De(d=>{let f=a.current.indexOf(d);f!==-1&&a.current.splice(f,1),n&&n.unregister(d)}),u=w.useMemo(()=>({register:l,unregister:o,portals:a}),[l,o,a]);return[a,w.useMemo(()=>function({children:d}){return ue.createElement(Xf.Provider,{value:u},d)},[u])]}let gw=dt(dw),Ry=dt(mw),vw=Object.assign(gw,{Group:Ry}),yw=w.Fragment;function xw(n,a){let{...l}=n,o=!1,{isFocusVisible:u,focusProps:d}=uy(),{isHovered:f,hoverProps:h}=ry({isDisabled:o}),{pressed:g,pressProps:p}=fy({disabled:o}),y=bd({ref:a},d,h,p),x=ti({hover:f,focus:u,active:g});return Nt()({ourProps:y,theirProps:l,slot:x,defaultTag:yw,name:"DataInteractive"})}let bw=dt(xw);function Sw(n,a=typeof document<"u"?document.defaultView:null,l){let o=xs(n,"escape");Cy(a,"keydown",u=>{o&&(u.defaultPrevented||u.key===gy.Escape&&l(u))})}function Tw(){var n;let[a]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[l,o]=w.useState((n=a==null?void 0:a.matches)!=null?n:!1);return At(()=>{if(!a)return;function u(d){o(d.matches)}return a.addEventListener("change",u),()=>a.removeEventListener("change",u)},[a]),l}function ww({defaultContainers:n=[],portals:a,mainTreeNode:l}={}){let o=De(()=>{var u,d;let f=Ji(l),h=[];for(let g of n)g!==null&&(ga(g)?h.push(g):"current"in g&&ga(g.current)&&h.push(g.current));if(a!=null&&a.current)for(let g of a.current)h.push(g);for(let g of(u=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?u:[])g!==document.body&&g!==document.head&&ga(g)&&g.id!=="headlessui-portal-root"&&(l&&(g.contains(l)||g.contains((d=l==null?void 0:l.getRootNode())==null?void 0:d.host))||h.some(p=>g.contains(p))||h.push(g));return h});return{resolveContainers:o,contains:De(u=>o().some(d=>d.contains(u)))}}let Ly=w.createContext(null);function Nv({children:n,node:a}){let[l,o]=w.useState(null),u=ky(a??l);return ue.createElement(Ly.Provider,{value:u},n,u===null&&ue.createElement(Gf,{features:cr.Hidden,ref:d=>{var f,h;if(d){for(let g of(h=(f=Ji(d))==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?h:[])if(g!==document.body&&g!==document.head&&ga(g)&&g!=null&&g.contains(d)){o(g);break}}}}))}function ky(n=null){var a;return(a=w.useContext(Ly))!=null?a:n}function Ew(){let n=typeof document>"u";return"useSyncExternalStore"in sv?(a=>a.useSyncExternalStore)(sv)(()=>()=>{},()=>!1,()=>!n):!1}function Nr(){let n=Ew(),[a,l]=w.useState(hn.isHandoffComplete);return a&&hn.isHandoffComplete===!1&&l(!1),w.useEffect(()=>{a!==!0&&l(!0)},[a]),w.useEffect(()=>hn.handoff(),[]),n?!1:a}function Ed(){let n=w.useRef(!1);return At(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var ts=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(ts||{});function jw(){let n=w.useRef(0);return Ny(!0,"keydown",a=>{a.key==="Tab"&&(n.current=a.shiftKey?1:0)},!0),n}function Vy(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let a=new Set;for(let l of n.current)ga(l.current)&&a.add(l.current);return a}let Aw="div";var qa=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(qa||{});function Nw(n,a){let l=w.useRef(null),o=gn(l,a),{initialFocus:u,initialFocusFallback:d,containers:f,features:h=15,...g}=n;Nr()||(h=0);let p=Td(l.current);Ow(h,{ownerDocument:p});let y=zw(h,{ownerDocument:p,container:l,initialFocus:u,initialFocusFallback:d});Rw(h,{ownerDocument:p,container:l,containers:f,previousActiveElement:y});let x=jw(),T=De(R=>{if(!Ia(l.current))return;let _=l.current;(z=>z())(()=>{_n(x.current,{[ts.Forwards]:()=>{ss(_,kn.First,{skipElements:[R.relatedTarget,d]})},[ts.Backwards]:()=>{ss(_,kn.Last,{skipElements:[R.relatedTarget,d]})}})})}),S=xs(!!(h&2),"focus-trap#tab-lock"),E=vs(),D=w.useRef(!1),M={ref:o,onKeyDown(R){R.key=="Tab"&&(D.current=!0,E.requestAnimationFrame(()=>{D.current=!1}))},onBlur(R){if(!(h&4))return;let _=Vy(f);Ia(l.current)&&_.add(l.current);let z=R.relatedTarget;ma(z)&&z.dataset.headlessuiFocusGuard!=="true"&&(_y(_,z)||(D.current?ss(l.current,_n(x.current,{[ts.Forwards]:()=>kn.Next,[ts.Backwards]:()=>kn.Previous})|kn.WrapAround,{relativeTo:R.target}):ma(R.target)&&Vn(R.target)))}},C=Nt();return ue.createElement(ue.Fragment,null,S&&ue.createElement(Gf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:T,features:cr.Focusable}),C({ourProps:M,theirProps:g,defaultTag:Aw,name:"FocusTrap"}),S&&ue.createElement(Gf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:T,features:cr.Focusable}))}let Cw=dt(Nw),Mw=Object.assign(Cw,{features:qa});function Dw(n=!0){let a=w.useRef(da.slice());return wd(([l],[o])=>{o===!0&&l===!1&&Er(()=>{a.current.splice(0)}),o===!1&&l===!0&&(a.current=da.slice())},[n,da,a]),De(()=>{var l;return(l=a.current.find(o=>o!=null&&o.isConnected))!=null?l:null})}function Ow(n,{ownerDocument:a}){let l=!!(n&8),o=Dw(l);wd(()=>{l||KT(a==null?void 0:a.body)&&Vn(o())},[l]),My(()=>{l&&Vn(o())})}function zw(n,{ownerDocument:a,container:l,initialFocus:o,initialFocusFallback:u}){let d=w.useRef(null),f=xs(!!(n&1),"focus-trap#initial-focus"),h=Ed();return wd(()=>{if(n===0)return;if(!f){u!=null&&u.current&&Vn(u.current);return}let g=l.current;g&&Er(()=>{if(!h.current)return;let p=a==null?void 0:a.activeElement;if(o!=null&&o.current){if((o==null?void 0:o.current)===p){d.current=p;return}}else if(g.contains(p)){d.current=p;return}if(o!=null&&o.current)Vn(o.current);else{if(n&16){if(ss(g,kn.First|kn.AutoFocus)!==qf.Error)return}else if(ss(g,kn.First)!==qf.Error)return;if(u!=null&&u.current&&(Vn(u.current),(a==null?void 0:a.activeElement)===u.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}d.current=a==null?void 0:a.activeElement})},[u,f,n]),d}function Rw(n,{ownerDocument:a,container:l,containers:o,previousActiveElement:u}){let d=Ed(),f=!!(n&4);Cy(a==null?void 0:a.defaultView,"focus",h=>{if(!f||!d.current)return;let g=Vy(o);Ia(l.current)&&g.add(l.current);let p=u.current;if(!p)return;let y=h.target;Ia(y)?_y(g,y)?(u.current=y,Vn(y)):(h.preventDefault(),h.stopPropagation(),Vn(p)):Vn(u.current)},!0)}function _y(n,a){for(let l of n)if(l.contains(a))return!0;return!1}function Uy(n){var a;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!is((a=n.as)!=null?a:Hy)||ue.Children.count(n.children)===1}let Cr=w.createContext(null);Cr.displayName="TransitionContext";var Lw=(n=>(n.Visible="visible",n.Hidden="hidden",n))(Lw||{});function kw(){let n=w.useContext(Cr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function Vw(){let n=w.useContext(Mr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Mr=w.createContext(null);Mr.displayName="NestingContext";function Dr(n){return"children"in n?Dr(n.children):n.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function By(n,a){let l=ei(n),o=w.useRef([]),u=Ed(),d=vs(),f=De((S,E=ha.Hidden)=>{let D=o.current.findIndex(({el:M})=>M===S);D!==-1&&(_n(E,{[ha.Unmount](){o.current.splice(D,1)},[ha.Hidden](){o.current[D].state="hidden"}}),d.microTask(()=>{var M;!Dr(o)&&u.current&&((M=l.current)==null||M.call(l))}))}),h=De(S=>{let E=o.current.find(({el:D})=>D===S);return E?E.state!=="visible"&&(E.state="visible"):o.current.push({el:S,state:"visible"}),()=>f(S,ha.Unmount)}),g=w.useRef([]),p=w.useRef(Promise.resolve()),y=w.useRef({enter:[],leave:[]}),x=De((S,E,D)=>{g.current.splice(0),a&&(a.chains.current[E]=a.chains.current[E].filter(([M])=>M!==S)),a==null||a.chains.current[E].push([S,new Promise(M=>{g.current.push(M)})]),a==null||a.chains.current[E].push([S,new Promise(M=>{Promise.all(y.current[E].map(([C,R])=>R)).then(()=>M())})]),E==="enter"?p.current=p.current.then(()=>a==null?void 0:a.wait.current).then(()=>D(E)):D(E)}),T=De((S,E,D)=>{Promise.all(y.current[E].splice(0).map(([M,C])=>C)).then(()=>{var M;(M=g.current.shift())==null||M()}).then(()=>D(E))});return w.useMemo(()=>({children:o,register:h,unregister:f,onStart:x,onStop:T,wait:p,chains:y}),[h,f,o,x,T,y,p])}let Hy=w.Fragment,$y=ur.RenderStrategy;function _w(n,a){var l,o;let{transition:u=!0,beforeEnter:d,afterEnter:f,beforeLeave:h,afterLeave:g,enter:p,enterFrom:y,enterTo:x,entered:T,leave:S,leaveFrom:E,leaveTo:D,...M}=n,[C,R]=w.useState(null),_=w.useRef(null),z=Uy(n),q=gn(...z?[_,a,R]:a===null?[]:[a]),I=(l=M.unmount)==null||l?ha.Unmount:ha.Hidden,{show:Z,appear:J,initial:F}=kw(),[K,te]=w.useState(Z?"visible":"hidden"),ie=Vw(),{register:Te,unregister:Ae}=ie;At(()=>Te(_),[Te,_]),At(()=>{if(I===ha.Hidden&&_.current){if(Z&&K!=="visible"){te("visible");return}return _n(K,{hidden:()=>Ae(_),visible:()=>Te(_)})}},[K,_,Te,Ae,Z,I]);let Ne=Nr();At(()=>{if(z&&Ne&&K==="visible"&&_.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[_,K,Ne,z]);let B=F&&!J,Q=J&&Z&&F,P=w.useRef(!1),oe=By(()=>{P.current||(te("hidden"),Ae(_))},ie),he=De(be=>{P.current=!0;let Ze=be?"enter":"leave";oe.onStart(_,Ze,ke=>{ke==="enter"?d==null||d():ke==="leave"&&(h==null||h())})}),A=De(be=>{let Ze=be?"enter":"leave";P.current=!1,oe.onStop(_,Ze,ke=>{ke==="enter"?f==null||f():ke==="leave"&&(g==null||g())}),Ze==="leave"&&!Dr(oe)&&(te("hidden"),Ae(_))});w.useEffect(()=>{z&&u||(he(Z),A(Z))},[Z,z,u]);let G=!(!u||!z||!Ne||B),[,X]=tw(G,C,Z,{start:he,end:A}),W=Ga({ref:q,className:((o=$f(M.className,Q&&p,Q&&y,X.enter&&p,X.enter&&X.closed&&y,X.enter&&!X.closed&&x,X.leave&&S,X.leave&&!X.closed&&E,X.leave&&X.closed&&D,!X.transition&&Z&&T))==null?void 0:o.trim())||void 0,...ew(X)}),re=0;K==="visible"&&(re|=an.Open),K==="hidden"&&(re|=an.Closed),Z&&K==="hidden"&&(re|=an.Opening),!Z&&K==="visible"&&(re|=an.Closing);let me=Nt();return ue.createElement(Mr.Provider,{value:oe},ue.createElement(sw,{value:re},me({ourProps:W,theirProps:M,defaultTag:Hy,features:$y,visible:K==="visible",name:"Transition.Child"})))}function Uw(n,a){let{show:l,appear:o=!1,unmount:u=!0,...d}=n,f=w.useRef(null),h=Uy(n),g=gn(...h?[f,a]:a===null?[]:[a]);Nr();let p=Ar();if(l===void 0&&p!==null&&(l=(p&an.Open)===an.Open),l===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[y,x]=w.useState(l?"visible":"hidden"),T=By(()=>{l||x("hidden")}),[S,E]=w.useState(!0),D=w.useRef([l]);At(()=>{S!==!1&&D.current[D.current.length-1]!==l&&(D.current.push(l),E(!1))},[D,l]);let M=w.useMemo(()=>({show:l,appear:o,initial:S}),[l,o,S]);At(()=>{l?x("visible"):!Dr(T)&&f.current!==null&&x("hidden")},[l,T]);let C={unmount:u},R=De(()=>{var q;S&&E(!1),(q=n.beforeEnter)==null||q.call(n)}),_=De(()=>{var q;S&&E(!1),(q=n.beforeLeave)==null||q.call(n)}),z=Nt();return ue.createElement(Mr.Provider,{value:T},ue.createElement(Cr.Provider,{value:M},z({ourProps:{...C,as:w.Fragment,children:ue.createElement(Gy,{ref:g,...C,...d,beforeEnter:R,beforeLeave:_})},theirProps:{},defaultTag:w.Fragment,features:$y,visible:y==="visible",name:"Transition"})))}function Bw(n,a){let l=w.useContext(Cr)!==null,o=Ar()!==null;return ue.createElement(ue.Fragment,null,!l&&o?ue.createElement(Kf,{ref:a,...n}):ue.createElement(Gy,{ref:a,...n}))}let Kf=dt(Uw),Gy=dt(_w),jd=dt(Bw),Hw=Object.assign(Kf,{Child:jd,Root:Kf});var $w=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))($w||{}),Gw=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(Gw||{});let Yw={0(n,a){return n.titleId===a.id?n:{...n,titleId:a.id}}},Ad=w.createContext(null);Ad.displayName="DialogContext";function Or(n){let a=w.useContext(Ad);if(a===null){let l=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,Or),l}return a}function qw(n,a){return _n(a.type,Yw,n,a)}let Cv=dt(function(n,a){let l=w.useId(),{id:o=`headlessui-dialog-${l}`,open:u,onClose:d,initialFocus:f,role:h="dialog",autoFocus:g=!0,__demoMode:p=!1,unmount:y=!1,...x}=n,T=w.useRef(!1);h=(function(){return h==="dialog"||h==="alertdialog"?h:(T.current||(T.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let S=Ar();u===void 0&&S!==null&&(u=(S&an.Open)===an.Open);let E=w.useRef(null),D=gn(E,a),M=Td(E.current),C=u?0:1,[R,_]=w.useReducer(qw,{titleId:null,descriptionId:null,panelRef:w.createRef()}),z=De(()=>d(!1)),q=De(X=>_({type:0,id:X})),I=Nr()?C===0:!1,[Z,J]=pw(),F={get current(){var X;return(X=R.panelRef.current)!=null?X:E.current}},K=ky(),{resolveContainers:te}=ww({mainTreeNode:K,portals:Z,defaultContainers:[F]}),ie=S!==null?(S&an.Closing)===an.Closing:!1;O2(p||ie?!1:I,{allowed:De(()=>{var X,W;return[(W=(X=E.current)==null?void 0:X.closest("[data-headlessui-portal]"))!=null?W:null]}),disallowed:De(()=>{var X;return[(X=K==null?void 0:K.closest("body > *:not(#headlessui-portal-root)"))!=null?X:null]})});let Te=wy.get(null);At(()=>{if(I)return Te.actions.push(o),()=>Te.actions.pop(o)},[Te,o,I]);let Ae=Ey(Te,w.useCallback(X=>Te.selectors.isTop(X,o),[Te,o]));Y2(Ae,te,X=>{X.preventDefault(),z()}),Sw(Ae,M==null?void 0:M.defaultView,X=>{X.preventDefault(),X.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),z()}),P2(p||ie?!1:I,M,te),z2(I,E,z);let[Ne,B]=c2(),Q=w.useMemo(()=>[{dialogState:C,close:z,setTitleId:q,unmount:y},R],[C,z,q,y,R]),P=ti({open:C===0}),oe={ref:D,id:o,role:h,tabIndex:-1,"aria-modal":p?void 0:C===0?!0:void 0,"aria-labelledby":R.titleId,"aria-describedby":Ne,unmount:y},he=!Tw(),A=qa.None;I&&!p&&(A|=qa.RestoreFocus,A|=qa.TabLock,g&&(A|=qa.AutoFocus),he&&(A|=qa.InitialFocus));let G=Nt();return ue.createElement(ow,null,ue.createElement(Av,{force:!0},ue.createElement(vw,null,ue.createElement(Ad.Provider,{value:Q},ue.createElement(Ry,{target:E},ue.createElement(Av,{force:!1},ue.createElement(B,{slot:P},ue.createElement(J,null,ue.createElement(Mw,{initialFocus:f,initialFocusFallback:E,containers:te,features:A},ue.createElement(g2,{value:z},G({ourProps:oe,theirProps:x,slot:P,defaultTag:Xw,features:Kw,visible:C===0,name:"Dialog"})))))))))))}),Xw="div",Kw=ur.RenderStrategy|ur.Static;function Fw(n,a){let{transition:l=!1,open:o,...u}=n,d=Ar(),f=n.hasOwnProperty("open")||d!==null,h=n.hasOwnProperty("onClose");if(!f&&!h)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!f)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!h)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!d&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(o!==void 0||l)&&!u.static?ue.createElement(Nv,null,ue.createElement(Hw,{show:o,transition:l,unmount:u.unmount},ue.createElement(Cv,{ref:a,...u}))):ue.createElement(Nv,null,ue.createElement(Cv,{ref:a,open:o,...u}))}let Zw="div";function Qw(n,a){let l=w.useId(),{id:o=`headlessui-dialog-panel-${l}`,transition:u=!1,...d}=n,[{dialogState:f,unmount:h},g]=Or("Dialog.Panel"),p=gn(a,g.panelRef),y=ti({open:f===0}),x=De(M=>{M.stopPropagation()}),T={ref:p,id:o,onClick:x},S=u?jd:w.Fragment,E=u?{unmount:h}:{},D=Nt();return ue.createElement(S,{...E},D({ourProps:T,theirProps:d,slot:y,defaultTag:Zw,name:"Dialog.Panel"}))}let Pw="div";function Jw(n,a){let{transition:l=!1,...o}=n,[{dialogState:u,unmount:d}]=Or("Dialog.Backdrop"),f=ti({open:u===0}),h={ref:a,"aria-hidden":!0},g=l?jd:w.Fragment,p=l?{unmount:d}:{},y=Nt();return ue.createElement(g,{...p},y({ourProps:h,theirProps:o,slot:f,defaultTag:Pw,name:"Dialog.Backdrop"}))}let Ww="h2";function Iw(n,a){let l=w.useId(),{id:o=`headlessui-dialog-title-${l}`,...u}=n,[{dialogState:d,setTitleId:f}]=Or("Dialog.Title"),h=gn(a);w.useEffect(()=>(f(o),()=>f(null)),[o,f]);let g=ti({open:d===0}),p={ref:h,id:o};return Nt()({ourProps:p,theirProps:u,slot:g,defaultTag:Ww,name:"Dialog.Title"})}let eE=dt(Fw),Yy=dt(Qw),tE=dt(Jw),nE=dt(Iw),aE=Object.assign(eE,{Panel:Yy,Title:nE,Description:m2});const dr=w.createContext({});function iE(n){const a=w.useRef(null);return a.current===null&&(a.current=n()),a.current}const lE=typeof window<"u",qy=lE?w.useLayoutEffect:w.useEffect,Nd=w.createContext(null);function Cd(n,a){n.indexOf(a)===-1&&n.push(a)}function hr(n,a){const l=n.indexOf(a);l>-1&&n.splice(l,1)}const pn=(n,a,l)=>l>a?a:l<n?n:l;let Md=()=>{};const va={},Xy=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function Ky(n){return typeof n=="object"&&n!==null}const Fy=n=>/^0[^.\s]+$/u.test(n);function Zy(n){let a;return()=>(a===void 0&&(a=n()),a)}const Jt=n=>n,sE=(n,a)=>l=>a(n(l)),bs=(...n)=>n.reduce(sE),ds=(n,a,l)=>{const o=a-n;return o===0?1:(l-n)/o};class Dd{constructor(){this.subscriptions=[]}add(a){return Cd(this.subscriptions,a),()=>hr(this.subscriptions,a)}notify(a,l,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](a,l,o);else for(let d=0;d<u;d++){const f=this.subscriptions[d];f&&f(a,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ut=n=>n*1e3,Pt=n=>n/1e3;function Qy(n,a){return a?n*(1e3/a):0}const Py=(n,a,l)=>(((1-3*l+3*a)*n+(3*l-6*a))*n+3*a)*n,oE=1e-7,rE=12;function uE(n,a,l,o,u){let d,f,h=0;do f=a+(l-a)/2,d=Py(f,o,u)-n,d>0?l=f:a=f;while(Math.abs(d)>oE&&++h<rE);return f}function Ss(n,a,l,o){if(n===a&&l===o)return Jt;const u=d=>uE(d,0,1,n,l);return d=>d===0||d===1?d:Py(u(d),a,o)}const Jy=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,Wy=n=>a=>1-n(1-a),Iy=Ss(.33,1.53,.69,.99),Od=Wy(Iy),ex=Jy(Od),tx=n=>n>=1?1:(n*=2)<1?.5*Od(n):.5*(2-Math.pow(2,-10*(n-1))),zd=n=>1-Math.sin(Math.acos(n)),nx=Wy(zd),ax=Jy(zd),cE=Ss(.42,0,1,1),fE=Ss(0,0,.58,1),ix=Ss(.42,0,.58,1),dE=n=>Array.isArray(n)&&typeof n[0]!="number",lx=n=>Array.isArray(n)&&typeof n[0]=="number",hE={linear:Jt,easeIn:cE,easeInOut:ix,easeOut:fE,circIn:zd,circInOut:ax,circOut:nx,backIn:Od,backInOut:ex,backOut:Iy,anticipate:tx},mE=n=>typeof n=="string",Mv=n=>{if(lx(n)){Md(n.length===4);const[a,l,o,u]=n;return Ss(a,l,o,u)}else if(mE(n))return hE[n];return n},Fo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function pE(n,a){let l=new Set,o=new Set,u=!1,d=!1;const f=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function g(y){f.has(y)&&(p.schedule(y),n()),y(h)}const p={schedule:(y,x=!1,T=!1)=>{const E=T&&u?l:o;return x&&f.add(y),E.add(y),y},cancel:y=>{o.delete(y),f.delete(y)},process:y=>{if(h=y,u){d=!0;return}u=!0;const x=l;l=o,o=x,l.forEach(g),l.clear(),u=!1,d&&(d=!1,p.process(y))}};return p}const gE=40;function sx(n,a){let l=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=Fo.reduce((_,z)=>(_[z]=pE(d),_),{}),{setup:h,read:g,resolveKeyframes:p,preUpdate:y,update:x,preRender:T,render:S,postRender:E}=f,D=()=>{const _=va.useManualTiming,z=_?u.timestamp:performance.now();l=!1,_||(u.delta=o?1e3/60:Math.max(Math.min(z-u.timestamp,gE),1)),u.timestamp=z,u.isProcessing=!0,h.process(u),g.process(u),p.process(u),y.process(u),x.process(u),T.process(u),S.process(u),E.process(u),u.isProcessing=!1,l&&a&&(o=!1,n(D))},M=()=>{l=!0,o=!0,u.isProcessing||n(D)};return{schedule:Fo.reduce((_,z)=>{const q=f[z];return _[z]=(I,Z=!1,J=!1)=>(l||M(),q.schedule(I,Z,J)),_},{}),cancel:_=>{for(let z=0;z<Fo.length;z++)f[Fo[z]].cancel(_)},state:u,steps:f}}const{schedule:Le,cancel:ya,state:ut,steps:mf}=sx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Jt,!0);let er;function vE(){er=void 0}const gt={now:()=>(er===void 0&>.set(ut.isProcessing||va.useManualTiming?ut.timestamp:performance.now()),er),set:n=>{er=n,queueMicrotask(vE)}},ox=n=>a=>typeof a=="string"&&a.startsWith(n),rx=ox("--"),yE=ox("var(--"),Rd=n=>yE(n)?xE.test(n.split("/*")[0].trim()):!1,xE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dv(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Wi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},hs={...Wi,transform:n=>pn(0,1,n)},Zo={...Wi,default:1},os=n=>Math.round(n*1e5)/1e5,Ld=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bE(n){return n==null}const SE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kd=(n,a)=>l=>!!(typeof l=="string"&&SE.test(l)&&l.startsWith(n)||a&&!bE(l)&&Object.prototype.hasOwnProperty.call(l,a)),ux=(n,a,l)=>o=>{if(typeof o!="string")return o;const[u,d,f,h]=o.match(Ld);return{[n]:parseFloat(u),[a]:parseFloat(d),[l]:parseFloat(f),alpha:h!==void 0?parseFloat(h):1}},TE=n=>pn(0,255,n),pf={...Wi,transform:n=>Math.round(TE(n))},Za={test:kd("rgb","red"),parse:ux("red","green","blue"),transform:({red:n,green:a,blue:l,alpha:o=1})=>"rgba("+pf.transform(n)+", "+pf.transform(a)+", "+pf.transform(l)+", "+os(hs.transform(o))+")"};function wE(n){let a="",l="",o="",u="";return n.length>5?(a=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),u=n.substring(7,9)):(a=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),u=n.substring(4,5),a+=a,l+=l,o+=o,u+=u),{red:parseInt(a,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const Ff={test:kd("#"),parse:wE,transform:Za.transform},Ts=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ca=Ts("deg"),mn=Ts("%"),ne=Ts("px"),EE=Ts("vh"),jE=Ts("vw"),Ov={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},Gi={test:kd("hsl","hue"),parse:ux("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+mn.transform(os(a))+", "+mn.transform(os(l))+", "+os(hs.transform(o))+")"},Ie={test:n=>Za.test(n)||Ff.test(n)||Gi.test(n),parse:n=>Za.test(n)?Za.parse(n):Gi.test(n)?Gi.parse(n):Ff.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Za.transform(n):Gi.transform(n),getAnimatableNone:n=>{const a=Ie.parse(n);return a.alpha=0,Ie.transform(a)}},AE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function NE(n){var a,l;return isNaN(n)&&typeof n=="string"&&(((a=n.match(Ld))==null?void 0:a.length)||0)+(((l=n.match(AE))==null?void 0:l.length)||0)>0}const cx="number",fx="color",CE="var",ME="var(",zv="${}",DE=/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 Fi(n){const a=n.toString(),l=[],o={color:[],number:[],var:[]},u=[];let d=0;const h=a.replace(DE,g=>(Ie.test(g)?(o.color.push(d),u.push(fx),l.push(Ie.parse(g))):g.startsWith(ME)?(o.var.push(d),u.push(CE),l.push(g)):(o.number.push(d),u.push(cx),l.push(parseFloat(g))),++d,zv)).split(zv);return{values:l,split:h,indexes:o,types:u}}function OE(n){return Fi(n).values}function dx({split:n,types:a}){const l=n.length;return o=>{let u="";for(let d=0;d<l;d++)if(u+=n[d],o[d]!==void 0){const f=a[d];f===cx?u+=os(o[d]):f===fx?u+=Ie.transform(o[d]):u+=o[d]}return u}}function zE(n){return dx(Fi(n))}const RE=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n,LE=(n,a)=>typeof n=="number"?a!=null&&a.trim().endsWith("/")?n:0:RE(n);function kE(n){const a=Fi(n);return dx(a)(a.values.map((o,u)=>LE(o,a.split[u])))}const ln={test:NE,parse:OE,createTransformer:zE,getAnimatableNone:kE};function gf(n,a,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(a-n)*6*l:l<1/2?a:l<2/3?n+(a-n)*(2/3-l)*6:n}function VE({hue:n,saturation:a,lightness:l,alpha:o}){n/=360,a/=100,l/=100;let u=0,d=0,f=0;if(!a)u=d=f=l;else{const h=l<.5?l*(1+a):l+a-l*a,g=2*l-h;u=gf(g,h,n+1/3),d=gf(g,h,n),f=gf(g,h,n-1/3)}return{red:Math.round(u*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:o}}function mr(n,a){return l=>l>0?a:n}const Be=(n,a,l)=>n+(a-n)*l,vf=(n,a,l)=>{const o=n*n,u=l*(a*a-o)+o;return u<0?0:Math.sqrt(u)},_E=[Ff,Za,Gi],UE=n=>_E.find(a=>a.test(n));function Rv(n){const a=UE(n);if(!a)return!1;let l=a.parse(n);return a===Gi&&(l=VE(l)),l}const Lv=(n,a)=>{const l=Rv(n),o=Rv(a);if(!l||!o)return mr(n,a);const u={...l};return d=>(u.red=vf(l.red,o.red,d),u.green=vf(l.green,o.green,d),u.blue=vf(l.blue,o.blue,d),u.alpha=Be(l.alpha,o.alpha,d),Za.transform(u))},Zf=new Set(["none","hidden"]);function BE(n,a){return Zf.has(n)?l=>l<=0?n:a:l=>l>=1?a:n}function HE(n,a){return l=>Be(n,a,l)}function Vd(n){return typeof n=="number"?HE:typeof n=="string"?Rd(n)?mr:Ie.test(n)?Lv:YE:Array.isArray(n)?hx:typeof n=="object"?Ie.test(n)?Lv:$E:mr}function hx(n,a){const l=[...n],o=l.length,u=n.map((d,f)=>Vd(d)(d,a[f]));return d=>{for(let f=0;f<o;f++)l[f]=u[f](d);return l}}function $E(n,a){const l={...n,...a},o={};for(const u in l)n[u]!==void 0&&a[u]!==void 0&&(o[u]=Vd(n[u])(n[u],a[u]));return u=>{for(const d in o)l[d]=o[d](u);return l}}function GE(n,a){const l=[],o={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],f=n.indexes[d][o[d]],h=n.values[f]??0;l[u]=h,o[d]++}return l}const YE=(n,a)=>{const l=ln.createTransformer(a),o=Fi(n),u=Fi(a);return o.indexes.var.length===u.indexes.var.length&&o.indexes.color.length===u.indexes.color.length&&o.indexes.number.length>=u.indexes.number.length?Zf.has(n)&&!u.values.length||Zf.has(a)&&!o.values.length?BE(n,a):bs(hx(GE(o,u),u.values),l):mr(n,a)};function mx(n,a,l){return typeof n=="number"&&typeof a=="number"&&typeof l=="number"?Be(n,a,l):Vd(n)(n,a)}const qE=n=>{const a=({timestamp:l})=>n(l);return{start:(l=!0)=>Le.update(a,l),stop:()=>ya(a),now:()=>ut.isProcessing?ut.timestamp:gt.now()}},px=(n,a,l=10)=>{let o="";const u=Math.max(Math.round(a/l),2);for(let d=0;d<u;d++)o+=Math.round(n(d/(u-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},pr=2e4;function _d(n){let a=0;const l=50;let o=n.next(a);for(;!o.done&&a<pr;)a+=l,o=n.next(a);return a>=pr?1/0:a}function XE(n,a=100,l){const o=l({...n,keyframes:[0,a]}),u=Math.min(_d(o),pr);return{type:"keyframes",ease:d=>o.next(u*d).value/a,duration:Pt(u)}}const qe={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 Qf(n,a){return n*Math.sqrt(1-a*a)}const KE=12;function FE(n,a,l){let o=l;for(let u=1;u<KE;u++)o=o-n(o)/a(o);return o}const yf=.001;function ZE({duration:n=qe.duration,bounce:a=qe.bounce,velocity:l=qe.velocity,mass:o=qe.mass}){let u,d,f=1-a;f=pn(qe.minDamping,qe.maxDamping,f),n=pn(qe.minDuration,qe.maxDuration,Pt(n)),f<1?(u=p=>{const y=p*f,x=y*n,T=y-l,S=Qf(p,f),E=Math.exp(-x);return yf-T/S*E},d=p=>{const x=p*f*n,T=x*l+l,S=Math.pow(f,2)*Math.pow(p,2)*n,E=Math.exp(-x),D=Qf(Math.pow(p,2),f);return(-u(p)+yf>0?-1:1)*((T-S)*E)/D}):(u=p=>{const y=Math.exp(-p*n),x=(p-l)*n+1;return-yf+y*x},d=p=>{const y=Math.exp(-p*n),x=(l-p)*(n*n);return y*x});const h=5/n,g=FE(u,d,h);if(n=Ut(n),isNaN(g))return{stiffness:qe.stiffness,damping:qe.damping,duration:n};{const p=Math.pow(g,2)*o;return{stiffness:p,damping:f*2*Math.sqrt(o*p),duration:n}}}const QE=["duration","bounce"],PE=["stiffness","damping","mass"];function kv(n,a){return a.some(l=>n[l]!==void 0)}function JE(n){let a={velocity:qe.velocity,stiffness:qe.stiffness,damping:qe.damping,mass:qe.mass,isResolvedFromDuration:!1,...n};if(!kv(n,PE)&&kv(n,QE))if(a.velocity=0,n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),u=o*o,d=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(u);a={...a,mass:qe.mass,stiffness:u,damping:d}}else{const l=ZE({...n,velocity:0});a={...a,...l,mass:qe.mass},a.isResolvedFromDuration=!0}return a}function gr(n=qe.visualDuration,a=qe.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:u}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],h={done:!1,value:d},{stiffness:g,damping:p,mass:y,duration:x,velocity:T,isResolvedFromDuration:S}=JE({...l,velocity:-Pt(l.velocity||0)}),E=T||0,D=p/(2*Math.sqrt(g*y)),M=f-d,C=Pt(Math.sqrt(g/y)),R=Math.abs(M)<5;o||(o=R?qe.restSpeed.granular:qe.restSpeed.default),u||(u=R?qe.restDelta.granular:qe.restDelta.default);let _,z,q,I,Z,J;if(D<1)q=Qf(C,D),I=(E+D*C*M)/q,_=K=>{const te=Math.exp(-D*C*K);return f-te*(I*Math.sin(q*K)+M*Math.cos(q*K))},Z=D*C*I+M*q,J=D*C*M-I*q,z=K=>Math.exp(-D*C*K)*(Z*Math.sin(q*K)+J*Math.cos(q*K));else if(D===1){_=te=>f-Math.exp(-C*te)*(M+(E+C*M)*te);const K=E+C*M;z=te=>Math.exp(-C*te)*(C*K*te-E)}else{const K=C*Math.sqrt(D*D-1);_=Ae=>{const Ne=Math.exp(-D*C*Ae),B=Math.min(K*Ae,300);return f-Ne*((E+D*C*M)*Math.sinh(B)+K*M*Math.cosh(B))/K};const te=(E+D*C*M)/K,ie=D*C*te-M*K,Te=D*C*M-te*K;z=Ae=>{const Ne=Math.exp(-D*C*Ae),B=Math.min(K*Ae,300);return Ne*(ie*Math.sinh(B)+Te*Math.cosh(B))}}const F={calculatedDuration:S&&x||null,velocity:K=>Ut(z(K)),next:K=>{if(!S&&D<1){const ie=Math.exp(-D*C*K),Te=Math.sin(q*K),Ae=Math.cos(q*K),Ne=f-ie*(I*Te+M*Ae),B=Ut(ie*(Z*Te+J*Ae));return h.done=Math.abs(B)<=o&&Math.abs(f-Ne)<=u,h.value=h.done?f:Ne,h}const te=_(K);if(S)h.done=K>=x;else{const ie=Ut(z(K));h.done=Math.abs(ie)<=o&&Math.abs(f-te)<=u}return h.value=h.done?f:te,h},toString:()=>{const K=Math.min(_d(F),pr),te=px(ie=>F.next(K*ie).value,K,30);return K+"ms "+te},toTransition:()=>{}};return F}gr.applyToOptions=n=>{const a=XE(n,100,gr);return n.ease=a.ease,n.duration=Ut(a.duration),n.type="keyframes",n};const WE=5;function gx(n,a,l){const o=Math.max(a-WE,0);return Qy(l-n(o),a-o)}function Pf({keyframes:n,velocity:a=0,power:l=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:d=500,modifyTarget:f,min:h,max:g,restDelta:p=.5,restSpeed:y}){const x=n[0],T={done:!1,value:x},S=J=>h!==void 0&&J<h||g!==void 0&&J>g,E=J=>h===void 0?g:g===void 0||Math.abs(h-J)<Math.abs(g-J)?h:g;let D=l*a;const M=x+D,C=f===void 0?M:f(M);C!==M&&(D=C-x);const R=J=>-D*Math.exp(-J/o),_=J=>C+R(J),z=J=>{const F=R(J),K=_(J);T.done=Math.abs(F)<=p,T.value=T.done?C:K};let q,I;const Z=J=>{S(T.value)&&(q=J,I=gr({keyframes:[T.value,E(T.value)],velocity:gx(_,J,T.value),damping:u,stiffness:d,restDelta:p,restSpeed:y}))};return Z(0),{calculatedDuration:null,next:J=>{let F=!1;return!I&&q===void 0&&(F=!0,z(J),Z(J)),q!==void 0&&J>=q?I.next(J-q):(!F&&z(J),T)}}}function IE(n,a,l){const o=[],u=l||va.mix||mx,d=n.length-1;for(let f=0;f<d;f++){let h=u(n[f],n[f+1]);if(a){const g=Array.isArray(a)?a[f]||Jt:a;h=bs(g,h)}o.push(h)}return o}function ej(n,a,{clamp:l=!0,ease:o,mixer:u}={}){const d=n.length;if(Md(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const f=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const h=IE(a,o,u),g=h.length,p=y=>{if(f&&y<n[0])return a[0];let x=0;if(g>1)for(;x<n.length-2&&!(y<n[x+1]);x++);const T=ds(n[x],n[x+1],y);return h[x](T)};return l?y=>p(pn(n[0],n[d-1],y)):p}function tj(n,a){const l=n[n.length-1];for(let o=1;o<=a;o++){const u=ds(0,a,o);n.push(Be(l,1,u))}}function nj(n){const a=[0];return tj(a,n.length-1),a}function aj(n,a){return n.map(l=>l*a)}function ij(n,a){return n.map(()=>a||ix).splice(0,n.length-1)}function rs({duration:n=300,keyframes:a,times:l,ease:o="easeInOut"}){const u=dE(o)?o.map(Mv):Mv(o),d={done:!1,value:a[0]},f=aj(l&&l.length===a.length?l:nj(a),n),h=ej(f,a,{ease:Array.isArray(u)?u:ij(a,u)});return{calculatedDuration:n,next:g=>(d.value=h(g),d.done=g>=n,d)}}const lj=n=>n!==null;function zr(n,{repeat:a,repeatType:l="loop"},o,u=1){const d=n.filter(lj),h=u<0||a&&l!=="loop"&&a%2===1?0:d.length-1;return!h||o===void 0?d[h]:o}const sj={decay:Pf,inertia:Pf,tween:rs,keyframes:rs,spring:gr};function vx(n){typeof n.type=="string"&&(n.type=sj[n.type])}class Ud{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,l){return this.finished.then(a,l)}}const oj=n=>n/100;class vr extends Ud{constructor(a){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=()=>{var o,u;const{motionValue:l}=this.options;l&&l.updatedAt!==gt.now()&&this.tick(gt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(o=this.options).onStop)==null||u.call(o))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;vx(a);const{type:l=rs,repeat:o=0,repeatDelay:u=0,repeatType:d,velocity:f=0}=a;let{keyframes:h}=a;const g=l||rs;g!==rs&&typeof h[0]!="number"&&(this.mixKeyframes=bs(oj,mx(h[0],h[1])),h=[0,100]);const p=g({...a,keyframes:h});d==="mirror"&&(this.mirroredGenerator=g({...a,keyframes:[...h].reverse(),velocity:-f})),p.calculatedDuration===null&&(p.calculatedDuration=_d(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+u,this.totalDuration=this.resolvedDuration*(o+1)-u,this.generator=p}updateTime(a){const l=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=l}tick(a,l=!1){const{generator:o,totalDuration:u,mixKeyframes:d,mirroredGenerator:f,resolvedDuration:h,calculatedDuration:g}=this;if(this.startTime===null)return o.next(0);const{delay:p=0,keyframes:y,repeat:x,repeatType:T,repeatDelay:S,type:E,onUpdate:D,finalKeyframe:M}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-u/this.speed,this.startTime)),l?this.currentTime=a:this.updateTime(a);const C=this.currentTime-p*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?C<0:C>u;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let _=this.currentTime,z=o;if(x){const J=Math.min(this.currentTime,u)/h;let F=Math.floor(J),K=J%1;!K&&J>=1&&(K=1),K===1&&F--,F=Math.min(F,x+1),!!(F%2)&&(T==="reverse"?(K=1-K,S&&(K-=S/h)):T==="mirror"&&(z=f)),_=pn(0,1,K)*h}let q;R?(this.delayState.value=y[0],q=this.delayState):q=z.next(_),d&&!R&&(q.value=d(q.value));let{done:I}=q;!R&&g!==null&&(I=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const Z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return Z&&E!==Pf&&(q.value=zr(y,this.options,M,this.speed)),D&&D(q.value),Z&&this.finish(),q}then(a,l){return this.finished.then(a,l)}get duration(){return Pt(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(this.currentTime)}set time(a){a=Ut(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=a,this.tick(a))}getGeneratorVelocity(){const a=this.currentTime;if(a<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(a);const l=this.generator.next(a).value;return gx(o=>this.generator.next(o).value,a,l)}get speed(){return this.playbackSpeed}set speed(a){const l=this.playbackSpeed!==a;l&&this.driver&&this.updateTime(gt.now()),this.playbackSpeed=a,l&&this.driver&&(this.time=Pt(this.currentTime))}play(){var u,d;if(this.isStopped)return;const{driver:a=qE,startTime:l}=this.options;this.driver||(this.driver=a(f=>this.tick(f))),(d=(u=this.options).onPlay)==null||d.call(u);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=l??o),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(gt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,l;this.notifyFinished(),this.teardown(),this.state="finished",(l=(a=this.options).onComplete)==null||l.call(a)}cancel(){var a,l;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(l=(a=this.options).onCancel)==null||l.call(a)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){var l;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(l=this.driver)==null||l.stop(),a.observe(this)}}function rj(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const Qa=n=>n*180/Math.PI,Jf=n=>{const a=Qa(Math.atan2(n[1],n[0]));return Wf(a)},uj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Jf,rotateZ:Jf,skewX:n=>Qa(Math.atan(n[1])),skewY:n=>Qa(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Wf=n=>(n=n%360,n<0&&(n+=360),n),Vv=Jf,_v=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),Uv=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),cj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_v,scaleY:Uv,scale:n=>(_v(n)+Uv(n))/2,rotateX:n=>Wf(Qa(Math.atan2(n[6],n[5]))),rotateY:n=>Wf(Qa(Math.atan2(-n[2],n[0]))),rotateZ:Vv,rotate:Vv,skewX:n=>Qa(Math.atan(n[4])),skewY:n=>Qa(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function If(n){return n.includes("scale")?1:0}function ed(n,a){if(!n||n==="none")return If(a);const l=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,u;if(l)o=cj,u=l;else{const h=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=uj,u=h}if(!u)return If(a);const d=o[a],f=u[1].split(",").map(dj);return typeof d=="function"?d(f):f[d]}const fj=(n,a)=>{const{transform:l="none"}=getComputedStyle(n);return ed(l,a)};function dj(n){return parseFloat(n.trim())}const Ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],el=new Set(Ii),Bv=n=>n===Wi||n===ne,hj=new Set(["x","y","z"]),mj=Ii.filter(n=>!hj.has(n));function pj(n){const a=[];return mj.forEach(l=>{const o=n.getValue(l);o!==void 0&&(a.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),a}const pa={width:({x:n},{paddingLeft:a="0",paddingRight:l="0",boxSizing:o})=>{const u=n.max-n.min;return o==="border-box"?u:u-parseFloat(a)-parseFloat(l)},height:({y:n},{paddingTop:a="0",paddingBottom:l="0",boxSizing:o})=>{const u=n.max-n.min;return o==="border-box"?u:u-parseFloat(a)-parseFloat(l)},top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>ed(a,"x"),y:(n,{transform:a})=>ed(a,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const Pa=new Set;let td=!1,nd=!1,ad=!1;function yx(){if(nd){const n=Array.from(Pa).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),l=new Map;a.forEach(o=>{const u=pj(o);u.length&&(l.set(o,u),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const u=l.get(o);u&&u.forEach(([d,f])=>{var h;(h=o.getValue(d))==null||h.set(f)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}nd=!1,td=!1,Pa.forEach(n=>n.complete(ad)),Pa.clear()}function xx(){Pa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(nd=!0)})}function gj(){ad=!0,xx(),yx(),ad=!1}class Bd{constructor(a,l,o,u,d,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=l,this.name=o,this.motionValue=u,this.element=d,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Pa.add(this),td||(td=!0,Le.read(xx),Le.resolveKeyframes(yx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:l,element:o,motionValue:u}=this;if(a[0]===null){const d=u==null?void 0:u.get(),f=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&l){const h=o.readValue(l,f);h!=null&&(a[0]=h)}a[0]===void 0&&(a[0]=f),u&&d===void 0&&u.set(a[0])}rj(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Pa.delete(this)}cancel(){this.state==="scheduled"&&(Pa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vj=n=>n.startsWith("--");function bx(n,a,l){vj(a)?n.style.setProperty(a,l):n.style[a]=l}const yj={};function Sx(n,a){const l=Zy(n);return()=>yj[a]??l()}const xj=Sx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Tx=Sx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ns=([n,a,l,o])=>`cubic-bezier(${n}, ${a}, ${l}, ${o})`,Hv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ns([0,.65,.55,1]),circOut:ns([.55,0,1,.45]),backIn:ns([.31,.01,.66,-.59]),backOut:ns([.33,1.53,.69,.99])};function wx(n,a){if(n)return typeof n=="function"?Tx()?px(n,a):"ease-out":lx(n)?ns(n):Array.isArray(n)?n.map(l=>wx(l,a)||Hv.easeOut):Hv[n]}function bj(n,a,l,{delay:o=0,duration:u=300,repeat:d=0,repeatType:f="loop",ease:h="easeOut",times:g}={},p=void 0){const y={[a]:l};g&&(y.offset=g);const x=wx(h,u);Array.isArray(x)&&(y.easing=x);const T={delay:o,duration:u,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"};return p&&(T.pseudoElement=p),n.animate(y,T)}function Ex(n){return typeof n=="function"&&"applyToOptions"in n}function Sj({type:n,...a}){return Ex(n)&&Tx()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class jx extends Ud{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:l,name:o,keyframes:u,pseudoElement:d,allowFlatten:f=!1,finalKeyframe:h,onComplete:g}=a;this.isPseudoElement=!!d,this.allowFlatten=f,this.options=a,Md(typeof a.type!="string");const p=Sj(a);this.animation=bj(l,o,u,p,d),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const y=zr(u,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(y),bx(l,o,y),this.animation.cancel()}g==null||g(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,l;(l=(a=this.animation).finish)==null||l.call(a)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var l,o,u;const a=(l=this.options)==null?void 0:l.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((u=(o=this.animation).commitStyles)==null||u.call(o))}get duration(){var l,o;const a=((o=(l=this.animation.effect)==null?void 0:l.getComputedTiming)==null?void 0:o.call(l).duration)||0;return Pt(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(Number(this.animation.currentTime)||0)}set time(a){const l=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ut(a),l&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,rangeStart:l,rangeEnd:o,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&xj()?(this.animation.timeline=a,l&&(this.animation.rangeStart=l),o&&(this.animation.rangeEnd=o),Jt):u(this)}}const Ax={anticipate:tx,backInOut:ex,circInOut:ax};function Tj(n){return n in Ax}function wj(n){typeof n.ease=="string"&&Tj(n.ease)&&(n.ease=Ax[n.ease])}const xf=10;class Ej extends jx{constructor(a){wj(a),vx(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:l,onUpdate:o,onComplete:u,element:d,...f}=this.options;if(!l)return;if(a!==void 0){l.set(a);return}const h=new vr({...f,autoplay:!1}),g=Math.max(xf,gt.now()-this.startTime),p=pn(0,xf,g-xf),y=h.sample(g).value,{name:x}=this.options;d&&x&&bx(d,x,y),l.setWithVelocity(h.sample(Math.max(0,g-p)).value,y,p),h.stop()}}const $v=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ln.test(n)||n==="0")&&!n.startsWith("url("));function jj(n){const a=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==a)return!0}function Aj(n,a,l,o){const u=n[0];if(u===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],f=$v(u,a),h=$v(d,a);return!f||!h?!1:jj(n)||(l==="spring"||Ex(l))&&o}function id(n){n.duration=0,n.type="keyframes"}const Nx=new Set(["opacity","clipPath","filter","transform"]),Nj=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Cj(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&Nj.test(n[a]))return!0;return!1}const Mj=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Dj=Zy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Oj(n){var x;const{motionValue:a,name:l,repeatDelay:o,repeatType:u,damping:d,type:f,keyframes:h}=n;if(!(((x=a==null?void 0:a.owner)==null?void 0:x.current)instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:y}=a.owner.getProps();return Dj()&&l&&(Nx.has(l)||Mj.has(l)&&Cj(h))&&(l!=="transform"||!y)&&!p&&!o&&u!=="mirror"&&d!==0&&f!=="inertia"}const zj=40;class Rj extends Ud{constructor({autoplay:a=!0,delay:l=0,type:o="keyframes",repeat:u=0,repeatDelay:d=0,repeatType:f="loop",keyframes:h,name:g,motionValue:p,element:y,...x}){var E;super(),this.stop=()=>{var D,M;this._animation&&(this._animation.stop(),(D=this.stopTimeline)==null||D.call(this)),(M=this.keyframeResolver)==null||M.cancel()},this.createdAt=gt.now();const T={autoplay:a,delay:l,type:o,repeat:u,repeatDelay:d,repeatType:f,name:g,motionValue:p,element:y,...x},S=(y==null?void 0:y.KeyframeResolver)||Bd;this.keyframeResolver=new S(h,(D,M,C)=>this.onKeyframesResolved(D,M,T,!C),g,p,y),(E=this.keyframeResolver)==null||E.scheduleResolve()}onKeyframesResolved(a,l,o,u){var C,R;this.keyframeResolver=void 0;const{name:d,type:f,velocity:h,delay:g,isHandoff:p,onUpdate:y}=o;this.resolvedAt=gt.now();let x=!0;Aj(a,d,f,h)||(x=!1,(va.instantAnimations||!g)&&(y==null||y(zr(a,o,l))),a[0]=a[a.length-1],id(o),o.repeat=0);const S={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>zj?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:l,...o,keyframes:a},E=x&&!p&&Oj(S),D=(R=(C=S.motionValue)==null?void 0:C.owner)==null?void 0:R.current;let M;if(E)try{M=new Ej({...S,element:D})}catch{M=new vr(S)}else M=new vr(S);M.finished.then(()=>{this.notifyFinished()}).catch(Jt),this.pendingTimeline&&(this.stopTimeline=M.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=M}get finished(){return this._animation?this.animation.finished:this._finished}then(a,l){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),gj()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var a;this._animation&&this.animation.cancel(),(a=this.keyframeResolver)==null||a.cancel()}}function Cx(n,a,l,o=0,u=1){const d=Array.from(n).sort((p,y)=>p.sortNodePosition(y)).indexOf(a),f=n.size,h=(f-1)*o;return typeof l=="function"?l(d,f):u===1?d*o:h-d*o}const Lj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kj(n){const a=Lj.exec(n);if(!a)return[,];const[,l,o,u]=a;return[`--${l??o}`,u]}function Mx(n,a,l=1){const[o,u]=kj(n);if(!o)return;const d=window.getComputedStyle(a).getPropertyValue(o);if(d){const f=d.trim();return Xy(f)?parseFloat(f):f}return Rd(u)?Mx(u,a,l+1):u}const Vj={type:"spring",stiffness:500,damping:25,restSpeed:10},_j=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Uj={type:"keyframes",duration:.8},Bj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Hj=(n,{keyframes:a})=>a.length>2?Uj:el.has(n)?n.startsWith("scale")?_j(a[1]):Vj:Bj;function Dx(n,a){if(n!=null&&n.inherit&&a){const{inherit:l,...o}=n;return{...a,...o}}return n}function Hd(n,a){const l=(n==null?void 0:n[a])??(n==null?void 0:n.default)??n;return l!==n?Dx(l,n):l}const $j=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Gj(n){for(const a in n)if(!$j.has(a))return!0;return!1}const $d=(n,a,l,o={},u,d)=>f=>{const h=Hd(o,n)||{},g=h.delay||o.delay||0;let{elapsed:p=0}=o;p=p-Ut(g);const y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:a.getVelocity(),...h,delay:-p,onUpdate:T=>{a.set(T),h.onUpdate&&h.onUpdate(T)},onComplete:()=>{f(),h.onComplete&&h.onComplete()},name:n,motionValue:a,element:d?void 0:u};Gj(h)||Object.assign(y,Hj(n,y)),y.duration&&(y.duration=Ut(y.duration)),y.repeatDelay&&(y.repeatDelay=Ut(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let x=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(id(y),y.delay===0&&(x=!0)),(va.instantAnimations||va.skipAnimations||u!=null&&u.shouldSkipAnimations)&&(x=!0,id(y),y.delay=0),y.allowFlatten=!h.type&&!h.ease,x&&!d&&a.get()!==void 0){const T=zr(y.keyframes,h);if(T!==void 0){Le.update(()=>{y.onUpdate(T),y.onComplete()});return}}return h.isSync?new vr(y):new Rj(y)};function Gv(n){const a=[{},{}];return n==null||n.values.forEach((l,o)=>{a[0][o]=l.get(),a[1][o]=l.getVelocity()}),a}function Gd(n,a,l,o){if(typeof a=="function"){const[u,d]=Gv(o);a=a(l!==void 0?l:n.custom,u,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[u,d]=Gv(o);a=a(l!==void 0?l:n.custom,u,d)}return a}function Ja(n,a,l){const o=n.getProps();return Gd(o,a,l!==void 0?l:o.custom,n)}const Ox=new Set(["width","height","top","left","right","bottom",...Ii]),Yv=30,Yj=n=>!isNaN(parseFloat(n));class qj{constructor(a,l={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var d;const u=gt.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((d=this.events.change)==null||d.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=l.owner}setCurrent(a){this.current=a,this.updatedAt=gt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=Yj(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,l){this.events[a]||(this.events[a]=new Dd);const o=this.events[a].add(l);return a==="change"?()=>{o(),Le.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,l){this.passiveEffect=a,this.stopPassiveEffect=l}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,l=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var a;(a=this.events.change)==null||a.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Yv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,Yv);return Qy(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(a){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=a(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var a,l;(a=this.dependents)==null||a.clear(),(l=this.events.destroy)==null||l.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zi(n,a){return new qj(n,a)}const ld=n=>Array.isArray(n);function Xj(n,a,l){n.hasValue(a)?n.getValue(a).set(l):n.addValue(a,Zi(l))}function Kj(n){return ld(n)?n[n.length-1]||0:n}function Fj(n,a){const l=Ja(n,a);let{transitionEnd:o={},transition:u={},...d}=l||{};d={...d,...o};for(const f in d){const h=Kj(d[f]);Xj(n,f,h)}}const ft=n=>!!(n&&n.getVelocity);function Zj(n){return!!(ft(n)&&n.add)}function sd(n,a){const l=n.getValue("willChange");if(Zj(l))return l.add(a);if(!l&&va.WillChange){const o=new va.WillChange("auto");n.addValue("willChange",o),o.add(a)}}function Yd(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const Qj="framerAppearId",zx="data-"+Yd(Qj);function Rx(n){return n.props[zx]}function Pj({protectedKeys:n,needsAnimating:a},l){const o=n.hasOwnProperty(l)&&a[l]!==!0;return a[l]=!1,o}function Lx(n,a,{delay:l=0,transitionOverride:o,type:u}={}){let{transition:d,transitionEnd:f,...h}=a;const g=n.getDefaultTransition();d=d?Dx(d,g):g;const p=d==null?void 0:d.reduceMotion;o&&(d=o);const y=[],x=u&&n.animationState&&n.animationState.getState()[u];for(const T in h){const S=n.getValue(T,n.latestValues[T]??null),E=h[T];if(E===void 0||x&&Pj(x,T))continue;const D={delay:l,...Hd(d||{},T)},M=S.get();if(M!==void 0&&!S.isAnimating()&&!Array.isArray(E)&&E===M&&!D.velocity){Le.update(()=>S.set(E));continue}let C=!1;if(window.MotionHandoffAnimation){const z=Rx(n);if(z){const q=window.MotionHandoffAnimation(z,T,Le);q!==null&&(D.startTime=q,C=!0)}}sd(n,T);const R=p??n.shouldReduceMotion;S.start($d(T,S,E,R&&Ox.has(T)?{type:!1}:D,n,C));const _=S.animation;_&&y.push(_)}if(f){const T=()=>Le.update(()=>{f&&Fj(n,f)});y.length?Promise.all(y).then(T):T()}return y}function od(n,a,l={}){var g;const o=Ja(n,a,l.type==="exit"?(g=n.presenceContext)==null?void 0:g.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=o||{};l.transitionOverride&&(u=l.transitionOverride);const d=o?()=>Promise.all(Lx(n,o,l)):()=>Promise.resolve(),f=n.variantChildren&&n.variantChildren.size?(p=0)=>{const{delayChildren:y=0,staggerChildren:x,staggerDirection:T}=u;return Jj(n,a,p,y,x,T,l)}:()=>Promise.resolve(),{when:h}=u;if(h){const[p,y]=h==="beforeChildren"?[d,f]:[f,d];return p().then(()=>y())}else return Promise.all([d(),f(l.delay)])}function Jj(n,a,l=0,o=0,u=0,d=1,f){const h=[];for(const g of n.variantChildren)g.notify("AnimationStart",a),h.push(od(g,a,{...f,delay:l+(typeof o=="function"?0:o)+Cx(n.variantChildren,g,o,u,d)}).then(()=>g.notify("AnimationComplete",a)));return Promise.all(h)}function Wj(n,a,l={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const u=a.map(d=>od(n,d,l));o=Promise.all(u)}else if(typeof a=="string")o=od(n,a,l);else{const u=typeof a=="function"?Ja(n,a,l.custom):a;o=Promise.all(Lx(n,u,l))}return o.then(()=>{n.notify("AnimationComplete",a)})}const Ij={test:n=>n==="auto",parse:n=>n},kx=n=>a=>a.test(n),Vx=[Wi,ne,mn,ca,jE,EE,Ij],qv=n=>Vx.find(kx(n));function e5(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Fy(n):!0}const t5=new Set(["brightness","contrast","saturate","opacity"]);function n5(n){const[a,l]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=l.match(Ld)||[];if(!o)return n;const u=l.replace(o,"");let d=t5.has(a)?1:0;return o!==l&&(d*=100),a+"("+d+u+")"}const a5=/\b([a-z-]*)\(.*?\)/gu,rd={...ln,getAnimatableNone:n=>{const a=n.match(a5);return a?a.map(n5).join(" "):n}},ud={...ln,getAnimatableNone:n=>{const a=ln.parse(n);return ln.createTransformer(n)(a.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},Xv={...Wi,transform:Math.round},i5={rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scale:Zo,scaleX:Zo,scaleY:Zo,scaleZ:Zo,skew:ca,skewX:ca,skewY:ca,distance:ne,translateX:ne,translateY:ne,translateZ:ne,x:ne,y:ne,z:ne,perspective:ne,transformPerspective:ne,opacity:hs,originX:Ov,originY:Ov,originZ:ne},qd={borderWidth:ne,borderTopWidth:ne,borderRightWidth:ne,borderBottomWidth:ne,borderLeftWidth:ne,borderRadius:ne,borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomRightRadius:ne,borderBottomLeftRadius:ne,width:ne,maxWidth:ne,height:ne,maxHeight:ne,top:ne,right:ne,bottom:ne,left:ne,inset:ne,insetBlock:ne,insetBlockStart:ne,insetBlockEnd:ne,insetInline:ne,insetInlineStart:ne,insetInlineEnd:ne,padding:ne,paddingTop:ne,paddingRight:ne,paddingBottom:ne,paddingLeft:ne,paddingBlock:ne,paddingBlockStart:ne,paddingBlockEnd:ne,paddingInline:ne,paddingInlineStart:ne,paddingInlineEnd:ne,margin:ne,marginTop:ne,marginRight:ne,marginBottom:ne,marginLeft:ne,marginBlock:ne,marginBlockStart:ne,marginBlockEnd:ne,marginInline:ne,marginInlineStart:ne,marginInlineEnd:ne,fontSize:ne,backgroundPositionX:ne,backgroundPositionY:ne,...i5,zIndex:Xv,fillOpacity:hs,strokeOpacity:hs,numOctaves:Xv},l5={...qd,color:Ie,backgroundColor:Ie,outlineColor:Ie,fill:Ie,stroke:Ie,borderColor:Ie,borderTopColor:Ie,borderRightColor:Ie,borderBottomColor:Ie,borderLeftColor:Ie,filter:rd,WebkitFilter:rd,mask:ud,WebkitMask:ud},_x=n=>l5[n],s5=new Set([rd,ud]);function Ux(n,a){let l=_x(n);return s5.has(l)||(l=ln),l.getAnimatableNone?l.getAnimatableNone(a):void 0}const o5=new Set(["auto","none","0"]);function r5(n,a,l){let o=0,u;for(;o<n.length&&!u;){const d=n[o];typeof d=="string"&&!o5.has(d)&&Fi(d).values.length&&(u=n[o]),o++}if(u&&l)for(const d of a)n[d]=Ux(l,u)}class u5 extends Bd{constructor(a,l,o,u,d){super(a,l,o,u,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let y=0;y<a.length;y++){let x=a[y];if(typeof x=="string"&&(x=x.trim(),Rd(x))){const T=Mx(x,l.current);T!==void 0&&(a[y]=T),y===a.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!Ox.has(o)||a.length!==2)return;const[u,d]=a,f=qv(u),h=qv(d),g=Dv(u),p=Dv(d);if(g!==p&&pa[o]){this.needsMeasurement=!0;return}if(f!==h)if(Bv(f)&&Bv(h))for(let y=0;y<a.length;y++){const x=a[y];typeof x=="string"&&(a[y]=parseFloat(x))}else pa[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:l}=this,o=[];for(let u=0;u<a.length;u++)(a[u]===null||e5(a[u]))&&o.push(u);o.length&&r5(a,o,l)}measureInitialState(){const{element:a,unresolvedKeyframes:l,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[o](a.measureViewportBox(),window.getComputedStyle(a.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&a.getValue(o,u).jump(u,!1)}measureEndState(){var h;const{element:a,name:l,unresolvedKeyframes:o}=this;if(!a||!a.current)return;const u=a.getValue(l);u&&u.jump(this.measuredOrigin,!1);const d=o.length-1,f=o[d];o[d]=pa[l](a.measureViewportBox(),window.getComputedStyle(a.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),(h=this.removedTransforms)!=null&&h.length&&this.removedTransforms.forEach(([g,p])=>{a.getValue(g).set(p)}),this.resolveNoneKeyframes()}}function Bx(n,a,l){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let o=document;const u=(l==null?void 0:l[n])??o.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n).filter(o=>o!=null)}const Hx=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function c5(n){return Ky(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Xd}=sx(queueMicrotask,!1),nn={x:!1,y:!1};function $x(){return nn.x||nn.y}function f5(n){return n==="x"||n==="y"?nn[n]?null:(nn[n]=!0,()=>{nn[n]=!1}):nn.x||nn.y?null:(nn.x=nn.y=!0,()=>{nn.x=nn.y=!1})}function Gx(n,a){const l=Bx(n),o=new AbortController,u={passive:!0,...a,signal:o.signal};return[l,u,()=>o.abort()]}function d5(n){return!(n.pointerType==="touch"||$x())}function h5(n,a,l={}){const[o,u,d]=Gx(n,l);return o.forEach(f=>{let h=!1,g=!1,p;const y=()=>{f.removeEventListener("pointerleave",E)},x=M=>{p&&(p(M),p=void 0),y()},T=M=>{h=!1,window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T),g&&(g=!1,x(M))},S=()=>{h=!0,window.addEventListener("pointerup",T,u),window.addEventListener("pointercancel",T,u)},E=M=>{if(M.pointerType!=="touch"){if(h){g=!0;return}x(M)}},D=M=>{if(!d5(M))return;g=!1;const C=a(f,M);typeof C=="function"&&(p=C,f.addEventListener("pointerleave",E,u))};f.addEventListener("pointerenter",D,u),f.addEventListener("pointerdown",S,u)}),d}const Yx=(n,a)=>a?n===a?!0:Yx(n,a.parentElement):!1,Kd=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,m5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function p5(n){return m5.has(n.tagName)||n.isContentEditable===!0}const g5=new Set(["INPUT","SELECT","TEXTAREA"]);function v5(n){return g5.has(n.tagName)||n.isContentEditable===!0}const tr=new WeakSet;function Kv(n){return a=>{a.key==="Enter"&&n(a)}}function bf(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const y5=(n,a)=>{const l=n.currentTarget;if(!l)return;const o=Kv(()=>{if(tr.has(l))return;bf(l,"down");const u=Kv(()=>{bf(l,"up")}),d=()=>bf(l,"cancel");l.addEventListener("keyup",u,a),l.addEventListener("blur",d,a)});l.addEventListener("keydown",o,a),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),a)};function Fv(n){return Kd(n)&&!$x()}const Zv=new WeakSet;function x5(n,a,l={}){const[o,u,d]=Gx(n,l),f=h=>{const g=h.currentTarget;if(!Fv(h)||Zv.has(h))return;tr.add(g),l.stopPropagation&&Zv.add(h);const p=a(g,h),y=(S,E)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",T),tr.has(g)&&tr.delete(g),Fv(S)&&typeof p=="function"&&p(S,{success:E})},x=S=>{y(S,g===window||g===document||l.useGlobalTarget||Yx(g,S.target))},T=S=>{y(S,!1)};window.addEventListener("pointerup",x,u),window.addEventListener("pointercancel",T,u)};return o.forEach(h=>{(l.useGlobalTarget?window:h).addEventListener("pointerdown",f,u),c5(h)&&(h.addEventListener("focus",p=>y5(p,u)),!p5(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),d}function Fd(n){return Ky(n)&&"ownerSVGElement"in n}const nr=new WeakMap;let fa;const qx=(n,a,l)=>(o,u)=>u&&u[0]?u[0][n+"Size"]:Fd(o)&&"getBBox"in o?o.getBBox()[a]:o[l],b5=qx("inline","width","offsetWidth"),S5=qx("block","height","offsetHeight");function T5({target:n,borderBoxSize:a}){var l;(l=nr.get(n))==null||l.forEach(o=>{o(n,{get width(){return b5(n,a)},get height(){return S5(n,a)}})})}function w5(n){n.forEach(T5)}function E5(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(w5))}function j5(n,a){fa||E5();const l=Bx(n);return l.forEach(o=>{let u=nr.get(o);u||(u=new Set,nr.set(o,u)),u.add(a),fa==null||fa.observe(o)}),()=>{l.forEach(o=>{const u=nr.get(o);u==null||u.delete(a),u!=null&&u.size||fa==null||fa.unobserve(o)})}}const ar=new Set;let Yi;function A5(){Yi=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};ar.forEach(a=>a(n))},window.addEventListener("resize",Yi)}function N5(n){return ar.add(n),Yi||A5(),()=>{ar.delete(n),!ar.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function Qv(n,a){return typeof n=="function"?N5(n):j5(n,a)}function C5(n){return Fd(n)&&n.tagName==="svg"}const M5=[...Vx,Ie,ln],D5=n=>M5.find(kx(n)),Pv=()=>({translate:0,scale:1,origin:0,originPoint:0}),qi=()=>({x:Pv(),y:Pv()}),Jv=()=>({min:0,max:0}),tt=()=>({x:Jv(),y:Jv()}),O5=new WeakMap;function Rr(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function ms(n){return typeof n=="string"||Array.isArray(n)}const Zd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qd=["initial",...Zd];function Lr(n){return Rr(n.animate)||Qd.some(a=>ms(n[a]))}function Xx(n){return!!(Lr(n)||n.variants)}function z5(n,a,l){for(const o in a){const u=a[o],d=l[o];if(ft(u))n.addValue(o,u);else if(ft(d))n.addValue(o,Zi(u,{owner:n}));else if(d!==u)if(n.hasValue(o)){const f=n.getValue(o);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=n.getStaticValue(o);n.addValue(o,Zi(f!==void 0?f:u,{owner:n}))}}for(const o in l)a[o]===void 0&&n.removeValue(o);return a}const cd={current:null},Kx={current:!1},R5=typeof window<"u";function L5(){if(Kx.current=!0,!!R5)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>cd.current=n.matches;n.addEventListener("change",a),a()}else cd.current=!1}const Wv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yr={};function Fx(n){yr=n}function k5(){return yr}class V5{scrapeMotionValuesFromProps(a,l,o){return{}}constructor({parent:a,props:l,presenceContext:o,reducedMotionConfig:u,skipAnimations:d,blockInitialAnimation:f,visualState:h},g={}){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=Bd,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 S=gt.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,Le.render(this.render,!1,!0))};const{latestValues:p,renderState:y}=h;this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=y,this.parent=a,this.props=l,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=d,this.options=g,this.blockInitialAnimation=!!f,this.isControllingVariants=Lr(l),this.isVariantNode=Xx(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:x,...T}=this.scrapeMotionValuesFromProps(l,{},this);for(const S in T){const E=T[S];p[S]!==void 0&&ft(E)&&E.set(p[S])}}mount(a){var l,o;if(this.hasBeenMounted)for(const u in this.initialValues)(l=this.values.get(u))==null||l.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=a,O5.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((u,d)=>this.bindToMotionValue(d,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Kx.current||L5(),this.shouldReduceMotion=cd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(o=this.parent)==null||o.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var a;this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(this.render),this.valueSubscriptions.forEach(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const l in this.events)this.events[l].clear();for(const l in this.features){const o=this.features[l];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,l){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),l.accelerate&&Nx.has(a)&&this.current instanceof HTMLElement){const{factory:f,keyframes:h,times:g,ease:p,duration:y}=l.accelerate,x=new jx({element:this.current,name:a,keyframes:h,times:g,ease:p,duration:Ut(y)}),T=f(x);this.valueSubscriptions.set(a,()=>{T(),x.cancel()});return}const o=el.has(a);o&&this.onBindTransform&&this.onBindTransform();const u=l.on("change",f=>{this.latestValues[a]=f,this.props.onUpdate&&Le.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,l)),this.valueSubscriptions.set(a,()=>{u(),d&&d(),l.owner&&l.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in yr){const l=yr[a];if(!l)continue;const{isEnabled:o,Feature:u}=l;if(!this.features[a]&&u&&o(this.props)&&(this.features[a]=new u(this)),this.features[a]){const d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):tt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,l){this.latestValues[a]=l}update(a,l){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<Wv.length;o++){const u=Wv[o];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const d="on"+u,f=a[d];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=z5(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(a),()=>l.variantChildren.delete(a)}addValue(a,l){const o=this.values.get(a);l!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,l),this.values.set(a,l),this.latestValues[a]=l.get())}removeValue(a){this.values.delete(a);const l=this.valueSubscriptions.get(a);l&&(l(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,l){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&l!==void 0&&(o=Zi(l===null?void 0:l,{owner:this}),this.addValue(a,o)),o}readValue(a,l){let o=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return o!=null&&(typeof o=="string"&&(Xy(o)||Fy(o))?o=parseFloat(o):!D5(o)&&ln.test(l)&&(o=Ux(a,l)),this.setBaseTarget(a,ft(o)?o.get():o)),ft(o)?o.get():o}setBaseTarget(a,l){this.baseTarget[a]=l}getBaseTarget(a){var d;const{initial:l}=this.props;let o;if(typeof l=="string"||typeof l=="object"){const f=Gd(this.props,l,(d=this.presenceContext)==null?void 0:d.custom);f&&(o=f[a])}if(l&&o!==void 0)return o;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!ft(u)?u:this.initialValues[a]!==void 0&&o===void 0?void 0:this.baseTarget[a]}on(a,l){return this.events[a]||(this.events[a]=new Dd),this.events[a].add(l)}notify(a,...l){this.events[a]&&this.events[a].notify(...l)}scheduleRenderMicrotask(){Xd.render(this.render)}}class Zx extends V5{constructor(){super(...arguments),this.KeyframeResolver=u5}sortInstanceNodePosition(a,l){return a.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(a,l){const o=a.style;return o?o[l]:void 0}removeValueFromRenderState(a,{vars:l,style:o}){delete l[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ft(a)&&(this.childSubscription=a.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}class Sa{constructor(a){this.isMounted=!1,this.node=a}update(){}}function Qx({top:n,left:a,right:l,bottom:o}){return{x:{min:a,max:l},y:{min:n,max:o}}}function _5({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function U5(n,a){if(!a)return n;const l=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Sf(n){return n===void 0||n===1}function fd({scale:n,scaleX:a,scaleY:l}){return!Sf(n)||!Sf(a)||!Sf(l)}function Ya(n){return fd(n)||Px(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Px(n){return Iv(n.x)||Iv(n.y)}function Iv(n){return n&&n!=="0%"}function xr(n,a,l){const o=n-l,u=a*o;return l+u}function e0(n,a,l,o,u){return u!==void 0&&(n=xr(n,u,o)),xr(n,l,o)+a}function dd(n,a=0,l=1,o,u){n.min=e0(n.min,a,l,o,u),n.max=e0(n.max,a,l,o,u)}function Jx(n,{x:a,y:l}){dd(n.x,a.translate,a.scale,a.originPoint),dd(n.y,l.translate,l.scale,l.originPoint)}const t0=.999999999999,n0=1.0000000000001;function B5(n,a,l,o=!1){var h;const u=l.length;if(!u)return;a.x=a.y=1;let d,f;for(let g=0;g<u;g++){d=l[g],f=d.projectionDelta;const{visualElement:p}=d.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(dn(n.x,-d.scroll.offset.x),dn(n.y,-d.scroll.offset.y)),f&&(a.x*=f.x.scale,a.y*=f.y.scale,Jx(n,f)),o&&Ya(d.latestValues)&&ir(n,d.latestValues,(h=d.layout)==null?void 0:h.layoutBox))}a.x<n0&&a.x>t0&&(a.x=1),a.y<n0&&a.y>t0&&(a.y=1)}function dn(n,a){n.min+=a,n.max+=a}function a0(n,a,l,o,u=.5){const d=Be(n.min,n.max,u);dd(n,a,l,d,o)}function i0(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function ir(n,a,l){const o=l??n;a0(n.x,i0(a.x,o.x),a.scaleX,a.scale,a.originX),a0(n.y,i0(a.y,o.y),a.scaleY,a.scale,a.originY)}function Wx(n,a){return Qx(U5(n.getBoundingClientRect(),a))}function H5(n,a,l){const o=Wx(n,l),{scroll:u}=a;return u&&(dn(o.x,u.offset.x),dn(o.y,u.offset.y)),o}const $5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G5=Ii.length;function Y5(n,a,l){let o="",u=!0;for(let d=0;d<G5;d++){const f=Ii[d],h=n[f];if(h===void 0)continue;let g=!0;if(typeof h=="number")g=h===(f.startsWith("scale")?1:0);else{const p=parseFloat(h);g=f.startsWith("scale")?p===1:p===0}if(!g||l){const p=Hx(h,qd[f]);if(!g){u=!1;const y=$5[f]||f;o+=`${y}(${p}) `}l&&(a[f]=p)}}return o=o.trim(),l?o=l(a,u?"":o):u&&(o="none"),o}function Pd(n,a,l){const{style:o,vars:u,transformOrigin:d}=n;let f=!1,h=!1;for(const g in a){const p=a[g];if(el.has(g)){f=!0;continue}else if(rx(g)){u[g]=p;continue}else{const y=Hx(p,qd[g]);g.startsWith("origin")?(h=!0,d[g]=y):o[g]=y}}if(a.transform||(f||l?o.transform=Y5(a,n.transform,l):o.transform&&(o.transform="none")),h){const{originX:g="50%",originY:p="50%",originZ:y=0}=d;o.transformOrigin=`${g} ${p} ${y}`}}function Ix(n,{style:a,vars:l},o,u){const d=n.style;let f;for(f in a)d[f]=a[f];u==null||u.applyProjectionStyles(d,o);for(f in l)d.setProperty(f,l[f])}function l0(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Pl={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(ne.test(n))n=parseFloat(n);else return n;const l=l0(n,a.target.x),o=l0(n,a.target.y);return`${l}% ${o}%`}},q5={correct:(n,{treeScale:a,projectionDelta:l})=>{const o=n,u=ln.parse(n);if(u.length>5)return o;const d=ln.createTransformer(n),f=typeof u[0]!="number"?1:0,h=l.x.scale*a.x,g=l.y.scale*a.y;u[0+f]/=h,u[1+f]/=g;const p=Be(h,g,.5);return typeof u[2+f]=="number"&&(u[2+f]/=p),typeof u[3+f]=="number"&&(u[3+f]/=p),d(u)}},hd={borderRadius:{...Pl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pl,borderTopRightRadius:Pl,borderBottomLeftRadius:Pl,borderBottomRightRadius:Pl,boxShadow:q5};function eb(n,{layout:a,layoutId:l}){return el.has(n)||n.startsWith("origin")||(a||l!==void 0)&&(!!hd[n]||n==="opacity")}function Jd(n,a,l){var f;const o=n.style,u=a==null?void 0:a.style,d={};if(!o)return d;for(const h in o)(ft(o[h])||u&&ft(u[h])||eb(h,n)||((f=l==null?void 0:l.getValue(h))==null?void 0:f.liveStyle)!==void 0)&&(d[h]=o[h]);return d}function X5(n){return window.getComputedStyle(n)}class K5 extends Zx{constructor(){super(...arguments),this.type="html",this.renderInstance=Ix}readValueFromInstance(a,l){var o;if(el.has(l))return(o=this.projection)!=null&&o.isProjecting?If(l):fj(a,l);{const u=X5(a),d=(rx(l)?u.getPropertyValue(l):u[l])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(a,{transformPagePoint:l}){return Wx(a,l)}build(a,l,o){Pd(a,l,o.transformTemplate)}scrapeMotionValuesFromProps(a,l,o){return Jd(a,l,o)}}const F5={offset:"stroke-dashoffset",array:"stroke-dasharray"},Z5={offset:"strokeDashoffset",array:"strokeDasharray"};function Q5(n,a,l=1,o=0,u=!0){n.pathLength=1;const d=u?F5:Z5;n[d.offset]=`${-o}`,n[d.array]=`${a} ${l}`}const P5=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tb(n,{attrX:a,attrY:l,attrScale:o,pathLength:u,pathSpacing:d=1,pathOffset:f=0,...h},g,p,y){if(Pd(n,h,p),g){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:T}=n;x.transform&&(T.transform=x.transform,delete x.transform),(T.transform||x.transformOrigin)&&(T.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),T.transform&&(T.transformBox=(y==null?void 0:y.transformBox)??"fill-box",delete x.transformBox);for(const S of P5)x[S]!==void 0&&(T[S]=x[S],delete x[S]);a!==void 0&&(x.x=a),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),u!==void 0&&Q5(x,u,d,f,!1)}const nb=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"]),ab=n=>typeof n=="string"&&n.toLowerCase()==="svg";function J5(n,a,l,o){Ix(n,a,void 0,o);for(const u in a.attrs)n.setAttribute(nb.has(u)?u:Yd(u),a.attrs[u])}function ib(n,a,l){const o=Jd(n,a,l);for(const u in n)if(ft(n[u])||ft(a[u])){const d=Ii.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;o[d]=n[u]}return o}class W5 extends Zx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=tt}getBaseTargetFromProps(a,l){return a[l]}readValueFromInstance(a,l){if(el.has(l)){const o=_x(l);return o&&o.default||0}return l=nb.has(l)?l:Yd(l),a.getAttribute(l)}scrapeMotionValuesFromProps(a,l,o){return ib(a,l,o)}build(a,l,o){tb(a,l,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(a,l,o,u){J5(a,l,o,u)}mount(a){this.isSVGTag=ab(a.tagName),super.mount(a)}}const I5=Qd.length;function lb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?lb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const a={};for(let l=0;l<I5;l++){const o=Qd[l],u=n.props[o];(ms(u)||u===!1)&&(a[o]=u)}return a}function sb(n,a){if(!Array.isArray(a))return!1;const l=a.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(a[o]!==n[o])return!1;return!0}const eA=[...Zd].reverse(),tA=Zd.length;function nA(n){return a=>Promise.all(a.map(({animation:l,options:o})=>Wj(n,l,o)))}function aA(n){let a=nA(n),l=s0(),o=!0,u=!1;const d=p=>(y,x)=>{var S;const T=Ja(n,x,p==="exit"?(S=n.presenceContext)==null?void 0:S.custom:void 0);if(T){const{transition:E,transitionEnd:D,...M}=T;y={...y,...M,...D}}return y};function f(p){a=p(n)}function h(p){const{props:y}=n,x=lb(n.parent)||{},T=[],S=new Set;let E={},D=1/0;for(let C=0;C<tA;C++){const R=eA[C],_=l[R],z=y[R]!==void 0?y[R]:x[R],q=ms(z),I=R===p?_.isActive:null;I===!1&&(D=C);let Z=z===x[R]&&z!==y[R]&&q;if(Z&&(o||u)&&n.manuallyAnimateOnMount&&(Z=!1),_.protectedKeys={...E},!_.isActive&&I===null||!z&&!_.prevProp||Rr(z)||typeof z=="boolean")continue;if(R==="exit"&&_.isActive&&I!==!0){_.prevResolvedValues&&(E={...E,..._.prevResolvedValues});continue}const J=iA(_.prevProp,z);let F=J||R===p&&_.isActive&&!Z&&q||C>D&&q,K=!1;const te=Array.isArray(z)?z:[z];let ie=te.reduce(d(R),{});I===!1&&(ie={});const{prevResolvedValues:Te={}}=_,Ae={...Te,...ie},Ne=P=>{F=!0,S.has(P)&&(K=!0,S.delete(P)),_.needsAnimating[P]=!0;const oe=n.getValue(P);oe&&(oe.liveStyle=!1)};for(const P in Ae){const oe=ie[P],he=Te[P];if(E.hasOwnProperty(P))continue;let A=!1;ld(oe)&&ld(he)?A=!sb(oe,he):A=oe!==he,A?oe!=null?Ne(P):S.add(P):oe!==void 0&&S.has(P)?Ne(P):_.protectedKeys[P]=!0}_.prevProp=z,_.prevResolvedValues=ie,_.isActive&&(E={...E,...ie}),(o||u)&&n.blockInitialAnimation&&(F=!1);const B=Z&&J;F&&(!B||K)&&T.push(...te.map(P=>{const oe={type:R};if(typeof P=="string"&&(o||u)&&!B&&n.manuallyAnimateOnMount&&n.parent){const{parent:he}=n,A=Ja(he,P);if(he.enteringChildren&&A){const{delayChildren:G}=A.transition||{};oe.delay=Cx(he.enteringChildren,n,G)}}return{animation:P,options:oe}}))}if(S.size){const C={};if(typeof y.initial!="boolean"){const R=Ja(n,Array.isArray(y.initial)?y.initial[0]:y.initial);R&&R.transition&&(C.transition=R.transition)}S.forEach(R=>{const _=n.getBaseTarget(R),z=n.getValue(R);z&&(z.liveStyle=!0),C[R]=_??null}),T.push({animation:C})}let M=!!T.length;return o&&(y.initial===!1||y.initial===y.animate)&&!n.manuallyAnimateOnMount&&(M=!1),o=!1,u=!1,M?a(T):Promise.resolve()}function g(p,y){var T;if(l[p].isActive===y)return Promise.resolve();(T=n.variantChildren)==null||T.forEach(S=>{var E;return(E=S.animationState)==null?void 0:E.setActive(p,y)}),l[p].isActive=y;const x=h(p);for(const S in l)l[S].protectedKeys={};return x}return{animateChanges:h,setActive:g,setAnimateFunction:f,getState:()=>l,reset:()=>{l=s0(),u=!0}}}function iA(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!sb(a,n):!1}function $a(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function s0(){return{animate:$a(!0),whileInView:$a(),whileHover:$a(),whileTap:$a(),whileDrag:$a(),whileFocus:$a(),exit:$a()}}function md(n,a){n.min=a.min,n.max=a.max}function tn(n,a){md(n.x,a.x),md(n.y,a.y)}function o0(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const ob=1e-4,lA=1-ob,sA=1+ob,rb=.01,oA=0-rb,rA=0+rb;function vt(n){return n.max-n.min}function uA(n,a,l){return Math.abs(n-a)<=l}function r0(n,a,l,o=.5){n.origin=o,n.originPoint=Be(a.min,a.max,n.origin),n.scale=vt(l)/vt(a),n.translate=Be(l.min,l.max,n.origin)-n.originPoint,(n.scale>=lA&&n.scale<=sA||isNaN(n.scale))&&(n.scale=1),(n.translate>=oA&&n.translate<=rA||isNaN(n.translate))&&(n.translate=0)}function us(n,a,l,o){r0(n.x,a.x,l.x,o?o.originX:void 0),r0(n.y,a.y,l.y,o?o.originY:void 0)}function u0(n,a,l,o=0){const u=o?Be(l.min,l.max,o):l.min;n.min=u+a.min,n.max=n.min+vt(a)}function cA(n,a,l,o){u0(n.x,a.x,l.x,o==null?void 0:o.x),u0(n.y,a.y,l.y,o==null?void 0:o.y)}function c0(n,a,l,o=0){const u=o?Be(l.min,l.max,o):l.min;n.min=a.min-u,n.max=n.min+vt(a)}function br(n,a,l,o){c0(n.x,a.x,l.x,o==null?void 0:o.x),c0(n.y,a.y,l.y,o==null?void 0:o.y)}function f0(n,a,l,o,u){return n-=a,n=xr(n,1/l,o),u!==void 0&&(n=xr(n,1/u,o)),n}function fA(n,a=0,l=1,o=.5,u,d=n,f=n){if(mn.test(a)&&(a=parseFloat(a),a=Be(f.min,f.max,a/100)-f.min),typeof a!="number")return;let h=Be(d.min,d.max,o);n===d&&(h-=a),n.min=f0(n.min,a,l,h,u),n.max=f0(n.max,a,l,h,u)}function d0(n,a,[l,o,u],d,f){fA(n,a[l],a[o],a[u],a.scale,d,f)}const dA=["x","scaleX","originX"],hA=["y","scaleY","originY"];function h0(n,a,l,o){d0(n.x,a,dA,l?l.x:void 0,o?o.x:void 0),d0(n.y,a,hA,l?l.y:void 0,o?o.y:void 0)}function m0(n){return n.translate===0&&n.scale===1}function ub(n){return m0(n.x)&&m0(n.y)}function p0(n,a){return n.min===a.min&&n.max===a.max}function mA(n,a){return p0(n.x,a.x)&&p0(n.y,a.y)}function g0(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function cb(n,a){return g0(n.x,a.x)&&g0(n.y,a.y)}function v0(n){return vt(n.x)/vt(n.y)}function y0(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function fn(n){return[n("x"),n("y")]}function pA(n,a,l){let o="";const u=n.x.translate/a.x,d=n.y.translate/a.y,f=(l==null?void 0:l.z)||0;if((u||d||f)&&(o=`translate3d(${u}px, ${d}px, ${f}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),l){const{transformPerspective:p,rotate:y,rotateX:x,rotateY:T,skewX:S,skewY:E}=l;p&&(o=`perspective(${p}px) ${o}`),y&&(o+=`rotate(${y}deg) `),x&&(o+=`rotateX(${x}deg) `),T&&(o+=`rotateY(${T}deg) `),S&&(o+=`skewX(${S}deg) `),E&&(o+=`skewY(${E}deg) `)}const h=n.x.scale*a.x,g=n.y.scale*a.y;return(h!==1||g!==1)&&(o+=`scale(${h}, ${g})`),o||"none"}const fb=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],gA=fb.length,x0=n=>typeof n=="string"?parseFloat(n):n,b0=n=>typeof n=="number"||ne.test(n);function vA(n,a,l,o,u,d){u?(n.opacity=Be(0,l.opacity??1,yA(o)),n.opacityExit=Be(a.opacity??1,0,xA(o))):d&&(n.opacity=Be(a.opacity??1,l.opacity??1,o));for(let f=0;f<gA;f++){const h=fb[f];let g=S0(a,h),p=S0(l,h);if(g===void 0&&p===void 0)continue;g||(g=0),p||(p=0),g===0||p===0||b0(g)===b0(p)?(n[h]=Math.max(Be(x0(g),x0(p),o),0),(mn.test(p)||mn.test(g))&&(n[h]+="%")):n[h]=p}(a.rotate||l.rotate)&&(n.rotate=Be(a.rotate||0,l.rotate||0,o))}function S0(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const yA=db(0,.5,nx),xA=db(.5,.95,Jt);function db(n,a,l){return o=>o<n?0:o>a?1:l(ds(n,a,o))}function bA(n,a,l){const o=ft(n)?n:Zi(n);return o.start($d("",o,a,l)),o.animation}function ps(n,a,l,o={passive:!0}){return n.addEventListener(a,l,o),()=>n.removeEventListener(a,l)}const SA=(n,a)=>n.depth-a.depth;class TA{constructor(){this.children=[],this.isDirty=!1}add(a){Cd(this.children,a),this.isDirty=!0}remove(a){hr(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(SA),this.isDirty=!1,this.children.forEach(a)}}function wA(n,a){const l=gt.now(),o=({timestamp:u})=>{const d=u-l;d>=a&&(ya(o),n(d-a))};return Le.setup(o,!0),()=>ya(o)}function lr(n){return ft(n)?n.get():n}class EA{constructor(){this.members=[]}add(a){Cd(this.members,a);for(let l=this.members.length-1;l>=0;l--){const o=this.members[l];if(o===a||o===this.lead||o===this.prevLead)continue;const u=o.instance;(!u||u.isConnected===!1)&&!o.snapshot&&(hr(this.members,o),o.unmount())}a.scheduleRender()}remove(a){if(hr(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(a){var l;for(let o=this.members.indexOf(a)-1;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1&&((l=u.instance)==null?void 0:l.isConnected)!==!1)return this.promote(u),!0}return!1}promote(a,l){var u;const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.updateSnapshot(),a.scheduleRender();const{layoutDependency:d}=o.options,{layoutDependency:f}=a.options;(d===void 0||d!==f)&&(a.resumeFrom=o,l&&(o.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),(u=a.root)!=null&&u.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{var l,o,u,d,f;(o=(l=a.options).onExitComplete)==null||o.call(l),(f=(u=a.resumingFrom)==null?void 0:(d=u.options).onExitComplete)==null||f.call(d)})}scheduleRender(){this.members.forEach(a=>a.instance&&a.scheduleRender(!1))}removeLeadSnapshot(){var a;(a=this.lead)!=null&&a.snapshot&&(this.lead.snapshot=void 0)}}const sr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Tf=["","X","Y","Z"],jA=1e3;let AA=0;function wf(n,a,l,o){const{latestValues:u}=a;u[n]&&(l[n]=u[n],a.setStaticValue(n,0),o&&(o[n]=0))}function hb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const l=Rx(a);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",Le,!(u||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&hb(o)}function mb({attachResizeListener:n,defaultParent:a,measureScroll:l,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(f={},h=a==null?void 0:a()){this.id=AA++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(MA),this.nodes.forEach(kA),this.nodes.forEach(VA),this.nodes.forEach(DA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new TA)}addEventListener(f,h){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Dd),this.eventHandlers.get(f).add(h)}notifyListeners(f,...h){const g=this.eventHandlers.get(f);g&&g.notify(...h)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=Fd(f)&&!C5(f),this.instance=f;const{layoutId:h,layout:g,visualElement:p}=this.options;if(p&&!p.current&&p.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(g||h)&&(this.isLayoutDirty=!0),n){let y,x=0;const T=()=>this.root.updateBlockedByResize=!1;Le.read(()=>{x=window.innerWidth}),n(f,()=>{const S=window.innerWidth;S!==x&&(x=S,this.root.updateBlockedByResize=!0,y&&y(),y=wA(T,250),sr.hasAnimatedSinceResize&&(sr.hasAnimatedSinceResize=!1,this.nodes.forEach(E0)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&p&&(h||g)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:x,hasRelativeLayoutChanged:T,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||p.getDefaultTransition()||$A,{onLayoutAnimationStart:D,onLayoutAnimationComplete:M}=p.getProps(),C=!this.targetLayout||!cb(this.targetLayout,S),R=!x&&T;if(this.options.layoutRoot||this.resumeFrom||R||x&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...Hd(E,"layout"),onPlay:D,onComplete:M};(p.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(y,R)}else x||E0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ya(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_A),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const x=this.path[y];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:h,layout:g}=this.options;if(h===void 0&&!g)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const g=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),g&&this.nodes.forEach(zA),this.nodes.forEach(T0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(w0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(RA),this.nodes.forEach(LA),this.nodes.forEach(NA),this.nodes.forEach(CA)):this.nodes.forEach(w0),this.clearAllSnapshots();const h=gt.now();ut.delta=pn(0,1e3/60,h-ut.timestamp),ut.timestamp=h,ut.isProcessing=!0,mf.update.process(ut),mf.preRender.process(ut),mf.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OA),this.sharedNodes.forEach(UA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let g=0;g<this.path.length;g++)this.path[g].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=tt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(h=!1),h&&this.instance){const g=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:g,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!ub(this.projectionDelta),g=this.getTransformTemplate(),p=g?g(this.latestValues,""):void 0,y=p!==this.prevTransformTemplateValue;f&&this.instance&&(h||Ya(this.latestValues)||y)&&(u(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const h=this.measurePageBox();let g=this.removeElementScroll(h);return f&&(g=this.removeTransform(g)),GA(g),{animationId:this.root.animationId,measuredBox:h,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){var p;const{visualElement:f}=this.options;if(!f)return tt();const h=f.measureViewportBox();if(!(((p=this.scroll)==null?void 0:p.wasRoot)||this.path.some(YA))){const{scroll:y}=this.root;y&&(dn(h.x,y.offset.x),dn(h.y,y.offset.y))}return h}removeElementScroll(f){var g;const h=tt();if(tn(h,f),(g=this.scroll)!=null&&g.wasRoot)return h;for(let p=0;p<this.path.length;p++){const y=this.path[p],{scroll:x,options:T}=y;y!==this.root&&x&&T.layoutScroll&&(x.wasRoot&&tn(h,f),dn(h.x,x.offset.x),dn(h.y,x.offset.y))}return h}applyTransform(f,h=!1,g){var y,x;const p=g||tt();tn(p,f);for(let T=0;T<this.path.length;T++){const S=this.path[T];!h&&S.options.layoutScroll&&S.scroll&&S!==S.root&&(dn(p.x,-S.scroll.offset.x),dn(p.y,-S.scroll.offset.y)),Ya(S.latestValues)&&ir(p,S.latestValues,(y=S.layout)==null?void 0:y.layoutBox)}return Ya(this.latestValues)&&ir(p,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),p}removeTransform(f){var g;const h=tt();tn(h,f);for(let p=0;p<this.path.length;p++){const y=this.path[p];if(!Ya(y.latestValues))continue;let x;y.instance&&(fd(y.latestValues)&&y.updateSnapshot(),x=tt(),tn(x,y.measurePageBox())),h0(h,y.latestValues,(g=y.snapshot)==null?void 0:g.layoutBox,x)}return Ya(this.latestValues)&&h0(h,this.latestValues),h}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var S;const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==h;if(!(f||g&&this.isSharedProjectionDirty||this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:x}=this.options;if(!this.layout||!(y||x))return;this.resolvedRelativeTargetAt=ut.timestamp;const T=this.getClosestProjectingParent();T&&this.linkedParentVersion!==T.layoutVersion&&!T.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&T&&T.layout?this.createRelativeTarget(T,this.layout.layoutBox,T.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=tt(),this.targetWithTransforms=tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cA(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tn(this.target,this.layout.layoutBox),Jx(this.target,this.targetDelta)):tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?this.createRelativeTarget(T,this.target,T.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||fd(this.parent.latestValues)||Px(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,h,g){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=tt(),this.relativeTargetOrigin=tt(),br(this.relativeTargetOrigin,h,g,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var E;const f=this.getLead(),h=!!this.resumingFrom||this!==f;let g=!0;if((this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty)&&(g=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(g=!1),g)return;const{layout:p,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||y))return;tn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,T=this.treeScale.y;B5(this.layoutCorrected,this.treeScale,this.path,h),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=tt());const{target:S}=f;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(o0(this.prevProjectionDelta.x,this.projectionDelta.x),o0(this.prevProjectionDelta.y,this.projectionDelta.y)),us(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==T||!y0(this.projectionDelta.x,this.prevProjectionDelta.x)||!y0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var h;if((h=this.options.visualElement)==null||h.scheduleRender(),f){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=qi(),this.projectionDelta=qi(),this.projectionDeltaWithTransform=qi()}setAnimationOrigin(f,h=!1){const g=this.snapshot,p=g?g.latestValues:{},y={...this.latestValues},x=qi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const T=tt(),S=g?g.source:void 0,E=this.layout?this.layout.source:void 0,D=S!==E,M=this.getStack(),C=!M||M.members.length<=1,R=!!(D&&!C&&this.options.crossfade===!0&&!this.path.some(HA));this.animationProgress=0;let _;this.mixTargetDelta=z=>{const q=z/1e3;j0(x.x,f.x,q),j0(x.y,f.y,q),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(br(T,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),BA(this.relativeTarget,this.relativeTargetOrigin,T,q),_&&mA(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=tt()),tn(_,this.relativeTarget)),D&&(this.animationValues=y,vA(y,p,this.latestValues,q,R,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=q},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){var h,g,p;this.notifyListeners("animationStart"),(h=this.currentAnimation)==null||h.stop(),(p=(g=this.resumingFrom)==null?void 0:g.currentAnimation)==null||p.stop(),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{sr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zi(0)),this.motionValue.jump(0,!1),this.currentAnimation=bA(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:y=>{this.mixTargetDelta(y),f.onUpdate&&f.onUpdate(y)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:h,target:g,layout:p,latestValues:y}=f;if(!(!h||!g||!p)){if(this!==f&&this.layout&&p&&pb(this.options.animationType,this.layout.layoutBox,p.layoutBox)){g=this.target||tt();const x=vt(this.layout.layoutBox.x);g.x.min=f.target.x.min,g.x.max=g.x.min+x;const T=vt(this.layout.layoutBox.y);g.y.min=f.target.y.min,g.y.max=g.y.min+T}tn(h,g),ir(h,y),us(this.projectionDeltaWithTransform,this.layoutCorrected,h,y)}}registerSharedNode(f,h){this.sharedNodes.has(f)||this.sharedNodes.set(f,new EA),this.sharedNodes.get(f).add(h);const p=h.options.initialPromotionConfig;h.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(h):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var h;const{layoutId:f}=this.options;return f?((h=this.getStack())==null?void 0:h.lead)||this:this}getPrevLead(){var h;const{layoutId:f}=this.options;return f?(h=this.getStack())==null?void 0:h.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:h,preserveFollowOpacity:g}={}){const p=this.getStack();p&&p.promote(this,g),f&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let h=!1;const{latestValues:g}=f;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(h=!0),!h)return;const p={};g.z&&wf("z",f,p,this.animationValues);for(let y=0;y<Tf.length;y++)wf(`rotate${Tf[y]}`,f,p,this.animationValues),wf(`skew${Tf[y]}`,f,p,this.animationValues);f.render();for(const y in p)f.setStaticValue(y,p[y]),this.animationValues&&(this.animationValues[y]=p[y]);f.scheduleRender()}applyProjectionStyles(f,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const g=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=lr(h==null?void 0:h.pointerEvents)||"",f.transform=g?g(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=lr(h==null?void 0:h.pointerEvents)||""),this.hasProjected&&!Ya(this.latestValues)&&(f.transform=g?g({},""):"none",this.hasProjected=!1);return}f.visibility="";const y=p.animationValues||p.latestValues;this.applyTransformsToTarget();let x=pA(this.projectionDeltaWithTransform,this.treeScale,y);g&&(x=g(y,x)),f.transform=x;const{x:T,y:S}=this.projectionDelta;f.transformOrigin=`${T.origin*100}% ${S.origin*100}% 0`,p.animationValues?f.opacity=p===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:f.opacity=p===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const E in hd){if(y[E]===void 0)continue;const{correct:D,applyTo:M,isCSSVariable:C}=hd[E],R=x==="none"?y[E]:D(y[E],p);if(M){const _=M.length;for(let z=0;z<_;z++)f[M[z]]=R}else C?this.options.visualElement.renderState.vars[E]=R:f[E]=R}this.options.layoutId&&(f.pointerEvents=p===this?lr(h==null?void 0:h.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var h;return(h=f.currentAnimation)==null?void 0:h.stop()}),this.root.nodes.forEach(T0),this.root.sharedNodes.clear()}}}function NA(n){n.updateLayout()}function CA(n){var l;const a=((l=n.resumeFrom)==null?void 0:l.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:u}=n.layout,{animationType:d}=n.options,f=a.source!==n.layout.source;if(d==="size")fn(x=>{const T=f?a.measuredBox[x]:a.layoutBox[x],S=vt(T);T.min=o[x].min,T.max=T.min+S});else if(d==="x"||d==="y"){const x=d==="x"?"y":"x";md(f?a.measuredBox[x]:a.layoutBox[x],o[x])}else pb(d,a.layoutBox,o)&&fn(x=>{const T=f?a.measuredBox[x]:a.layoutBox[x],S=vt(o[x]);T.max=T.min+S,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[x].max=n.relativeTarget[x].min+S)});const h=qi();us(h,o,a.layoutBox);const g=qi();f?us(g,n.applyTransform(u,!0),a.measuredBox):us(g,o,a.layoutBox);const p=!ub(h);let y=!1;if(!n.resumeFrom){const x=n.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:T,layout:S}=x;if(T&&S){const E=n.options.layoutAnchor||void 0,D=tt();br(D,a.layoutBox,T.layoutBox,E);const M=tt();br(M,o,S.layoutBox,E),cb(D,M)||(y=!0),x.options.layoutRoot&&(n.relativeTarget=M,n.relativeTargetOrigin=D,n.relativeParent=x)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:a,delta:g,layoutDelta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function MA(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function DA(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function OA(n){n.clearSnapshot()}function T0(n){n.clearMeasurements()}function zA(n){n.isLayoutDirty=!0,n.updateLayout()}function w0(n){n.isLayoutDirty=!1}function RA(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function LA(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function E0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function kA(n){n.resolveTargetDelta()}function VA(n){n.calcProjection()}function _A(n){n.resetSkewAndRotation()}function UA(n){n.removeLeadSnapshot()}function j0(n,a,l){n.translate=Be(a.translate,0,l),n.scale=Be(a.scale,1,l),n.origin=a.origin,n.originPoint=a.originPoint}function A0(n,a,l,o){n.min=Be(a.min,l.min,o),n.max=Be(a.max,l.max,o)}function BA(n,a,l,o){A0(n.x,a.x,l.x,o),A0(n.y,a.y,l.y,o)}function HA(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const $A={duration:.45,ease:[.4,0,.1,1]},N0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),C0=N0("applewebkit/")&&!N0("chrome/")?Math.round:Jt;function M0(n){n.min=C0(n.min),n.max=C0(n.max)}function GA(n){M0(n.x),M0(n.y)}function pb(n,a,l){return n==="position"||n==="preserve-aspect"&&!uA(v0(a),v0(l),.2)}function YA(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const qA=mb({attachResizeListener:(n,a)=>ps(n,"resize",a),measureScroll:()=>{var n,a;return{x:document.documentElement.scrollLeft||((n=document.body)==null?void 0:n.scrollLeft)||0,y:document.documentElement.scrollTop||((a=document.body)==null?void 0:a.scrollTop)||0}},checkIsScrollRoot:()=>!0}),XA=n=>!n.isLayoutDirty&&n.willUpdate(!1);function D0(){const n=new Set,a=new WeakMap,l=()=>n.forEach(XA);return{add:o=>{n.add(o),a.set(o,o.addEventListener("willUpdate",l))},remove:o=>{n.delete(o);const u=a.get(o);u&&(u(),a.delete(o)),l()},dirty:l}}const Ef={current:void 0},gb=mb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Ef.current){const n=new qA({});n.mount(window),n.setOptions({layoutScroll:!0}),Ef.current=n}return Ef.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),vb=w.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function KA(n=!0){const a=w.useContext(Nd);if(a===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:u}=a,d=w.useId();w.useEffect(()=>{if(n)return u(d)},[n]);const f=w.useCallback(()=>n&&o&&o(d),[d,o,n]);return!l&&o?[!1,f]:[!0]}const FA=w.createContext(null);function ZA(){const n=w.useRef(!1);return qy(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function QA(){const n=ZA(),[a,l]=w.useState(0),o=w.useCallback(()=>{n.current&&l(a+1)},[a]);return[w.useCallback(()=>Le.postRender(o),[o]),a]}const yb=n=>n===!0,PA=n=>yb(n===!0)||n==="id",xb=({children:n,id:a,inherit:l=!0})=>{const o=w.useContext(dr),u=w.useContext(FA),[d,f]=QA(),h=w.useRef(null),g=o.id||u;h.current===null&&(PA(l)&&g&&(a=a?g+"-"+a:g),h.current={id:a,group:yb(l)&&o.group||D0()});const p=w.useMemo(()=>({...h.current,forceRender:d}),[f]);return m.jsx(dr.Provider,{value:p,children:n})},bb=w.createContext({strict:!1}),O0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let z0=!1;function JA(){if(z0)return;const n={};for(const a in O0)n[a]={isEnabled:l=>O0[a].some(o=>!!l[o])};Fx(n),z0=!0}function Sb(){return JA(),k5()}function WA(n){const a=Sb();for(const l in n)a[l]={...a[l],...n[l]};Fx(a)}const IA=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Sr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||IA.has(n)}let Tb=n=>!Sr(n);function eN(n){typeof n=="function"&&(Tb=a=>a.startsWith("on")?!Sr(a):n(a))}try{eN(require("@emotion/is-prop-valid").default)}catch{}function tN(n,a,l){const o={};for(const u in n)u==="values"&&typeof n.values=="object"||ft(n[u])||(Tb(u)||l===!0&&Sr(u)||!a&&!Sr(u)||n.draggable&&u.startsWith("onDrag"))&&(o[u]=n[u]);return o}const kr=w.createContext({});function nN(n,a){if(Lr(n)){const{initial:l,animate:o}=n;return{initial:l===!1||ms(l)?l:void 0,animate:ms(o)?o:void 0}}return n.inherit!==!1?a:{}}function aN(n){const{initial:a,animate:l}=nN(n,w.useContext(kr));return w.useMemo(()=>({initial:a,animate:l}),[R0(a),R0(l)])}function R0(n){return Array.isArray(n)?n.join(" "):n}const Wd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wb(n,a,l){for(const o in a)!ft(a[o])&&!eb(o,l)&&(n[o]=a[o])}function iN({transformTemplate:n},a){return w.useMemo(()=>{const l=Wd();return Pd(l,a,n),Object.assign({},l.vars,l.style)},[a])}function lN(n,a){const l=n.style||{},o={};return wb(o,l,n),Object.assign(o,iN(n,a)),o}function sN(n,a){const l={},o=lN(n,a);return n.drag&&n.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(l.tabIndex=0),l.style=o,l}const Eb=()=>({...Wd(),attrs:{}});function oN(n,a,l,o){const u=w.useMemo(()=>{const d=Eb();return tb(d,a,ab(o),n.transformTemplate,n.style),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};wb(d,n.style,n),u.style={...d,...u.style}}return u}const rN=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Id(n){return typeof n!="string"||n.includes("-")?!1:!!(rN.indexOf(n)>-1||/[A-Z]/u.test(n))}function uN(n,a,l,{latestValues:o},u,d=!1,f){const g=(f??Id(n)?oN:sN)(a,o,u,n),p=tN(a,typeof n=="string",d),y=n!==w.Fragment?{...p,...g,ref:l}:{},{children:x}=a,T=w.useMemo(()=>ft(x)?x.get():x,[x]);return w.createElement(n,{...y,children:T})}function cN({scrapeMotionValuesFromProps:n,createRenderState:a},l,o,u){return{latestValues:fN(l,o,u,n),renderState:a()}}function fN(n,a,l,o){const u={},d=o(n,{});for(const T in d)u[T]=lr(d[T]);let{initial:f,animate:h}=n;const g=Lr(n),p=Xx(n);a&&p&&!g&&n.inherit!==!1&&(f===void 0&&(f=a.initial),h===void 0&&(h=a.animate));let y=l?l.initial===!1:!1;y=y||f===!1;const x=y?h:f;if(x&&typeof x!="boolean"&&!Rr(x)){const T=Array.isArray(x)?x:[x];for(let S=0;S<T.length;S++){const E=Gd(n,T[S]);if(E){const{transitionEnd:D,transition:M,...C}=E;for(const R in C){let _=C[R];if(Array.isArray(_)){const z=y?_.length-1:0;_=_[z]}_!==null&&(u[R]=_)}for(const R in D)u[R]=D[R]}}}return u}const jb=n=>(a,l)=>{const o=w.useContext(kr),u=w.useContext(Nd),d=()=>cN(n,a,o,u);return l?d():iE(d)},dN=jb({scrapeMotionValuesFromProps:Jd,createRenderState:Wd}),hN=jb({scrapeMotionValuesFromProps:ib,createRenderState:Eb}),mN=Symbol.for("motionComponentSymbol");function pN(n,a,l){const o=w.useRef(l);w.useInsertionEffect(()=>{o.current=l});const u=w.useRef(null);return w.useCallback(d=>{var h;d&&((h=n.onMount)==null||h.call(n,d));const f=o.current;if(typeof f=="function")if(d){const g=f(d);typeof g=="function"&&(u.current=g)}else u.current?(u.current(),u.current=null):f(d);else f&&(f.current=d);a&&(d?a.mount(d):a.unmount())},[a])}const Ab=w.createContext({});function $i(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function gN(n,a,l,o,u,d){var _,z;const{visualElement:f}=w.useContext(kr),h=w.useContext(bb),g=w.useContext(Nd),p=w.useContext(vb),y=p.reducedMotion,x=p.skipAnimations,T=w.useRef(null),S=w.useRef(!1);o=o||h.renderer,!T.current&&o&&(T.current=o(n,{visualState:a,parent:f,props:l,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:y,skipAnimations:x,isSVG:d}),S.current&&T.current&&(T.current.manuallyAnimateOnMount=!0));const E=T.current,D=w.useContext(Ab);E&&!E.projection&&u&&(E.type==="html"||E.type==="svg")&&vN(T.current,l,u,D);const M=w.useRef(!1);w.useInsertionEffect(()=>{E&&M.current&&E.update(l,g)});const C=l[zx],R=w.useRef(!!C&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,C))&&((z=window.MotionHasOptimisedAnimation)==null?void 0:z.call(window,C)));return qy(()=>{S.current=!0,E&&(M.current=!0,window.MotionIsMounted=!0,E.updateFeatures(),E.scheduleRenderMicrotask(),R.current&&E.animationState&&E.animationState.animateChanges())}),w.useEffect(()=>{E&&(!R.current&&E.animationState&&E.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{var q;(q=window.MotionHandoffMarkAsComplete)==null||q.call(window,C)}),R.current=!1),E.enteringChildren=void 0)}),E}function vN(n,a,l,o){const{layoutId:u,layout:d,drag:f,dragConstraints:h,layoutScroll:g,layoutRoot:p,layoutAnchor:y,layoutCrossfade:x}=a;n.projection=new l(n.latestValues,a["data-framer-portal-id"]?void 0:Nb(n.parent)),n.projection.setOptions({layoutId:u,layout:d,alwaysMeasureLayout:!!f||h&&$i(h),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,crossfade:x,layoutScroll:g,layoutRoot:p,layoutAnchor:y})}function Nb(n){if(n)return n.options.allowProjection!==!1?n.projection:Nb(n.parent)}function jf(n,{forwardMotionProps:a=!1,type:l}={},o,u){o&&WA(o);const d=l?l==="svg":Id(n),f=d?hN:dN;function h(p,y){let x;const T={...w.useContext(vb),...p,layoutId:yN(p)},{isStatic:S}=T,E=aN(p),D=f(p,S);if(!S&&typeof window<"u"){xN();const M=bN(T);x=M.MeasureLayout,E.visualElement=gN(n,D,T,u,M.ProjectionNode,d)}return m.jsxs(kr.Provider,{value:E,children:[x&&E.visualElement?m.jsx(x,{visualElement:E.visualElement,...T}):null,uN(n,p,pN(D,E.visualElement,y),D,S,a,d)]})}h.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const g=w.forwardRef(h);return g[mN]=n,g}function yN({layoutId:n}){const a=w.useContext(dr).id;return a&&n!==void 0?a+"-"+n:n}function xN(n,a){w.useContext(bb).strict}function bN(n){const a=Sb(),{drag:l,layout:o}=a;if(!l&&!o)return{};const u={...l,...o};return{MeasureLayout:l!=null&&l.isEnabled(n)||o!=null&&o.isEnabled(n)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function SN(n,a){if(typeof Proxy>"u")return jf;const l=new Map,o=(d,f)=>jf(d,f,n,a),u=(d,f)=>o(d,f);return new Proxy(u,{get:(d,f)=>f==="create"?o:(l.has(f)||l.set(f,jf(f,void 0,n,a)),l.get(f))})}const TN=(n,a)=>a.isSVG??Id(n)?new W5(a):new K5(a,{allowProjection:n!==w.Fragment});class wN extends Sa{constructor(a){super(a),a.animationState||(a.animationState=aA(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();Rr(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:l}=this.node.prevProps||{};a!==l&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let EN=0;class jN extends Sa{constructor(){super(...arguments),this.id=EN++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;if(a&&o===!1){if(this.isExitComplete){const{initial:f,custom:h}=this.node.getProps();if(typeof f=="string"){const g=Ja(this.node,f,h);if(g){const{transition:p,transitionEnd:y,...x}=g;for(const T in x)(d=this.node.getValue(T))==null||d.jump(x[T])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const u=this.node.animationState.setActive("exit",!a);l&&!a&&u.then(()=>{this.isExitComplete=!0,l(this.id)})}mount(){const{register:a,onExitComplete:l}=this.node.presenceContext||{};l&&l(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const AN={animation:{Feature:wN},exit:{Feature:jN}};function ws(n){return{point:{x:n.pageX,y:n.pageY}}}const NN=n=>a=>Kd(a)&&n(a,ws(a));function cs(n,a,l,o){return ps(n,a,NN(l),o)}const Cb=({current:n})=>n?n.ownerDocument.defaultView:null,L0=(n,a)=>Math.abs(n-a);function CN(n,a){const l=L0(n.x,a.x),o=L0(n.y,a.y);return Math.sqrt(l**2+o**2)}const k0=new Set(["auto","scroll"]);class Mb{constructor(a,l,{transformPagePoint:o,contextWindow:u=window,dragSnapToOrigin:d=!1,distanceThreshold:f=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Qo(this.lastRawMoveEventInfo,this.transformPagePoint));const S=Af(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,D=CN(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!D)return;const{point:M}=S,{timestamp:C}=ut;this.history.push({...M,timestamp:C});const{onStart:R,onMove:_}=this.handlers;E||(R&&R(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,S)},this.handlePointerMove=(S,E)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=Qo(E,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(S,E)=>{this.end();const{onEnd:D,onSessionEnd:M,resumeAnimation:C}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=Af(S.type==="pointercancel"?this.lastMoveEventInfo:Qo(E,this.transformPagePoint),this.history);this.startEvent&&D&&D(S,R),M&&M(S,R)},!Kd(a))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=o,this.distanceThreshold=f,this.contextWindow=u||window;const g=ws(a),p=Qo(g,this.transformPagePoint),{point:y}=p,{timestamp:x}=ut;this.history=[{...y,timestamp:x}];const{onSessionStart:T}=l;T&&T(a,Af(p,this.history)),this.removeListeners=bs(cs(this.contextWindow,"pointermove",this.handlePointerMove),cs(this.contextWindow,"pointerup",this.handlePointerUp),cs(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(a){let l=a.parentElement;for(;l;){const o=getComputedStyle(l);(k0.has(o.overflowX)||k0.has(o.overflowY))&&this.scrollPositions.set(l,{x:l.scrollLeft,y:l.scrollTop}),l=l.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(a){const l=this.scrollPositions.get(a);if(!l)return;const o=a===window,u=o?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},d={x:u.x-l.x,y:u.y-l.y};d.x===0&&d.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(a,u),Le.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ya(this.updatePoint)}}function Qo(n,a){return a?{point:a(n.point)}:n}function V0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Af({point:n},a){return{point:n,delta:V0(n,Db(a)),offset:V0(n,MN(a)),velocity:DN(a,.1)}}function MN(n){return n[0]}function Db(n){return n[n.length-1]}function DN(n,a){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const u=Db(n);for(;l>=0&&(o=n[l],!(u.timestamp-o.timestamp>Ut(a)));)l--;if(!o)return{x:0,y:0};o===n[0]&&n.length>2&&u.timestamp-o.timestamp>Ut(a)*2&&(o=n[1]);const d=Pt(u.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const f={x:(u.x-o.x)/d,y:(u.y-o.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function ON(n,{min:a,max:l},o){return a!==void 0&&n<a?n=o?Be(a,n,o.min):Math.max(n,a):l!==void 0&&n>l&&(n=o?Be(l,n,o.max):Math.min(n,l)),n}function _0(n,a,l){return{min:a!==void 0?n.min+a:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function zN(n,{top:a,left:l,bottom:o,right:u}){return{x:_0(n.x,l,u),y:_0(n.y,a,o)}}function U0(n,a){let l=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function RN(n,a){return{x:U0(n.x,a.x),y:U0(n.y,a.y)}}function LN(n,a){let l=.5;const o=vt(n),u=vt(a);return u>o?l=ds(a.min,a.max-o,n.min):o>u&&(l=ds(n.min,n.max-u,a.min)),pn(0,1,l)}function kN(n,a){const l={};return a.min!==void 0&&(l.min=a.min-n.min),a.max!==void 0&&(l.max=a.max-n.min),l}const pd=.35;function VN(n=pd){return n===!1?n=0:n===!0&&(n=pd),{x:B0(n,"left","right"),y:B0(n,"top","bottom")}}function B0(n,a,l){return{min:H0(n,a),max:H0(n,l)}}function H0(n,a){return typeof n=="number"?n:n[a]||0}const _N=new WeakMap;class UN{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=tt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:l=!1,distanceThreshold:o}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const d=x=>{l&&this.snapToCursor(ws(x).point),this.stopAnimation()},f=(x,T)=>{const{drag:S,dragPropagation:E,onDragStart:D}=this.getProps();if(S&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=f5(S),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=T,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fn(C=>{let R=this.getAxisMotionValue(C).get()||0;if(mn.test(R)){const{projection:_}=this.visualElement;if(_&&_.layout){const z=_.layout.layoutBox[C];z&&(R=vt(z)*(parseFloat(R)/100))}}this.originPoint[C]=R}),D&&Le.update(()=>D(x,T),!1,!0),sd(this.visualElement,"transform");const{animationState:M}=this.visualElement;M&&M.setActive("whileDrag",!0)},h=(x,T)=>{this.latestPointerEvent=x,this.latestPanInfo=T;const{dragPropagation:S,dragDirectionLock:E,onDirectionLock:D,onDrag:M}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:C}=T;if(E&&this.currentDirection===null){this.currentDirection=HN(C),this.currentDirection!==null&&D&&D(this.currentDirection);return}this.updateAxis("x",T.point,C),this.updateAxis("y",T.point,C),this.visualElement.render(),M&&Le.update(()=>M(x,T),!1,!0)},g=(x,T)=>{this.latestPointerEvent=x,this.latestPanInfo=T,this.stop(x,T),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new Mb(a,{onSessionStart:d,onStart:f,onMove:h,onSessionEnd:g,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:o,contextWindow:Cb(this.visualElement),element:this.visualElement.current})}stop(a,l){const o=a||this.latestPointerEvent,u=l||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!u||!o)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:h}=this.getProps();h&&Le.postRender(()=>h(o,u))}cancel(){this.isDragging=!1;const{projection:a,animationState:l}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,l,o){const{drag:u}=this.getProps();if(!o||!Po(a,u,this.currentDirection))return;const d=this.getAxisMotionValue(a);let f=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(f=ON(f,this.constraints[a],this.elastic[a])),d.set(f)}resolveConstraints(){var d;const{dragConstraints:a,dragElastic:l}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(d=this.visualElement.projection)==null?void 0:d.layout,u=this.constraints;a&&$i(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&o?this.constraints=zN(o.layoutBox,a):this.constraints=!1,this.elastic=VN(l),u!==this.constraints&&!$i(a)&&o&&this.constraints&&!this.hasMutatedConstraints&&fn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=kN(o.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:l}=this.getProps();if(!a||!$i(a))return!1;const o=a.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const d=H5(o,u.root,this.visualElement.getTransformPagePoint());let f=RN(u.layout.layoutBox,d);if(l){const h=l(_5(f));this.hasMutatedConstraints=!!h,h&&(f=Qx(h))}return f}startAnimation(a){const{drag:l,dragMomentum:o,dragElastic:u,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:h}=this.getProps(),g=this.constraints||{},p=fn(y=>{if(!Po(y,l,this.currentDirection))return;let x=g&&g[y]||{};(f===!0||f===y)&&(x={min:0,max:0});const T=u?200:1e6,S=u?40:1e7,E={type:"inertia",velocity:o?a[y]:0,bounceStiffness:T,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...d,...x};return this.startAxisValueAnimation(y,E)});return Promise.all(p).then(h)}startAxisValueAnimation(a,l){const o=this.getAxisMotionValue(a);return sd(this.visualElement,a),o.start($d(a,o,0,l,this.visualElement,!1))}stopAnimation(){fn(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const l=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),u=o[l];return u||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){fn(l=>{const{drag:o}=this.getProps();if(!Po(l,o,this.currentDirection))return;const{projection:u}=this.visualElement,d=this.getAxisMotionValue(l);if(u&&u.layout){const{min:f,max:h}=u.layout.layoutBox[l],g=d.get()||0;d.set(a[l]-Be(f,h,.5)+g)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!$i(l)||!o||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};fn(f=>{const h=this.getAxisMotionValue(f);if(h&&this.constraints!==!1){const g=h.get();u[f]=LN({min:g,max:g},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(f=>{if(!Po(f,a,null))return;const h=this.getAxisMotionValue(f),{min:g,max:p}=this.constraints[f];h.set(Be(g,p,u[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_N.set(this.visualElement,this);const a=this.visualElement.current,l=cs(a,"pointerdown",p=>{const{drag:y,dragListener:x=!0}=this.getProps(),T=p.target,S=T!==a&&v5(T);y&&x&&!S&&this.start(p)});let o;const u=()=>{const{dragConstraints:p}=this.getProps();$i(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),o||(o=BN(a,p.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,f=d.addEventListener("measure",u);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),Le.read(u);const h=ps(window,"resize",()=>this.scalePositionWithinConstraints()),g=d.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:y})=>{this.isDragging&&y&&(fn(x=>{const T=this.getAxisMotionValue(x);T&&(this.originPoint[x]+=p[x].translate,T.set(T.get()+p[x].translate))}),this.visualElement.render())}));return()=>{h(),l(),f(),g&&g(),o&&o()}}getProps(){const a=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:d=!1,dragElastic:f=pd,dragMomentum:h=!0}=a;return{...a,drag:l,dragDirectionLock:o,dragPropagation:u,dragConstraints:d,dragElastic:f,dragMomentum:h}}}function $0(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function BN(n,a,l){const o=Qv(n,$0(l)),u=Qv(a,$0(l));return()=>{o(),u()}}function Po(n,a,l){return(a===!0||a===n)&&(l===null||l===n)}function HN(n,a=10){let l=null;return Math.abs(n.y)>a?l="y":Math.abs(n.x)>a&&(l="x"),l}class $N extends Sa{constructor(a){super(a),this.removeGroupControls=Jt,this.removeListeners=Jt,this.controls=new UN(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jt}update(){const{dragControls:a}=this.node.getProps(),{dragControls:l}=this.node.prevProps||{};a!==l&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Nf=n=>(a,l)=>{n&&Le.update(()=>n(a,l),!1,!0)};class GN extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Jt}onPointerDown(a){this.session=new Mb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Cb(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:l,onPan:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:Nf(a),onStart:Nf(l),onMove:Nf(o),onEnd:(d,f)=>{delete this.session,u&&Le.postRender(()=>u(d,f))}}}mount(){this.removePointerDownListener=cs(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Cf=!1;class YN extends w.Component{componentDidMount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o,layoutId:u}=this.props,{projection:d}=a;d&&(l.group&&l.group.add(d),o&&o.register&&u&&o.register(d),Cf&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sr.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:l,visualElement:o,drag:u,isPresent:d}=this.props,{projection:f}=o;return f&&(f.isPresent=d,a.layoutDependency!==l&&f.setOptions({...f.options,layoutDependency:l}),Cf=!0,u||a.layoutDependency!==l||l===void 0||a.isPresent!==d?f.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?f.promote():f.relegate()||Le.postRender(()=>{const h=f.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:l}=this.props,{projection:o}=a;o&&(o.options.layoutAnchor=l,o.root.didUpdate(),Xd.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:u}=a;Cf=!0,u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function Ob(n){const[a,l]=KA(),o=w.useContext(dr);return m.jsx(YN,{...n,layoutGroup:o,switchLayoutGroup:w.useContext(Ab),isPresent:a,safeToRemove:l})}const qN={pan:{Feature:GN},drag:{Feature:$N,ProjectionNode:gb,MeasureLayout:Ob}};function G0(n,a,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,d=o[u];d&&Le.postRender(()=>d(a,ws(a)))}class XN extends Sa{mount(){const{current:a}=this.node;a&&(this.unmount=h5(a,(l,o)=>(G0(this.node,o,"Start"),u=>G0(this.node,u,"End"))))}unmount(){}}class KN extends Sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bs(ps(this.node.current,"focus",()=>this.onFocus()),ps(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Y0(n,a,l){const{props:o}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),d=o[u];d&&Le.postRender(()=>d(a,ws(a)))}class FN extends Sa{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:l,propagate:o}=this.node.props;this.unmount=x5(a,(u,d)=>(Y0(this.node,d,"Start"),(f,{success:h})=>Y0(this.node,f,h?"End":"Cancel")),{useGlobalTarget:l,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const gd=new WeakMap,Mf=new WeakMap,ZN=n=>{const a=gd.get(n.target);a&&a(n)},QN=n=>{n.forEach(ZN)};function PN({root:n,...a}){const l=n||document;Mf.has(l)||Mf.set(l,{});const o=Mf.get(l),u=JSON.stringify(a);return o[u]||(o[u]=new IntersectionObserver(QN,{root:n,...a})),o[u]}function JN(n,a,l){const o=PN(a);return gd.set(n,l),o.observe(n),()=>{gd.delete(n),o.unobserve(n)}}const WN={some:0,all:1};class IN extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var g;(g=this.stopObserver)==null||g.call(this);const{viewport:a={}}=this.node.getProps(),{root:l,margin:o,amount:u="some",once:d}=a,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:WN[u]},h=p=>{const{isIntersecting:y}=p;if(this.isInView===y||(this.isInView=y,d&&!y&&this.hasEnteredView))return;y&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",y);const{onViewportEnter:x,onViewportLeave:T}=this.node.getProps(),S=y?x:T;S&&S(p)};this.stopObserver=JN(this.node.current,f,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:l}=this.node;["amount","margin","root"].some(e3(a,l))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function e3({viewport:n={}},{viewport:a={}}={}){return l=>n[l]!==a[l]}const t3={inView:{Feature:IN},tap:{Feature:FN},focus:{Feature:KN},hover:{Feature:XN}},n3={layout:{ProjectionNode:gb,MeasureLayout:Ob}},a3={...AN,...t3,...qN,...n3},zb=SN(a3,TN),Vr=w.forwardRef(function(a,l){return m.jsx(bw,{children:m.jsx("a",{...a,ref:l})})}),Jl={base:["relative isolate inline-flex items-baseline justify-center gap-x-2 rounded-lg border text-base/6 font-semibold","px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)] sm:text-sm/6","focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500","data-disabled:opacity-50","*:data-[slot=icon]:-mx-0.5 *:data-[slot=icon]:my-0.5 *:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:self-center *:data-[slot=icon]:text-(--btn-icon) sm:*:data-[slot=icon]:my-1 sm:*:data-[slot=icon]:size-4 forced-colors:[--btn-icon:ButtonText] forced-colors:data-hover:[--btn-icon:ButtonText]"],solid:["border-transparent bg-(--btn-border)","dark:bg-(--btn-bg)","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(var(--radius-lg)-1px)] before:bg-(--btn-bg)","before:shadow-sm","dark:before:hidden","dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(var(--radius-lg)-1px)]","after:shadow-[inset_0_1px_--theme(--color-white/15%)]","data-active:after:bg-(--btn-hover-overlay) data-hover:after:bg-(--btn-hover-overlay)","dark:after:-inset-px dark:after:rounded-lg","data-disabled:before:shadow-none data-disabled:after:shadow-none"],outline:["border-zinc-950/10 text-zinc-950 data-active:bg-zinc-950/2.5 data-hover:bg-zinc-950/2.5","dark:border-white/15 dark:text-white dark:[--btn-bg:transparent] dark:data-active:bg-white/5 dark:data-hover:bg-white/5","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],plain:["border-transparent text-zinc-950 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","dark:text-white dark:data-active:bg-white/10 dark:data-hover:bg-white/10","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],colors:{"dark/zinc":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-white dark:[--btn-bg:var(--color-zinc-600)] dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],light:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:text-white dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],"dark/white":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-zinc-950 dark:[--btn-bg:white] dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],dark:["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],white:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-500)] data-hover:[--btn-icon:var(--color-zinc-500)]"],zinc:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-zinc-600)] [--btn-border:var(--color-zinc-700)]/90","dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],indigo:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-indigo-500)] [--btn-border:var(--color-indigo-600)]/90","[--btn-icon:var(--color-indigo-300)] data-active:[--btn-icon:var(--color-indigo-200)] data-hover:[--btn-icon:var(--color-indigo-200)]"],cyan:["text-cyan-950 [--btn-bg:var(--color-cyan-300)] [--btn-border:var(--color-cyan-400)]/80 [--btn-hover-overlay:var(--color-white)]/25","[--btn-icon:var(--color-cyan-500)]"],red:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-red-600)] [--btn-border:var(--color-red-700)]/90","[--btn-icon:var(--color-red-300)] data-active:[--btn-icon:var(--color-red-200)] data-hover:[--btn-icon:var(--color-red-200)]"],orange:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-orange-500)] [--btn-border:var(--color-orange-600)]/90","[--btn-icon:var(--color-orange-300)] data-active:[--btn-icon:var(--color-orange-200)] data-hover:[--btn-icon:var(--color-orange-200)]"],amber:["text-amber-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-amber-400)] [--btn-border:var(--color-amber-500)]/80","[--btn-icon:var(--color-amber-600)]"],yellow:["text-yellow-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-yellow-300)] [--btn-border:var(--color-yellow-400)]/80","[--btn-icon:var(--color-yellow-600)] data-active:[--btn-icon:var(--color-yellow-700)] data-hover:[--btn-icon:var(--color-yellow-700)]"],lime:["text-lime-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-lime-300)] [--btn-border:var(--color-lime-400)]/80","[--btn-icon:var(--color-lime-600)] data-active:[--btn-icon:var(--color-lime-700)] data-hover:[--btn-icon:var(--color-lime-700)]"],green:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-green-600)] [--btn-border:var(--color-green-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],emerald:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-emerald-600)] [--btn-border:var(--color-emerald-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],teal:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-teal-600)] [--btn-border:var(--color-teal-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],sky:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-sky-500)] [--btn-border:var(--color-sky-600)]/80","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],blue:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-blue-600)] [--btn-border:var(--color-blue-700)]/90","[--btn-icon:var(--color-blue-400)] data-active:[--btn-icon:var(--color-blue-300)] data-hover:[--btn-icon:var(--color-blue-300)]"],violet:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-violet-500)] [--btn-border:var(--color-violet-600)]/90","[--btn-icon:var(--color-violet-300)] data-active:[--btn-icon:var(--color-violet-200)] data-hover:[--btn-icon:var(--color-violet-200)]"],purple:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-purple-500)] [--btn-border:var(--color-purple-600)]/90","[--btn-icon:var(--color-purple-300)] data-active:[--btn-icon:var(--color-purple-200)] data-hover:[--btn-icon:var(--color-purple-200)]"],fuchsia:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-fuchsia-500)] [--btn-border:var(--color-fuchsia-600)]/90","[--btn-icon:var(--color-fuchsia-300)] data-active:[--btn-icon:var(--color-fuchsia-200)] data-hover:[--btn-icon:var(--color-fuchsia-200)]"],pink:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-pink-500)] [--btn-border:var(--color-pink-600)]/90","[--btn-icon:var(--color-pink-300)] data-active:[--btn-icon:var(--color-pink-200)] data-hover:[--btn-icon:var(--color-pink-200)]"],rose:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-rose-500)] [--btn-border:var(--color-rose-600)]/90","[--btn-icon:var(--color-rose-300)] data-active:[--btn-icon:var(--color-rose-200)] data-hover:[--btn-icon:var(--color-rose-200)]"]}};w.forwardRef(function({color:a,outline:l,plain:o,className:u,children:d,...f},h){let g=Fe(u,Jl.base,l?Jl.outline:o?Jl.plain:Fe(Jl.solid,Jl.colors[a??"dark/zinc"]));return typeof f.href=="string"?m.jsx(Vr,{...f,className:g,ref:h,children:m.jsx(xa,{children:d})}):m.jsx(ys,{...f,className:Fe(g,"cursor-default"),ref:h,children:m.jsx(xa,{children:d})})});function xa({children:n}){return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"absolute top-1/2 left-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 pointer-fine:hidden","aria-hidden":"true"}),n]})}function i3({className:n,...a}){return m.jsx("nav",{...a,className:Fe(n,"flex flex-1 items-center gap-4 py-2.5")})}function l3({className:n,...a}){let l=w.useId();return m.jsx(xb,{id:l,children:m.jsx("div",{...a,className:Fe(n,"flex items-center gap-3")})})}function s3({className:n,...a}){return m.jsx("div",{"aria-hidden":"true",...a,className:Fe(n,"-ml-4 flex-1")})}const eh=w.forwardRef(function({current:a,className:l,children:o,...u},d){let f=Fe("relative flex min-w-0 items-center gap-3 rounded-lg p-2 text-left text-base/6 font-medium text-zinc-950 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:not-nth-2:last:data-[slot=icon]:ml-auto *:not-nth-2:last:data-[slot=icon]:size-5 sm:*:not-nth-2:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 *:data-[slot=avatar]:[--avatar-radius:var(--radius-md)] sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white");return m.jsxs("span",{className:Fe(l,"relative"),children:[a&&m.jsx(zb.span,{layoutId:"current-indicator",className:"absolute inset-x-2 -bottom-2.5 h-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?m.jsx(Vr,{...u,className:f,"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})}):m.jsx(ys,{...u,className:Fe("cursor-default",f),"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})})]})});function o3(){return m.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:m.jsx("path",{d:"M2 6.75C2 6.33579 2.33579 6 2.75 6H17.25C17.6642 6 18 6.33579 18 6.75C18 7.16421 17.6642 7.5 17.25 7.5H2.75C2.33579 7.5 2 7.16421 2 6.75ZM2 13.25C2 12.8358 2.33579 12.5 2.75 12.5H17.25C17.6642 12.5 18 12.8358 18 13.25C18 13.6642 17.6642 14 17.25 14H2.75C2.33579 14 2 13.6642 2 13.25Z"})})}function r3(){return m.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:m.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})})}function u3({open:n,close:a,children:l}){return m.jsxs(aE,{open:n,onClose:a,className:"lg:hidden",children:[m.jsx(tE,{transition:!0,className:"fixed inset-0 bg-black/30 transition data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in"}),m.jsx(Yy,{transition:!0,className:"fixed inset-y-0 w-full max-w-80 p-2 transition duration-300 ease-in-out data-closed:-translate-x-full",children:m.jsxs("div",{className:"flex h-full flex-col rounded-lg bg-ouro-deep shadow-xl ring-1 ring-ouro-moss/40",children:[m.jsx("div",{className:"-mb-3 px-4 pt-3",children:m.jsx(yy,{as:eh,"aria-label":"Close navigation",children:m.jsx(r3,{})})}),l]})})]})}function c3({navbar:n,sidebar:a,children:l}){let[o,u]=w.useState(!1);return m.jsxs("div",{className:"relative isolate flex min-h-svh w-full bg-ouro-void max-lg:flex-col",children:[m.jsx("div",{className:"fixed inset-y-0 left-0 w-64 max-lg:hidden border-r border-zinc-200 dark:border-ouro-moss/30",children:a}),m.jsx(u3,{open:o,close:()=>u(!1),children:a}),m.jsxs("header",{className:"flex items-center px-4 lg:hidden",children:[m.jsx("div",{className:"py-2.5",children:m.jsx(eh,{onClick:()=>u(!0),"aria-label":"Open navigation",children:m.jsx(o3,{})})}),m.jsx("div",{className:"min-w-0 flex-1",children:n})]}),m.jsx("main",{className:"flex flex-1 flex-col lg:min-w-0 lg:pl-64",children:m.jsx("div",{className:"grow bg-ouro-deep p-4 lg:p-8",children:m.jsx("div",{className:"mx-auto max-w-6xl",children:l})})})]})}function f3({className:n,...a}){return m.jsx("nav",{...a,className:Fe(n,"flex h-full min-h-0 flex-col")})}function d3({className:n,...a}){return m.jsx("div",{...a,className:Fe(n,"flex flex-col border-b border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function h3({className:n,...a}){return m.jsx("div",{...a,className:Fe(n,"flex flex-1 flex-col overflow-y-auto p-4 [&>[data-slot=section]+[data-slot=section]]:mt-8")})}function m3({className:n,...a}){return m.jsx("div",{...a,className:Fe(n,"flex flex-col border-t border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function q0({className:n,...a}){let l=w.useId();return m.jsx(xb,{id:l,children:m.jsx("div",{...a,"data-slot":"section",className:Fe(n,"flex flex-col gap-0.5")})})}function X0({className:n,...a}){return m.jsx("h3",{...a,className:Fe(n,"mb-1 px-2 text-xs/6 font-medium text-zinc-500 dark:text-zinc-400")})}const p3=w.forwardRef(function({current:a,className:l,children:o,...u},d){let f=Fe("flex w-full items-center gap-3 rounded-lg px-2 py-2.5 text-left text-base/6 font-medium text-zinc-950 sm:py-2 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:last:data-[slot=icon]:ml-auto *:last:data-[slot=icon]:size-5 sm:*:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","data-current:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white","dark:data-current:*:data-[slot=icon]:fill-white");return m.jsxs("span",{className:Fe(l,"relative"),children:[a&&m.jsx(zb.span,{layoutId:"current-indicator",className:"absolute inset-y-2 -left-4 w-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?m.jsx(yy,{as:Vr,...u,className:f,"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})}):m.jsx(ys,{...u,className:Fe("cursor-default",f),"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})})]})});function g3({className:n,...a}){return m.jsx("span",{...a,className:Fe(n,"truncate")})}const v3={red:"bg-red-500/15 text-red-700 group-data-hover:bg-red-500/25 dark:bg-red-500/10 dark:text-red-400 dark:group-data-hover:bg-red-500/20",orange:"bg-orange-500/15 text-orange-700 group-data-hover:bg-orange-500/25 dark:bg-orange-500/10 dark:text-orange-400 dark:group-data-hover:bg-orange-500/20",amber:"bg-amber-400/20 text-amber-700 group-data-hover:bg-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400 dark:group-data-hover:bg-amber-400/15",yellow:"bg-yellow-400/20 text-yellow-700 group-data-hover:bg-yellow-400/30 dark:bg-yellow-400/10 dark:text-yellow-300 dark:group-data-hover:bg-yellow-400/15",lime:"bg-lime-400/20 text-lime-700 group-data-hover:bg-lime-400/30 dark:bg-lime-400/10 dark:text-lime-300 dark:group-data-hover:bg-lime-400/15",green:"bg-green-500/15 text-green-700 group-data-hover:bg-green-500/25 dark:bg-green-500/10 dark:text-green-400 dark:group-data-hover:bg-green-500/20",emerald:"bg-emerald-500/15 text-emerald-700 group-data-hover:bg-emerald-500/25 dark:bg-emerald-500/10 dark:text-emerald-400 dark:group-data-hover:bg-emerald-500/20",teal:"bg-teal-500/15 text-teal-700 group-data-hover:bg-teal-500/25 dark:bg-teal-500/10 dark:text-teal-300 dark:group-data-hover:bg-teal-500/20",cyan:"bg-cyan-400/20 text-cyan-700 group-data-hover:bg-cyan-400/30 dark:bg-cyan-400/10 dark:text-cyan-300 dark:group-data-hover:bg-cyan-400/15",sky:"bg-sky-500/15 text-sky-700 group-data-hover:bg-sky-500/25 dark:bg-sky-500/10 dark:text-sky-300 dark:group-data-hover:bg-sky-500/20",blue:"bg-blue-500/15 text-blue-700 group-data-hover:bg-blue-500/25 dark:text-blue-400 dark:group-data-hover:bg-blue-500/25",indigo:"bg-indigo-500/15 text-indigo-700 group-data-hover:bg-indigo-500/25 dark:text-indigo-400 dark:group-data-hover:bg-indigo-500/20",violet:"bg-violet-500/15 text-violet-700 group-data-hover:bg-violet-500/25 dark:text-violet-400 dark:group-data-hover:bg-violet-500/20",purple:"bg-purple-500/15 text-purple-700 group-data-hover:bg-purple-500/25 dark:text-purple-400 dark:group-data-hover:bg-purple-500/20",fuchsia:"bg-fuchsia-400/15 text-fuchsia-700 group-data-hover:bg-fuchsia-400/25 dark:bg-fuchsia-400/10 dark:text-fuchsia-400 dark:group-data-hover:bg-fuchsia-400/20",pink:"bg-pink-400/15 text-pink-700 group-data-hover:bg-pink-400/25 dark:bg-pink-400/10 dark:text-pink-400 dark:group-data-hover:bg-pink-400/20",rose:"bg-rose-400/15 text-rose-700 group-data-hover:bg-rose-400/25 dark:bg-rose-400/10 dark:text-rose-400 dark:group-data-hover:bg-rose-400/20",zinc:"bg-zinc-600/10 text-zinc-700 group-data-hover:bg-zinc-600/20 dark:bg-white/5 dark:text-zinc-400 dark:group-data-hover:bg-white/10"};function Se({color:n="zinc",className:a,...l}){return m.jsx("span",{...l,className:Fe(a,"inline-flex items-center gap-x-1.5 rounded-md px-1.5 py-0.5 text-sm/5 font-medium sm:text-xs/5 forced-colors:outline",v3[n])})}w.forwardRef(function({color:a="zinc",className:l,children:o,...u},d){let f=Fe(l,"group relative inline-flex rounded-md focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500");return typeof u.href=="string"?m.jsx(Vr,{...u,className:f,ref:d,children:m.jsx(xa,{children:m.jsx(Se,{color:a,children:o})})}):m.jsx(ys,{...u,className:f,ref:d,children:m.jsx(xa,{children:m.jsx(Se,{color:a,children:o})})})});function y3(n){w.useEffect(()=>{if(!n)return;function a(l){if(!(l.target instanceof HTMLInputElement||l.target instanceof HTMLTextAreaElement))switch(l.key){case"1":n({tab:"overview"});break;case"2":n({tab:"sessions"});break;case"3":n({tab:"work"});break;case"4":n({tab:"connections"});break;case"5":n({tab:"inner"});break;case"6":n({tab:"memory"});break;case"7":n({tab:"runtime"});break;case"Escape":{document.activeElement instanceof HTMLElement&&document.activeElement.blur();break}}}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n])}const x3={"owed-reply":"red","blocking-obligation":"red","broken-return":"red","stale-delegation":"yellow","return-ready":"lime","overdue-habit":"yellow"},b3={"owed-reply":"owed reply","blocking-obligation":"blocking","broken-return":"broken return","stale-delegation":"stale","return-ready":"ready to return","overdue-habit":"overdue"},S3={"owed-reply":"Someone spoke last and is waiting for your response","blocking-obligation":"This obligation is open and blocking forward progress","broken-return":"Work was done but the result was never returned to the requester","stale-delegation":"This was delegated to you and hasn't been addressed","return-ready":"The result is ready — deliver it to close the loop","overdue-habit":"This routine is past its scheduled cadence"},T3=new Set(["stale-delegation"]),w3=new Set(["owed-reply","blocking-obligation","broken-return","return-ready","overdue-habit"]);function E3({view:n,deskPrefs:a}){const l=Qi(),[o,u]=w.useState(null),[d,f]=w.useState(null),[h,g]=w.useState(null),[p,y]=w.useState(null),[x,T]=w.useState(null),S=n.agent,E=n.work,D=n.inner,M=n.activity,C=S.degraded,R=S.attention,_=E.tasks,z=E.obligations,q=E.sessions,I=E.coding,Z=S.senses??[],J=E.bridges??[];return w.useEffect(()=>{$e(`/agents/${encodeURIComponent(S.agentName)}/needs-me`).then(u),$e(`/agents/${encodeURIComponent(S.agentName)}/coding`).then(f),$e(`/agents/${encodeURIComponent(S.agentName)}/continuity`).then(g).catch(()=>{}),$e(`/agents/${encodeURIComponent(S.agentName)}/orientation`).then(y).catch(()=>{}),$e(`/agents/${encodeURIComponent(S.agentName)}/changes`).then(T).catch(()=>{})},[S.agentName]),m.jsxs("div",{className:"space-y-6",children:[o&&o.items.length>0&&(()=>{const F=o.items.filter(te=>w3.has(te.urgency)),K=o.items.filter(te=>T3.has(te.urgency));return m.jsxs("div",{className:"space-y-3",children:[F.length>0&&m.jsxs("div",{className:"rounded-xl bg-ouro-fang/5 p-4 ring-1 ring-ouro-fang/15",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-fang",children:["Action now (",F.length,")"]}),m.jsx("div",{className:"mt-2 space-y-1.5",children:F.map((te,ie)=>m.jsx(K0,{item:te,nav:l,agentName:S.agentName,onDismiss:()=>{u(Te=>Te&&{items:Te.items.filter((Ae,Ne)=>o.items.indexOf(te)!==Ne)})}},`action-${ie}`))})]}),K.length>0&&m.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["Stale (",K.length,")"]}),m.jsx("button",{onClick:async()=>{var te;for(const ie of K)(te=ie.ref)!=null&&te.focus&&await fetch(`/api/agents/${encodeURIComponent(S.agentName)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:ie.ref.focus})});$e(`/agents/${encodeURIComponent(S.agentName)}/needs-me`).then(u)},className:"text-xs text-ouro-gold underline underline-offset-2 hover:text-ouro-bone transition-colors",children:"Clear all stale"})]}),m.jsx("div",{className:"mt-2 space-y-1.5",children:K.map((te,ie)=>m.jsx(K0,{item:te,nav:l,agentName:S.agentName,onDismiss:()=>{$e(`/agents/${encodeURIComponent(S.agentName)}/needs-me`).then(u)}},`stale-${ie}`))})]})]})})(),(a==null?void 0:a.carrying)&&m.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"What I'm carrying"}),m.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-bone",children:a.carrying})]}),(()=>{const F=(a==null?void 0:a.pinnedConstellations)??[];return F.length===0?null:m.jsxs("div",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Pinned threads"}),m.jsx("div",{className:"mt-2 space-y-2",children:F.map((K,te)=>m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-medium text-ouro-bone",children:K.label}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-1.5",children:[(K.friendIds??[]).map(ie=>m.jsxs("button",{onClick:()=>l({tab:"sessions"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["friend:",ie.slice(0,8),"…"]},ie)),(K.taskRefs??[]).map(ie=>m.jsxs("button",{onClick:()=>l({tab:"work"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["task:",ie]},ie)),(K.bridgeIds??[]).map(ie=>m.jsxs("button",{onClick:()=>l({tab:"connections",focus:ie}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["bridge:",ie.slice(0,8),"…"]},ie))]})]},te))})]})})(),m.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10 sm:p-5",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Center of gravity"}),m.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone sm:text-2xl",children:R.label}),m.jsxs("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:[S.agentName," has"," ",m.jsxs(Jo,{tab:"work",children:[_.liveCount," live tasks"]}),","," ",m.jsxs(Jo,{tab:"work",children:[z.openCount," obligations"]}),","," ",m.jsxs(Jo,{tab:"work",children:[I.activeCount," coding lanes"]}),", and"," ",m.jsxs(Jo,{tab:"sessions",children:[q.liveCount," live sessions"]}),"."]}),C.status==="degraded"&&C.issues.length>0&&m.jsxs("div",{className:"mt-3 space-y-1",children:[C.issues.slice(0,5).map((F,K)=>m.jsxs("button",{onClick:()=>l({tab:"runtime"}),className:"flex w-full items-start gap-2 rounded-lg bg-ouro-fang/5 px-3 py-2 text-left text-sm ring-1 ring-ouro-fang/10 hover:ring-ouro-fang/25 transition-colors",children:[m.jsx("span",{className:"mt-0.5 h-2 w-2 shrink-0 rounded-full bg-ouro-fang"}),m.jsxs("span",{className:"text-ouro-mist",children:[m.jsx("span",{className:"font-semibold text-ouro-fang",children:F.code}),m.jsxs("span",{className:"text-ouro-shadow",children:[" — ",jt(F.detail,80)]})]})]},K)),C.issues.length>5&&m.jsxs("button",{onClick:()=>l({tab:"runtime"}),className:"text-xs text-ouro-glow underline underline-offset-2",children:["+",C.issues.length-5," more issues"]})]})]}),p&&m.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Orientation"}),p.currentSession&&m.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[m.jsx(Se,{color:"lime",children:"active session"}),m.jsxs("button",{onClick:()=>l({tab:"sessions",focus:`${p.currentSession.friendId}/${p.currentSession.channel}/${p.currentSession.key}`}),className:"text-sm text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:[p.currentSession.channel,"/",p.currentSession.key]}),p.currentSession.lastActivityAt&&m.jsx("span",{className:"text-xs text-ouro-shadow",children:ct(p.currentSession.lastActivityAt)})]}),p.primaryObligation&&m.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:"yellow",children:p.primaryObligation.status}),m.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:jt(p.primaryObligation.content,80)})]}),p.primaryObligation.nextAction&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-mist",children:["Next: ",p.primaryObligation.nextAction]}),p.primaryObligation.waitingOn&&m.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Waiting on: ",p.primaryObligation.waitingOn]})]}),p.resumeHandle&&m.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Resume handle"}),m.jsxs("div",{className:"mt-1 space-y-0.5 text-sm",children:[p.resumeHandle.lane&&m.jsxs("p",{className:"text-ouro-bone",children:["Lane: ",p.resumeHandle.lane]}),p.resumeHandle.artifact&&m.jsxs("p",{className:"text-ouro-mist",children:["Artifact: ",p.resumeHandle.artifact]}),p.resumeHandle.nextAction&&m.jsxs("p",{className:"text-ouro-mist",children:["Next: ",p.resumeHandle.nextAction]}),p.resumeHandle.blockerOrWaitingOn&&m.jsxs("p",{className:"text-ouro-shadow",children:["Blocked: ",p.resumeHandle.blockerOrWaitingOn]}),m.jsxs(Se,{color:p.resumeHandle.confidence==="high"?"lime":p.resumeHandle.confidence==="medium"?"yellow":"zinc",children:[p.resumeHandle.confidence," confidence"]})]})]}),p.otherActiveSessions.length>0&&m.jsxs("div",{className:"mt-2",children:[m.jsxs("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:["Other sessions (",p.otherActiveSessions.length,")"]}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:p.otherActiveSessions.slice(0,5).map(F=>m.jsx("button",{onClick:()=>l({tab:"sessions",focus:`${F.friendId}/${F.channel}/${F.key}`}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:F.friendName},`${F.friendId}/${F.channel}/${F.key}`))})]})]}),x&&x.changeCount>0&&m.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["What changed (",x.changeCount,")"]}),x.snapshotAge&&m.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Since ",ct(x.snapshotAge)]}),m.jsxs("div",{className:"mt-2 space-y-1",children:[x.items.slice(0,8).map((F,K)=>m.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.jsx(Se,{color:F.kind.includes("status")?"yellow":"zinc",children:F.kind.replace(/_/g," ")}),m.jsx("span",{className:"truncate text-ouro-mist",children:F.summary})]},K)),x.items.length>8&&m.jsxs("p",{className:"text-xs text-ouro-shadow",children:["+",x.items.length-8," more changes"]})]})]}),h&&m.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[m.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Presence"}),h.presence.self?m.jsxs("div",{className:"mt-2 space-y-1",children:[m.jsx("p",{className:"text-sm font-medium text-ouro-bone",children:h.presence.self.availability}),h.presence.self.lane&&m.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Lane: ",h.presence.self.lane]}),h.presence.self.tempo&&m.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Tempo: ",h.presence.self.tempo]})]}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No presence data"}),h.presence.peers.length>0&&m.jsxs("div",{className:"mt-2 border-t border-ouro-moss/20 pt-2",children:[m.jsx("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:"Peers"}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:h.presence.peers.map(F=>m.jsx(Se,{color:F.availability==="active"?"lime":"zinc",children:F.agentName},F.agentName))})]})]}),m.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Cares (",h.cares.activeCount,")"]}),h.cares.items.length>0?m.jsx("div",{className:"mt-2 space-y-1.5",children:h.cares.items.slice(0,5).map(F=>m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:F.salience==="high"?"red":F.salience==="medium"?"yellow":"zinc",children:F.salience}),m.jsx("p",{className:"truncate text-sm text-ouro-bone",children:F.label})]},F.id))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No active cares"})]}),m.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Episodes (",h.episodes.recentCount,")"]}),h.episodes.items.length>0?m.jsx("div",{className:"mt-2 space-y-1.5",children:h.episodes.items.slice(0,5).map(F=>m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Se,{color:"zinc",children:F.kind}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("p",{className:"truncate text-sm text-ouro-bone",children:F.summary}),m.jsx("p",{className:"text-xs text-ouro-shadow",children:ct(F.timestamp)})]})]},F.id))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No recent episodes"})]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[m.jsx(Wo,{label:"Tasks",value:_.liveCount,sub:`${_.blockedCount} blocked`,onClick:()=>l({tab:"work"})}),m.jsx(Wo,{label:"Obligations",value:z.openCount,sub:`${q.liveCount} sessions`,onClick:()=>l({tab:"work"})}),m.jsx(Wo,{label:"Coding",value:I.activeCount,sub:`${I.blockedCount} blocked`,onClick:()=>l({tab:"work"})}),m.jsx(Wo,{label:"Inner",value:D.status,sub:jt(D.summary??"",30),onClick:()=>l({tab:"inner"})})]}),d&&d.items.length>0&&(()=>{const F=d.items.filter(K=>["spawning","running","waiting_input","stalled"].includes(K.status));return F.length===0?null:m.jsx(Wl,{title:`Active coding (${F.length})`,children:m.jsx("div",{className:"space-y-1.5",children:F.map(K=>m.jsxs("button",{onClick:()=>l({tab:"work"}),className:"flex w-full items-center gap-2 rounded-lg bg-ouro-void/40 px-3 py-2 text-left ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:[m.jsx(Se,{color:K.status==="running"?"lime":K.status==="waiting_input"?"yellow":"zinc",children:K.status}),m.jsxs("span",{className:"truncate text-sm text-ouro-bone",children:[K.runner," — ",jt(K.workdir,40)]}),m.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:ct(K.lastActivityAt)})]},K.id))})})})(),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[m.jsx(Wl,{title:"Senses",children:Z.length>0?m.jsx(j3,{items:Z}):m.jsx(Df,{children:"No active senses"})}),m.jsx(Wl,{title:"Bridges",children:J.length>0?m.jsx("div",{className:"flex flex-wrap gap-1.5",children:J.map(F=>m.jsx("button",{onClick:()=>l({tab:"connections",focus:F}),children:m.jsx(Se,{color:"lime",children:F})},F))}):m.jsx(Df,{children:"No active bridges"})})]}),(()=>{var te;const K=(((te=E.obligations)==null?void 0:te.items)??[]).filter(ie=>ie.status==="fulfilled");return K.length===0?null:m.jsx(Wl,{title:"Recently closed",children:m.jsx("div",{className:"space-y-1",children:K.slice(0,3).map((ie,Te)=>m.jsxs("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2 bg-ouro-glow/5 ring-1 ring-ouro-glow/10",children:[m.jsx(Se,{color:"lime",children:"closed"}),m.jsx("p",{className:"text-sm text-ouro-mist truncate",children:jt(ie.content,80)}),m.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:ct(ie.updatedAt)})]},Te))})})})(),m.jsx(Wl,{title:"Recent activity",children:M.recent.length>0?m.jsx("div",{className:"space-y-1",children:M.recent.map((F,K)=>{const te=F.kind==="coding"||F.kind==="obligation"?"work":F.kind==="session"?"sessions":"inner";return m.jsxs("button",{onClick:()=>l({tab:te}),className:"flex w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left hover:bg-ouro-moss/10 transition-colors",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{children:F.kind}),m.jsx("span",{className:"text-xs text-ouro-shadow",children:ct(F.at)})]}),m.jsx("p",{className:"truncate text-sm font-medium text-ouro-bone",children:jt(F.label,100)}),m.jsx("p",{className:"truncate text-xs text-ouro-shadow",children:jt(F.detail,80)})]},K)})}):m.jsx(Df,{children:"No recent activity yet."})})]})}function K0({item:n,nav:a,agentName:l,onDismiss:o}){var d;const u=n.urgency==="return-ready";return m.jsxs("div",{className:`flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left ring-1 transition-colors ${u?"bg-ouro-glow/5 ring-ouro-glow/15":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[m.jsxs("button",{onClick:()=>n.ref&&a({tab:n.ref.tab,focus:n.ref.focus}),className:"flex min-w-0 flex-1 items-start gap-2.5",children:[m.jsx(Se,{color:x3[n.urgency]??"zinc",children:b3[n.urgency]??n.urgency}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:`text-sm font-medium ${u?"text-ouro-glow":"text-ouro-bone"}`,children:n.label}),m.jsx("p",{className:"text-xs text-ouro-shadow truncate",children:n.detail}),m.jsx("p",{className:"text-[10px] italic text-ouro-shadow/60 mt-0.5",children:S3[n.urgency]??""})]}),n.ageMs!=null&&m.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:n.ageMs<36e5?`${Math.floor(n.ageMs/6e4)}m`:n.ageMs<864e5?`${Math.floor(n.ageMs/36e5)}h`:`${Math.floor(n.ageMs/864e5)}d`})]}),((d=n.ref)==null?void 0:d.focus)&&m.jsx("button",{onClick:async f=>{f.stopPropagation(),await fetch(`/api/agents/${encodeURIComponent(l)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:n.ref.focus})}),o()},className:"shrink-0 text-xs text-ouro-shadow hover:text-ouro-fang transition-colors",title:"Dismiss",children:"✕"})]})}function Jo({tab:n,children:a}){const l=Qi();return m.jsx("button",{onClick:()=>l({tab:n}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow transition-colors",children:a})}function Wo({label:n,value:a,sub:l,onClick:o}){return m.jsxs("button",{onClick:o,className:"rounded-xl bg-ouro-void/50 p-3 text-left ring-1 ring-ouro-moss/20 hover:ring-ouro-glow/20 transition-all",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),m.jsx("p",{className:"mt-1 text-xl font-semibold tabular-nums text-ouro-bone",children:a}),m.jsx("p",{className:"mt-0.5 truncate text-xs text-ouro-shadow",children:l})]})}function Wl({title:n,children:a}){return m.jsxs("div",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n}),m.jsx("div",{className:"mt-2",children:a})]})}function j3({items:n}){return m.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(a=>m.jsx(Se,{color:"lime",children:a},a))})}function Df({children:n}){return m.jsx("p",{className:"text-sm text-ouro-shadow",children:n})}function vd(n){const a=n.function.name,l=A3(n.function.arguments);return a==="settle"?{kind:"response",name:a,id:n.id,deliveredText:l.answer??null,delegatedThought:null,metadata:l.intent??null,rawArgs:null}:a==="ponder"?{kind:"delegation",name:a,id:n.id,deliveredText:l.say??null,delegatedThought:l.thought??null,metadata:null,rawArgs:null}:a==="rest"?{kind:"rest",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:null}:a==="observe"?{kind:"observe",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:l.reason??null,rawArgs:null}:a==="surface"?{kind:"surface",name:a,id:n.id,deliveredText:l.content??null,delegatedThought:null,metadata:l.delegationId??l.friendId??null,rawArgs:null}:{kind:"action",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:n.function.arguments}}function A3(n){try{const a=JSON.parse(n);if(a&&typeof a=="object")return a}catch{}return{}}const F0={"needs-reply":{color:"red",label:"needs reply"},"on-hold":{color:"yellow",label:"on hold"},monitoring:{color:"zinc",label:"monitoring"},idle:{color:"zinc",label:"idle"}};function N3({agentName:n,focus:a,onFocusConsumed:l,deskPrefs:o}){Qi();const[u,d]=w.useState(null),[f,h]=w.useState(null),[g,p]=w.useState(null),[y,x]=w.useState(!1);w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/sessions`).then(R=>{d(R),a&&(T(a),l==null||l())})},[n,a]);function T(R){if(f===R){h(null),p(null);return}h(R),p(null),x(!0);const[_,z,q]=R.split("/");$e(`/agents/${encodeURIComponent(n)}/sessions/${encodeURIComponent(_)}/${encodeURIComponent(z)}/${encodeURIComponent(q)}`).then(p).catch(()=>p(null)).finally(()=>x(!1))}const S=new Set((o==null?void 0:o.starredFriends)??[]);if(!u)return m.jsx(Rb,{label:"Loading sessions"});const E=new Map;for(const R of u.items)E.has(R.friendId)||E.set(R.friendId,[]),E.get(R.friendId).push(R);const D=[...E.entries()].sort((R,_)=>{const z=S.has(R[0])?0:1,q=S.has(_[0])?0:1;return z!==q?z-q:_[1].length-R[1].length}),M=[],C=new Map;for(const[R,_]of D)C.set(M.length,{name:_[0].friendName,channels:_.length,starred:S.has(R)}),M.push(..._);return m.jsxs("div",{className:"space-y-3",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:[u.totalCount," sessions · ",u.activeCount," active · ",u.staleCount," stale"]}),m.jsx("div",{className:"space-y-1.5",children:M.map((R,_)=>{var ie;const z=C.get(_),q=S.has(R.friendId),I=`${R.friendId}/${R.channel}/${R.key}`,Z=f===I,J=F0[R.replyState]??F0.idle,F=((ie=R.lastUsage)==null?void 0:ie.total_tokens)??R.estimatedTokens??0,te=F>0?Math.min(100,Math.round(F/8e4*100)):0;return m.jsxs("div",{children:[z&&z.channels>1&&m.jsxs("div",{className:"flex items-center gap-2 pt-3 pb-1",children:[z.starred&&m.jsx("span",{className:"text-ouro-gold text-sm",children:"★"}),m.jsx("span",{className:"font-medium text-ouro-bone text-sm",children:z.name}),m.jsxs("span",{className:"text-xs text-ouro-shadow",children:[z.channels," channels"]})]}),m.jsxs("button",{onClick:()=>T(I),className:`flex w-full flex-col gap-1.5 rounded-lg px-3 py-3 text-left transition-colors ring-1 ${Z?"bg-ouro-moss/15 ring-ouro-glow/20":"ring-ouro-moss/15 hover:bg-ouro-moss/8"}`,children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[q&&m.jsx("span",{className:"text-ouro-gold",title:"Starred",children:"★"}),m.jsx("span",{className:"truncate font-medium text-ouro-bone",children:R.friendName}),m.jsxs("span",{className:"shrink-0 text-xs text-ouro-shadow",children:["via ",R.channel]}),m.jsx(Se,{color:J.color,children:J.label})]}),m.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:ct(R.lastActivityAt)})]}),R.latestUserExcerpt&&m.jsxs("p",{className:"truncate text-xs text-ouro-gold/70",children:[m.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"in:"})," ",jt(R.latestUserExcerpt,100)]}),R.latestAssistantExcerpt&&m.jsxs("p",{className:"truncate text-xs text-ouro-glow/60",children:[m.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"out:"})," ",jt(R.latestAssistantExcerpt,100)]}),m.jsxs("div",{className:"flex items-center gap-3 text-xs text-ouro-shadow",children:[m.jsxs("span",{className:"tabular-nums",children:[R.messageCount," msgs"]}),R.lastUsage&&m.jsxs("span",{className:"tabular-nums",children:[R.lastUsage.total_tokens.toLocaleString()," tok"]}),te>0&&m.jsxs("div",{className:"flex items-center gap-1.5 flex-1 max-w-32",title:"Context pressure — steady state oscillates between 80-100%",children:[m.jsx("div",{className:"h-1 flex-1 rounded-full bg-ouro-moss/20",children:m.jsx("div",{className:`h-1 rounded-full transition-all ${te>100?"bg-ouro-fang":te>80?"bg-ouro-gold":"bg-ouro-glow"}`,style:{width:`${Math.min(100,te)}%`}})}),m.jsxs("span",{className:"tabular-nums text-[10px]",children:[te,"%"]})]})]})]}),Z&&m.jsx(C3,{loading:y,transcript:g})]},I)})})]})}function C3({loading:n,transcript:a}){const l=w.useRef(null);return w.useEffect(()=>{a&&l.current&&(l.current.scrollTop=l.current.scrollHeight)},[a]),m.jsxs("div",{ref:l,className:"mt-1 max-h-[70vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15",children:[n&&m.jsx(Rb,{label:"Loading transcript"}),a&&m.jsx(M3,{messages:a.messages,usage:a.lastUsage})]})}function M3({messages:n,usage:a}){const l=n.filter(h=>h.role==="system"),o=n.filter(h=>h.role!=="system"),[u,d]=w.useState(!1),f=new Map;for(const h of o)h.role==="tool"&&h.tool_call_id&&f.set(h.tool_call_id,h);return m.jsxs("div",{className:"space-y-0.5",children:[a&&m.jsxs("p",{className:"pb-2 font-mono text-[10px] text-ouro-shadow",children:[a.input_tokens.toLocaleString()," in · ",a.output_tokens.toLocaleString()," out · ",a.total_tokens.toLocaleString()," total"]}),l.length>0&&m.jsxs("div",{className:"pb-2 mb-2 border-b border-ouro-moss/15",children:[m.jsxs("button",{onClick:()=>d(!u),className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow hover:text-ouro-mist transition-colors",children:[u?"▼":"▶"," system context (",l.length,")"]}),u&&l.map(h=>m.jsx("div",{className:"mt-2 max-h-60 overflow-y-auto rounded bg-ouro-void/40 p-2 text-xs text-ouro-shadow whitespace-pre-wrap break-words",children:h.content},h.index))]}),o.map(h=>h.role==="tool"?null:h.role==="user"?m.jsx(D3,{msg:h},h.index):h.role==="assistant"?m.jsx(O3,{msg:h,toolResults:f},h.index):null)]})}function D3({msg:n}){return m.jsx("div",{className:"flex justify-start py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-sm bg-ouro-moss/25 px-3.5 py-2 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-gold/70",children:"user"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",n.index]})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:n.content})]})})}function O3({msg:n,toolResults:a}){const l=(n.tool_calls??[]).map(vd),o=l.filter(f=>f.kind!=="action"),u=l.filter(f=>f.kind==="action"),d=[];for(const f of o)f.kind==="response"?d.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70 mb-0.5",children:"agent"}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:f.deliveredText}),f.metadata&&f.metadata!=="complete"&&m.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["intent: ",f.metadata]})]})},f.id)):f.kind==="delegation"?d.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70 mb-0.5",children:"agent"}),f.deliveredText&&m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:f.deliveredText}),f.delegatedThought&&m.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-moss/20 px-2.5 py-1.5 ring-1 ring-ouro-glow/8",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/60",children:"→ inner dialog"}),m.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist",children:f.delegatedThought})]})]})},f.id)):f.kind==="surface"?d.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-scale/12 px-3.5 py-2 ring-1 ring-ouro-scale/15",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70 mb-0.5",children:"surfaced"}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:f.deliveredText}),f.metadata&&m.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",f.metadata]})]})},f.id)):f.kind==="rest"?d.push(m.jsx("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:"— resting —"},f.id)):f.kind==="observe"&&d.push(m.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:["— observed",f.metadata?`: ${f.metadata}`:""," —"]},f.id));return n.content&&o.length===0&&d.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70 mb-0.5",children:"agent"}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:n.content})]})},`${n.index}-content`)),u.length>0&&d.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsx("div",{className:"max-w-[85%] sm:max-w-[75%] space-y-1",children:u.map(f=>m.jsx(z3,{call:f,result:a.get(f.id)},f.id))})},`${n.index}-tools`)),m.jsx(m.Fragment,{children:d})}function z3({call:n,result:a}){const[l,o]=w.useState(!1);return m.jsxs("button",{onClick:()=>o(!l),className:"w-full text-left rounded-lg bg-ouro-moss/10 px-2.5 py-1.5 text-sm ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/15 transition-colors",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-xs text-ouro-glow",children:n.name}),!l&&m.jsx("span",{className:"text-[10px] text-ouro-shadow",children:"tap to inspect"})]}),l&&m.jsxs(m.Fragment,{children:[n.rawArgs&&m.jsx("pre",{className:"mt-1.5 max-h-24 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap break-words",children:n.rawArgs}),a&&m.jsxs("div",{className:"mt-1.5 border-t border-ouro-moss/15 pt-1.5",children:[m.jsx(Se,{children:"result"}),m.jsx("pre",{className:"mt-1 max-h-32 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-mist whitespace-pre-wrap break-words",children:a.content})]})]})]})}function Rb({label:n}){return m.jsxs("div",{className:"flex items-center gap-2 py-6",children:[m.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),m.jsxs("span",{className:"font-mono text-xs text-ouro-shadow",children:[n,"…"]})]})}function R3({agentName:n,view:a,focus:l,onFocusConsumed:o}){var R,_;const u=Qi(),[d,f]=w.useState(null),[h,g]=w.useState(null),[p,y]=w.useState(null),x=a.work,T=x.obligations,S=x.tasks;w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/coding`).then(f),$e(`/agents/${encodeURIComponent(n)}/obligations`).then(g).catch(()=>{}),$e(`/agents/${encodeURIComponent(n)}/self-fix`).then(y).catch(()=>{})},[n]);const E=(h==null?void 0:h.items)??T.items??[],D=(h==null?void 0:h.openCount)??T.openCount,M=(d==null?void 0:d.items)??[],C=new Map;for(const z of M){const q=z.obligationId;q&&(C.has(q)||C.set(q,[]),C.get(q).push(z))}return m.jsxs("div",{className:"space-y-8",children:[m.jsxs("section",{children:[m.jsx(Io,{label:`Obligations (${D} open)`}),(h==null?void 0:h.primarySelectionReason)&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Primary: ",h.primarySelectionReason]}),E.length>0?m.jsx("div",{className:"mt-3 space-y-3",children:E.map(z=>{const q=C.get(z.id)??[],I="isPrimary"in z&&z.isPrimary,Z="meaning"in z?z.meaning:null;return m.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${I?"bg-ouro-glow/5 ring-ouro-glow/20":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-start gap-2",children:[I&&m.jsx(Se,{color:"lime",children:"primary"}),m.jsx(Se,{color:z.status==="pending"?"yellow":z.status==="fulfilled"?"lime":"zinc",children:z.status}),m.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:jt(z.content,120)})]}),z.origin&&m.jsxs("button",{onClick:()=>u({tab:"sessions",focus:`${z.origin.friendId}/${z.origin.channel}/${z.origin.key}`}),className:"mt-2 flex w-full items-center gap-2 rounded-md bg-ouro-moss/8 px-2.5 py-1.5 text-left text-xs ring-1 ring-ouro-moss/10 hover:ring-ouro-glow/20 transition-colors",children:[m.jsx("span",{className:"text-ouro-shadow",children:"from"}),m.jsx("span",{className:"font-medium text-ouro-glow",children:z.origin.channel}),m.jsx("span",{className:"text-ouro-shadow",children:"→"}),m.jsx("span",{className:"text-ouro-mist truncate",children:z.origin.key}),m.jsx("span",{className:"ml-auto text-ouro-shadow",children:"open session →"})]}),z.currentSurface&&m.jsxs("div",{className:"mt-1 text-xs text-ouro-mist",children:["surface: ",m.jsx("span",{className:"text-ouro-bone",children:z.currentSurface.kind})," — ",z.currentSurface.label]}),(Z==null?void 0:Z.waitingOn)&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Waiting on: ",Z.waitingOn]}),q.length>0&&m.jsxs("div",{className:"mt-2 space-y-1",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Linked coding"}),q.map(J=>m.jsxs("div",{className:"flex items-center gap-2 rounded bg-ouro-moss/10 px-2 py-1 text-xs",children:[m.jsx(Se,{color:J.status==="failed"?"red":J.status==="running"?"lime":"zinc",children:J.status}),m.jsxs("span",{className:"text-ouro-mist truncate",children:[J.runner," — ",J.workdir]})]},J.id))]}),z.nextAction&&m.jsxs("p",{className:"mt-1.5 text-xs text-ouro-mist",children:["Next: ",z.nextAction]}),m.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:ct(z.updatedAt)})]},z.id)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No open obligations."})]}),p&&p.steps.length>0&&m.jsxs("section",{children:[m.jsx(Io,{label:`Self-fix ${p.active?"(active)":"(inactive)"}`}),p.currentStep&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-glow",children:["Current: ",p.currentStep]}),m.jsx("div",{className:"mt-3 space-y-1.5",children:p.steps.map((z,q)=>m.jsxs("div",{className:`flex items-center gap-2.5 rounded-lg px-3 py-2 ring-1 ${z.status==="active"?"bg-ouro-glow/5 ring-ouro-glow/20":z.status==="done"?"bg-ouro-void/40 ring-ouro-glow/10":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[m.jsx(Se,{color:z.status==="done"?"lime":z.status==="active"?"yellow":(z.status==="skipped","zinc"),children:z.status}),m.jsx("span",{className:`text-sm ${z.status==="active"?"font-medium text-ouro-bone":"text-ouro-mist"}`,children:z.label}),z.detail&&m.jsx("span",{className:"ml-auto text-xs text-ouro-shadow",children:z.detail})]},q))})]}),m.jsxs("section",{children:[m.jsx(Io,{label:`Coding lanes (${M.length})`}),M.length>0?m.jsx("div",{className:"mt-3 space-y-2",children:M.map(z=>{const q=z.status,I=q==="failed",Z=z.failure;return m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:I?"red":q==="running"?"lime":q==="completed"?"zinc":"yellow",children:q}),m.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:z.runner}),m.jsx("span",{className:"truncate text-xs text-ouro-shadow",children:z.workdir})]}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-2",children:[z.obligationId&&m.jsxs("button",{onClick:()=>u({tab:"work",focus:z.obligationId}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",z.obligationId.slice(0,20),"…"]}),z.taskRef&&m.jsxs("span",{className:"text-xs text-ouro-glow",children:["task: ",z.taskRef]}),z.originSession&&m.jsx("button",{onClick:()=>{const J=z.originSession;u({tab:"sessions",focus:`${J.friendId}/${J.channel}/${J.key}`})},className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:"origin session"})]}),z.checkpoint&&m.jsx("p",{className:"mt-1.5 text-xs text-ouro-mist",children:jt(z.checkpoint,100)}),m.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["pid ",z.pid??"–"," · restarts ",z.restartCount," · ",ct(z.lastActivityAt)]}),I&&Z&&m.jsxs("div",{className:"mt-2 rounded bg-ouro-fang/5 p-2 text-xs ring-1 ring-ouro-fang/15",children:[m.jsx("span",{className:"font-semibold text-ouro-fang",children:"FAILURE:"})," ",m.jsxs("span",{className:"text-ouro-mist",children:[Z.command," exited ",String(Z.code??Z.signal)]}),Z.stderrTail&&m.jsx("pre",{className:"mt-1 max-h-20 overflow-y-auto font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap",children:Z.stderrTail})]})]},z.id)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No coding sessions."})]}),m.jsxs("section",{children:[m.jsx(Io,{label:`Tasks (${S.liveCount} live, ${S.blockedCount} blocked)`}),((R=S.liveTaskNames)==null?void 0:R.length)>0?m.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:S.liveTaskNames.map(z=>m.jsx(Se,{children:z},z))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No live tasks."}),((_=S.actionRequired)==null?void 0:_.length)>0&&m.jsxs("div",{className:"mt-3",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Action required"}),m.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:S.actionRequired.map(z=>m.jsx(Se,{color:"red",children:z},z))})]})]})]})}function Io({label:n}){return m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function L3({agentName:n,focus:a,onFocusConsumed:l}){const o=Qi(),[u,d]=w.useState(null),[f,h]=w.useState(null),[g,p]=w.useState(null);w.useEffect(()=>{const S=`/agents/${encodeURIComponent(n)}`;Promise.all([$e(`${S}/attention`).then(d),$e(`${S}/bridges`).then(h),$e(`${S}/friends`).then(p)])},[n]);const y=(u==null?void 0:u.queueItems)??[],x=(f==null?void 0:f.items)??[],T=(g==null?void 0:g.friends)??[];return m.jsxs("div",{className:"space-y-8",children:[m.jsxs("section",{children:[m.jsx(Of,{label:`Who is waiting (${(u==null?void 0:u.queueLength)??0})`}),y.length>0?m.jsx("div",{className:"mt-3 space-y-2",children:y.map((S,E)=>m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("button",{onClick:()=>o({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:S.friendName}),m.jsxs("span",{className:"text-xs text-ouro-shadow",children:["via ",S.channel]}),m.jsxs(Se,{color:"yellow",children:["waiting ",ct(new Date(S.timestamp).toISOString())]})]}),m.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:jt(S.delegatedContent,140)}),m.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-2 text-xs",children:[S.bridgeId&&m.jsxs("button",{onClick:()=>o({tab:"connections",focus:S.bridgeId}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["bridge: ",S.bridgeId.slice(0,12),"…"]}),S.obligationId&&m.jsxs("button",{onClick:()=>o({tab:"work",focus:S.obligationId}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",S.obligationId.slice(0,16),"…"]})]})]},E))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"Nobody waiting."})]}),m.jsxs("section",{children:[m.jsx(Of,{label:`Bridges (${(f==null?void 0:f.totalCount)??0})`}),x.length>0?m.jsx("div",{className:"mt-3 space-y-3",children:x.map(S=>{const E=S.attachedSessions??[],D=S.task,M=S.lifecycle==="active";return m.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${M?"bg-ouro-moss/10 ring-ouro-glow/12":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Se,{color:M?"lime":"zinc",children:S.lifecycle}),m.jsx("p",{className:"font-medium text-ouro-bone",children:S.objective})]}),S.summary&&m.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:jt(S.summary,160)}),E.length>0&&m.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:E.map((C,R)=>m.jsxs("button",{onClick:()=>o({tab:"sessions",focus:`${C.friendId}/${C.channel}/${C.key}`}),className:"rounded-md bg-ouro-moss/10 px-2 py-0.5 font-mono text-[11px] text-ouro-glow ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/25 transition-colors",children:[C.friendId,"/",C.channel,"/",C.key]},R))}),D&&m.jsxs("p",{className:"mt-1.5 text-xs",children:[m.jsxs("button",{onClick:()=>o({tab:"work"}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["task: ",D.taskName]}),m.jsxs("span",{className:"text-ouro-shadow",children:[" (",D.mode,")"]})]}),m.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:ct(S.updatedAt)})]},S.id)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No bridges."})]}),m.jsxs("section",{children:[m.jsx(Of,{label:`Friends (${(g==null?void 0:g.totalFriends)??0})`}),T.length>0?m.jsx("div",{className:"mt-3 space-y-1.5",children:T.map(S=>m.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx("button",{onClick:()=>o({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:S.friendName}),m.jsxs("p",{className:"text-xs text-ouro-shadow",children:[S.channels.join(", ")," · ",S.sessionCount," sessions",S.lastActivityAt&&m.jsxs(m.Fragment,{children:[" · ",ct(S.lastActivityAt)]})]})]}),m.jsxs("div",{className:"shrink-0 text-right",children:[m.jsx("p",{className:"tabular-nums text-sm font-medium text-ouro-bone",children:S.totalTokens.toLocaleString()}),m.jsx("p",{className:"text-[10px] text-ouro-shadow",children:"tokens"})]})]},S.friendId))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No friends."})]})]})}function Of({label:n}){return m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function k3({agentName:n,view:a}){var M;const l=Qi(),[o,u]=w.useState(null),[d,f]=w.useState(null),[h,g]=w.useState(!1),p=a.inner;w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/habits`).then(u)},[n]);function y(){if(d){g(!h);return}$e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(C=>{f(C),g(!0)})}const x=(o==null?void 0:o.items)??[],T=x.filter(C=>C.isOverdue),S=x.filter(C=>C.status==="active"&&!C.isOverdue),E=x.filter(C=>C.status==="paused"),D=x.find(C=>{var R;return((R=C.name)==null?void 0:R.toLowerCase())==="heartbeat"});return m.jsxs("div",{className:"space-y-8",children:[D&&m.jsxs("section",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Heartbeat"}),m.jsx("div",{className:`mt-2 rounded-xl p-4 ring-1 ${D.isOverdue?"bg-ouro-fang/5 ring-ouro-fang/15":"bg-ouro-moss/10 ring-ouro-glow/10"}`,children:m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${D.isOverdue?"bg-ouro-fang animate-pulse":"bg-ouro-glow"}`}),m.jsx("span",{className:"font-medium text-ouro-bone",children:D.isOverdue?"Overdue":"Healthy"}),m.jsxs("span",{className:"text-xs text-ouro-shadow",children:["every ",D.cadence," · last ",D.lastRun?ct(D.lastRun):"never"]})]})})]}),m.jsx("section",{children:m.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Inner work"}),m.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone",children:p.status}),p.summary&&m.jsx("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:p.summary}),m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:p.hasPending?"Pending inner work queued.":"No pending inner work."}),p.mode==="deep"&&p.origin&&m.jsxs("div",{className:"mt-3",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Triggered from"}),m.jsxs("button",{onClick:()=>{const C=p.origin;l({tab:"sessions",focus:`${C.friendId}/${C.channel}/${C.key}`})},className:"mt-1 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:[(M=p.origin.friendId)==null?void 0:M.slice(0,8),"…/",p.origin.channel,"/",p.origin.key]}),p.obligationStatus&&m.jsxs("button",{onClick:()=>l({tab:"work"}),className:"ml-2 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",p.obligationStatus]})]})]})}),m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Inner dialog ",d?`(${d.messages.length} total)`:""]}),d?m.jsx(V3,{messages:d.messages}):m.jsx("button",{onClick:y,className:"mt-2 w-full rounded-lg px-3 py-2.5 text-left font-mono text-xs text-ouro-glow ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:"Load inner dialog"})]}),m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Habits (",(o==null?void 0:o.totalCount)??0,")"]}),T.length>0&&m.jsxs("div",{className:"mt-3",children:[m.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-fang mb-1.5",children:["Overdue (",T.length,")"]}),m.jsx("div",{className:"space-y-1.5",children:T.map(C=>m.jsx(zf,{h:C},C.name))})]}),S.length>0&&m.jsxs("div",{className:"mt-3",children:[m.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow mb-1.5",children:["Running fine (",S.length,")"]}),m.jsx("div",{className:"space-y-1.5",children:S.map(C=>m.jsx(zf,{h:C},C.name))})]}),E.length>0&&m.jsxs("div",{className:"mt-3",children:[m.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow mb-1.5",children:["Paused (",E.length,")"]}),m.jsx("div",{className:"space-y-1.5",children:E.map(C=>m.jsx(zf,{h:C},C.name))})]}),x.length===0&&m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No habits configured."})]})]})}function V3({messages:n}){const a=n.filter(p=>p.role!=="system"&&p.role!=="tool"),[l,o]=w.useState(!1),u=w.useRef(null),d=l?a:a.slice(-30),f=a.length-d.length;w.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[d.length]);const h=[];for(const p of a){if(p.role!=="assistant")continue;const y=(p.tool_calls??[]).map(vd);for(const x of y)x.kind==="surface"&&h.push({index:p.index,kind:"surfaced",label:jt(x.deliveredText??"",40)}),x.kind==="rest"&&h.push({index:p.index,kind:"resting",label:"resting"}),x.kind==="delegation"&&h.push({index:p.index,kind:"delegated",label:"continued thinking"})}function g(p){var x;const y=(x=u.current)==null?void 0:x.querySelector(`[data-msg-index="${p}"]`);y&&y.scrollIntoView({behavior:"smooth",block:"center"})}return m.jsxs("div",{children:[h.length>0&&m.jsx("div",{className:"mt-2 mb-1 flex flex-wrap gap-1",children:h.map((p,y)=>m.jsxs("button",{onClick:()=>{o(!0),setTimeout(()=>g(p.index),100)},className:`rounded-md px-2 py-0.5 text-[10px] font-mono ring-1 transition-colors ${p.kind==="surfaced"?"bg-ouro-scale/10 text-ouro-glow ring-ouro-scale/20 hover:ring-ouro-glow/30":p.kind==="resting"?"bg-ouro-void/40 text-ouro-shadow ring-ouro-moss/10":"bg-ouro-gold/5 text-ouro-gold ring-ouro-gold/10"}`,children:[p.kind==="surfaced"?"★":p.kind==="resting"?"—":"→"," #",p.index]},y))}),m.jsxs("div",{ref:u,className:"max-h-[60vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15 space-y-1",children:[f>0&&m.jsxs("button",{onClick:()=>o(!0),className:"w-full rounded-lg px-3 py-2 text-center font-mono text-xs text-ouro-shadow hover:text-ouro-mist ring-1 ring-ouro-moss/10 hover:ring-ouro-moss/20 transition-colors mb-2",children:["Load ",f," earlier messages"]}),d.map(p=>{var y,x,T,S;if(p.role==="user"){const E=((y=p.content)==null?void 0:y.includes("[pending from"))||((x=p.content)==null?void 0:x.includes("[delegated")),D=((T=p.content)==null?void 0:T.includes("waking up"))||((S=p.content)==null?void 0:S.includes("world-state checkpoint"));return m.jsx("div",{"data-msg-index":p.index,className:"flex justify-start py-1",children:m.jsxs("div",{className:`max-w-[85%] rounded-2xl rounded-bl-sm px-3 py-2 ring-1 ${E?"bg-ouro-gold/8 ring-ouro-gold/15":D?"bg-ouro-moss/20 ring-ouro-moss/15":"bg-ouro-moss/25 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider",style:{color:E?"var(--color-ouro-gold)":"var(--color-ouro-shadow)"},children:E?"★ delegated":D?"heartbeat":"prompt"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",p.index]})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:p.content})]})},p.index)}if(p.role==="assistant"){const E=(p.tool_calls??[]).map(vd),D=E.filter(R=>R.kind==="surface"),M=E.filter(R=>R.kind==="rest"),C=E.filter(R=>R.kind==="delegation");return m.jsxs("div",{"data-msg-index":p.index,children:[D.map(R=>m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-scale/15 px-3 py-2 ring-1 ring-ouro-scale/20",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow",children:"★ surfaced outward"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",p.index]})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:R.deliveredText}),R.metadata&&m.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",R.metadata]})]})},R.id)),C.length>0&&m.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-gold/50",children:["— still thinking — #",p.index]}),M.length>0&&m.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/40",children:["— resting — #",p.index]}),D.length===0&&M.length===0&&C.length===0&&p.content&&m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-glow/6 px-3 py-2 ring-1 ring-ouro-glow/8",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/50",children:"thinking"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",p.index]})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-mist whitespace-pre-wrap break-words",children:p.content})]})})]},p.index)}return null})]})]})}function zf({h:n}){const a=n.isOverdue,l=n.isDegraded,o=n.status;return m.jsxs("div",{className:`rounded-lg px-3 py-2.5 ring-1 ${a?"bg-ouro-fang/5 ring-ouro-fang/15":l?"bg-ouro-gold/5 ring-ouro-gold/15":o==="paused"?"bg-ouro-void/30 ring-ouro-moss/10":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:a?"red":l?"yellow":o==="active"?"lime":"zinc",children:a?"overdue":l?"degraded":o}),m.jsx("span",{className:"font-medium text-ouro-bone",children:n.title})]}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 text-xs text-ouro-shadow",children:[n.cadence&&m.jsxs("span",{children:["every ",n.cadence]}),m.jsx("span",{children:n.lastRun?`last ${ct(n.lastRun)}`:"never run"}),l&&n.degradedReason&&m.jsx("span",{className:"text-ouro-gold",children:n.degradedReason}),!a&&!l&&o==="active"&&n.lastRun&&m.jsx("span",{className:"text-ouro-glow",children:"on schedule"}),a&&n.overdueMs&&m.jsxs("span",{className:"text-ouro-fang",children:[Math.floor(n.overdueMs/6e4),"m overdue"]}),!n.lastRun&&o==="active"&&m.jsx("span",{className:"text-ouro-gold",children:"never fired — may be misconfigured"})]}),n.bodyExcerpt&&m.jsx("p",{className:"mt-1 text-xs text-ouro-shadow/70",children:n.bodyExcerpt})]})}function _3({agentName:n}){const[a,l]=w.useState(null),[o,u]=w.useState(null),[d,f]=w.useState("diary");if(w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/memory`).then(l),$e(`/agents/${encodeURIComponent(n)}/memory-decisions`).then(u).catch(()=>{})},[n]),!a)return m.jsxs("div",{className:"flex items-center gap-2 py-6",children:[m.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),m.jsx("span",{className:"font-mono text-xs text-ouro-shadow",children:"Loading…"})]});const h=a.recentDiaryEntries??[],g=a.recentJournalEntries??[];return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs("button",{onClick:()=>f("diary"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="diary"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Diary (",a.diaryEntryCount,")"]}),m.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),m.jsxs("button",{onClick:()=>f("journal"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="journal"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Journal (",a.journalEntryCount,")"]}),m.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),m.jsxs("button",{onClick:()=>f("decisions"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="decisions"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Decisions (",(o==null?void 0:o.totalCount)??0,")"]})]}),d==="diary"&&m.jsx("div",{children:h.length>0?m.jsx("div",{className:"space-y-3",children:h.map(p=>m.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone",children:p.text}),m.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-ouro-shadow",children:[m.jsx(Se,{children:p.source}),m.jsx("span",{children:ct(p.createdAt)})]})]},p.id))}):m.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No diary entries yet. The agent hasn't written anything down."})}),d==="journal"&&m.jsx("div",{children:g.length>0?m.jsx("div",{className:"space-y-3",children:g.map(p=>m.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-medium text-ouro-bone",children:p.filename}),m.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-mist",children:p.preview})]},p.filename))}):m.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No journal entries yet."})}),d==="decisions"&&m.jsx("div",{children:o&&o.items.length>0?m.jsx("div",{className:"space-y-2",children:o.items.map((p,y)=>m.jsxs("div",{className:"rounded-xl bg-ouro-void/40 px-4 py-3 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:p.decision==="saved"?"lime":"zinc",children:p.decision}),m.jsx(Se,{children:p.kind.replace(/_/g," ")}),m.jsx("span",{className:"text-xs text-ouro-shadow",children:ct(p.timestamp)})]}),p.reason&&m.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:p.reason}),p.excerpt&&m.jsx("p",{className:"mt-0.5 text-xs text-ouro-shadow italic truncate",children:p.excerpt})]},y))}):m.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No memory decisions logged yet."})})]})}function U3({agentName:n,view:a}){const[l,o]=w.useState(null),[u,d]=w.useState(null),f=a.agent,h=f.degraded,g=f.freshness;w.useEffect(()=>{Promise.all([$e("/machine/health").then(o).catch(()=>null),$e("/machine/logs").then(d).catch(()=>null)])},[n]);const p=(l==null?void 0:l.degradedComponents)??[],y=(u==null?void 0:u.entries)??[];return m.jsxs("div",{className:"space-y-8",children:[h.status==="degraded"&&h.issues.length>0&&m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-fang",children:["Agent issues (",h.issues.length,")"]}),m.jsx("div",{className:"mt-3 space-y-1.5",children:h.issues.map((x,T)=>m.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2.5 ring-1 ring-ouro-fang/15",children:[m.jsx("p",{className:"font-mono text-xs font-semibold text-ouro-fang",children:x.code}),m.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist break-all",children:x.detail})]},T))})]}),m.jsxs("section",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Agent config"}),m.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[m.jsx(Hi,{label:"Provider",value:f.provider||"none"}),m.jsx(Hi,{label:"Enabled",value:f.enabled?"yes":"no"}),m.jsx(Hi,{label:"Freshness",value:`${g.status}${g.ageMs!=null?` (${Math.floor(g.ageMs/6e4)}m)`:""}`})]})]}),m.jsxs("section",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Daemon health"}),l&&l.status!=="unavailable"?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[m.jsx(Hi,{label:"Status",value:l.status}),m.jsx(Hi,{label:"Mode",value:l.mode}),m.jsx(Hi,{label:"Uptime",value:`${Math.floor(l.uptimeSeconds/60)}m`})]}),p.length>0&&m.jsxs("div",{className:"mt-3 space-y-1.5",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Degraded components"}),p.map((x,T)=>m.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2 ring-1 ring-ouro-fang/15",children:[m.jsx("p",{className:"text-xs font-semibold text-ouro-fang",children:x.component}),m.jsx("p",{className:"text-xs text-ouro-mist",children:x.reason})]},T))]})]}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No health file found. This is normal when not running under the daemon."})]}),m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Recent logs (",(u==null?void 0:u.totalLines)??0," total)"]}),y.length>0?m.jsx("div",{className:"mt-3 max-h-96 overflow-y-auto rounded-lg bg-ouro-void/40 ring-1 ring-ouro-moss/15",children:[...y].reverse().slice(0,50).map((x,T)=>{const S=x.level;return m.jsxs("div",{className:"border-b border-ouro-moss/10 px-3 py-1.5 last:border-b-0",children:[m.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[m.jsx(Se,{color:S==="error"?"red":S==="warn"?"yellow":"zinc",children:S}),m.jsx("span",{className:"text-ouro-shadow",children:ct(x.ts)}),m.jsx("span",{className:"font-mono text-ouro-glow",children:x.event})]}),m.jsx("p",{className:"truncate text-xs text-ouro-mist",children:x.message})]},T)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No log entries."})]})]})}function Hi({label:n,value:a}){return m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),m.jsx("p",{className:"mt-1 text-sm font-medium text-ouro-bone",children:a})]})}const Rf=[{id:"overview",label:"Overview"},{id:"sessions",label:"Sessions"},{id:"work",label:"Work"},{id:"connections",label:"Connections"},{id:"inner",label:"Inner"},{id:"memory",label:"Diary & Journal"},{id:"runtime",label:"Runtime"}];function B3(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function H3({agentName:n,view:a,deskPrefs:l,initialRoute:o}){const[u,d]=w.useState((o==null?void 0:o.tab)??"overview"),[f,h]=w.useState(o==null?void 0:o.focus),g=w.useRef(!1);w.useEffect(()=>{(o==null?void 0:o.agent)===n&&!g.current?(g.current=!0,d(o.tab),h(o.focus)):(d("overview"),h(void 0))},[n]);const p=w.useCallback(E=>{d(E.tab),h(E.focus),window.history.pushState(null,"",Lf({agent:n,tab:E.tab,focus:E.focus}))},[n]),y=w.useCallback(E=>{d(E),h(void 0),window.history.pushState(null,"",Lf({agent:n,tab:E,focus:void 0}))},[n]),x=w.useCallback(()=>h(void 0),[]);if(y3(p),!a||!n)return m.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[m.jsx("p",{className:"font-display text-2xl italic text-ouro-bone",children:"Choose an agent"}),m.jsx("p",{className:"mt-2 text-sm text-ouro-mist",children:"Select an agent from the sidebar to inspect its state."})]});const S=a.agent.attention;return m.jsx(J0.Provider,{value:p,children:m.jsxs("div",{children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-4 border-b border-ouro-moss/30",children:[m.jsx("div",{className:"min-w-0",children:m.jsx("h1",{className:"font-display text-2xl italic font-semibold text-ouro-bone sm:text-3xl",children:n})}),m.jsx(Se,{color:B3(S.level),children:S.label})]}),m.jsx("nav",{className:"mt-4 flex gap-0.5 overflow-x-auto border-b border-ouro-moss/20 -mx-1",children:(()=>{const E=l==null?void 0:l.tabOrder;if(!E)return Rf;const D=E.map(C=>Rf.find(R=>R.id===C)).filter(C=>C!==void 0),M=Rf.filter(C=>!E.includes(C.id));return[...D,...M]})().map(E=>m.jsx("button",{type:"button",onClick:()=>y(E.id),className:`shrink-0 px-3 py-2 text-xs font-mono uppercase tracking-wider transition-colors rounded-t-md ${u===E.id?"bg-ouro-moss/20 text-ouro-glow border-b-2 border-ouro-glow":"text-ouro-shadow hover:text-ouro-mist hover:bg-ouro-moss/10"}`,children:E.label},E.id))}),m.jsxs("div",{className:"mt-6",children:[u==="overview"&&m.jsx(E3,{view:a,deskPrefs:l}),u==="sessions"&&m.jsx(N3,{agentName:n,focus:f,onFocusConsumed:x,deskPrefs:l}),u==="work"&&m.jsx(R3,{agentName:n,view:a,focus:f,onFocusConsumed:x}),u==="connections"&&m.jsx(L3,{agentName:n,focus:f,onFocusConsumed:x}),u==="inner"&&m.jsx(k3,{agentName:n,view:a}),u==="memory"&&m.jsx(_3,{agentName:n}),u==="runtime"&&m.jsx(U3,{agentName:n,view:a})]})]})})}function Z0(){return W0(window.location.hash)}function $3(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function G3(){var E,D;const[n,a]=w.useState(null),[l,o]=w.useState(((E=Z0())==null?void 0:E.agent)??""),[u,d]=w.useState(null),f=w.useRef(0),h=w.useRef(Z0()),g=w.useCallback(async()=>{var M;try{const C=await $e("/machine");if(a(C),!l&&C.agents.length>0){const R=((M=h.current)==null?void 0:M.agent)??C.agents[0].agentName;o(R)}}catch{}},[l]),[p,y]=w.useState(null),x=w.useCallback(async M=>{if(!M){d(null),y(null);return}try{const[C,R]=await Promise.all([$e(`/agents/${encodeURIComponent(M)}`),$e(`/agents/${encodeURIComponent(M)}/desk-prefs`)]);d(C),y(R)}catch{d(null),y(null)}},[]);w.useEffect(()=>{g()},[g]),w.useEffect(()=>{l&&x(l)},[l,x]),w.useEffect(()=>mT(()=>{const C=++f.current;g().then(()=>{f.current===C&&l&&x(l)})}),[g,x,l]),w.useEffect(()=>{const M=()=>{const C=W0(window.location.hash);C&&o(C.agent)};return window.addEventListener("hashchange",M),()=>window.removeEventListener("hashchange",M)},[]);const T=w.useCallback(M=>{o(M),window.history.pushState(null,"",Lf({agent:M,tab:"overview",focus:void 0}))},[]);if(!n)return m.jsx("div",{className:"flex h-screen items-center justify-center bg-ouro-void",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"mx-auto mb-4 h-4 w-4 animate-pulse rounded-full bg-ouro-glow shadow-[0_0_20px_theme(--color-ouro-glow)]"}),m.jsx("p",{className:"font-mono text-sm text-ouro-mist",children:"Connecting to Outlook…"})]})});const S=n.overview.totals;return m.jsx(c3,{navbar:m.jsxs(i3,{children:[m.jsx(s3,{}),m.jsx(l3,{children:m.jsx(eh,{children:m.jsx(Se,{color:n.overview.daemon.mode==="dev"?"yellow":"lime",children:n.overview.daemon.mode})})})]}),sidebar:m.jsxs(f3,{className:"bg-ouro-deep",children:[m.jsx(d3,{className:"border-ouro-moss/30",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"h-3 w-3 shrink-0 rounded-full bg-ouro-glow shadow-[0_0_16px_theme(--color-ouro-glow)]"}),m.jsx("div",{className:"min-w-0",children:m.jsx("p",{className:"truncate font-display text-lg italic font-semibold text-ouro-bone",children:"Ouro Outlook"})})]})}),m.jsxs(h3,{className:"[&>[data-slot=section]+[data-slot=section]]:mt-4",children:[m.jsxs(q0,{children:[m.jsx(X0,{className:"text-ouro-mist/60",children:"Machine"}),m.jsx("div",{className:"grid grid-cols-3 gap-1.5 px-2",children:[{v:S.liveTasks??0,l:"Tasks",alert:(S.blockedTasks??0)>0},{v:S.openObligations??0,l:"Oblig."},{v:S.activeCodingAgents??0,l:"Coding"}].map(M=>m.jsxs("div",{className:"rounded-md bg-ouro-void/60 px-2 py-1.5 text-center ring-1 ring-ouro-moss/20",children:[m.jsx("div",{className:`text-base font-semibold tabular-nums ${M.alert?"text-ouro-fang":"text-ouro-bone"}`,children:M.v}),m.jsx("div",{className:"text-[9px] uppercase tracking-widest text-ouro-shadow",children:M.l})]},M.l))})]}),m.jsxs(q0,{children:[m.jsx(X0,{className:"text-ouro-mist/60",children:"Agents"}),n.agents.map(M=>m.jsx(p3,{current:M.agentName===l,onClick:()=>T(M.agentName),children:m.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-2",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx(g3,{className:"text-ouro-bone",children:M.agentName}),m.jsxs("p",{className:"truncate text-xs text-ouro-shadow",children:[M.tasks.liveCount,"t · ",M.obligations.openCount,"o · ",M.coding.activeCount,"c"]})]}),m.jsx(Se,{color:$3(M.attention.level),children:M.attention.label})]})},M.agentName))]})]}),m.jsx(m3,{className:"border-ouro-moss/30",children:m.jsxs("div",{className:"px-2 text-xs text-ouro-shadow",children:[m.jsx("p",{className:"font-mono",children:n.overview.runtime.version}),m.jsxs("p",{className:"mt-0.5",children:[n.overview.daemon.mode," · ",n.overview.freshness.status]})]})}),l&&u&&m.jsx("div",{className:"px-4 py-2 border-t border-ouro-moss/20",children:m.jsx("p",{className:"text-xs italic text-ouro-shadow/70",children:(()=>{var q;const M=p==null?void 0:p.statusLine;if(M)return M;const C=u==null?void 0:u.inner;if((C==null?void 0:C.status)==="working"||C!=null&&C.hasPending)return"thinking through something privately";const _=u==null?void 0:u.work,z=((q=_==null?void 0:_.obligations)==null?void 0:q.openCount)??0;return z>2?"a few loose ends":z>0?"carrying something":"steady"})()})})]}),children:m.jsx(H3,{agentName:l,view:u,deskPrefs:p,initialRoute:((D=h.current)==null?void 0:D.agent)===l?h.current:void 0})})}hT.createRoot(document.getElementById("app")).render(m.jsx(w.StrictMode,{children:m.jsx(G3,{})}));
|
|
60
|
+
*/var bv;function Ow(){if(bv)return gf;bv=1;var n=jr();function a(g,p){return g===p&&(g!==0||1/g===1/p)||g!==g&&p!==p}var l=typeof Object.is=="function"?Object.is:a,o=n.useSyncExternalStore,u=n.useRef,d=n.useEffect,f=n.useMemo,h=n.useDebugValue;return gf.useSyncExternalStoreWithSelector=function(g,p,y,x,T){var S=u(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=f(function(){function M(Y){if(!C){if(C=!0,R=Y,Y=x(Y),T!==void 0&&E.hasValue){var I=E.value;if(T(I,Y))return _=I}return _=Y}if(I=_,l(R,Y))return I;var Z=x(Y);return T!==void 0&&T(I,Z)?(R=Y,I):(R=Y,_=Z)}var C=!1,R,_,z=y===void 0?null:y;return[function(){return M(p())},z===null?void 0:function(){return M(z())}]},[p,y,x,T]);var D=o(g,S[0],S[1]);return d(function(){E.hasValue=!0,E.value=D},[D]),h(D),D},gf}var Sv;function zw(){return Sv||(Sv=1,pf.exports=Ow()),pf.exports}var Rw=zw();function Ny(n,a,l=Ey){return Rw.useSyncExternalStoreWithSelector(De(o=>n.subscribe(Lw,o)),De(()=>n.state),De(()=>n.state),De(a),l)}function Lw(n){return n}function Ss(n,a){let l=w.useId(),o=Ay.get(a),[u,d]=Ny(o,w.useCallback(f=>[o.selectors.isTop(f,l),o.selectors.inStack(f,l)],[o,l]));return At(()=>{if(n)return o.actions.push(l),()=>o.actions.pop(l)},[o,n,l]),n?d?u:!0:!1}let Kf=new Map,os=new Map;function Tv(n){var a;let l=(a=os.get(n))!=null?a:0;return os.set(n,l+1),l!==0?()=>wv(n):(Kf.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>wv(n))}function wv(n){var a;let l=(a=os.get(n))!=null?a:1;if(l===1?os.delete(n):os.set(n,l-1),l!==1)return;let o=Kf.get(n);o&&(o["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",o["aria-hidden"]),n.inert=o.inert,Kf.delete(n))}function kw(n,{allowed:a,disallowed:l}={}){let o=Ss(n,"inert-others");At(()=>{var u,d;if(!o)return;let f=Un();for(let g of(u=l==null?void 0:l())!=null?u:[])g&&f.add(Tv(g));let h=(d=a==null?void 0:a())!=null?d:[];for(let g of h){if(!g)continue;let p=Wi(g);if(!p)continue;let y=g.parentElement;for(;y&&y!==p.body;){for(let x of y.children)h.some(T=>x.contains(T))||f.add(Tv(x));y=y.parentElement}}return f.dispose},[o,a,l])}function Vw(n,a,l){let o=ei(u=>{let d=u.getBoundingClientRect();d.x===0&&d.y===0&&d.width===0&&d.height===0&&l()});w.useEffect(()=>{if(!n)return;let u=a===null?null:Ia(a)?a:a.current;if(!u)return;let d=Un();if(typeof ResizeObserver<"u"){let f=new ResizeObserver(()=>o.current(u));f.observe(u),d.add(()=>f.disconnect())}if(typeof IntersectionObserver<"u"){let f=new IntersectionObserver(()=>o.current(u));f.observe(u),d.add(()=>f.disconnect())}return()=>d.dispose()},[a,o,n])}let mr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),_w=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var kn=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(kn||{}),Ff=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Ff||{}),Uw=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Uw||{});function Bw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(mr)).sort((a,l)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(l.tabIndex||Number.MAX_SAFE_INTEGER)))}function Hw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(_w)).sort((a,l)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(l.tabIndex||Number.MAX_SAFE_INTEGER)))}var Cy=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Cy||{});function $w(n,a=0){var l;return n===((l=Wi(n))==null?void 0:l.body)?!1:_n(a,{0(){return n.matches(mr)},1(){let o=n;for(;o!==null;){if(o.matches(mr))return!0;o=o.parentElement}return!1}})}var qw=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(qw||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Vn(n){n==null||n.focus({preventScroll:!0})}let Gw=["textarea","input"].join(",");function Yw(n){var a,l;return(l=(a=n==null?void 0:n.matches)==null?void 0:a.call(n,Gw))!=null?l:!1}function Xw(n,a=l=>l){return n.slice().sort((l,o)=>{let u=a(l),d=a(o);if(u===null||d===null)return 0;let f=u.compareDocumentPosition(d);return f&Node.DOCUMENT_POSITION_FOLLOWING?-1:f&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function rs(n,a,{sorted:l=!0,relativeTo:o=null,skipElements:u=[]}={}){let d=Array.isArray(n)?n.length>0?Gf(n[0]):document:Gf(n),f=Array.isArray(n)?l?Xw(n):n:a&64?Hw(n):Bw(n);u.length>0&&f.length>1&&(f=f.filter(S=>!u.some(E=>E!=null&&"current"in E?(E==null?void 0:E.current)===S:E===S))),o=o??(d==null?void 0:d.activeElement);let h=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,f.indexOf(o))-1;if(a&4)return Math.max(0,f.indexOf(o))+1;if(a&8)return f.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=a&32?{preventScroll:!0}:{},y=0,x=f.length,T;do{if(y>=x||y+x<=0)return 0;let S=g+y;if(a&16)S=(S+x)%x;else{if(S<0)return 3;if(S>=x)return 1}T=f[S],T==null||T.focus(p),y+=h}while(T!==hy(T));return a&6&&Yw(T)&&T.select(),2}function My(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Kw(){return/Android/gi.test(window.navigator.userAgent)}function Ev(){return My()||Kw()}function Qo(n,a,l,o){let u=ei(l);w.useEffect(()=>{if(!n)return;function d(f){u.current(f)}return document.addEventListener(a,d,o),()=>document.removeEventListener(a,d,o)},[n,a,o])}function Dy(n,a,l,o){let u=ei(l);w.useEffect(()=>{if(!n)return;function d(f){u.current(f)}return window.addEventListener(a,d,o),()=>window.removeEventListener(a,d,o)},[n,a,o])}const jv=30;function Fw(n,a,l){let o=ei(l),u=w.useCallback(function(h,g){if(h.defaultPrevented)return;let p=g(h);if(p===null||!p.getRootNode().contains(p)||!p.isConnected)return;let y=(function x(T){return typeof T=="function"?x(T()):Array.isArray(T)||T instanceof Set?T:[T]})(a);for(let x of y)if(x!==null&&(x.contains(p)||h.composed&&h.composedPath().includes(x)))return;return!$w(p,Cy.Loose)&&p.tabIndex!==-1&&h.preventDefault(),o.current(h,p)},[o,a]),d=w.useRef(null);Qo(n,"pointerdown",h=>{var g,p;Ev()||(d.current=((p=(g=h.composedPath)==null?void 0:g.call(h))==null?void 0:p[0])||h.target)},!0),Qo(n,"pointerup",h=>{if(Ev()||!d.current)return;let g=d.current;return d.current=null,u(h,()=>g)},!0);let f=w.useRef({x:0,y:0});Qo(n,"touchstart",h=>{f.current.x=h.touches[0].clientX,f.current.y=h.touches[0].clientY},!0),Qo(n,"touchend",h=>{let g={x:h.changedTouches[0].clientX,y:h.changedTouches[0].clientY};if(!(Math.abs(g.x-f.current.x)>=jv||Math.abs(g.y-f.current.y)>=jv))return u(h,()=>ma(h.target)?h.target:null)},!0),Dy(n,"blur",h=>u(h,()=>fw(window.document.activeElement)?window.document.activeElement:null),!0)}function jd(...n){return w.useMemo(()=>Wi(...n),[...n])}function Oy(n,a,l,o){let u=ei(l);w.useEffect(()=>{n=n??window;function d(f){u.current(f)}return n.addEventListener(a,d,o),()=>n.removeEventListener(a,d,o)},[n,a,o])}function Zw(n){return w.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function Qw(n,a){let l=n(),o=new Set;return{getSnapshot(){return l},subscribe(u){return o.add(u),()=>o.delete(u)},dispatch(u,...d){let f=a[u].call(l,...d);f&&(l=f,o.forEach(h=>h()))}}}function Pw(){let n;return{before({doc:a}){var l;let o=a.documentElement,u=(l=a.defaultView)!=null?l:window;n=Math.max(0,u.innerWidth-o.clientWidth)},after({doc:a,d:l}){let o=a.documentElement,u=Math.max(0,o.clientWidth-o.offsetWidth),d=Math.max(0,n-u);l.style(o,"paddingRight",`${d}px`)}}}function Jw(){return My()?{before({doc:n,d:a,meta:l}){function o(u){for(let d of l().containers)for(let f of d())if(f.contains(u))return!0;return!1}a.microTask(()=>{var u;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let h=Un();h.style(n.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>h.dispose()))}let d=(u=window.scrollY)!=null?u:window.pageYOffset,f=null;a.addEventListener(n,"click",h=>{if(ma(h.target))try{let g=h.target.closest("a");if(!g)return;let{hash:p}=new URL(g.href),y=n.querySelector(p);ma(y)&&!o(y)&&(f=y)}catch{}},!0),a.group(h=>{a.addEventListener(n,"touchstart",g=>{if(h.dispose(),ma(g.target)&&cw(g.target))if(o(g.target)){let p=g.target;for(;p.parentElement&&o(p.parentElement);)p=p.parentElement;h.style(p,"overscrollBehavior","contain")}else h.style(g.target,"touchAction","none")})}),a.addEventListener(n,"touchmove",h=>{if(ma(h.target)){if(dw(h.target))return;if(o(h.target)){let g=h.target;for(;g.parentElement&&g.dataset.headlessuiPortal!==""&&!(g.scrollHeight>g.clientHeight||g.scrollWidth>g.clientWidth);)g=g.parentElement;g.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()}},{passive:!1}),a.add(()=>{var h;let g=(h=window.scrollY)!=null?h:window.pageYOffset;d!==g&&window.scrollTo(0,d),f&&f.isConnected&&(f.scrollIntoView({block:"nearest"}),f=null)})})}}:{}}function Ww(){return{before({doc:n,d:a}){a.style(n.documentElement,"overflow","hidden")}}}function Av(n){let a={};for(let l of n)Object.assign(a,l(a));return a}let Fa=Qw(()=>new Map,{PUSH(n,a){var l;let o=(l=this.get(n))!=null?l:{doc:n,count:0,d:Un(),meta:new Set,computedMeta:{}};return o.count++,o.meta.add(a),o.computedMeta=Av(o.meta),this.set(n,o),this},POP(n,a){let l=this.get(n);return l&&(l.count--,l.meta.delete(a),l.computedMeta=Av(l.meta)),this},SCROLL_PREVENT(n){let a={doc:n.doc,d:n.d,meta(){return n.computedMeta}},l=[Jw(),Pw(),Ww()];l.forEach(({before:o})=>o==null?void 0:o(a)),l.forEach(({after:o})=>o==null?void 0:o(a))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Fa.subscribe(()=>{let n=Fa.getSnapshot(),a=new Map;for(let[l]of n)a.set(l,l.documentElement.style.overflow);for(let l of n.values()){let o=a.get(l.doc)==="hidden",u=l.count!==0;(u&&!o||!u&&o)&&Fa.dispatch(l.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",l),l.count===0&&Fa.dispatch("TEARDOWN",l)}});function Iw(n,a,l=()=>({containers:[]})){let o=Zw(Fa),u=a?o.get(a):void 0,d=u?u.count>0:!1;return At(()=>{if(!(!a||!n))return Fa.dispatch("PUSH",a,l),()=>Fa.dispatch("POP",a,l)},[n,a]),d}function e2(n,a,l=()=>[document.body]){let o=Ss(n,"scroll-lock");Iw(o,a,u=>{var d;return{containers:[...(d=u.containers)!=null?d:[],l]}})}function t2(n=0){let[a,l]=w.useState(n),o=w.useCallback(g=>l(g),[]),u=w.useCallback(g=>l(p=>p|g),[]),d=w.useCallback(g=>(a&g)===g,[a]),f=w.useCallback(g=>l(p=>p&~g),[]),h=w.useCallback(g=>l(p=>p^g),[]);return{flags:a,setFlag:o,addFlag:u,hasFlag:d,removeFlag:f,toggleFlag:h}}var n2={},Nv,Cv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Nv=process==null?void 0:n2)==null?void 0:Nv.NODE_ENV)==="test"&&typeof((Cv=Element==null?void 0:Element.prototype)==null?void 0:Cv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
61
|
+
`)),[]});var a2=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(a2||{});function i2(n){let a={};for(let l in n)n[l]===!0&&(a[`data-${l}`]="");return a}function l2(n,a,l,o){let[u,d]=w.useState(l),{hasFlag:f,addFlag:h,removeFlag:g}=t2(n&&u?3:0),p=w.useRef(!1),y=w.useRef(!1),x=xs();return At(()=>{var T;if(n){if(l&&d(!0),!a){l&&h(3);return}return(T=o==null?void 0:o.start)==null||T.call(o,l),s2(a,{inFlight:p,prepare(){y.current?y.current=!1:y.current=p.current,p.current=!0,!y.current&&(l?(h(3),g(4)):(h(4),g(2)))},run(){y.current?l?(g(3),h(4)):(g(4),h(3)):l?g(1):h(1)},done(){var S;y.current&&u2(a)||(p.current=!1,g(7),l||d(!1),(S=o==null?void 0:o.end)==null||S.call(o,l))}})}},[n,l,a,x]),n?[u,{closed:f(1),enter:f(2),leave:f(4),transition:f(2)||f(4)}]:[l,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function s2(n,{prepare:a,run:l,done:o,inFlight:u}){let d=Un();return r2(n,{prepare:a,inFlight:u}),d.nextFrame(()=>{l(),d.requestAnimationFrame(()=>{d.add(o2(n,o))})}),d.dispose}function o2(n,a){var l,o;let u=Un();if(!n)return u.dispose;let d=!1;u.add(()=>{d=!0});let f=(o=(l=n.getAnimations)==null?void 0:l.call(n).filter(h=>h instanceof CSSTransition))!=null?o:[];return f.length===0?(a(),u.dispose):(Promise.allSettled(f.map(h=>h.finished)).then(()=>{d||a()}),u.dispose)}function r2(n,{inFlight:a,prepare:l}){if(a!=null&&a.current){l();return}let o=n.style.transition;n.style.transition="none",l(),n.offsetHeight,n.style.transition=o}function u2(n){var a,l;return((l=(a=n.getAnimations)==null?void 0:a.call(n))!=null?l:[]).some(o=>o instanceof CSSTransition&&o.playState!=="finished")}function Ad(n,a){let l=w.useRef([]),o=De(n);w.useEffect(()=>{let u=[...l.current];for(let[d,f]of a.entries())if(l.current[d]!==f){let h=o(a,u);return l.current=a,h}},[o,...a])}let Cr=w.createContext(null);Cr.displayName="OpenClosedContext";var an=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(an||{});function Mr(){return w.useContext(Cr)}function c2({value:n,children:a}){return ue.createElement(Cr.Provider,{value:n},a)}function f2({children:n}){return ue.createElement(Cr.Provider,{value:null},n)}function d2(n){function a(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let da=[];d2(()=>{function n(a){if(!ma(a.target)||a.target===document.body||da[0]===a.target)return;let l=a.target;l=l.closest(mr),da.unshift(l??a.target),da=da.filter(o=>o!=null&&o.isConnected),da.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function zy(n){let a=De(n),l=w.useRef(!1);w.useEffect(()=>(l.current=!1,()=>{l.current=!0,Nr(()=>{l.current&&a()})}),[a])}let Ry=w.createContext(!1);function h2(){return w.useContext(Ry)}function Mv(n){return ue.createElement(Ry.Provider,{value:n.force},n.children)}function m2(n){let a=h2(),l=w.useContext(ky),[o,u]=w.useState(()=>{var d;if(!a&&l!==null)return(d=l.current)!=null?d:null;if(hn.isServer)return null;let f=n==null?void 0:n.getElementById("headlessui-portal-root");if(f)return f;if(n===null)return null;let h=n.createElement("div");return h.setAttribute("id","headlessui-portal-root"),n.body.appendChild(h)});return w.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),w.useEffect(()=>{a||l!==null&&u(l.current)},[l,u,a]),o}let Ly=w.Fragment,p2=dt(function(n,a){let{ownerDocument:l=null,...o}=n,u=w.useRef(null),d=gn(hw(T=>{u.current=T}),a),f=jd(u.current),h=l??f,g=m2(h),p=w.useContext(Zf),y=xs(),x=Nt();return zy(()=>{var T;g&&g.childNodes.length<=0&&((T=g.parentElement)==null||T.removeChild(g))}),g?LT.createPortal(ue.createElement("div",{"data-headlessui-portal":"",ref:T=>{y.dispose(),p&&T&&y.add(p.register(T))}},x({ourProps:{ref:d},theirProps:o,slot:{},defaultTag:Ly,name:"Portal"})),g):null});function g2(n,a){let l=gn(a),{enabled:o=!0,ownerDocument:u,...d}=n,f=Nt();return o?ue.createElement(p2,{...d,ownerDocument:u,ref:l}):f({ourProps:{ref:l},theirProps:d,slot:{},defaultTag:Ly,name:"Portal"})}let v2=w.Fragment,ky=w.createContext(null);function y2(n,a){let{target:l,...o}=n,u={ref:gn(a)},d=Nt();return ue.createElement(ky.Provider,{value:l},d({ourProps:u,theirProps:o,defaultTag:v2,name:"Popover.Group"}))}let Zf=w.createContext(null);function x2(){let n=w.useContext(Zf),a=w.useRef([]),l=De(d=>(a.current.push(d),n&&n.register(d),()=>o(d))),o=De(d=>{let f=a.current.indexOf(d);f!==-1&&a.current.splice(f,1),n&&n.unregister(d)}),u=w.useMemo(()=>({register:l,unregister:o,portals:a}),[l,o,a]);return[a,w.useMemo(()=>function({children:d}){return ue.createElement(Zf.Provider,{value:u},d)},[u])]}let b2=dt(g2),Vy=dt(y2),S2=Object.assign(b2,{Group:Vy}),T2=w.Fragment;function w2(n,a){let{...l}=n,o=!1,{isFocusVisible:u,focusProps:d}=dy(),{isHovered:f,hoverProps:h}=fy({isDisabled:o}),{pressed:g,pressProps:p}=my({disabled:o}),y=wd({ref:a},d,h,p),x=ti({hover:f,focus:u,active:g});return Nt()({ourProps:y,theirProps:l,slot:x,defaultTag:T2,name:"DataInteractive"})}let E2=dt(w2);function j2(n,a=typeof document<"u"?document.defaultView:null,l){let o=Ss(n,"escape");Oy(a,"keydown",u=>{o&&(u.defaultPrevented||u.key===xy.Escape&&l(u))})}function A2(){var n;let[a]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[l,o]=w.useState((n=a==null?void 0:a.matches)!=null?n:!1);return At(()=>{if(!a)return;function u(d){o(d.matches)}return a.addEventListener("change",u),()=>a.removeEventListener("change",u)},[a]),l}function N2({defaultContainers:n=[],portals:a,mainTreeNode:l}={}){let o=De(()=>{var u,d;let f=Wi(l),h=[];for(let g of n)g!==null&&(ga(g)?h.push(g):"current"in g&&ga(g.current)&&h.push(g.current));if(a!=null&&a.current)for(let g of a.current)h.push(g);for(let g of(u=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?u:[])g!==document.body&&g!==document.head&&ga(g)&&g.id!=="headlessui-portal-root"&&(l&&(g.contains(l)||g.contains((d=l==null?void 0:l.getRootNode())==null?void 0:d.host))||h.some(p=>g.contains(p))||h.push(g));return h});return{resolveContainers:o,contains:De(u=>o().some(d=>d.contains(u)))}}let _y=w.createContext(null);function Dv({children:n,node:a}){let[l,o]=w.useState(null),u=Uy(a??l);return ue.createElement(_y.Provider,{value:u},n,u===null&&ue.createElement(Xf,{features:hr.Hidden,ref:d=>{var f,h;if(d){for(let g of(h=(f=Wi(d))==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?h:[])if(g!==document.body&&g!==document.head&&ga(g)&&g!=null&&g.contains(d)){o(g);break}}}}))}function Uy(n=null){var a;return(a=w.useContext(_y))!=null?a:n}function C2(){let n=typeof document>"u";return"useSyncExternalStore"in uv?(a=>a.useSyncExternalStore)(uv)(()=>()=>{},()=>!1,()=>!n):!1}function Dr(){let n=C2(),[a,l]=w.useState(hn.isHandoffComplete);return a&&hn.isHandoffComplete===!1&&l(!1),w.useEffect(()=>{a!==!0&&l(!0)},[a]),w.useEffect(()=>hn.handoff(),[]),n?!1:a}function Nd(){let n=w.useRef(!1);return At(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var as=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(as||{});function M2(){let n=w.useRef(0);return Dy(!0,"keydown",a=>{a.key==="Tab"&&(n.current=a.shiftKey?1:0)},!0),n}function By(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let a=new Set;for(let l of n.current)ga(l.current)&&a.add(l.current);return a}let D2="div";var Ya=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Ya||{});function O2(n,a){let l=w.useRef(null),o=gn(l,a),{initialFocus:u,initialFocusFallback:d,containers:f,features:h=15,...g}=n;Dr()||(h=0);let p=jd(l.current);k2(h,{ownerDocument:p});let y=V2(h,{ownerDocument:p,container:l,initialFocus:u,initialFocusFallback:d});_2(h,{ownerDocument:p,container:l,containers:f,previousActiveElement:y});let x=M2(),T=De(R=>{if(!Ia(l.current))return;let _=l.current;(z=>z())(()=>{_n(x.current,{[as.Forwards]:()=>{rs(_,kn.First,{skipElements:[R.relatedTarget,d]})},[as.Backwards]:()=>{rs(_,kn.Last,{skipElements:[R.relatedTarget,d]})}})})}),S=Ss(!!(h&2),"focus-trap#tab-lock"),E=xs(),D=w.useRef(!1),M={ref:o,onKeyDown(R){R.key=="Tab"&&(D.current=!0,E.requestAnimationFrame(()=>{D.current=!1}))},onBlur(R){if(!(h&4))return;let _=By(f);Ia(l.current)&&_.add(l.current);let z=R.relatedTarget;ma(z)&&z.dataset.headlessuiFocusGuard!=="true"&&(Hy(_,z)||(D.current?rs(l.current,_n(x.current,{[as.Forwards]:()=>kn.Next,[as.Backwards]:()=>kn.Previous})|kn.WrapAround,{relativeTo:R.target}):ma(R.target)&&Vn(R.target)))}},C=Nt();return ue.createElement(ue.Fragment,null,S&&ue.createElement(Xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:T,features:hr.Focusable}),C({ourProps:M,theirProps:g,defaultTag:D2,name:"FocusTrap"}),S&&ue.createElement(Xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:T,features:hr.Focusable}))}let z2=dt(O2),R2=Object.assign(z2,{features:Ya});function L2(n=!0){let a=w.useRef(da.slice());return Ad(([l],[o])=>{o===!0&&l===!1&&Nr(()=>{a.current.splice(0)}),o===!1&&l===!0&&(a.current=da.slice())},[n,da,a]),De(()=>{var l;return(l=a.current.find(o=>o!=null&&o.isConnected))!=null?l:null})}function k2(n,{ownerDocument:a}){let l=!!(n&8),o=L2(l);Ad(()=>{l||PT(a==null?void 0:a.body)&&Vn(o())},[l]),zy(()=>{l&&Vn(o())})}function V2(n,{ownerDocument:a,container:l,initialFocus:o,initialFocusFallback:u}){let d=w.useRef(null),f=Ss(!!(n&1),"focus-trap#initial-focus"),h=Nd();return Ad(()=>{if(n===0)return;if(!f){u!=null&&u.current&&Vn(u.current);return}let g=l.current;g&&Nr(()=>{if(!h.current)return;let p=a==null?void 0:a.activeElement;if(o!=null&&o.current){if((o==null?void 0:o.current)===p){d.current=p;return}}else if(g.contains(p)){d.current=p;return}if(o!=null&&o.current)Vn(o.current);else{if(n&16){if(rs(g,kn.First|kn.AutoFocus)!==Ff.Error)return}else if(rs(g,kn.First)!==Ff.Error)return;if(u!=null&&u.current&&(Vn(u.current),(a==null?void 0:a.activeElement)===u.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}d.current=a==null?void 0:a.activeElement})},[u,f,n]),d}function _2(n,{ownerDocument:a,container:l,containers:o,previousActiveElement:u}){let d=Nd(),f=!!(n&4);Oy(a==null?void 0:a.defaultView,"focus",h=>{if(!f||!d.current)return;let g=By(o);Ia(l.current)&&g.add(l.current);let p=u.current;if(!p)return;let y=h.target;Ia(y)?Hy(g,y)?(u.current=y,Vn(y)):(h.preventDefault(),h.stopPropagation(),Vn(p)):Vn(u.current)},!0)}function Hy(n,a){for(let l of n)if(l.contains(a))return!0;return!1}function $y(n){var a;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!ss((a=n.as)!=null?a:Gy)||ue.Children.count(n.children)===1}let Or=w.createContext(null);Or.displayName="TransitionContext";var U2=(n=>(n.Visible="visible",n.Hidden="hidden",n))(U2||{});function B2(){let n=w.useContext(Or);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function H2(){let n=w.useContext(zr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let zr=w.createContext(null);zr.displayName="NestingContext";function Rr(n){return"children"in n?Rr(n.children):n.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function qy(n,a){let l=ei(n),o=w.useRef([]),u=Nd(),d=xs(),f=De((S,E=ha.Hidden)=>{let D=o.current.findIndex(({el:M})=>M===S);D!==-1&&(_n(E,{[ha.Unmount](){o.current.splice(D,1)},[ha.Hidden](){o.current[D].state="hidden"}}),d.microTask(()=>{var M;!Rr(o)&&u.current&&((M=l.current)==null||M.call(l))}))}),h=De(S=>{let E=o.current.find(({el:D})=>D===S);return E?E.state!=="visible"&&(E.state="visible"):o.current.push({el:S,state:"visible"}),()=>f(S,ha.Unmount)}),g=w.useRef([]),p=w.useRef(Promise.resolve()),y=w.useRef({enter:[],leave:[]}),x=De((S,E,D)=>{g.current.splice(0),a&&(a.chains.current[E]=a.chains.current[E].filter(([M])=>M!==S)),a==null||a.chains.current[E].push([S,new Promise(M=>{g.current.push(M)})]),a==null||a.chains.current[E].push([S,new Promise(M=>{Promise.all(y.current[E].map(([C,R])=>R)).then(()=>M())})]),E==="enter"?p.current=p.current.then(()=>a==null?void 0:a.wait.current).then(()=>D(E)):D(E)}),T=De((S,E,D)=>{Promise.all(y.current[E].splice(0).map(([M,C])=>C)).then(()=>{var M;(M=g.current.shift())==null||M()}).then(()=>D(E))});return w.useMemo(()=>({children:o,register:h,unregister:f,onStart:x,onStop:T,wait:p,chains:y}),[h,f,o,x,T,y,p])}let Gy=w.Fragment,Yy=dr.RenderStrategy;function $2(n,a){var l,o;let{transition:u=!0,beforeEnter:d,afterEnter:f,beforeLeave:h,afterLeave:g,enter:p,enterFrom:y,enterTo:x,entered:T,leave:S,leaveFrom:E,leaveTo:D,...M}=n,[C,R]=w.useState(null),_=w.useRef(null),z=$y(n),Y=gn(...z?[_,a,R]:a===null?[]:[a]),I=(l=M.unmount)==null||l?ha.Unmount:ha.Hidden,{show:Z,appear:J,initial:F}=B2(),[K,te]=w.useState(Z?"visible":"hidden"),ie=H2(),{register:Te,unregister:Ae}=ie;At(()=>Te(_),[Te,_]),At(()=>{if(I===ha.Hidden&&_.current){if(Z&&K!=="visible"){te("visible");return}return _n(K,{hidden:()=>Ae(_),visible:()=>Te(_)})}},[K,_,Te,Ae,Z,I]);let Ne=Dr();At(()=>{if(z&&Ne&&K==="visible"&&_.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[_,K,Ne,z]);let B=F&&!J,Q=J&&Z&&F,P=w.useRef(!1),oe=qy(()=>{P.current||(te("hidden"),Ae(_))},ie),he=De(be=>{P.current=!0;let Ze=be?"enter":"leave";oe.onStart(_,Ze,ke=>{ke==="enter"?d==null||d():ke==="leave"&&(h==null||h())})}),A=De(be=>{let Ze=be?"enter":"leave";P.current=!1,oe.onStop(_,Ze,ke=>{ke==="enter"?f==null||f():ke==="leave"&&(g==null||g())}),Ze==="leave"&&!Rr(oe)&&(te("hidden"),Ae(_))});w.useEffect(()=>{z&&u||(he(Z),A(Z))},[Z,z,u]);let q=!(!u||!z||!Ne||B),[,X]=l2(q,C,Z,{start:he,end:A}),W=qa({ref:Y,className:((o=Yf(M.className,Q&&p,Q&&y,X.enter&&p,X.enter&&X.closed&&y,X.enter&&!X.closed&&x,X.leave&&S,X.leave&&!X.closed&&E,X.leave&&X.closed&&D,!X.transition&&Z&&T))==null?void 0:o.trim())||void 0,...i2(X)}),re=0;K==="visible"&&(re|=an.Open),K==="hidden"&&(re|=an.Closed),Z&&K==="hidden"&&(re|=an.Opening),!Z&&K==="visible"&&(re|=an.Closing);let me=Nt();return ue.createElement(zr.Provider,{value:oe},ue.createElement(c2,{value:re},me({ourProps:W,theirProps:M,defaultTag:Gy,features:Yy,visible:K==="visible",name:"Transition.Child"})))}function q2(n,a){let{show:l,appear:o=!1,unmount:u=!0,...d}=n,f=w.useRef(null),h=$y(n),g=gn(...h?[f,a]:a===null?[]:[a]);Dr();let p=Mr();if(l===void 0&&p!==null&&(l=(p&an.Open)===an.Open),l===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[y,x]=w.useState(l?"visible":"hidden"),T=qy(()=>{l||x("hidden")}),[S,E]=w.useState(!0),D=w.useRef([l]);At(()=>{S!==!1&&D.current[D.current.length-1]!==l&&(D.current.push(l),E(!1))},[D,l]);let M=w.useMemo(()=>({show:l,appear:o,initial:S}),[l,o,S]);At(()=>{l?x("visible"):!Rr(T)&&f.current!==null&&x("hidden")},[l,T]);let C={unmount:u},R=De(()=>{var Y;S&&E(!1),(Y=n.beforeEnter)==null||Y.call(n)}),_=De(()=>{var Y;S&&E(!1),(Y=n.beforeLeave)==null||Y.call(n)}),z=Nt();return ue.createElement(zr.Provider,{value:T},ue.createElement(Or.Provider,{value:M},z({ourProps:{...C,as:w.Fragment,children:ue.createElement(Xy,{ref:g,...C,...d,beforeEnter:R,beforeLeave:_})},theirProps:{},defaultTag:w.Fragment,features:Yy,visible:y==="visible",name:"Transition"})))}function G2(n,a){let l=w.useContext(Or)!==null,o=Mr()!==null;return ue.createElement(ue.Fragment,null,!l&&o?ue.createElement(Qf,{ref:a,...n}):ue.createElement(Xy,{ref:a,...n}))}let Qf=dt(q2),Xy=dt($2),Cd=dt(G2),Y2=Object.assign(Qf,{Child:Cd,Root:Qf});var X2=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(X2||{}),K2=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(K2||{});let F2={0(n,a){return n.titleId===a.id?n:{...n,titleId:a.id}}},Md=w.createContext(null);Md.displayName="DialogContext";function Lr(n){let a=w.useContext(Md);if(a===null){let l=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,Lr),l}return a}function Z2(n,a){return _n(a.type,F2,n,a)}let Ov=dt(function(n,a){let l=w.useId(),{id:o=`headlessui-dialog-${l}`,open:u,onClose:d,initialFocus:f,role:h="dialog",autoFocus:g=!0,__demoMode:p=!1,unmount:y=!1,...x}=n,T=w.useRef(!1);h=(function(){return h==="dialog"||h==="alertdialog"?h:(T.current||(T.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let S=Mr();u===void 0&&S!==null&&(u=(S&an.Open)===an.Open);let E=w.useRef(null),D=gn(E,a),M=jd(E.current),C=u?0:1,[R,_]=w.useReducer(Z2,{titleId:null,descriptionId:null,panelRef:w.createRef()}),z=De(()=>d(!1)),Y=De(X=>_({type:0,id:X})),I=Dr()?C===0:!1,[Z,J]=x2(),F={get current(){var X;return(X=R.panelRef.current)!=null?X:E.current}},K=Uy(),{resolveContainers:te}=N2({mainTreeNode:K,portals:Z,defaultContainers:[F]}),ie=S!==null?(S&an.Closing)===an.Closing:!1;kw(p||ie?!1:I,{allowed:De(()=>{var X,W;return[(W=(X=E.current)==null?void 0:X.closest("[data-headlessui-portal]"))!=null?W:null]}),disallowed:De(()=>{var X;return[(X=K==null?void 0:K.closest("body > *:not(#headlessui-portal-root)"))!=null?X:null]})});let Te=Ay.get(null);At(()=>{if(I)return Te.actions.push(o),()=>Te.actions.pop(o)},[Te,o,I]);let Ae=Ny(Te,w.useCallback(X=>Te.selectors.isTop(X,o),[Te,o]));Fw(Ae,te,X=>{X.preventDefault(),z()}),j2(Ae,M==null?void 0:M.defaultView,X=>{X.preventDefault(),X.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),z()}),e2(p||ie?!1:I,M,te),Vw(I,E,z);let[Ne,B]=mw(),Q=w.useMemo(()=>[{dialogState:C,close:z,setTitleId:Y,unmount:y},R],[C,z,Y,y,R]),P=ti({open:C===0}),oe={ref:D,id:o,role:h,tabIndex:-1,"aria-modal":p?void 0:C===0?!0:void 0,"aria-labelledby":R.titleId,"aria-describedby":Ne,unmount:y},he=!A2(),A=Ya.None;I&&!p&&(A|=Ya.RestoreFocus,A|=Ya.TabLock,g&&(A|=Ya.AutoFocus),he&&(A|=Ya.InitialFocus));let q=Nt();return ue.createElement(f2,null,ue.createElement(Mv,{force:!0},ue.createElement(S2,null,ue.createElement(Md.Provider,{value:Q},ue.createElement(Vy,{target:E},ue.createElement(Mv,{force:!1},ue.createElement(B,{slot:P},ue.createElement(J,null,ue.createElement(R2,{initialFocus:f,initialFocusFallback:E,containers:te,features:A},ue.createElement(bw,{value:z},q({ourProps:oe,theirProps:x,slot:P,defaultTag:Q2,features:P2,visible:C===0,name:"Dialog"})))))))))))}),Q2="div",P2=dr.RenderStrategy|dr.Static;function J2(n,a){let{transition:l=!1,open:o,...u}=n,d=Mr(),f=n.hasOwnProperty("open")||d!==null,h=n.hasOwnProperty("onClose");if(!f&&!h)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!f)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!h)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!d&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(o!==void 0||l)&&!u.static?ue.createElement(Dv,null,ue.createElement(Y2,{show:o,transition:l,unmount:u.unmount},ue.createElement(Ov,{ref:a,...u}))):ue.createElement(Dv,null,ue.createElement(Ov,{ref:a,open:o,...u}))}let W2="div";function I2(n,a){let l=w.useId(),{id:o=`headlessui-dialog-panel-${l}`,transition:u=!1,...d}=n,[{dialogState:f,unmount:h},g]=Lr("Dialog.Panel"),p=gn(a,g.panelRef),y=ti({open:f===0}),x=De(M=>{M.stopPropagation()}),T={ref:p,id:o,onClick:x},S=u?Cd:w.Fragment,E=u?{unmount:h}:{},D=Nt();return ue.createElement(S,{...E},D({ourProps:T,theirProps:d,slot:y,defaultTag:W2,name:"Dialog.Panel"}))}let eE="div";function tE(n,a){let{transition:l=!1,...o}=n,[{dialogState:u,unmount:d}]=Lr("Dialog.Backdrop"),f=ti({open:u===0}),h={ref:a,"aria-hidden":!0},g=l?Cd:w.Fragment,p=l?{unmount:d}:{},y=Nt();return ue.createElement(g,{...p},y({ourProps:h,theirProps:o,slot:f,defaultTag:eE,name:"Dialog.Backdrop"}))}let nE="h2";function aE(n,a){let l=w.useId(),{id:o=`headlessui-dialog-title-${l}`,...u}=n,[{dialogState:d,setTitleId:f}]=Lr("Dialog.Title"),h=gn(a);w.useEffect(()=>(f(o),()=>f(null)),[o,f]);let g=ti({open:d===0}),p={ref:h,id:o};return Nt()({ourProps:p,theirProps:u,slot:g,defaultTag:nE,name:"Dialog.Title"})}let iE=dt(J2),Ky=dt(I2),lE=dt(tE),sE=dt(aE),oE=Object.assign(iE,{Panel:Ky,Title:sE,Description:yw});const pr=w.createContext({});function rE(n){const a=w.useRef(null);return a.current===null&&(a.current=n()),a.current}const uE=typeof window<"u",Fy=uE?w.useLayoutEffect:w.useEffect,Dd=w.createContext(null);function Od(n,a){n.indexOf(a)===-1&&n.push(a)}function gr(n,a){const l=n.indexOf(a);l>-1&&n.splice(l,1)}const pn=(n,a,l)=>l>a?a:l<n?n:l;let zd=()=>{};const va={},Zy=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function Qy(n){return typeof n=="object"&&n!==null}const Py=n=>/^0[^.\s]+$/u.test(n);function Jy(n){let a;return()=>(a===void 0&&(a=n()),a)}const Jt=n=>n,cE=(n,a)=>l=>a(n(l)),Ts=(...n)=>n.reduce(cE),ms=(n,a,l)=>{const o=a-n;return o===0?1:(l-n)/o};class Rd{constructor(){this.subscriptions=[]}add(a){return Od(this.subscriptions,a),()=>gr(this.subscriptions,a)}notify(a,l,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](a,l,o);else for(let d=0;d<u;d++){const f=this.subscriptions[d];f&&f(a,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ut=n=>n*1e3,Pt=n=>n/1e3;function Wy(n,a){return a?n*(1e3/a):0}const Iy=(n,a,l)=>(((1-3*l+3*a)*n+(3*l-6*a))*n+3*a)*n,fE=1e-7,dE=12;function hE(n,a,l,o,u){let d,f,h=0;do f=a+(l-a)/2,d=Iy(f,o,u)-n,d>0?l=f:a=f;while(Math.abs(d)>fE&&++h<dE);return f}function ws(n,a,l,o){if(n===a&&l===o)return Jt;const u=d=>hE(d,0,1,n,l);return d=>d===0||d===1?d:Iy(u(d),a,o)}const ex=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,tx=n=>a=>1-n(1-a),nx=ws(.33,1.53,.69,.99),Ld=tx(nx),ax=ex(Ld),ix=n=>n>=1?1:(n*=2)<1?.5*Ld(n):.5*(2-Math.pow(2,-10*(n-1))),kd=n=>1-Math.sin(Math.acos(n)),lx=tx(kd),sx=ex(kd),mE=ws(.42,0,1,1),pE=ws(0,0,.58,1),ox=ws(.42,0,.58,1),gE=n=>Array.isArray(n)&&typeof n[0]!="number",rx=n=>Array.isArray(n)&&typeof n[0]=="number",vE={linear:Jt,easeIn:mE,easeInOut:ox,easeOut:pE,circIn:kd,circInOut:sx,circOut:lx,backIn:Ld,backInOut:ax,backOut:nx,anticipate:ix},yE=n=>typeof n=="string",zv=n=>{if(rx(n)){zd(n.length===4);const[a,l,o,u]=n;return ws(a,l,o,u)}else if(yE(n))return vE[n];return n},Po=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function xE(n,a){let l=new Set,o=new Set,u=!1,d=!1;const f=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function g(y){f.has(y)&&(p.schedule(y),n()),y(h)}const p={schedule:(y,x=!1,T=!1)=>{const E=T&&u?l:o;return x&&f.add(y),E.add(y),y},cancel:y=>{o.delete(y),f.delete(y)},process:y=>{if(h=y,u){d=!0;return}u=!0;const x=l;l=o,o=x,l.forEach(g),l.clear(),u=!1,d&&(d=!1,p.process(y))}};return p}const bE=40;function ux(n,a){let l=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=Po.reduce((_,z)=>(_[z]=xE(d),_),{}),{setup:h,read:g,resolveKeyframes:p,preUpdate:y,update:x,preRender:T,render:S,postRender:E}=f,D=()=>{const _=va.useManualTiming,z=_?u.timestamp:performance.now();l=!1,_||(u.delta=o?1e3/60:Math.max(Math.min(z-u.timestamp,bE),1)),u.timestamp=z,u.isProcessing=!0,h.process(u),g.process(u),p.process(u),y.process(u),x.process(u),T.process(u),S.process(u),E.process(u),u.isProcessing=!1,l&&a&&(o=!1,n(D))},M=()=>{l=!0,o=!0,u.isProcessing||n(D)};return{schedule:Po.reduce((_,z)=>{const Y=f[z];return _[z]=(I,Z=!1,J=!1)=>(l||M(),Y.schedule(I,Z,J)),_},{}),cancel:_=>{for(let z=0;z<Po.length;z++)f[Po[z]].cancel(_)},state:u,steps:f}}const{schedule:Le,cancel:ya,state:ut,steps:vf}=ux(typeof requestAnimationFrame<"u"?requestAnimationFrame:Jt,!0);let ar;function SE(){ar=void 0}const gt={now:()=>(ar===void 0&>.set(ut.isProcessing||va.useManualTiming?ut.timestamp:performance.now()),ar),set:n=>{ar=n,queueMicrotask(SE)}},cx=n=>a=>typeof a=="string"&&a.startsWith(n),fx=cx("--"),TE=cx("var(--"),Vd=n=>TE(n)?wE.test(n.split("/*")[0].trim()):!1,wE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Rv(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Ii={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},ps={...Ii,transform:n=>pn(0,1,n)},Jo={...Ii,default:1},us=n=>Math.round(n*1e5)/1e5,_d=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function EE(n){return n==null}const jE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ud=(n,a)=>l=>!!(typeof l=="string"&&jE.test(l)&&l.startsWith(n)||a&&!EE(l)&&Object.prototype.hasOwnProperty.call(l,a)),dx=(n,a,l)=>o=>{if(typeof o!="string")return o;const[u,d,f,h]=o.match(_d);return{[n]:parseFloat(u),[a]:parseFloat(d),[l]:parseFloat(f),alpha:h!==void 0?parseFloat(h):1}},AE=n=>pn(0,255,n),yf={...Ii,transform:n=>Math.round(AE(n))},Za={test:Ud("rgb","red"),parse:dx("red","green","blue"),transform:({red:n,green:a,blue:l,alpha:o=1})=>"rgba("+yf.transform(n)+", "+yf.transform(a)+", "+yf.transform(l)+", "+us(ps.transform(o))+")"};function NE(n){let a="",l="",o="",u="";return n.length>5?(a=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),u=n.substring(7,9)):(a=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),u=n.substring(4,5),a+=a,l+=l,o+=o,u+=u),{red:parseInt(a,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const Pf={test:Ud("#"),parse:NE,transform:Za.transform},Es=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ca=Es("deg"),mn=Es("%"),ne=Es("px"),CE=Es("vh"),ME=Es("vw"),Lv={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},qi={test:Ud("hsl","hue"),parse:dx("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+mn.transform(us(a))+", "+mn.transform(us(l))+", "+us(ps.transform(o))+")"},Ie={test:n=>Za.test(n)||Pf.test(n)||qi.test(n),parse:n=>Za.test(n)?Za.parse(n):qi.test(n)?qi.parse(n):Pf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Za.transform(n):qi.transform(n),getAnimatableNone:n=>{const a=Ie.parse(n);return a.alpha=0,Ie.transform(a)}},DE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function OE(n){var a,l;return isNaN(n)&&typeof n=="string"&&(((a=n.match(_d))==null?void 0:a.length)||0)+(((l=n.match(DE))==null?void 0:l.length)||0)>0}const hx="number",mx="color",zE="var",RE="var(",kv="${}",LE=/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 Zi(n){const a=n.toString(),l=[],o={color:[],number:[],var:[]},u=[];let d=0;const h=a.replace(LE,g=>(Ie.test(g)?(o.color.push(d),u.push(mx),l.push(Ie.parse(g))):g.startsWith(RE)?(o.var.push(d),u.push(zE),l.push(g)):(o.number.push(d),u.push(hx),l.push(parseFloat(g))),++d,kv)).split(kv);return{values:l,split:h,indexes:o,types:u}}function kE(n){return Zi(n).values}function px({split:n,types:a}){const l=n.length;return o=>{let u="";for(let d=0;d<l;d++)if(u+=n[d],o[d]!==void 0){const f=a[d];f===hx?u+=us(o[d]):f===mx?u+=Ie.transform(o[d]):u+=o[d]}return u}}function VE(n){return px(Zi(n))}const _E=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n,UE=(n,a)=>typeof n=="number"?a!=null&&a.trim().endsWith("/")?n:0:_E(n);function BE(n){const a=Zi(n);return px(a)(a.values.map((o,u)=>UE(o,a.split[u])))}const ln={test:OE,parse:kE,createTransformer:VE,getAnimatableNone:BE};function xf(n,a,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(a-n)*6*l:l<1/2?a:l<2/3?n+(a-n)*(2/3-l)*6:n}function HE({hue:n,saturation:a,lightness:l,alpha:o}){n/=360,a/=100,l/=100;let u=0,d=0,f=0;if(!a)u=d=f=l;else{const h=l<.5?l*(1+a):l+a-l*a,g=2*l-h;u=xf(g,h,n+1/3),d=xf(g,h,n),f=xf(g,h,n-1/3)}return{red:Math.round(u*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:o}}function vr(n,a){return l=>l>0?a:n}const Be=(n,a,l)=>n+(a-n)*l,bf=(n,a,l)=>{const o=n*n,u=l*(a*a-o)+o;return u<0?0:Math.sqrt(u)},$E=[Pf,Za,qi],qE=n=>$E.find(a=>a.test(n));function Vv(n){const a=qE(n);if(!a)return!1;let l=a.parse(n);return a===qi&&(l=HE(l)),l}const _v=(n,a)=>{const l=Vv(n),o=Vv(a);if(!l||!o)return vr(n,a);const u={...l};return d=>(u.red=bf(l.red,o.red,d),u.green=bf(l.green,o.green,d),u.blue=bf(l.blue,o.blue,d),u.alpha=Be(l.alpha,o.alpha,d),Za.transform(u))},Jf=new Set(["none","hidden"]);function GE(n,a){return Jf.has(n)?l=>l<=0?n:a:l=>l>=1?a:n}function YE(n,a){return l=>Be(n,a,l)}function Bd(n){return typeof n=="number"?YE:typeof n=="string"?Vd(n)?vr:Ie.test(n)?_v:FE:Array.isArray(n)?gx:typeof n=="object"?Ie.test(n)?_v:XE:vr}function gx(n,a){const l=[...n],o=l.length,u=n.map((d,f)=>Bd(d)(d,a[f]));return d=>{for(let f=0;f<o;f++)l[f]=u[f](d);return l}}function XE(n,a){const l={...n,...a},o={};for(const u in l)n[u]!==void 0&&a[u]!==void 0&&(o[u]=Bd(n[u])(n[u],a[u]));return u=>{for(const d in o)l[d]=o[d](u);return l}}function KE(n,a){const l=[],o={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],f=n.indexes[d][o[d]],h=n.values[f]??0;l[u]=h,o[d]++}return l}const FE=(n,a)=>{const l=ln.createTransformer(a),o=Zi(n),u=Zi(a);return o.indexes.var.length===u.indexes.var.length&&o.indexes.color.length===u.indexes.color.length&&o.indexes.number.length>=u.indexes.number.length?Jf.has(n)&&!u.values.length||Jf.has(a)&&!o.values.length?GE(n,a):Ts(gx(KE(o,u),u.values),l):vr(n,a)};function vx(n,a,l){return typeof n=="number"&&typeof a=="number"&&typeof l=="number"?Be(n,a,l):Bd(n)(n,a)}const ZE=n=>{const a=({timestamp:l})=>n(l);return{start:(l=!0)=>Le.update(a,l),stop:()=>ya(a),now:()=>ut.isProcessing?ut.timestamp:gt.now()}},yx=(n,a,l=10)=>{let o="";const u=Math.max(Math.round(a/l),2);for(let d=0;d<u;d++)o+=Math.round(n(d/(u-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},yr=2e4;function Hd(n){let a=0;const l=50;let o=n.next(a);for(;!o.done&&a<yr;)a+=l,o=n.next(a);return a>=yr?1/0:a}function QE(n,a=100,l){const o=l({...n,keyframes:[0,a]}),u=Math.min(Hd(o),yr);return{type:"keyframes",ease:d=>o.next(u*d).value/a,duration:Pt(u)}}const Ye={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 Wf(n,a){return n*Math.sqrt(1-a*a)}const PE=12;function JE(n,a,l){let o=l;for(let u=1;u<PE;u++)o=o-n(o)/a(o);return o}const Sf=.001;function WE({duration:n=Ye.duration,bounce:a=Ye.bounce,velocity:l=Ye.velocity,mass:o=Ye.mass}){let u,d,f=1-a;f=pn(Ye.minDamping,Ye.maxDamping,f),n=pn(Ye.minDuration,Ye.maxDuration,Pt(n)),f<1?(u=p=>{const y=p*f,x=y*n,T=y-l,S=Wf(p,f),E=Math.exp(-x);return Sf-T/S*E},d=p=>{const x=p*f*n,T=x*l+l,S=Math.pow(f,2)*Math.pow(p,2)*n,E=Math.exp(-x),D=Wf(Math.pow(p,2),f);return(-u(p)+Sf>0?-1:1)*((T-S)*E)/D}):(u=p=>{const y=Math.exp(-p*n),x=(p-l)*n+1;return-Sf+y*x},d=p=>{const y=Math.exp(-p*n),x=(l-p)*(n*n);return y*x});const h=5/n,g=JE(u,d,h);if(n=Ut(n),isNaN(g))return{stiffness:Ye.stiffness,damping:Ye.damping,duration:n};{const p=Math.pow(g,2)*o;return{stiffness:p,damping:f*2*Math.sqrt(o*p),duration:n}}}const IE=["duration","bounce"],ej=["stiffness","damping","mass"];function Uv(n,a){return a.some(l=>n[l]!==void 0)}function tj(n){let a={velocity:Ye.velocity,stiffness:Ye.stiffness,damping:Ye.damping,mass:Ye.mass,isResolvedFromDuration:!1,...n};if(!Uv(n,ej)&&Uv(n,IE))if(a.velocity=0,n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),u=o*o,d=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(u);a={...a,mass:Ye.mass,stiffness:u,damping:d}}else{const l=WE({...n,velocity:0});a={...a,...l,mass:Ye.mass},a.isResolvedFromDuration=!0}return a}function xr(n=Ye.visualDuration,a=Ye.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:u}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],h={done:!1,value:d},{stiffness:g,damping:p,mass:y,duration:x,velocity:T,isResolvedFromDuration:S}=tj({...l,velocity:-Pt(l.velocity||0)}),E=T||0,D=p/(2*Math.sqrt(g*y)),M=f-d,C=Pt(Math.sqrt(g/y)),R=Math.abs(M)<5;o||(o=R?Ye.restSpeed.granular:Ye.restSpeed.default),u||(u=R?Ye.restDelta.granular:Ye.restDelta.default);let _,z,Y,I,Z,J;if(D<1)Y=Wf(C,D),I=(E+D*C*M)/Y,_=K=>{const te=Math.exp(-D*C*K);return f-te*(I*Math.sin(Y*K)+M*Math.cos(Y*K))},Z=D*C*I+M*Y,J=D*C*M-I*Y,z=K=>Math.exp(-D*C*K)*(Z*Math.sin(Y*K)+J*Math.cos(Y*K));else if(D===1){_=te=>f-Math.exp(-C*te)*(M+(E+C*M)*te);const K=E+C*M;z=te=>Math.exp(-C*te)*(C*K*te-E)}else{const K=C*Math.sqrt(D*D-1);_=Ae=>{const Ne=Math.exp(-D*C*Ae),B=Math.min(K*Ae,300);return f-Ne*((E+D*C*M)*Math.sinh(B)+K*M*Math.cosh(B))/K};const te=(E+D*C*M)/K,ie=D*C*te-M*K,Te=D*C*M-te*K;z=Ae=>{const Ne=Math.exp(-D*C*Ae),B=Math.min(K*Ae,300);return Ne*(ie*Math.sinh(B)+Te*Math.cosh(B))}}const F={calculatedDuration:S&&x||null,velocity:K=>Ut(z(K)),next:K=>{if(!S&&D<1){const ie=Math.exp(-D*C*K),Te=Math.sin(Y*K),Ae=Math.cos(Y*K),Ne=f-ie*(I*Te+M*Ae),B=Ut(ie*(Z*Te+J*Ae));return h.done=Math.abs(B)<=o&&Math.abs(f-Ne)<=u,h.value=h.done?f:Ne,h}const te=_(K);if(S)h.done=K>=x;else{const ie=Ut(z(K));h.done=Math.abs(ie)<=o&&Math.abs(f-te)<=u}return h.value=h.done?f:te,h},toString:()=>{const K=Math.min(Hd(F),yr),te=yx(ie=>F.next(K*ie).value,K,30);return K+"ms "+te},toTransition:()=>{}};return F}xr.applyToOptions=n=>{const a=QE(n,100,xr);return n.ease=a.ease,n.duration=Ut(a.duration),n.type="keyframes",n};const nj=5;function xx(n,a,l){const o=Math.max(a-nj,0);return Wy(l-n(o),a-o)}function If({keyframes:n,velocity:a=0,power:l=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:d=500,modifyTarget:f,min:h,max:g,restDelta:p=.5,restSpeed:y}){const x=n[0],T={done:!1,value:x},S=J=>h!==void 0&&J<h||g!==void 0&&J>g,E=J=>h===void 0?g:g===void 0||Math.abs(h-J)<Math.abs(g-J)?h:g;let D=l*a;const M=x+D,C=f===void 0?M:f(M);C!==M&&(D=C-x);const R=J=>-D*Math.exp(-J/o),_=J=>C+R(J),z=J=>{const F=R(J),K=_(J);T.done=Math.abs(F)<=p,T.value=T.done?C:K};let Y,I;const Z=J=>{S(T.value)&&(Y=J,I=xr({keyframes:[T.value,E(T.value)],velocity:xx(_,J,T.value),damping:u,stiffness:d,restDelta:p,restSpeed:y}))};return Z(0),{calculatedDuration:null,next:J=>{let F=!1;return!I&&Y===void 0&&(F=!0,z(J),Z(J)),Y!==void 0&&J>=Y?I.next(J-Y):(!F&&z(J),T)}}}function aj(n,a,l){const o=[],u=l||va.mix||vx,d=n.length-1;for(let f=0;f<d;f++){let h=u(n[f],n[f+1]);if(a){const g=Array.isArray(a)?a[f]||Jt:a;h=Ts(g,h)}o.push(h)}return o}function ij(n,a,{clamp:l=!0,ease:o,mixer:u}={}){const d=n.length;if(zd(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const f=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const h=aj(a,o,u),g=h.length,p=y=>{if(f&&y<n[0])return a[0];let x=0;if(g>1)for(;x<n.length-2&&!(y<n[x+1]);x++);const T=ms(n[x],n[x+1],y);return h[x](T)};return l?y=>p(pn(n[0],n[d-1],y)):p}function lj(n,a){const l=n[n.length-1];for(let o=1;o<=a;o++){const u=ms(0,a,o);n.push(Be(l,1,u))}}function sj(n){const a=[0];return lj(a,n.length-1),a}function oj(n,a){return n.map(l=>l*a)}function rj(n,a){return n.map(()=>a||ox).splice(0,n.length-1)}function cs({duration:n=300,keyframes:a,times:l,ease:o="easeInOut"}){const u=gE(o)?o.map(zv):zv(o),d={done:!1,value:a[0]},f=oj(l&&l.length===a.length?l:sj(a),n),h=ij(f,a,{ease:Array.isArray(u)?u:rj(a,u)});return{calculatedDuration:n,next:g=>(d.value=h(g),d.done=g>=n,d)}}const uj=n=>n!==null;function kr(n,{repeat:a,repeatType:l="loop"},o,u=1){const d=n.filter(uj),h=u<0||a&&l!=="loop"&&a%2===1?0:d.length-1;return!h||o===void 0?d[h]:o}const cj={decay:If,inertia:If,tween:cs,keyframes:cs,spring:xr};function bx(n){typeof n.type=="string"&&(n.type=cj[n.type])}class $d{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,l){return this.finished.then(a,l)}}const fj=n=>n/100;class br extends $d{constructor(a){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=()=>{var o,u;const{motionValue:l}=this.options;l&&l.updatedAt!==gt.now()&&this.tick(gt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(o=this.options).onStop)==null||u.call(o))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;bx(a);const{type:l=cs,repeat:o=0,repeatDelay:u=0,repeatType:d,velocity:f=0}=a;let{keyframes:h}=a;const g=l||cs;g!==cs&&typeof h[0]!="number"&&(this.mixKeyframes=Ts(fj,vx(h[0],h[1])),h=[0,100]);const p=g({...a,keyframes:h});d==="mirror"&&(this.mirroredGenerator=g({...a,keyframes:[...h].reverse(),velocity:-f})),p.calculatedDuration===null&&(p.calculatedDuration=Hd(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+u,this.totalDuration=this.resolvedDuration*(o+1)-u,this.generator=p}updateTime(a){const l=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=l}tick(a,l=!1){const{generator:o,totalDuration:u,mixKeyframes:d,mirroredGenerator:f,resolvedDuration:h,calculatedDuration:g}=this;if(this.startTime===null)return o.next(0);const{delay:p=0,keyframes:y,repeat:x,repeatType:T,repeatDelay:S,type:E,onUpdate:D,finalKeyframe:M}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-u/this.speed,this.startTime)),l?this.currentTime=a:this.updateTime(a);const C=this.currentTime-p*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?C<0:C>u;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let _=this.currentTime,z=o;if(x){const J=Math.min(this.currentTime,u)/h;let F=Math.floor(J),K=J%1;!K&&J>=1&&(K=1),K===1&&F--,F=Math.min(F,x+1),!!(F%2)&&(T==="reverse"?(K=1-K,S&&(K-=S/h)):T==="mirror"&&(z=f)),_=pn(0,1,K)*h}let Y;R?(this.delayState.value=y[0],Y=this.delayState):Y=z.next(_),d&&!R&&(Y.value=d(Y.value));let{done:I}=Y;!R&&g!==null&&(I=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const Z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return Z&&E!==If&&(Y.value=kr(y,this.options,M,this.speed)),D&&D(Y.value),Z&&this.finish(),Y}then(a,l){return this.finished.then(a,l)}get duration(){return Pt(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(this.currentTime)}set time(a){a=Ut(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=a,this.tick(a))}getGeneratorVelocity(){const a=this.currentTime;if(a<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(a);const l=this.generator.next(a).value;return xx(o=>this.generator.next(o).value,a,l)}get speed(){return this.playbackSpeed}set speed(a){const l=this.playbackSpeed!==a;l&&this.driver&&this.updateTime(gt.now()),this.playbackSpeed=a,l&&this.driver&&(this.time=Pt(this.currentTime))}play(){var u,d;if(this.isStopped)return;const{driver:a=ZE,startTime:l}=this.options;this.driver||(this.driver=a(f=>this.tick(f))),(d=(u=this.options).onPlay)==null||d.call(u);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=l??o),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(gt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,l;this.notifyFinished(),this.teardown(),this.state="finished",(l=(a=this.options).onComplete)==null||l.call(a)}cancel(){var a,l;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(l=(a=this.options).onCancel)==null||l.call(a)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){var l;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(l=this.driver)==null||l.stop(),a.observe(this)}}function dj(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const Qa=n=>n*180/Math.PI,ed=n=>{const a=Qa(Math.atan2(n[1],n[0]));return td(a)},hj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:ed,rotateZ:ed,skewX:n=>Qa(Math.atan(n[1])),skewY:n=>Qa(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},td=n=>(n=n%360,n<0&&(n+=360),n),Bv=ed,Hv=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),$v=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),mj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hv,scaleY:$v,scale:n=>(Hv(n)+$v(n))/2,rotateX:n=>td(Qa(Math.atan2(n[6],n[5]))),rotateY:n=>td(Qa(Math.atan2(-n[2],n[0]))),rotateZ:Bv,rotate:Bv,skewX:n=>Qa(Math.atan(n[4])),skewY:n=>Qa(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function nd(n){return n.includes("scale")?1:0}function ad(n,a){if(!n||n==="none")return nd(a);const l=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,u;if(l)o=mj,u=l;else{const h=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=hj,u=h}if(!u)return nd(a);const d=o[a],f=u[1].split(",").map(gj);return typeof d=="function"?d(f):f[d]}const pj=(n,a)=>{const{transform:l="none"}=getComputedStyle(n);return ad(l,a)};function gj(n){return parseFloat(n.trim())}const el=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tl=new Set(el),qv=n=>n===Ii||n===ne,vj=new Set(["x","y","z"]),yj=el.filter(n=>!vj.has(n));function xj(n){const a=[];return yj.forEach(l=>{const o=n.getValue(l);o!==void 0&&(a.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),a}const pa={width:({x:n},{paddingLeft:a="0",paddingRight:l="0",boxSizing:o})=>{const u=n.max-n.min;return o==="border-box"?u:u-parseFloat(a)-parseFloat(l)},height:({y:n},{paddingTop:a="0",paddingBottom:l="0",boxSizing:o})=>{const u=n.max-n.min;return o==="border-box"?u:u-parseFloat(a)-parseFloat(l)},top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>ad(a,"x"),y:(n,{transform:a})=>ad(a,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const Pa=new Set;let id=!1,ld=!1,sd=!1;function Sx(){if(ld){const n=Array.from(Pa).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),l=new Map;a.forEach(o=>{const u=xj(o);u.length&&(l.set(o,u),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const u=l.get(o);u&&u.forEach(([d,f])=>{var h;(h=o.getValue(d))==null||h.set(f)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}ld=!1,id=!1,Pa.forEach(n=>n.complete(sd)),Pa.clear()}function Tx(){Pa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ld=!0)})}function bj(){sd=!0,Tx(),Sx(),sd=!1}class qd{constructor(a,l,o,u,d,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=l,this.name=o,this.motionValue=u,this.element=d,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Pa.add(this),id||(id=!0,Le.read(Tx),Le.resolveKeyframes(Sx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:l,element:o,motionValue:u}=this;if(a[0]===null){const d=u==null?void 0:u.get(),f=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&l){const h=o.readValue(l,f);h!=null&&(a[0]=h)}a[0]===void 0&&(a[0]=f),u&&d===void 0&&u.set(a[0])}dj(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Pa.delete(this)}cancel(){this.state==="scheduled"&&(Pa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Sj=n=>n.startsWith("--");function wx(n,a,l){Sj(a)?n.style.setProperty(a,l):n.style[a]=l}const Tj={};function Ex(n,a){const l=Jy(n);return()=>Tj[a]??l()}const wj=Ex(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),jx=Ex(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),is=([n,a,l,o])=>`cubic-bezier(${n}, ${a}, ${l}, ${o})`,Gv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:is([0,.65,.55,1]),circOut:is([.55,0,1,.45]),backIn:is([.31,.01,.66,-.59]),backOut:is([.33,1.53,.69,.99])};function Ax(n,a){if(n)return typeof n=="function"?jx()?yx(n,a):"ease-out":rx(n)?is(n):Array.isArray(n)?n.map(l=>Ax(l,a)||Gv.easeOut):Gv[n]}function Ej(n,a,l,{delay:o=0,duration:u=300,repeat:d=0,repeatType:f="loop",ease:h="easeOut",times:g}={},p=void 0){const y={[a]:l};g&&(y.offset=g);const x=Ax(h,u);Array.isArray(x)&&(y.easing=x);const T={delay:o,duration:u,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"};return p&&(T.pseudoElement=p),n.animate(y,T)}function Nx(n){return typeof n=="function"&&"applyToOptions"in n}function jj({type:n,...a}){return Nx(n)&&jx()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class Cx extends $d{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:l,name:o,keyframes:u,pseudoElement:d,allowFlatten:f=!1,finalKeyframe:h,onComplete:g}=a;this.isPseudoElement=!!d,this.allowFlatten=f,this.options=a,zd(typeof a.type!="string");const p=jj(a);this.animation=Ej(l,o,u,p,d),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const y=kr(u,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(y),wx(l,o,y),this.animation.cancel()}g==null||g(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,l;(l=(a=this.animation).finish)==null||l.call(a)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var l,o,u;const a=(l=this.options)==null?void 0:l.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((u=(o=this.animation).commitStyles)==null||u.call(o))}get duration(){var l,o;const a=((o=(l=this.animation.effect)==null?void 0:l.getComputedTiming)==null?void 0:o.call(l).duration)||0;return Pt(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(Number(this.animation.currentTime)||0)}set time(a){const l=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ut(a),l&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,rangeStart:l,rangeEnd:o,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&wj()?(this.animation.timeline=a,l&&(this.animation.rangeStart=l),o&&(this.animation.rangeEnd=o),Jt):u(this)}}const Mx={anticipate:ix,backInOut:ax,circInOut:sx};function Aj(n){return n in Mx}function Nj(n){typeof n.ease=="string"&&Aj(n.ease)&&(n.ease=Mx[n.ease])}const Tf=10;class Cj extends Cx{constructor(a){Nj(a),bx(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:l,onUpdate:o,onComplete:u,element:d,...f}=this.options;if(!l)return;if(a!==void 0){l.set(a);return}const h=new br({...f,autoplay:!1}),g=Math.max(Tf,gt.now()-this.startTime),p=pn(0,Tf,g-Tf),y=h.sample(g).value,{name:x}=this.options;d&&x&&wx(d,x,y),l.setWithVelocity(h.sample(Math.max(0,g-p)).value,y,p),h.stop()}}const Yv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ln.test(n)||n==="0")&&!n.startsWith("url("));function Mj(n){const a=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==a)return!0}function Dj(n,a,l,o){const u=n[0];if(u===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],f=Yv(u,a),h=Yv(d,a);return!f||!h?!1:Mj(n)||(l==="spring"||Nx(l))&&o}function od(n){n.duration=0,n.type="keyframes"}const Dx=new Set(["opacity","clipPath","filter","transform"]),Oj=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function zj(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&Oj.test(n[a]))return!0;return!1}const Rj=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Lj=Jy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function kj(n){var x;const{motionValue:a,name:l,repeatDelay:o,repeatType:u,damping:d,type:f,keyframes:h}=n;if(!(((x=a==null?void 0:a.owner)==null?void 0:x.current)instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:y}=a.owner.getProps();return Lj()&&l&&(Dx.has(l)||Rj.has(l)&&zj(h))&&(l!=="transform"||!y)&&!p&&!o&&u!=="mirror"&&d!==0&&f!=="inertia"}const Vj=40;class _j extends $d{constructor({autoplay:a=!0,delay:l=0,type:o="keyframes",repeat:u=0,repeatDelay:d=0,repeatType:f="loop",keyframes:h,name:g,motionValue:p,element:y,...x}){var E;super(),this.stop=()=>{var D,M;this._animation&&(this._animation.stop(),(D=this.stopTimeline)==null||D.call(this)),(M=this.keyframeResolver)==null||M.cancel()},this.createdAt=gt.now();const T={autoplay:a,delay:l,type:o,repeat:u,repeatDelay:d,repeatType:f,name:g,motionValue:p,element:y,...x},S=(y==null?void 0:y.KeyframeResolver)||qd;this.keyframeResolver=new S(h,(D,M,C)=>this.onKeyframesResolved(D,M,T,!C),g,p,y),(E=this.keyframeResolver)==null||E.scheduleResolve()}onKeyframesResolved(a,l,o,u){var C,R;this.keyframeResolver=void 0;const{name:d,type:f,velocity:h,delay:g,isHandoff:p,onUpdate:y}=o;this.resolvedAt=gt.now();let x=!0;Dj(a,d,f,h)||(x=!1,(va.instantAnimations||!g)&&(y==null||y(kr(a,o,l))),a[0]=a[a.length-1],od(o),o.repeat=0);const S={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>Vj?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:l,...o,keyframes:a},E=x&&!p&&kj(S),D=(R=(C=S.motionValue)==null?void 0:C.owner)==null?void 0:R.current;let M;if(E)try{M=new Cj({...S,element:D})}catch{M=new br(S)}else M=new br(S);M.finished.then(()=>{this.notifyFinished()}).catch(Jt),this.pendingTimeline&&(this.stopTimeline=M.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=M}get finished(){return this._animation?this.animation.finished:this._finished}then(a,l){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),bj()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var a;this._animation&&this.animation.cancel(),(a=this.keyframeResolver)==null||a.cancel()}}function Ox(n,a,l,o=0,u=1){const d=Array.from(n).sort((p,y)=>p.sortNodePosition(y)).indexOf(a),f=n.size,h=(f-1)*o;return typeof l=="function"?l(d,f):u===1?d*o:h-d*o}const Uj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bj(n){const a=Uj.exec(n);if(!a)return[,];const[,l,o,u]=a;return[`--${l??o}`,u]}function zx(n,a,l=1){const[o,u]=Bj(n);if(!o)return;const d=window.getComputedStyle(a).getPropertyValue(o);if(d){const f=d.trim();return Zy(f)?parseFloat(f):f}return Vd(u)?zx(u,a,l+1):u}const Hj={type:"spring",stiffness:500,damping:25,restSpeed:10},$j=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),qj={type:"keyframes",duration:.8},Gj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yj=(n,{keyframes:a})=>a.length>2?qj:tl.has(n)?n.startsWith("scale")?$j(a[1]):Hj:Gj;function Rx(n,a){if(n!=null&&n.inherit&&a){const{inherit:l,...o}=n;return{...a,...o}}return n}function Gd(n,a){const l=(n==null?void 0:n[a])??(n==null?void 0:n.default)??n;return l!==n?Rx(l,n):l}const Xj=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Kj(n){for(const a in n)if(!Xj.has(a))return!0;return!1}const Yd=(n,a,l,o={},u,d)=>f=>{const h=Gd(o,n)||{},g=h.delay||o.delay||0;let{elapsed:p=0}=o;p=p-Ut(g);const y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:a.getVelocity(),...h,delay:-p,onUpdate:T=>{a.set(T),h.onUpdate&&h.onUpdate(T)},onComplete:()=>{f(),h.onComplete&&h.onComplete()},name:n,motionValue:a,element:d?void 0:u};Kj(h)||Object.assign(y,Yj(n,y)),y.duration&&(y.duration=Ut(y.duration)),y.repeatDelay&&(y.repeatDelay=Ut(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let x=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(od(y),y.delay===0&&(x=!0)),(va.instantAnimations||va.skipAnimations||u!=null&&u.shouldSkipAnimations)&&(x=!0,od(y),y.delay=0),y.allowFlatten=!h.type&&!h.ease,x&&!d&&a.get()!==void 0){const T=kr(y.keyframes,h);if(T!==void 0){Le.update(()=>{y.onUpdate(T),y.onComplete()});return}}return h.isSync?new br(y):new _j(y)};function Xv(n){const a=[{},{}];return n==null||n.values.forEach((l,o)=>{a[0][o]=l.get(),a[1][o]=l.getVelocity()}),a}function Xd(n,a,l,o){if(typeof a=="function"){const[u,d]=Xv(o);a=a(l!==void 0?l:n.custom,u,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[u,d]=Xv(o);a=a(l!==void 0?l:n.custom,u,d)}return a}function Ja(n,a,l){const o=n.getProps();return Xd(o,a,l!==void 0?l:o.custom,n)}const Lx=new Set(["width","height","top","left","right","bottom",...el]),Kv=30,Fj=n=>!isNaN(parseFloat(n));class Zj{constructor(a,l={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var d;const u=gt.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((d=this.events.change)==null||d.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=l.owner}setCurrent(a){this.current=a,this.updatedAt=gt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=Fj(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,l){this.events[a]||(this.events[a]=new Rd);const o=this.events[a].add(l);return a==="change"?()=>{o(),Le.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,l){this.passiveEffect=a,this.stopPassiveEffect=l}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,l=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var a;(a=this.events.change)==null||a.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Kv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,Kv);return Wy(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(a){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=a(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var a,l;(a=this.dependents)==null||a.clear(),(l=this.events.destroy)==null||l.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(n,a){return new Zj(n,a)}const rd=n=>Array.isArray(n);function Qj(n,a,l){n.hasValue(a)?n.getValue(a).set(l):n.addValue(a,Qi(l))}function Pj(n){return rd(n)?n[n.length-1]||0:n}function Jj(n,a){const l=Ja(n,a);let{transitionEnd:o={},transition:u={},...d}=l||{};d={...d,...o};for(const f in d){const h=Pj(d[f]);Qj(n,f,h)}}const ft=n=>!!(n&&n.getVelocity);function Wj(n){return!!(ft(n)&&n.add)}function ud(n,a){const l=n.getValue("willChange");if(Wj(l))return l.add(a);if(!l&&va.WillChange){const o=new va.WillChange("auto");n.addValue("willChange",o),o.add(a)}}function Kd(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const Ij="framerAppearId",kx="data-"+Kd(Ij);function Vx(n){return n.props[kx]}function e5({protectedKeys:n,needsAnimating:a},l){const o=n.hasOwnProperty(l)&&a[l]!==!0;return a[l]=!1,o}function _x(n,a,{delay:l=0,transitionOverride:o,type:u}={}){let{transition:d,transitionEnd:f,...h}=a;const g=n.getDefaultTransition();d=d?Rx(d,g):g;const p=d==null?void 0:d.reduceMotion;o&&(d=o);const y=[],x=u&&n.animationState&&n.animationState.getState()[u];for(const T in h){const S=n.getValue(T,n.latestValues[T]??null),E=h[T];if(E===void 0||x&&e5(x,T))continue;const D={delay:l,...Gd(d||{},T)},M=S.get();if(M!==void 0&&!S.isAnimating()&&!Array.isArray(E)&&E===M&&!D.velocity){Le.update(()=>S.set(E));continue}let C=!1;if(window.MotionHandoffAnimation){const z=Vx(n);if(z){const Y=window.MotionHandoffAnimation(z,T,Le);Y!==null&&(D.startTime=Y,C=!0)}}ud(n,T);const R=p??n.shouldReduceMotion;S.start(Yd(T,S,E,R&&Lx.has(T)?{type:!1}:D,n,C));const _=S.animation;_&&y.push(_)}if(f){const T=()=>Le.update(()=>{f&&Jj(n,f)});y.length?Promise.all(y).then(T):T()}return y}function cd(n,a,l={}){var g;const o=Ja(n,a,l.type==="exit"?(g=n.presenceContext)==null?void 0:g.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=o||{};l.transitionOverride&&(u=l.transitionOverride);const d=o?()=>Promise.all(_x(n,o,l)):()=>Promise.resolve(),f=n.variantChildren&&n.variantChildren.size?(p=0)=>{const{delayChildren:y=0,staggerChildren:x,staggerDirection:T}=u;return t5(n,a,p,y,x,T,l)}:()=>Promise.resolve(),{when:h}=u;if(h){const[p,y]=h==="beforeChildren"?[d,f]:[f,d];return p().then(()=>y())}else return Promise.all([d(),f(l.delay)])}function t5(n,a,l=0,o=0,u=0,d=1,f){const h=[];for(const g of n.variantChildren)g.notify("AnimationStart",a),h.push(cd(g,a,{...f,delay:l+(typeof o=="function"?0:o)+Ox(n.variantChildren,g,o,u,d)}).then(()=>g.notify("AnimationComplete",a)));return Promise.all(h)}function n5(n,a,l={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const u=a.map(d=>cd(n,d,l));o=Promise.all(u)}else if(typeof a=="string")o=cd(n,a,l);else{const u=typeof a=="function"?Ja(n,a,l.custom):a;o=Promise.all(_x(n,u,l))}return o.then(()=>{n.notify("AnimationComplete",a)})}const a5={test:n=>n==="auto",parse:n=>n},Ux=n=>a=>a.test(n),Bx=[Ii,ne,mn,ca,ME,CE,a5],Fv=n=>Bx.find(Ux(n));function i5(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Py(n):!0}const l5=new Set(["brightness","contrast","saturate","opacity"]);function s5(n){const[a,l]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=l.match(_d)||[];if(!o)return n;const u=l.replace(o,"");let d=l5.has(a)?1:0;return o!==l&&(d*=100),a+"("+d+u+")"}const o5=/\b([a-z-]*)\(.*?\)/gu,fd={...ln,getAnimatableNone:n=>{const a=n.match(o5);return a?a.map(s5).join(" "):n}},dd={...ln,getAnimatableNone:n=>{const a=ln.parse(n);return ln.createTransformer(n)(a.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},Zv={...Ii,transform:Math.round},r5={rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scale:Jo,scaleX:Jo,scaleY:Jo,scaleZ:Jo,skew:ca,skewX:ca,skewY:ca,distance:ne,translateX:ne,translateY:ne,translateZ:ne,x:ne,y:ne,z:ne,perspective:ne,transformPerspective:ne,opacity:ps,originX:Lv,originY:Lv,originZ:ne},Fd={borderWidth:ne,borderTopWidth:ne,borderRightWidth:ne,borderBottomWidth:ne,borderLeftWidth:ne,borderRadius:ne,borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomRightRadius:ne,borderBottomLeftRadius:ne,width:ne,maxWidth:ne,height:ne,maxHeight:ne,top:ne,right:ne,bottom:ne,left:ne,inset:ne,insetBlock:ne,insetBlockStart:ne,insetBlockEnd:ne,insetInline:ne,insetInlineStart:ne,insetInlineEnd:ne,padding:ne,paddingTop:ne,paddingRight:ne,paddingBottom:ne,paddingLeft:ne,paddingBlock:ne,paddingBlockStart:ne,paddingBlockEnd:ne,paddingInline:ne,paddingInlineStart:ne,paddingInlineEnd:ne,margin:ne,marginTop:ne,marginRight:ne,marginBottom:ne,marginLeft:ne,marginBlock:ne,marginBlockStart:ne,marginBlockEnd:ne,marginInline:ne,marginInlineStart:ne,marginInlineEnd:ne,fontSize:ne,backgroundPositionX:ne,backgroundPositionY:ne,...r5,zIndex:Zv,fillOpacity:ps,strokeOpacity:ps,numOctaves:Zv},u5={...Fd,color:Ie,backgroundColor:Ie,outlineColor:Ie,fill:Ie,stroke:Ie,borderColor:Ie,borderTopColor:Ie,borderRightColor:Ie,borderBottomColor:Ie,borderLeftColor:Ie,filter:fd,WebkitFilter:fd,mask:dd,WebkitMask:dd},Hx=n=>u5[n],c5=new Set([fd,dd]);function $x(n,a){let l=Hx(n);return c5.has(l)||(l=ln),l.getAnimatableNone?l.getAnimatableNone(a):void 0}const f5=new Set(["auto","none","0"]);function d5(n,a,l){let o=0,u;for(;o<n.length&&!u;){const d=n[o];typeof d=="string"&&!f5.has(d)&&Zi(d).values.length&&(u=n[o]),o++}if(u&&l)for(const d of a)n[d]=$x(l,u)}class h5 extends qd{constructor(a,l,o,u,d){super(a,l,o,u,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let y=0;y<a.length;y++){let x=a[y];if(typeof x=="string"&&(x=x.trim(),Vd(x))){const T=zx(x,l.current);T!==void 0&&(a[y]=T),y===a.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!Lx.has(o)||a.length!==2)return;const[u,d]=a,f=Fv(u),h=Fv(d),g=Rv(u),p=Rv(d);if(g!==p&&pa[o]){this.needsMeasurement=!0;return}if(f!==h)if(qv(f)&&qv(h))for(let y=0;y<a.length;y++){const x=a[y];typeof x=="string"&&(a[y]=parseFloat(x))}else pa[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:l}=this,o=[];for(let u=0;u<a.length;u++)(a[u]===null||i5(a[u]))&&o.push(u);o.length&&d5(a,o,l)}measureInitialState(){const{element:a,unresolvedKeyframes:l,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[o](a.measureViewportBox(),window.getComputedStyle(a.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&a.getValue(o,u).jump(u,!1)}measureEndState(){var h;const{element:a,name:l,unresolvedKeyframes:o}=this;if(!a||!a.current)return;const u=a.getValue(l);u&&u.jump(this.measuredOrigin,!1);const d=o.length-1,f=o[d];o[d]=pa[l](a.measureViewportBox(),window.getComputedStyle(a.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),(h=this.removedTransforms)!=null&&h.length&&this.removedTransforms.forEach(([g,p])=>{a.getValue(g).set(p)}),this.resolveNoneKeyframes()}}function qx(n,a,l){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let o=document;const u=(l==null?void 0:l[n])??o.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n).filter(o=>o!=null)}const Gx=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function m5(n){return Qy(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Zd}=ux(queueMicrotask,!1),nn={x:!1,y:!1};function Yx(){return nn.x||nn.y}function p5(n){return n==="x"||n==="y"?nn[n]?null:(nn[n]=!0,()=>{nn[n]=!1}):nn.x||nn.y?null:(nn.x=nn.y=!0,()=>{nn.x=nn.y=!1})}function Xx(n,a){const l=qx(n),o=new AbortController,u={passive:!0,...a,signal:o.signal};return[l,u,()=>o.abort()]}function g5(n){return!(n.pointerType==="touch"||Yx())}function v5(n,a,l={}){const[o,u,d]=Xx(n,l);return o.forEach(f=>{let h=!1,g=!1,p;const y=()=>{f.removeEventListener("pointerleave",E)},x=M=>{p&&(p(M),p=void 0),y()},T=M=>{h=!1,window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T),g&&(g=!1,x(M))},S=()=>{h=!0,window.addEventListener("pointerup",T,u),window.addEventListener("pointercancel",T,u)},E=M=>{if(M.pointerType!=="touch"){if(h){g=!0;return}x(M)}},D=M=>{if(!g5(M))return;g=!1;const C=a(f,M);typeof C=="function"&&(p=C,f.addEventListener("pointerleave",E,u))};f.addEventListener("pointerenter",D,u),f.addEventListener("pointerdown",S,u)}),d}const Kx=(n,a)=>a?n===a?!0:Kx(n,a.parentElement):!1,Qd=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,y5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function x5(n){return y5.has(n.tagName)||n.isContentEditable===!0}const b5=new Set(["INPUT","SELECT","TEXTAREA"]);function S5(n){return b5.has(n.tagName)||n.isContentEditable===!0}const ir=new WeakSet;function Qv(n){return a=>{a.key==="Enter"&&n(a)}}function wf(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const T5=(n,a)=>{const l=n.currentTarget;if(!l)return;const o=Qv(()=>{if(ir.has(l))return;wf(l,"down");const u=Qv(()=>{wf(l,"up")}),d=()=>wf(l,"cancel");l.addEventListener("keyup",u,a),l.addEventListener("blur",d,a)});l.addEventListener("keydown",o,a),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),a)};function Pv(n){return Qd(n)&&!Yx()}const Jv=new WeakSet;function w5(n,a,l={}){const[o,u,d]=Xx(n,l),f=h=>{const g=h.currentTarget;if(!Pv(h)||Jv.has(h))return;ir.add(g),l.stopPropagation&&Jv.add(h);const p=a(g,h),y=(S,E)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",T),ir.has(g)&&ir.delete(g),Pv(S)&&typeof p=="function"&&p(S,{success:E})},x=S=>{y(S,g===window||g===document||l.useGlobalTarget||Kx(g,S.target))},T=S=>{y(S,!1)};window.addEventListener("pointerup",x,u),window.addEventListener("pointercancel",T,u)};return o.forEach(h=>{(l.useGlobalTarget?window:h).addEventListener("pointerdown",f,u),m5(h)&&(h.addEventListener("focus",p=>T5(p,u)),!x5(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),d}function Pd(n){return Qy(n)&&"ownerSVGElement"in n}const lr=new WeakMap;let fa;const Fx=(n,a,l)=>(o,u)=>u&&u[0]?u[0][n+"Size"]:Pd(o)&&"getBBox"in o?o.getBBox()[a]:o[l],E5=Fx("inline","width","offsetWidth"),j5=Fx("block","height","offsetHeight");function A5({target:n,borderBoxSize:a}){var l;(l=lr.get(n))==null||l.forEach(o=>{o(n,{get width(){return E5(n,a)},get height(){return j5(n,a)}})})}function N5(n){n.forEach(A5)}function C5(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(N5))}function M5(n,a){fa||C5();const l=qx(n);return l.forEach(o=>{let u=lr.get(o);u||(u=new Set,lr.set(o,u)),u.add(a),fa==null||fa.observe(o)}),()=>{l.forEach(o=>{const u=lr.get(o);u==null||u.delete(a),u!=null&&u.size||fa==null||fa.unobserve(o)})}}const sr=new Set;let Gi;function D5(){Gi=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};sr.forEach(a=>a(n))},window.addEventListener("resize",Gi)}function O5(n){return sr.add(n),Gi||D5(),()=>{sr.delete(n),!sr.size&&typeof Gi=="function"&&(window.removeEventListener("resize",Gi),Gi=void 0)}}function Wv(n,a){return typeof n=="function"?O5(n):M5(n,a)}function z5(n){return Pd(n)&&n.tagName==="svg"}const R5=[...Bx,Ie,ln],L5=n=>R5.find(Ux(n)),Iv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yi=()=>({x:Iv(),y:Iv()}),e0=()=>({min:0,max:0}),tt=()=>({x:e0(),y:e0()}),k5=new WeakMap;function Vr(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function gs(n){return typeof n=="string"||Array.isArray(n)}const Jd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wd=["initial",...Jd];function _r(n){return Vr(n.animate)||Wd.some(a=>gs(n[a]))}function Zx(n){return!!(_r(n)||n.variants)}function V5(n,a,l){for(const o in a){const u=a[o],d=l[o];if(ft(u))n.addValue(o,u);else if(ft(d))n.addValue(o,Qi(u,{owner:n}));else if(d!==u)if(n.hasValue(o)){const f=n.getValue(o);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=n.getStaticValue(o);n.addValue(o,Qi(f!==void 0?f:u,{owner:n}))}}for(const o in l)a[o]===void 0&&n.removeValue(o);return a}const hd={current:null},Qx={current:!1},_5=typeof window<"u";function U5(){if(Qx.current=!0,!!_5)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>hd.current=n.matches;n.addEventListener("change",a),a()}else hd.current=!1}const t0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Sr={};function Px(n){Sr=n}function B5(){return Sr}class H5{scrapeMotionValuesFromProps(a,l,o){return{}}constructor({parent:a,props:l,presenceContext:o,reducedMotionConfig:u,skipAnimations:d,blockInitialAnimation:f,visualState:h},g={}){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=qd,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 S=gt.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,Le.render(this.render,!1,!0))};const{latestValues:p,renderState:y}=h;this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=y,this.parent=a,this.props=l,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=d,this.options=g,this.blockInitialAnimation=!!f,this.isControllingVariants=_r(l),this.isVariantNode=Zx(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:x,...T}=this.scrapeMotionValuesFromProps(l,{},this);for(const S in T){const E=T[S];p[S]!==void 0&&ft(E)&&E.set(p[S])}}mount(a){var l,o;if(this.hasBeenMounted)for(const u in this.initialValues)(l=this.values.get(u))==null||l.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=a,k5.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((u,d)=>this.bindToMotionValue(d,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Qx.current||U5(),this.shouldReduceMotion=hd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(o=this.parent)==null||o.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var a;this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(this.render),this.valueSubscriptions.forEach(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const l in this.events)this.events[l].clear();for(const l in this.features){const o=this.features[l];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,l){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),l.accelerate&&Dx.has(a)&&this.current instanceof HTMLElement){const{factory:f,keyframes:h,times:g,ease:p,duration:y}=l.accelerate,x=new Cx({element:this.current,name:a,keyframes:h,times:g,ease:p,duration:Ut(y)}),T=f(x);this.valueSubscriptions.set(a,()=>{T(),x.cancel()});return}const o=tl.has(a);o&&this.onBindTransform&&this.onBindTransform();const u=l.on("change",f=>{this.latestValues[a]=f,this.props.onUpdate&&Le.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,l)),this.valueSubscriptions.set(a,()=>{u(),d&&d(),l.owner&&l.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Sr){const l=Sr[a];if(!l)continue;const{isEnabled:o,Feature:u}=l;if(!this.features[a]&&u&&o(this.props)&&(this.features[a]=new u(this)),this.features[a]){const d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):tt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,l){this.latestValues[a]=l}update(a,l){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<t0.length;o++){const u=t0[o];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const d="on"+u,f=a[d];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=V5(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(a),()=>l.variantChildren.delete(a)}addValue(a,l){const o=this.values.get(a);l!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,l),this.values.set(a,l),this.latestValues[a]=l.get())}removeValue(a){this.values.delete(a);const l=this.valueSubscriptions.get(a);l&&(l(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,l){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&l!==void 0&&(o=Qi(l===null?void 0:l,{owner:this}),this.addValue(a,o)),o}readValue(a,l){let o=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return o!=null&&(typeof o=="string"&&(Zy(o)||Py(o))?o=parseFloat(o):!L5(o)&&ln.test(l)&&(o=$x(a,l)),this.setBaseTarget(a,ft(o)?o.get():o)),ft(o)?o.get():o}setBaseTarget(a,l){this.baseTarget[a]=l}getBaseTarget(a){var d;const{initial:l}=this.props;let o;if(typeof l=="string"||typeof l=="object"){const f=Xd(this.props,l,(d=this.presenceContext)==null?void 0:d.custom);f&&(o=f[a])}if(l&&o!==void 0)return o;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!ft(u)?u:this.initialValues[a]!==void 0&&o===void 0?void 0:this.baseTarget[a]}on(a,l){return this.events[a]||(this.events[a]=new Rd),this.events[a].add(l)}notify(a,...l){this.events[a]&&this.events[a].notify(...l)}scheduleRenderMicrotask(){Zd.render(this.render)}}class Jx extends H5{constructor(){super(...arguments),this.KeyframeResolver=h5}sortInstanceNodePosition(a,l){return a.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(a,l){const o=a.style;return o?o[l]:void 0}removeValueFromRenderState(a,{vars:l,style:o}){delete l[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ft(a)&&(this.childSubscription=a.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}class Sa{constructor(a){this.isMounted=!1,this.node=a}update(){}}function Wx({top:n,left:a,right:l,bottom:o}){return{x:{min:a,max:l},y:{min:n,max:o}}}function $5({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function q5(n,a){if(!a)return n;const l=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Ef(n){return n===void 0||n===1}function md({scale:n,scaleX:a,scaleY:l}){return!Ef(n)||!Ef(a)||!Ef(l)}function Ga(n){return md(n)||Ix(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Ix(n){return n0(n.x)||n0(n.y)}function n0(n){return n&&n!=="0%"}function Tr(n,a,l){const o=n-l,u=a*o;return l+u}function a0(n,a,l,o,u){return u!==void 0&&(n=Tr(n,u,o)),Tr(n,l,o)+a}function pd(n,a=0,l=1,o,u){n.min=a0(n.min,a,l,o,u),n.max=a0(n.max,a,l,o,u)}function eb(n,{x:a,y:l}){pd(n.x,a.translate,a.scale,a.originPoint),pd(n.y,l.translate,l.scale,l.originPoint)}const i0=.999999999999,l0=1.0000000000001;function G5(n,a,l,o=!1){var h;const u=l.length;if(!u)return;a.x=a.y=1;let d,f;for(let g=0;g<u;g++){d=l[g],f=d.projectionDelta;const{visualElement:p}=d.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(dn(n.x,-d.scroll.offset.x),dn(n.y,-d.scroll.offset.y)),f&&(a.x*=f.x.scale,a.y*=f.y.scale,eb(n,f)),o&&Ga(d.latestValues)&&or(n,d.latestValues,(h=d.layout)==null?void 0:h.layoutBox))}a.x<l0&&a.x>i0&&(a.x=1),a.y<l0&&a.y>i0&&(a.y=1)}function dn(n,a){n.min+=a,n.max+=a}function s0(n,a,l,o,u=.5){const d=Be(n.min,n.max,u);pd(n,a,l,d,o)}function o0(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function or(n,a,l){const o=l??n;s0(n.x,o0(a.x,o.x),a.scaleX,a.scale,a.originX),s0(n.y,o0(a.y,o.y),a.scaleY,a.scale,a.originY)}function tb(n,a){return Wx(q5(n.getBoundingClientRect(),a))}function Y5(n,a,l){const o=tb(n,l),{scroll:u}=a;return u&&(dn(o.x,u.offset.x),dn(o.y,u.offset.y)),o}const X5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},K5=el.length;function F5(n,a,l){let o="",u=!0;for(let d=0;d<K5;d++){const f=el[d],h=n[f];if(h===void 0)continue;let g=!0;if(typeof h=="number")g=h===(f.startsWith("scale")?1:0);else{const p=parseFloat(h);g=f.startsWith("scale")?p===1:p===0}if(!g||l){const p=Gx(h,Fd[f]);if(!g){u=!1;const y=X5[f]||f;o+=`${y}(${p}) `}l&&(a[f]=p)}}return o=o.trim(),l?o=l(a,u?"":o):u&&(o="none"),o}function Id(n,a,l){const{style:o,vars:u,transformOrigin:d}=n;let f=!1,h=!1;for(const g in a){const p=a[g];if(tl.has(g)){f=!0;continue}else if(fx(g)){u[g]=p;continue}else{const y=Gx(p,Fd[g]);g.startsWith("origin")?(h=!0,d[g]=y):o[g]=y}}if(a.transform||(f||l?o.transform=F5(a,n.transform,l):o.transform&&(o.transform="none")),h){const{originX:g="50%",originY:p="50%",originZ:y=0}=d;o.transformOrigin=`${g} ${p} ${y}`}}function nb(n,{style:a,vars:l},o,u){const d=n.style;let f;for(f in a)d[f]=a[f];u==null||u.applyProjectionStyles(d,o);for(f in l)d.setProperty(f,l[f])}function r0(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Jl={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(ne.test(n))n=parseFloat(n);else return n;const l=r0(n,a.target.x),o=r0(n,a.target.y);return`${l}% ${o}%`}},Z5={correct:(n,{treeScale:a,projectionDelta:l})=>{const o=n,u=ln.parse(n);if(u.length>5)return o;const d=ln.createTransformer(n),f=typeof u[0]!="number"?1:0,h=l.x.scale*a.x,g=l.y.scale*a.y;u[0+f]/=h,u[1+f]/=g;const p=Be(h,g,.5);return typeof u[2+f]=="number"&&(u[2+f]/=p),typeof u[3+f]=="number"&&(u[3+f]/=p),d(u)}},gd={borderRadius:{...Jl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jl,borderTopRightRadius:Jl,borderBottomLeftRadius:Jl,borderBottomRightRadius:Jl,boxShadow:Z5};function ab(n,{layout:a,layoutId:l}){return tl.has(n)||n.startsWith("origin")||(a||l!==void 0)&&(!!gd[n]||n==="opacity")}function eh(n,a,l){var f;const o=n.style,u=a==null?void 0:a.style,d={};if(!o)return d;for(const h in o)(ft(o[h])||u&&ft(u[h])||ab(h,n)||((f=l==null?void 0:l.getValue(h))==null?void 0:f.liveStyle)!==void 0)&&(d[h]=o[h]);return d}function Q5(n){return window.getComputedStyle(n)}class P5 extends Jx{constructor(){super(...arguments),this.type="html",this.renderInstance=nb}readValueFromInstance(a,l){var o;if(tl.has(l))return(o=this.projection)!=null&&o.isProjecting?nd(l):pj(a,l);{const u=Q5(a),d=(fx(l)?u.getPropertyValue(l):u[l])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(a,{transformPagePoint:l}){return tb(a,l)}build(a,l,o){Id(a,l,o.transformTemplate)}scrapeMotionValuesFromProps(a,l,o){return eh(a,l,o)}}const J5={offset:"stroke-dashoffset",array:"stroke-dasharray"},W5={offset:"strokeDashoffset",array:"strokeDasharray"};function I5(n,a,l=1,o=0,u=!0){n.pathLength=1;const d=u?J5:W5;n[d.offset]=`${-o}`,n[d.array]=`${a} ${l}`}const eA=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ib(n,{attrX:a,attrY:l,attrScale:o,pathLength:u,pathSpacing:d=1,pathOffset:f=0,...h},g,p,y){if(Id(n,h,p),g){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:T}=n;x.transform&&(T.transform=x.transform,delete x.transform),(T.transform||x.transformOrigin)&&(T.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),T.transform&&(T.transformBox=(y==null?void 0:y.transformBox)??"fill-box",delete x.transformBox);for(const S of eA)x[S]!==void 0&&(T[S]=x[S],delete x[S]);a!==void 0&&(x.x=a),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),u!==void 0&&I5(x,u,d,f,!1)}const lb=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"]),sb=n=>typeof n=="string"&&n.toLowerCase()==="svg";function tA(n,a,l,o){nb(n,a,void 0,o);for(const u in a.attrs)n.setAttribute(lb.has(u)?u:Kd(u),a.attrs[u])}function ob(n,a,l){const o=eh(n,a,l);for(const u in n)if(ft(n[u])||ft(a[u])){const d=el.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;o[d]=n[u]}return o}class nA extends Jx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=tt}getBaseTargetFromProps(a,l){return a[l]}readValueFromInstance(a,l){if(tl.has(l)){const o=Hx(l);return o&&o.default||0}return l=lb.has(l)?l:Kd(l),a.getAttribute(l)}scrapeMotionValuesFromProps(a,l,o){return ob(a,l,o)}build(a,l,o){ib(a,l,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(a,l,o,u){tA(a,l,o,u)}mount(a){this.isSVGTag=sb(a.tagName),super.mount(a)}}const aA=Wd.length;function rb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?rb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const a={};for(let l=0;l<aA;l++){const o=Wd[l],u=n.props[o];(gs(u)||u===!1)&&(a[o]=u)}return a}function ub(n,a){if(!Array.isArray(a))return!1;const l=a.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(a[o]!==n[o])return!1;return!0}const iA=[...Jd].reverse(),lA=Jd.length;function sA(n){return a=>Promise.all(a.map(({animation:l,options:o})=>n5(n,l,o)))}function oA(n){let a=sA(n),l=u0(),o=!0,u=!1;const d=p=>(y,x)=>{var S;const T=Ja(n,x,p==="exit"?(S=n.presenceContext)==null?void 0:S.custom:void 0);if(T){const{transition:E,transitionEnd:D,...M}=T;y={...y,...M,...D}}return y};function f(p){a=p(n)}function h(p){const{props:y}=n,x=rb(n.parent)||{},T=[],S=new Set;let E={},D=1/0;for(let C=0;C<lA;C++){const R=iA[C],_=l[R],z=y[R]!==void 0?y[R]:x[R],Y=gs(z),I=R===p?_.isActive:null;I===!1&&(D=C);let Z=z===x[R]&&z!==y[R]&&Y;if(Z&&(o||u)&&n.manuallyAnimateOnMount&&(Z=!1),_.protectedKeys={...E},!_.isActive&&I===null||!z&&!_.prevProp||Vr(z)||typeof z=="boolean")continue;if(R==="exit"&&_.isActive&&I!==!0){_.prevResolvedValues&&(E={...E,..._.prevResolvedValues});continue}const J=rA(_.prevProp,z);let F=J||R===p&&_.isActive&&!Z&&Y||C>D&&Y,K=!1;const te=Array.isArray(z)?z:[z];let ie=te.reduce(d(R),{});I===!1&&(ie={});const{prevResolvedValues:Te={}}=_,Ae={...Te,...ie},Ne=P=>{F=!0,S.has(P)&&(K=!0,S.delete(P)),_.needsAnimating[P]=!0;const oe=n.getValue(P);oe&&(oe.liveStyle=!1)};for(const P in Ae){const oe=ie[P],he=Te[P];if(E.hasOwnProperty(P))continue;let A=!1;rd(oe)&&rd(he)?A=!ub(oe,he):A=oe!==he,A?oe!=null?Ne(P):S.add(P):oe!==void 0&&S.has(P)?Ne(P):_.protectedKeys[P]=!0}_.prevProp=z,_.prevResolvedValues=ie,_.isActive&&(E={...E,...ie}),(o||u)&&n.blockInitialAnimation&&(F=!1);const B=Z&&J;F&&(!B||K)&&T.push(...te.map(P=>{const oe={type:R};if(typeof P=="string"&&(o||u)&&!B&&n.manuallyAnimateOnMount&&n.parent){const{parent:he}=n,A=Ja(he,P);if(he.enteringChildren&&A){const{delayChildren:q}=A.transition||{};oe.delay=Ox(he.enteringChildren,n,q)}}return{animation:P,options:oe}}))}if(S.size){const C={};if(typeof y.initial!="boolean"){const R=Ja(n,Array.isArray(y.initial)?y.initial[0]:y.initial);R&&R.transition&&(C.transition=R.transition)}S.forEach(R=>{const _=n.getBaseTarget(R),z=n.getValue(R);z&&(z.liveStyle=!0),C[R]=_??null}),T.push({animation:C})}let M=!!T.length;return o&&(y.initial===!1||y.initial===y.animate)&&!n.manuallyAnimateOnMount&&(M=!1),o=!1,u=!1,M?a(T):Promise.resolve()}function g(p,y){var T;if(l[p].isActive===y)return Promise.resolve();(T=n.variantChildren)==null||T.forEach(S=>{var E;return(E=S.animationState)==null?void 0:E.setActive(p,y)}),l[p].isActive=y;const x=h(p);for(const S in l)l[S].protectedKeys={};return x}return{animateChanges:h,setActive:g,setAnimateFunction:f,getState:()=>l,reset:()=>{l=u0(),u=!0}}}function rA(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!ub(a,n):!1}function $a(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function u0(){return{animate:$a(!0),whileInView:$a(),whileHover:$a(),whileTap:$a(),whileDrag:$a(),whileFocus:$a(),exit:$a()}}function vd(n,a){n.min=a.min,n.max=a.max}function tn(n,a){vd(n.x,a.x),vd(n.y,a.y)}function c0(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const cb=1e-4,uA=1-cb,cA=1+cb,fb=.01,fA=0-fb,dA=0+fb;function vt(n){return n.max-n.min}function hA(n,a,l){return Math.abs(n-a)<=l}function f0(n,a,l,o=.5){n.origin=o,n.originPoint=Be(a.min,a.max,n.origin),n.scale=vt(l)/vt(a),n.translate=Be(l.min,l.max,n.origin)-n.originPoint,(n.scale>=uA&&n.scale<=cA||isNaN(n.scale))&&(n.scale=1),(n.translate>=fA&&n.translate<=dA||isNaN(n.translate))&&(n.translate=0)}function fs(n,a,l,o){f0(n.x,a.x,l.x,o?o.originX:void 0),f0(n.y,a.y,l.y,o?o.originY:void 0)}function d0(n,a,l,o=0){const u=o?Be(l.min,l.max,o):l.min;n.min=u+a.min,n.max=n.min+vt(a)}function mA(n,a,l,o){d0(n.x,a.x,l.x,o==null?void 0:o.x),d0(n.y,a.y,l.y,o==null?void 0:o.y)}function h0(n,a,l,o=0){const u=o?Be(l.min,l.max,o):l.min;n.min=a.min-u,n.max=n.min+vt(a)}function wr(n,a,l,o){h0(n.x,a.x,l.x,o==null?void 0:o.x),h0(n.y,a.y,l.y,o==null?void 0:o.y)}function m0(n,a,l,o,u){return n-=a,n=Tr(n,1/l,o),u!==void 0&&(n=Tr(n,1/u,o)),n}function pA(n,a=0,l=1,o=.5,u,d=n,f=n){if(mn.test(a)&&(a=parseFloat(a),a=Be(f.min,f.max,a/100)-f.min),typeof a!="number")return;let h=Be(d.min,d.max,o);n===d&&(h-=a),n.min=m0(n.min,a,l,h,u),n.max=m0(n.max,a,l,h,u)}function p0(n,a,[l,o,u],d,f){pA(n,a[l],a[o],a[u],a.scale,d,f)}const gA=["x","scaleX","originX"],vA=["y","scaleY","originY"];function g0(n,a,l,o){p0(n.x,a,gA,l?l.x:void 0,o?o.x:void 0),p0(n.y,a,vA,l?l.y:void 0,o?o.y:void 0)}function v0(n){return n.translate===0&&n.scale===1}function db(n){return v0(n.x)&&v0(n.y)}function y0(n,a){return n.min===a.min&&n.max===a.max}function yA(n,a){return y0(n.x,a.x)&&y0(n.y,a.y)}function x0(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function hb(n,a){return x0(n.x,a.x)&&x0(n.y,a.y)}function b0(n){return vt(n.x)/vt(n.y)}function S0(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function fn(n){return[n("x"),n("y")]}function xA(n,a,l){let o="";const u=n.x.translate/a.x,d=n.y.translate/a.y,f=(l==null?void 0:l.z)||0;if((u||d||f)&&(o=`translate3d(${u}px, ${d}px, ${f}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),l){const{transformPerspective:p,rotate:y,rotateX:x,rotateY:T,skewX:S,skewY:E}=l;p&&(o=`perspective(${p}px) ${o}`),y&&(o+=`rotate(${y}deg) `),x&&(o+=`rotateX(${x}deg) `),T&&(o+=`rotateY(${T}deg) `),S&&(o+=`skewX(${S}deg) `),E&&(o+=`skewY(${E}deg) `)}const h=n.x.scale*a.x,g=n.y.scale*a.y;return(h!==1||g!==1)&&(o+=`scale(${h}, ${g})`),o||"none"}const mb=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],bA=mb.length,T0=n=>typeof n=="string"?parseFloat(n):n,w0=n=>typeof n=="number"||ne.test(n);function SA(n,a,l,o,u,d){u?(n.opacity=Be(0,l.opacity??1,TA(o)),n.opacityExit=Be(a.opacity??1,0,wA(o))):d&&(n.opacity=Be(a.opacity??1,l.opacity??1,o));for(let f=0;f<bA;f++){const h=mb[f];let g=E0(a,h),p=E0(l,h);if(g===void 0&&p===void 0)continue;g||(g=0),p||(p=0),g===0||p===0||w0(g)===w0(p)?(n[h]=Math.max(Be(T0(g),T0(p),o),0),(mn.test(p)||mn.test(g))&&(n[h]+="%")):n[h]=p}(a.rotate||l.rotate)&&(n.rotate=Be(a.rotate||0,l.rotate||0,o))}function E0(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const TA=pb(0,.5,lx),wA=pb(.5,.95,Jt);function pb(n,a,l){return o=>o<n?0:o>a?1:l(ms(n,a,o))}function EA(n,a,l){const o=ft(n)?n:Qi(n);return o.start(Yd("",o,a,l)),o.animation}function vs(n,a,l,o={passive:!0}){return n.addEventListener(a,l,o),()=>n.removeEventListener(a,l)}const jA=(n,a)=>n.depth-a.depth;class AA{constructor(){this.children=[],this.isDirty=!1}add(a){Od(this.children,a),this.isDirty=!0}remove(a){gr(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(jA),this.isDirty=!1,this.children.forEach(a)}}function NA(n,a){const l=gt.now(),o=({timestamp:u})=>{const d=u-l;d>=a&&(ya(o),n(d-a))};return Le.setup(o,!0),()=>ya(o)}function rr(n){return ft(n)?n.get():n}class CA{constructor(){this.members=[]}add(a){Od(this.members,a);for(let l=this.members.length-1;l>=0;l--){const o=this.members[l];if(o===a||o===this.lead||o===this.prevLead)continue;const u=o.instance;(!u||u.isConnected===!1)&&!o.snapshot&&(gr(this.members,o),o.unmount())}a.scheduleRender()}remove(a){if(gr(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(a){var l;for(let o=this.members.indexOf(a)-1;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1&&((l=u.instance)==null?void 0:l.isConnected)!==!1)return this.promote(u),!0}return!1}promote(a,l){var u;const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.updateSnapshot(),a.scheduleRender();const{layoutDependency:d}=o.options,{layoutDependency:f}=a.options;(d===void 0||d!==f)&&(a.resumeFrom=o,l&&(o.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),(u=a.root)!=null&&u.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{var l,o,u,d,f;(o=(l=a.options).onExitComplete)==null||o.call(l),(f=(u=a.resumingFrom)==null?void 0:(d=u.options).onExitComplete)==null||f.call(d)})}scheduleRender(){this.members.forEach(a=>a.instance&&a.scheduleRender(!1))}removeLeadSnapshot(){var a;(a=this.lead)!=null&&a.snapshot&&(this.lead.snapshot=void 0)}}const ur={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jf=["","X","Y","Z"],MA=1e3;let DA=0;function Af(n,a,l,o){const{latestValues:u}=a;u[n]&&(l[n]=u[n],a.setStaticValue(n,0),o&&(o[n]=0))}function gb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const l=Vx(a);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",Le,!(u||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&gb(o)}function vb({attachResizeListener:n,defaultParent:a,measureScroll:l,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(f={},h=a==null?void 0:a()){this.id=DA++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(RA),this.nodes.forEach(BA),this.nodes.forEach(HA),this.nodes.forEach(LA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new AA)}addEventListener(f,h){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Rd),this.eventHandlers.get(f).add(h)}notifyListeners(f,...h){const g=this.eventHandlers.get(f);g&&g.notify(...h)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=Pd(f)&&!z5(f),this.instance=f;const{layoutId:h,layout:g,visualElement:p}=this.options;if(p&&!p.current&&p.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(g||h)&&(this.isLayoutDirty=!0),n){let y,x=0;const T=()=>this.root.updateBlockedByResize=!1;Le.read(()=>{x=window.innerWidth}),n(f,()=>{const S=window.innerWidth;S!==x&&(x=S,this.root.updateBlockedByResize=!0,y&&y(),y=NA(T,250),ur.hasAnimatedSinceResize&&(ur.hasAnimatedSinceResize=!1,this.nodes.forEach(N0)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&p&&(h||g)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:x,hasRelativeLayoutChanged:T,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||p.getDefaultTransition()||XA,{onLayoutAnimationStart:D,onLayoutAnimationComplete:M}=p.getProps(),C=!this.targetLayout||!hb(this.targetLayout,S),R=!x&&T;if(this.options.layoutRoot||this.resumeFrom||R||x&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...Gd(E,"layout"),onPlay:D,onComplete:M};(p.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(y,R)}else x||N0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ya(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach($A),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const x=this.path[y];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:h,layout:g}=this.options;if(h===void 0&&!g)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const g=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),g&&this.nodes.forEach(VA),this.nodes.forEach(j0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(A0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(_A),this.nodes.forEach(UA),this.nodes.forEach(OA),this.nodes.forEach(zA)):this.nodes.forEach(A0),this.clearAllSnapshots();const h=gt.now();ut.delta=pn(0,1e3/60,h-ut.timestamp),ut.timestamp=h,ut.isProcessing=!0,vf.update.process(ut),vf.preRender.process(ut),vf.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(kA),this.sharedNodes.forEach(qA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let g=0;g<this.path.length;g++)this.path[g].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=tt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(h=!1),h&&this.instance){const g=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:g,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!db(this.projectionDelta),g=this.getTransformTemplate(),p=g?g(this.latestValues,""):void 0,y=p!==this.prevTransformTemplateValue;f&&this.instance&&(h||Ga(this.latestValues)||y)&&(u(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const h=this.measurePageBox();let g=this.removeElementScroll(h);return f&&(g=this.removeTransform(g)),KA(g),{animationId:this.root.animationId,measuredBox:h,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){var p;const{visualElement:f}=this.options;if(!f)return tt();const h=f.measureViewportBox();if(!(((p=this.scroll)==null?void 0:p.wasRoot)||this.path.some(FA))){const{scroll:y}=this.root;y&&(dn(h.x,y.offset.x),dn(h.y,y.offset.y))}return h}removeElementScroll(f){var g;const h=tt();if(tn(h,f),(g=this.scroll)!=null&&g.wasRoot)return h;for(let p=0;p<this.path.length;p++){const y=this.path[p],{scroll:x,options:T}=y;y!==this.root&&x&&T.layoutScroll&&(x.wasRoot&&tn(h,f),dn(h.x,x.offset.x),dn(h.y,x.offset.y))}return h}applyTransform(f,h=!1,g){var y,x;const p=g||tt();tn(p,f);for(let T=0;T<this.path.length;T++){const S=this.path[T];!h&&S.options.layoutScroll&&S.scroll&&S!==S.root&&(dn(p.x,-S.scroll.offset.x),dn(p.y,-S.scroll.offset.y)),Ga(S.latestValues)&&or(p,S.latestValues,(y=S.layout)==null?void 0:y.layoutBox)}return Ga(this.latestValues)&&or(p,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),p}removeTransform(f){var g;const h=tt();tn(h,f);for(let p=0;p<this.path.length;p++){const y=this.path[p];if(!Ga(y.latestValues))continue;let x;y.instance&&(md(y.latestValues)&&y.updateSnapshot(),x=tt(),tn(x,y.measurePageBox())),g0(h,y.latestValues,(g=y.snapshot)==null?void 0:g.layoutBox,x)}return Ga(this.latestValues)&&g0(h,this.latestValues),h}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var S;const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==h;if(!(f||g&&this.isSharedProjectionDirty||this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:x}=this.options;if(!this.layout||!(y||x))return;this.resolvedRelativeTargetAt=ut.timestamp;const T=this.getClosestProjectingParent();T&&this.linkedParentVersion!==T.layoutVersion&&!T.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&T&&T.layout?this.createRelativeTarget(T,this.layout.layoutBox,T.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=tt(),this.targetWithTransforms=tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mA(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tn(this.target,this.layout.layoutBox),eb(this.target,this.targetDelta)):tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?this.createRelativeTarget(T,this.target,T.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||md(this.parent.latestValues)||Ix(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,h,g){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=tt(),this.relativeTargetOrigin=tt(),wr(this.relativeTargetOrigin,h,g,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var E;const f=this.getLead(),h=!!this.resumingFrom||this!==f;let g=!0;if((this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty)&&(g=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(g=!1),g)return;const{layout:p,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||y))return;tn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,T=this.treeScale.y;G5(this.layoutCorrected,this.treeScale,this.path,h),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=tt());const{target:S}=f;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(c0(this.prevProjectionDelta.x,this.projectionDelta.x),c0(this.prevProjectionDelta.y,this.projectionDelta.y)),fs(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==T||!S0(this.projectionDelta.x,this.prevProjectionDelta.x)||!S0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var h;if((h=this.options.visualElement)==null||h.scheduleRender(),f){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yi(),this.projectionDelta=Yi(),this.projectionDeltaWithTransform=Yi()}setAnimationOrigin(f,h=!1){const g=this.snapshot,p=g?g.latestValues:{},y={...this.latestValues},x=Yi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const T=tt(),S=g?g.source:void 0,E=this.layout?this.layout.source:void 0,D=S!==E,M=this.getStack(),C=!M||M.members.length<=1,R=!!(D&&!C&&this.options.crossfade===!0&&!this.path.some(YA));this.animationProgress=0;let _;this.mixTargetDelta=z=>{const Y=z/1e3;C0(x.x,f.x,Y),C0(x.y,f.y,Y),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wr(T,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),GA(this.relativeTarget,this.relativeTargetOrigin,T,Y),_&&yA(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=tt()),tn(_,this.relativeTarget)),D&&(this.animationValues=y,SA(y,p,this.latestValues,Y,R,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){var h,g,p;this.notifyListeners("animationStart"),(h=this.currentAnimation)==null||h.stop(),(p=(g=this.resumingFrom)==null?void 0:g.currentAnimation)==null||p.stop(),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{ur.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=EA(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:y=>{this.mixTargetDelta(y),f.onUpdate&&f.onUpdate(y)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(MA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:h,target:g,layout:p,latestValues:y}=f;if(!(!h||!g||!p)){if(this!==f&&this.layout&&p&&yb(this.options.animationType,this.layout.layoutBox,p.layoutBox)){g=this.target||tt();const x=vt(this.layout.layoutBox.x);g.x.min=f.target.x.min,g.x.max=g.x.min+x;const T=vt(this.layout.layoutBox.y);g.y.min=f.target.y.min,g.y.max=g.y.min+T}tn(h,g),or(h,y),fs(this.projectionDeltaWithTransform,this.layoutCorrected,h,y)}}registerSharedNode(f,h){this.sharedNodes.has(f)||this.sharedNodes.set(f,new CA),this.sharedNodes.get(f).add(h);const p=h.options.initialPromotionConfig;h.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(h):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var h;const{layoutId:f}=this.options;return f?((h=this.getStack())==null?void 0:h.lead)||this:this}getPrevLead(){var h;const{layoutId:f}=this.options;return f?(h=this.getStack())==null?void 0:h.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:h,preserveFollowOpacity:g}={}){const p=this.getStack();p&&p.promote(this,g),f&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let h=!1;const{latestValues:g}=f;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(h=!0),!h)return;const p={};g.z&&Af("z",f,p,this.animationValues);for(let y=0;y<jf.length;y++)Af(`rotate${jf[y]}`,f,p,this.animationValues),Af(`skew${jf[y]}`,f,p,this.animationValues);f.render();for(const y in p)f.setStaticValue(y,p[y]),this.animationValues&&(this.animationValues[y]=p[y]);f.scheduleRender()}applyProjectionStyles(f,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const g=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=rr(h==null?void 0:h.pointerEvents)||"",f.transform=g?g(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=rr(h==null?void 0:h.pointerEvents)||""),this.hasProjected&&!Ga(this.latestValues)&&(f.transform=g?g({},""):"none",this.hasProjected=!1);return}f.visibility="";const y=p.animationValues||p.latestValues;this.applyTransformsToTarget();let x=xA(this.projectionDeltaWithTransform,this.treeScale,y);g&&(x=g(y,x)),f.transform=x;const{x:T,y:S}=this.projectionDelta;f.transformOrigin=`${T.origin*100}% ${S.origin*100}% 0`,p.animationValues?f.opacity=p===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:f.opacity=p===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const E in gd){if(y[E]===void 0)continue;const{correct:D,applyTo:M,isCSSVariable:C}=gd[E],R=x==="none"?y[E]:D(y[E],p);if(M){const _=M.length;for(let z=0;z<_;z++)f[M[z]]=R}else C?this.options.visualElement.renderState.vars[E]=R:f[E]=R}this.options.layoutId&&(f.pointerEvents=p===this?rr(h==null?void 0:h.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var h;return(h=f.currentAnimation)==null?void 0:h.stop()}),this.root.nodes.forEach(j0),this.root.sharedNodes.clear()}}}function OA(n){n.updateLayout()}function zA(n){var l;const a=((l=n.resumeFrom)==null?void 0:l.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:u}=n.layout,{animationType:d}=n.options,f=a.source!==n.layout.source;if(d==="size")fn(x=>{const T=f?a.measuredBox[x]:a.layoutBox[x],S=vt(T);T.min=o[x].min,T.max=T.min+S});else if(d==="x"||d==="y"){const x=d==="x"?"y":"x";vd(f?a.measuredBox[x]:a.layoutBox[x],o[x])}else yb(d,a.layoutBox,o)&&fn(x=>{const T=f?a.measuredBox[x]:a.layoutBox[x],S=vt(o[x]);T.max=T.min+S,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[x].max=n.relativeTarget[x].min+S)});const h=Yi();fs(h,o,a.layoutBox);const g=Yi();f?fs(g,n.applyTransform(u,!0),a.measuredBox):fs(g,o,a.layoutBox);const p=!db(h);let y=!1;if(!n.resumeFrom){const x=n.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:T,layout:S}=x;if(T&&S){const E=n.options.layoutAnchor||void 0,D=tt();wr(D,a.layoutBox,T.layoutBox,E);const M=tt();wr(M,o,S.layoutBox,E),hb(D,M)||(y=!0),x.options.layoutRoot&&(n.relativeTarget=M,n.relativeTargetOrigin=D,n.relativeParent=x)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:a,delta:g,layoutDelta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function RA(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function LA(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function kA(n){n.clearSnapshot()}function j0(n){n.clearMeasurements()}function VA(n){n.isLayoutDirty=!0,n.updateLayout()}function A0(n){n.isLayoutDirty=!1}function _A(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function UA(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function N0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function BA(n){n.resolveTargetDelta()}function HA(n){n.calcProjection()}function $A(n){n.resetSkewAndRotation()}function qA(n){n.removeLeadSnapshot()}function C0(n,a,l){n.translate=Be(a.translate,0,l),n.scale=Be(a.scale,1,l),n.origin=a.origin,n.originPoint=a.originPoint}function M0(n,a,l,o){n.min=Be(a.min,l.min,o),n.max=Be(a.max,l.max,o)}function GA(n,a,l,o){M0(n.x,a.x,l.x,o),M0(n.y,a.y,l.y,o)}function YA(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const XA={duration:.45,ease:[.4,0,.1,1]},D0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),O0=D0("applewebkit/")&&!D0("chrome/")?Math.round:Jt;function z0(n){n.min=O0(n.min),n.max=O0(n.max)}function KA(n){z0(n.x),z0(n.y)}function yb(n,a,l){return n==="position"||n==="preserve-aspect"&&!hA(b0(a),b0(l),.2)}function FA(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const ZA=vb({attachResizeListener:(n,a)=>vs(n,"resize",a),measureScroll:()=>{var n,a;return{x:document.documentElement.scrollLeft||((n=document.body)==null?void 0:n.scrollLeft)||0,y:document.documentElement.scrollTop||((a=document.body)==null?void 0:a.scrollTop)||0}},checkIsScrollRoot:()=>!0}),QA=n=>!n.isLayoutDirty&&n.willUpdate(!1);function R0(){const n=new Set,a=new WeakMap,l=()=>n.forEach(QA);return{add:o=>{n.add(o),a.set(o,o.addEventListener("willUpdate",l))},remove:o=>{n.delete(o);const u=a.get(o);u&&(u(),a.delete(o)),l()},dirty:l}}const Nf={current:void 0},xb=vb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Nf.current){const n=new ZA({});n.mount(window),n.setOptions({layoutScroll:!0}),Nf.current=n}return Nf.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),bb=w.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function PA(n=!0){const a=w.useContext(Dd);if(a===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:u}=a,d=w.useId();w.useEffect(()=>{if(n)return u(d)},[n]);const f=w.useCallback(()=>n&&o&&o(d),[d,o,n]);return!l&&o?[!1,f]:[!0]}const JA=w.createContext(null);function WA(){const n=w.useRef(!1);return Fy(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function IA(){const n=WA(),[a,l]=w.useState(0),o=w.useCallback(()=>{n.current&&l(a+1)},[a]);return[w.useCallback(()=>Le.postRender(o),[o]),a]}const Sb=n=>n===!0,eN=n=>Sb(n===!0)||n==="id",Tb=({children:n,id:a,inherit:l=!0})=>{const o=w.useContext(pr),u=w.useContext(JA),[d,f]=IA(),h=w.useRef(null),g=o.id||u;h.current===null&&(eN(l)&&g&&(a=a?g+"-"+a:g),h.current={id:a,group:Sb(l)&&o.group||R0()});const p=w.useMemo(()=>({...h.current,forceRender:d}),[f]);return m.jsx(pr.Provider,{value:p,children:n})},wb=w.createContext({strict:!1}),L0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let k0=!1;function tN(){if(k0)return;const n={};for(const a in L0)n[a]={isEnabled:l=>L0[a].some(o=>!!l[o])};Px(n),k0=!0}function Eb(){return tN(),B5()}function nN(n){const a=Eb();for(const l in n)a[l]={...a[l],...n[l]};Px(a)}const aN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Er(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||aN.has(n)}let jb=n=>!Er(n);function iN(n){typeof n=="function"&&(jb=a=>a.startsWith("on")?!Er(a):n(a))}try{iN(require("@emotion/is-prop-valid").default)}catch{}function lN(n,a,l){const o={};for(const u in n)u==="values"&&typeof n.values=="object"||ft(n[u])||(jb(u)||l===!0&&Er(u)||!a&&!Er(u)||n.draggable&&u.startsWith("onDrag"))&&(o[u]=n[u]);return o}const Ur=w.createContext({});function sN(n,a){if(_r(n)){const{initial:l,animate:o}=n;return{initial:l===!1||gs(l)?l:void 0,animate:gs(o)?o:void 0}}return n.inherit!==!1?a:{}}function oN(n){const{initial:a,animate:l}=sN(n,w.useContext(Ur));return w.useMemo(()=>({initial:a,animate:l}),[V0(a),V0(l)])}function V0(n){return Array.isArray(n)?n.join(" "):n}const th=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ab(n,a,l){for(const o in a)!ft(a[o])&&!ab(o,l)&&(n[o]=a[o])}function rN({transformTemplate:n},a){return w.useMemo(()=>{const l=th();return Id(l,a,n),Object.assign({},l.vars,l.style)},[a])}function uN(n,a){const l=n.style||{},o={};return Ab(o,l,n),Object.assign(o,rN(n,a)),o}function cN(n,a){const l={},o=uN(n,a);return n.drag&&n.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(l.tabIndex=0),l.style=o,l}const Nb=()=>({...th(),attrs:{}});function fN(n,a,l,o){const u=w.useMemo(()=>{const d=Nb();return ib(d,a,sb(o),n.transformTemplate,n.style),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};Ab(d,n.style,n),u.style={...d,...u.style}}return u}const dN=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function nh(n){return typeof n!="string"||n.includes("-")?!1:!!(dN.indexOf(n)>-1||/[A-Z]/u.test(n))}function hN(n,a,l,{latestValues:o},u,d=!1,f){const g=(f??nh(n)?fN:cN)(a,o,u,n),p=lN(a,typeof n=="string",d),y=n!==w.Fragment?{...p,...g,ref:l}:{},{children:x}=a,T=w.useMemo(()=>ft(x)?x.get():x,[x]);return w.createElement(n,{...y,children:T})}function mN({scrapeMotionValuesFromProps:n,createRenderState:a},l,o,u){return{latestValues:pN(l,o,u,n),renderState:a()}}function pN(n,a,l,o){const u={},d=o(n,{});for(const T in d)u[T]=rr(d[T]);let{initial:f,animate:h}=n;const g=_r(n),p=Zx(n);a&&p&&!g&&n.inherit!==!1&&(f===void 0&&(f=a.initial),h===void 0&&(h=a.animate));let y=l?l.initial===!1:!1;y=y||f===!1;const x=y?h:f;if(x&&typeof x!="boolean"&&!Vr(x)){const T=Array.isArray(x)?x:[x];for(let S=0;S<T.length;S++){const E=Xd(n,T[S]);if(E){const{transitionEnd:D,transition:M,...C}=E;for(const R in C){let _=C[R];if(Array.isArray(_)){const z=y?_.length-1:0;_=_[z]}_!==null&&(u[R]=_)}for(const R in D)u[R]=D[R]}}}return u}const Cb=n=>(a,l)=>{const o=w.useContext(Ur),u=w.useContext(Dd),d=()=>mN(n,a,o,u);return l?d():rE(d)},gN=Cb({scrapeMotionValuesFromProps:eh,createRenderState:th}),vN=Cb({scrapeMotionValuesFromProps:ob,createRenderState:Nb}),yN=Symbol.for("motionComponentSymbol");function xN(n,a,l){const o=w.useRef(l);w.useInsertionEffect(()=>{o.current=l});const u=w.useRef(null);return w.useCallback(d=>{var h;d&&((h=n.onMount)==null||h.call(n,d));const f=o.current;if(typeof f=="function")if(d){const g=f(d);typeof g=="function"&&(u.current=g)}else u.current?(u.current(),u.current=null):f(d);else f&&(f.current=d);a&&(d?a.mount(d):a.unmount())},[a])}const Mb=w.createContext({});function $i(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function bN(n,a,l,o,u,d){var _,z;const{visualElement:f}=w.useContext(Ur),h=w.useContext(wb),g=w.useContext(Dd),p=w.useContext(bb),y=p.reducedMotion,x=p.skipAnimations,T=w.useRef(null),S=w.useRef(!1);o=o||h.renderer,!T.current&&o&&(T.current=o(n,{visualState:a,parent:f,props:l,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:y,skipAnimations:x,isSVG:d}),S.current&&T.current&&(T.current.manuallyAnimateOnMount=!0));const E=T.current,D=w.useContext(Mb);E&&!E.projection&&u&&(E.type==="html"||E.type==="svg")&&SN(T.current,l,u,D);const M=w.useRef(!1);w.useInsertionEffect(()=>{E&&M.current&&E.update(l,g)});const C=l[kx],R=w.useRef(!!C&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,C))&&((z=window.MotionHasOptimisedAnimation)==null?void 0:z.call(window,C)));return Fy(()=>{S.current=!0,E&&(M.current=!0,window.MotionIsMounted=!0,E.updateFeatures(),E.scheduleRenderMicrotask(),R.current&&E.animationState&&E.animationState.animateChanges())}),w.useEffect(()=>{E&&(!R.current&&E.animationState&&E.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{var Y;(Y=window.MotionHandoffMarkAsComplete)==null||Y.call(window,C)}),R.current=!1),E.enteringChildren=void 0)}),E}function SN(n,a,l,o){const{layoutId:u,layout:d,drag:f,dragConstraints:h,layoutScroll:g,layoutRoot:p,layoutAnchor:y,layoutCrossfade:x}=a;n.projection=new l(n.latestValues,a["data-framer-portal-id"]?void 0:Db(n.parent)),n.projection.setOptions({layoutId:u,layout:d,alwaysMeasureLayout:!!f||h&&$i(h),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,crossfade:x,layoutScroll:g,layoutRoot:p,layoutAnchor:y})}function Db(n){if(n)return n.options.allowProjection!==!1?n.projection:Db(n.parent)}function Cf(n,{forwardMotionProps:a=!1,type:l}={},o,u){o&&nN(o);const d=l?l==="svg":nh(n),f=d?vN:gN;function h(p,y){let x;const T={...w.useContext(bb),...p,layoutId:TN(p)},{isStatic:S}=T,E=oN(p),D=f(p,S);if(!S&&typeof window<"u"){wN();const M=EN(T);x=M.MeasureLayout,E.visualElement=bN(n,D,T,u,M.ProjectionNode,d)}return m.jsxs(Ur.Provider,{value:E,children:[x&&E.visualElement?m.jsx(x,{visualElement:E.visualElement,...T}):null,hN(n,p,xN(D,E.visualElement,y),D,S,a,d)]})}h.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const g=w.forwardRef(h);return g[yN]=n,g}function TN({layoutId:n}){const a=w.useContext(pr).id;return a&&n!==void 0?a+"-"+n:n}function wN(n,a){w.useContext(wb).strict}function EN(n){const a=Eb(),{drag:l,layout:o}=a;if(!l&&!o)return{};const u={...l,...o};return{MeasureLayout:l!=null&&l.isEnabled(n)||o!=null&&o.isEnabled(n)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function jN(n,a){if(typeof Proxy>"u")return Cf;const l=new Map,o=(d,f)=>Cf(d,f,n,a),u=(d,f)=>o(d,f);return new Proxy(u,{get:(d,f)=>f==="create"?o:(l.has(f)||l.set(f,Cf(f,void 0,n,a)),l.get(f))})}const AN=(n,a)=>a.isSVG??nh(n)?new nA(a):new P5(a,{allowProjection:n!==w.Fragment});class NN extends Sa{constructor(a){super(a),a.animationState||(a.animationState=oA(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();Vr(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:l}=this.node.prevProps||{};a!==l&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let CN=0;class MN extends Sa{constructor(){super(...arguments),this.id=CN++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;if(a&&o===!1){if(this.isExitComplete){const{initial:f,custom:h}=this.node.getProps();if(typeof f=="string"){const g=Ja(this.node,f,h);if(g){const{transition:p,transitionEnd:y,...x}=g;for(const T in x)(d=this.node.getValue(T))==null||d.jump(x[T])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const u=this.node.animationState.setActive("exit",!a);l&&!a&&u.then(()=>{this.isExitComplete=!0,l(this.id)})}mount(){const{register:a,onExitComplete:l}=this.node.presenceContext||{};l&&l(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const DN={animation:{Feature:NN},exit:{Feature:MN}};function js(n){return{point:{x:n.pageX,y:n.pageY}}}const ON=n=>a=>Qd(a)&&n(a,js(a));function ds(n,a,l,o){return vs(n,a,ON(l),o)}const Ob=({current:n})=>n?n.ownerDocument.defaultView:null,_0=(n,a)=>Math.abs(n-a);function zN(n,a){const l=_0(n.x,a.x),o=_0(n.y,a.y);return Math.sqrt(l**2+o**2)}const U0=new Set(["auto","scroll"]);class zb{constructor(a,l,{transformPagePoint:o,contextWindow:u=window,dragSnapToOrigin:d=!1,distanceThreshold:f=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Wo(this.lastRawMoveEventInfo,this.transformPagePoint));const S=Mf(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,D=zN(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!D)return;const{point:M}=S,{timestamp:C}=ut;this.history.push({...M,timestamp:C});const{onStart:R,onMove:_}=this.handlers;E||(R&&R(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,S)},this.handlePointerMove=(S,E)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=Wo(E,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(S,E)=>{this.end();const{onEnd:D,onSessionEnd:M,resumeAnimation:C}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=Mf(S.type==="pointercancel"?this.lastMoveEventInfo:Wo(E,this.transformPagePoint),this.history);this.startEvent&&D&&D(S,R),M&&M(S,R)},!Qd(a))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=o,this.distanceThreshold=f,this.contextWindow=u||window;const g=js(a),p=Wo(g,this.transformPagePoint),{point:y}=p,{timestamp:x}=ut;this.history=[{...y,timestamp:x}];const{onSessionStart:T}=l;T&&T(a,Mf(p,this.history)),this.removeListeners=Ts(ds(this.contextWindow,"pointermove",this.handlePointerMove),ds(this.contextWindow,"pointerup",this.handlePointerUp),ds(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(a){let l=a.parentElement;for(;l;){const o=getComputedStyle(l);(U0.has(o.overflowX)||U0.has(o.overflowY))&&this.scrollPositions.set(l,{x:l.scrollLeft,y:l.scrollTop}),l=l.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(a){const l=this.scrollPositions.get(a);if(!l)return;const o=a===window,u=o?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},d={x:u.x-l.x,y:u.y-l.y};d.x===0&&d.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(a,u),Le.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ya(this.updatePoint)}}function Wo(n,a){return a?{point:a(n.point)}:n}function B0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Mf({point:n},a){return{point:n,delta:B0(n,Rb(a)),offset:B0(n,RN(a)),velocity:LN(a,.1)}}function RN(n){return n[0]}function Rb(n){return n[n.length-1]}function LN(n,a){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const u=Rb(n);for(;l>=0&&(o=n[l],!(u.timestamp-o.timestamp>Ut(a)));)l--;if(!o)return{x:0,y:0};o===n[0]&&n.length>2&&u.timestamp-o.timestamp>Ut(a)*2&&(o=n[1]);const d=Pt(u.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const f={x:(u.x-o.x)/d,y:(u.y-o.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function kN(n,{min:a,max:l},o){return a!==void 0&&n<a?n=o?Be(a,n,o.min):Math.max(n,a):l!==void 0&&n>l&&(n=o?Be(l,n,o.max):Math.min(n,l)),n}function H0(n,a,l){return{min:a!==void 0?n.min+a:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function VN(n,{top:a,left:l,bottom:o,right:u}){return{x:H0(n.x,l,u),y:H0(n.y,a,o)}}function $0(n,a){let l=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function _N(n,a){return{x:$0(n.x,a.x),y:$0(n.y,a.y)}}function UN(n,a){let l=.5;const o=vt(n),u=vt(a);return u>o?l=ms(a.min,a.max-o,n.min):o>u&&(l=ms(n.min,n.max-u,a.min)),pn(0,1,l)}function BN(n,a){const l={};return a.min!==void 0&&(l.min=a.min-n.min),a.max!==void 0&&(l.max=a.max-n.min),l}const yd=.35;function HN(n=yd){return n===!1?n=0:n===!0&&(n=yd),{x:q0(n,"left","right"),y:q0(n,"top","bottom")}}function q0(n,a,l){return{min:G0(n,a),max:G0(n,l)}}function G0(n,a){return typeof n=="number"?n:n[a]||0}const $N=new WeakMap;class qN{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=tt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:l=!1,distanceThreshold:o}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const d=x=>{l&&this.snapToCursor(js(x).point),this.stopAnimation()},f=(x,T)=>{const{drag:S,dragPropagation:E,onDragStart:D}=this.getProps();if(S&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p5(S),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=T,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fn(C=>{let R=this.getAxisMotionValue(C).get()||0;if(mn.test(R)){const{projection:_}=this.visualElement;if(_&&_.layout){const z=_.layout.layoutBox[C];z&&(R=vt(z)*(parseFloat(R)/100))}}this.originPoint[C]=R}),D&&Le.update(()=>D(x,T),!1,!0),ud(this.visualElement,"transform");const{animationState:M}=this.visualElement;M&&M.setActive("whileDrag",!0)},h=(x,T)=>{this.latestPointerEvent=x,this.latestPanInfo=T;const{dragPropagation:S,dragDirectionLock:E,onDirectionLock:D,onDrag:M}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:C}=T;if(E&&this.currentDirection===null){this.currentDirection=YN(C),this.currentDirection!==null&&D&&D(this.currentDirection);return}this.updateAxis("x",T.point,C),this.updateAxis("y",T.point,C),this.visualElement.render(),M&&Le.update(()=>M(x,T),!1,!0)},g=(x,T)=>{this.latestPointerEvent=x,this.latestPanInfo=T,this.stop(x,T),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new zb(a,{onSessionStart:d,onStart:f,onMove:h,onSessionEnd:g,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:o,contextWindow:Ob(this.visualElement),element:this.visualElement.current})}stop(a,l){const o=a||this.latestPointerEvent,u=l||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!u||!o)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:h}=this.getProps();h&&Le.postRender(()=>h(o,u))}cancel(){this.isDragging=!1;const{projection:a,animationState:l}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,l,o){const{drag:u}=this.getProps();if(!o||!Io(a,u,this.currentDirection))return;const d=this.getAxisMotionValue(a);let f=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(f=kN(f,this.constraints[a],this.elastic[a])),d.set(f)}resolveConstraints(){var d;const{dragConstraints:a,dragElastic:l}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(d=this.visualElement.projection)==null?void 0:d.layout,u=this.constraints;a&&$i(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&o?this.constraints=VN(o.layoutBox,a):this.constraints=!1,this.elastic=HN(l),u!==this.constraints&&!$i(a)&&o&&this.constraints&&!this.hasMutatedConstraints&&fn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=BN(o.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:l}=this.getProps();if(!a||!$i(a))return!1;const o=a.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const d=Y5(o,u.root,this.visualElement.getTransformPagePoint());let f=_N(u.layout.layoutBox,d);if(l){const h=l($5(f));this.hasMutatedConstraints=!!h,h&&(f=Wx(h))}return f}startAnimation(a){const{drag:l,dragMomentum:o,dragElastic:u,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:h}=this.getProps(),g=this.constraints||{},p=fn(y=>{if(!Io(y,l,this.currentDirection))return;let x=g&&g[y]||{};(f===!0||f===y)&&(x={min:0,max:0});const T=u?200:1e6,S=u?40:1e7,E={type:"inertia",velocity:o?a[y]:0,bounceStiffness:T,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...d,...x};return this.startAxisValueAnimation(y,E)});return Promise.all(p).then(h)}startAxisValueAnimation(a,l){const o=this.getAxisMotionValue(a);return ud(this.visualElement,a),o.start(Yd(a,o,0,l,this.visualElement,!1))}stopAnimation(){fn(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const l=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),u=o[l];return u||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){fn(l=>{const{drag:o}=this.getProps();if(!Io(l,o,this.currentDirection))return;const{projection:u}=this.visualElement,d=this.getAxisMotionValue(l);if(u&&u.layout){const{min:f,max:h}=u.layout.layoutBox[l],g=d.get()||0;d.set(a[l]-Be(f,h,.5)+g)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!$i(l)||!o||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};fn(f=>{const h=this.getAxisMotionValue(f);if(h&&this.constraints!==!1){const g=h.get();u[f]=UN({min:g,max:g},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(f=>{if(!Io(f,a,null))return;const h=this.getAxisMotionValue(f),{min:g,max:p}=this.constraints[f];h.set(Be(g,p,u[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;$N.set(this.visualElement,this);const a=this.visualElement.current,l=ds(a,"pointerdown",p=>{const{drag:y,dragListener:x=!0}=this.getProps(),T=p.target,S=T!==a&&S5(T);y&&x&&!S&&this.start(p)});let o;const u=()=>{const{dragConstraints:p}=this.getProps();$i(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),o||(o=GN(a,p.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,f=d.addEventListener("measure",u);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),Le.read(u);const h=vs(window,"resize",()=>this.scalePositionWithinConstraints()),g=d.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:y})=>{this.isDragging&&y&&(fn(x=>{const T=this.getAxisMotionValue(x);T&&(this.originPoint[x]+=p[x].translate,T.set(T.get()+p[x].translate))}),this.visualElement.render())}));return()=>{h(),l(),f(),g&&g(),o&&o()}}getProps(){const a=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:d=!1,dragElastic:f=yd,dragMomentum:h=!0}=a;return{...a,drag:l,dragDirectionLock:o,dragPropagation:u,dragConstraints:d,dragElastic:f,dragMomentum:h}}}function Y0(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function GN(n,a,l){const o=Wv(n,Y0(l)),u=Wv(a,Y0(l));return()=>{o(),u()}}function Io(n,a,l){return(a===!0||a===n)&&(l===null||l===n)}function YN(n,a=10){let l=null;return Math.abs(n.y)>a?l="y":Math.abs(n.x)>a&&(l="x"),l}class XN extends Sa{constructor(a){super(a),this.removeGroupControls=Jt,this.removeListeners=Jt,this.controls=new qN(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jt}update(){const{dragControls:a}=this.node.getProps(),{dragControls:l}=this.node.prevProps||{};a!==l&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Df=n=>(a,l)=>{n&&Le.update(()=>n(a,l),!1,!0)};class KN extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Jt}onPointerDown(a){this.session=new zb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ob(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:l,onPan:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:Df(a),onStart:Df(l),onMove:Df(o),onEnd:(d,f)=>{delete this.session,u&&Le.postRender(()=>u(d,f))}}}mount(){this.removePointerDownListener=ds(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Of=!1;class FN extends w.Component{componentDidMount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o,layoutId:u}=this.props,{projection:d}=a;d&&(l.group&&l.group.add(d),o&&o.register&&u&&o.register(d),Of&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ur.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:l,visualElement:o,drag:u,isPresent:d}=this.props,{projection:f}=o;return f&&(f.isPresent=d,a.layoutDependency!==l&&f.setOptions({...f.options,layoutDependency:l}),Of=!0,u||a.layoutDependency!==l||l===void 0||a.isPresent!==d?f.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?f.promote():f.relegate()||Le.postRender(()=>{const h=f.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:l}=this.props,{projection:o}=a;o&&(o.options.layoutAnchor=l,o.root.didUpdate(),Zd.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:u}=a;Of=!0,u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function Lb(n){const[a,l]=PA(),o=w.useContext(pr);return m.jsx(FN,{...n,layoutGroup:o,switchLayoutGroup:w.useContext(Mb),isPresent:a,safeToRemove:l})}const ZN={pan:{Feature:KN},drag:{Feature:XN,ProjectionNode:xb,MeasureLayout:Lb}};function X0(n,a,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,d=o[u];d&&Le.postRender(()=>d(a,js(a)))}class QN extends Sa{mount(){const{current:a}=this.node;a&&(this.unmount=v5(a,(l,o)=>(X0(this.node,o,"Start"),u=>X0(this.node,u,"End"))))}unmount(){}}class PN extends Sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ts(vs(this.node.current,"focus",()=>this.onFocus()),vs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function K0(n,a,l){const{props:o}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),d=o[u];d&&Le.postRender(()=>d(a,js(a)))}class JN extends Sa{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:l,propagate:o}=this.node.props;this.unmount=w5(a,(u,d)=>(K0(this.node,d,"Start"),(f,{success:h})=>K0(this.node,f,h?"End":"Cancel")),{useGlobalTarget:l,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const xd=new WeakMap,zf=new WeakMap,WN=n=>{const a=xd.get(n.target);a&&a(n)},IN=n=>{n.forEach(WN)};function e3({root:n,...a}){const l=n||document;zf.has(l)||zf.set(l,{});const o=zf.get(l),u=JSON.stringify(a);return o[u]||(o[u]=new IntersectionObserver(IN,{root:n,...a})),o[u]}function t3(n,a,l){const o=e3(a);return xd.set(n,l),o.observe(n),()=>{xd.delete(n),o.unobserve(n)}}const n3={some:0,all:1};class a3 extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var g;(g=this.stopObserver)==null||g.call(this);const{viewport:a={}}=this.node.getProps(),{root:l,margin:o,amount:u="some",once:d}=a,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:n3[u]},h=p=>{const{isIntersecting:y}=p;if(this.isInView===y||(this.isInView=y,d&&!y&&this.hasEnteredView))return;y&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",y);const{onViewportEnter:x,onViewportLeave:T}=this.node.getProps(),S=y?x:T;S&&S(p)};this.stopObserver=t3(this.node.current,f,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:l}=this.node;["amount","margin","root"].some(i3(a,l))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function i3({viewport:n={}},{viewport:a={}}={}){return l=>n[l]!==a[l]}const l3={inView:{Feature:a3},tap:{Feature:JN},focus:{Feature:PN},hover:{Feature:QN}},s3={layout:{ProjectionNode:xb,MeasureLayout:Lb}},o3={...DN,...l3,...ZN,...s3},kb=jN(o3,AN),Br=w.forwardRef(function(a,l){return m.jsx(E2,{children:m.jsx("a",{...a,ref:l})})}),Wl={base:["relative isolate inline-flex items-baseline justify-center gap-x-2 rounded-lg border text-base/6 font-semibold","px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)] sm:text-sm/6","focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500","data-disabled:opacity-50","*:data-[slot=icon]:-mx-0.5 *:data-[slot=icon]:my-0.5 *:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:self-center *:data-[slot=icon]:text-(--btn-icon) sm:*:data-[slot=icon]:my-1 sm:*:data-[slot=icon]:size-4 forced-colors:[--btn-icon:ButtonText] forced-colors:data-hover:[--btn-icon:ButtonText]"],solid:["border-transparent bg-(--btn-border)","dark:bg-(--btn-bg)","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(var(--radius-lg)-1px)] before:bg-(--btn-bg)","before:shadow-sm","dark:before:hidden","dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(var(--radius-lg)-1px)]","after:shadow-[inset_0_1px_--theme(--color-white/15%)]","data-active:after:bg-(--btn-hover-overlay) data-hover:after:bg-(--btn-hover-overlay)","dark:after:-inset-px dark:after:rounded-lg","data-disabled:before:shadow-none data-disabled:after:shadow-none"],outline:["border-zinc-950/10 text-zinc-950 data-active:bg-zinc-950/2.5 data-hover:bg-zinc-950/2.5","dark:border-white/15 dark:text-white dark:[--btn-bg:transparent] dark:data-active:bg-white/5 dark:data-hover:bg-white/5","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],plain:["border-transparent text-zinc-950 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","dark:text-white dark:data-active:bg-white/10 dark:data-hover:bg-white/10","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],colors:{"dark/zinc":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-white dark:[--btn-bg:var(--color-zinc-600)] dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],light:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:text-white dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],"dark/white":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-zinc-950 dark:[--btn-bg:white] dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],dark:["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],white:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-500)] data-hover:[--btn-icon:var(--color-zinc-500)]"],zinc:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-zinc-600)] [--btn-border:var(--color-zinc-700)]/90","dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],indigo:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-indigo-500)] [--btn-border:var(--color-indigo-600)]/90","[--btn-icon:var(--color-indigo-300)] data-active:[--btn-icon:var(--color-indigo-200)] data-hover:[--btn-icon:var(--color-indigo-200)]"],cyan:["text-cyan-950 [--btn-bg:var(--color-cyan-300)] [--btn-border:var(--color-cyan-400)]/80 [--btn-hover-overlay:var(--color-white)]/25","[--btn-icon:var(--color-cyan-500)]"],red:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-red-600)] [--btn-border:var(--color-red-700)]/90","[--btn-icon:var(--color-red-300)] data-active:[--btn-icon:var(--color-red-200)] data-hover:[--btn-icon:var(--color-red-200)]"],orange:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-orange-500)] [--btn-border:var(--color-orange-600)]/90","[--btn-icon:var(--color-orange-300)] data-active:[--btn-icon:var(--color-orange-200)] data-hover:[--btn-icon:var(--color-orange-200)]"],amber:["text-amber-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-amber-400)] [--btn-border:var(--color-amber-500)]/80","[--btn-icon:var(--color-amber-600)]"],yellow:["text-yellow-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-yellow-300)] [--btn-border:var(--color-yellow-400)]/80","[--btn-icon:var(--color-yellow-600)] data-active:[--btn-icon:var(--color-yellow-700)] data-hover:[--btn-icon:var(--color-yellow-700)]"],lime:["text-lime-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-lime-300)] [--btn-border:var(--color-lime-400)]/80","[--btn-icon:var(--color-lime-600)] data-active:[--btn-icon:var(--color-lime-700)] data-hover:[--btn-icon:var(--color-lime-700)]"],green:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-green-600)] [--btn-border:var(--color-green-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],emerald:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-emerald-600)] [--btn-border:var(--color-emerald-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],teal:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-teal-600)] [--btn-border:var(--color-teal-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],sky:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-sky-500)] [--btn-border:var(--color-sky-600)]/80","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],blue:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-blue-600)] [--btn-border:var(--color-blue-700)]/90","[--btn-icon:var(--color-blue-400)] data-active:[--btn-icon:var(--color-blue-300)] data-hover:[--btn-icon:var(--color-blue-300)]"],violet:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-violet-500)] [--btn-border:var(--color-violet-600)]/90","[--btn-icon:var(--color-violet-300)] data-active:[--btn-icon:var(--color-violet-200)] data-hover:[--btn-icon:var(--color-violet-200)]"],purple:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-purple-500)] [--btn-border:var(--color-purple-600)]/90","[--btn-icon:var(--color-purple-300)] data-active:[--btn-icon:var(--color-purple-200)] data-hover:[--btn-icon:var(--color-purple-200)]"],fuchsia:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-fuchsia-500)] [--btn-border:var(--color-fuchsia-600)]/90","[--btn-icon:var(--color-fuchsia-300)] data-active:[--btn-icon:var(--color-fuchsia-200)] data-hover:[--btn-icon:var(--color-fuchsia-200)]"],pink:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-pink-500)] [--btn-border:var(--color-pink-600)]/90","[--btn-icon:var(--color-pink-300)] data-active:[--btn-icon:var(--color-pink-200)] data-hover:[--btn-icon:var(--color-pink-200)]"],rose:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-rose-500)] [--btn-border:var(--color-rose-600)]/90","[--btn-icon:var(--color-rose-300)] data-active:[--btn-icon:var(--color-rose-200)] data-hover:[--btn-icon:var(--color-rose-200)]"]}};w.forwardRef(function({color:a,outline:l,plain:o,className:u,children:d,...f},h){let g=Fe(u,Wl.base,l?Wl.outline:o?Wl.plain:Fe(Wl.solid,Wl.colors[a??"dark/zinc"]));return typeof f.href=="string"?m.jsx(Br,{...f,className:g,ref:h,children:m.jsx(xa,{children:d})}):m.jsx(bs,{...f,className:Fe(g,"cursor-default"),ref:h,children:m.jsx(xa,{children:d})})});function xa({children:n}){return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"absolute top-1/2 left-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 pointer-fine:hidden","aria-hidden":"true"}),n]})}function r3({className:n,...a}){return m.jsx("nav",{...a,className:Fe(n,"flex flex-1 items-center gap-4 py-2.5")})}function u3({className:n,...a}){let l=w.useId();return m.jsx(Tb,{id:l,children:m.jsx("div",{...a,className:Fe(n,"flex items-center gap-3")})})}function c3({className:n,...a}){return m.jsx("div",{"aria-hidden":"true",...a,className:Fe(n,"-ml-4 flex-1")})}const ah=w.forwardRef(function({current:a,className:l,children:o,...u},d){let f=Fe("relative flex min-w-0 items-center gap-3 rounded-lg p-2 text-left text-base/6 font-medium text-zinc-950 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:not-nth-2:last:data-[slot=icon]:ml-auto *:not-nth-2:last:data-[slot=icon]:size-5 sm:*:not-nth-2:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 *:data-[slot=avatar]:[--avatar-radius:var(--radius-md)] sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white");return m.jsxs("span",{className:Fe(l,"relative"),children:[a&&m.jsx(kb.span,{layoutId:"current-indicator",className:"absolute inset-x-2 -bottom-2.5 h-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?m.jsx(Br,{...u,className:f,"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})}):m.jsx(bs,{...u,className:Fe("cursor-default",f),"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})})]})});function f3(){return m.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:m.jsx("path",{d:"M2 6.75C2 6.33579 2.33579 6 2.75 6H17.25C17.6642 6 18 6.33579 18 6.75C18 7.16421 17.6642 7.5 17.25 7.5H2.75C2.33579 7.5 2 7.16421 2 6.75ZM2 13.25C2 12.8358 2.33579 12.5 2.75 12.5H17.25C17.6642 12.5 18 12.8358 18 13.25C18 13.6642 17.6642 14 17.25 14H2.75C2.33579 14 2 13.6642 2 13.25Z"})})}function d3(){return m.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:m.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})})}function h3({open:n,close:a,children:l}){return m.jsxs(oE,{open:n,onClose:a,className:"lg:hidden",children:[m.jsx(lE,{transition:!0,className:"fixed inset-0 bg-black/30 transition data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in"}),m.jsx(Ky,{transition:!0,className:"fixed inset-y-0 w-full max-w-80 p-2 transition duration-300 ease-in-out data-closed:-translate-x-full",children:m.jsxs("div",{className:"flex h-full flex-col rounded-lg bg-ouro-deep shadow-xl ring-1 ring-ouro-moss/40",children:[m.jsx("div",{className:"-mb-3 px-4 pt-3",children:m.jsx(Sy,{as:ah,"aria-label":"Close navigation",children:m.jsx(d3,{})})}),l]})})]})}function m3({navbar:n,sidebar:a,children:l}){let[o,u]=w.useState(!1);return m.jsxs("div",{className:"relative isolate flex min-h-svh w-full bg-ouro-void max-lg:flex-col",children:[m.jsx("div",{className:"fixed inset-y-0 left-0 w-64 max-lg:hidden border-r border-zinc-200 dark:border-ouro-moss/30",children:a}),m.jsx(h3,{open:o,close:()=>u(!1),children:a}),m.jsxs("header",{className:"flex items-center px-4 lg:hidden",children:[m.jsx("div",{className:"py-2.5",children:m.jsx(ah,{onClick:()=>u(!0),"aria-label":"Open navigation",children:m.jsx(f3,{})})}),m.jsx("div",{className:"min-w-0 flex-1",children:n})]}),m.jsx("main",{className:"flex flex-1 flex-col lg:min-w-0 lg:pl-64",children:m.jsx("div",{className:"grow bg-ouro-deep p-4 lg:p-8",children:m.jsx("div",{className:"mx-auto max-w-6xl",children:l})})})]})}function p3({className:n,...a}){return m.jsx("nav",{...a,className:Fe(n,"flex h-full min-h-0 flex-col")})}function g3({className:n,...a}){return m.jsx("div",{...a,className:Fe(n,"flex flex-col border-b border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function v3({className:n,...a}){return m.jsx("div",{...a,className:Fe(n,"flex flex-1 flex-col overflow-y-auto p-4 [&>[data-slot=section]+[data-slot=section]]:mt-8")})}function y3({className:n,...a}){return m.jsx("div",{...a,className:Fe(n,"flex flex-col border-t border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function F0({className:n,...a}){let l=w.useId();return m.jsx(Tb,{id:l,children:m.jsx("div",{...a,"data-slot":"section",className:Fe(n,"flex flex-col gap-0.5")})})}function Z0({className:n,...a}){return m.jsx("h3",{...a,className:Fe(n,"mb-1 px-2 text-xs/6 font-medium text-zinc-500 dark:text-zinc-400")})}const x3=w.forwardRef(function({current:a,className:l,children:o,...u},d){let f=Fe("flex w-full items-center gap-3 rounded-lg px-2 py-2.5 text-left text-base/6 font-medium text-zinc-950 sm:py-2 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:last:data-[slot=icon]:ml-auto *:last:data-[slot=icon]:size-5 sm:*:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","data-current:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white","dark:data-current:*:data-[slot=icon]:fill-white");return m.jsxs("span",{className:Fe(l,"relative"),children:[a&&m.jsx(kb.span,{layoutId:"current-indicator",className:"absolute inset-y-2 -left-4 w-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?m.jsx(Sy,{as:Br,...u,className:f,"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})}):m.jsx(bs,{...u,className:Fe("cursor-default",f),"data-current":a?"true":void 0,ref:d,children:m.jsx(xa,{children:o})})]})});function b3({className:n,...a}){return m.jsx("span",{...a,className:Fe(n,"truncate")})}const S3={red:"bg-red-500/15 text-red-700 group-data-hover:bg-red-500/25 dark:bg-red-500/10 dark:text-red-400 dark:group-data-hover:bg-red-500/20",orange:"bg-orange-500/15 text-orange-700 group-data-hover:bg-orange-500/25 dark:bg-orange-500/10 dark:text-orange-400 dark:group-data-hover:bg-orange-500/20",amber:"bg-amber-400/20 text-amber-700 group-data-hover:bg-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400 dark:group-data-hover:bg-amber-400/15",yellow:"bg-yellow-400/20 text-yellow-700 group-data-hover:bg-yellow-400/30 dark:bg-yellow-400/10 dark:text-yellow-300 dark:group-data-hover:bg-yellow-400/15",lime:"bg-lime-400/20 text-lime-700 group-data-hover:bg-lime-400/30 dark:bg-lime-400/10 dark:text-lime-300 dark:group-data-hover:bg-lime-400/15",green:"bg-green-500/15 text-green-700 group-data-hover:bg-green-500/25 dark:bg-green-500/10 dark:text-green-400 dark:group-data-hover:bg-green-500/20",emerald:"bg-emerald-500/15 text-emerald-700 group-data-hover:bg-emerald-500/25 dark:bg-emerald-500/10 dark:text-emerald-400 dark:group-data-hover:bg-emerald-500/20",teal:"bg-teal-500/15 text-teal-700 group-data-hover:bg-teal-500/25 dark:bg-teal-500/10 dark:text-teal-300 dark:group-data-hover:bg-teal-500/20",cyan:"bg-cyan-400/20 text-cyan-700 group-data-hover:bg-cyan-400/30 dark:bg-cyan-400/10 dark:text-cyan-300 dark:group-data-hover:bg-cyan-400/15",sky:"bg-sky-500/15 text-sky-700 group-data-hover:bg-sky-500/25 dark:bg-sky-500/10 dark:text-sky-300 dark:group-data-hover:bg-sky-500/20",blue:"bg-blue-500/15 text-blue-700 group-data-hover:bg-blue-500/25 dark:text-blue-400 dark:group-data-hover:bg-blue-500/25",indigo:"bg-indigo-500/15 text-indigo-700 group-data-hover:bg-indigo-500/25 dark:text-indigo-400 dark:group-data-hover:bg-indigo-500/20",violet:"bg-violet-500/15 text-violet-700 group-data-hover:bg-violet-500/25 dark:text-violet-400 dark:group-data-hover:bg-violet-500/20",purple:"bg-purple-500/15 text-purple-700 group-data-hover:bg-purple-500/25 dark:text-purple-400 dark:group-data-hover:bg-purple-500/20",fuchsia:"bg-fuchsia-400/15 text-fuchsia-700 group-data-hover:bg-fuchsia-400/25 dark:bg-fuchsia-400/10 dark:text-fuchsia-400 dark:group-data-hover:bg-fuchsia-400/20",pink:"bg-pink-400/15 text-pink-700 group-data-hover:bg-pink-400/25 dark:bg-pink-400/10 dark:text-pink-400 dark:group-data-hover:bg-pink-400/20",rose:"bg-rose-400/15 text-rose-700 group-data-hover:bg-rose-400/25 dark:bg-rose-400/10 dark:text-rose-400 dark:group-data-hover:bg-rose-400/20",zinc:"bg-zinc-600/10 text-zinc-700 group-data-hover:bg-zinc-600/20 dark:bg-white/5 dark:text-zinc-400 dark:group-data-hover:bg-white/10"};function Se({color:n="zinc",className:a,...l}){return m.jsx("span",{...l,className:Fe(a,"inline-flex items-center gap-x-1.5 rounded-md px-1.5 py-0.5 text-sm/5 font-medium sm:text-xs/5 forced-colors:outline",S3[n])})}w.forwardRef(function({color:a="zinc",className:l,children:o,...u},d){let f=Fe(l,"group relative inline-flex rounded-md focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500");return typeof u.href=="string"?m.jsx(Br,{...u,className:f,ref:d,children:m.jsx(xa,{children:m.jsx(Se,{color:a,children:o})})}):m.jsx(bs,{...u,className:f,ref:d,children:m.jsx(xa,{children:m.jsx(Se,{color:a,children:o})})})});function T3(n){w.useEffect(()=>{if(!n)return;function a(l){if(!(l.target instanceof HTMLInputElement||l.target instanceof HTMLTextAreaElement))switch(l.key){case"1":n({tab:"overview"});break;case"2":n({tab:"sessions"});break;case"3":n({tab:"work"});break;case"4":n({tab:"connections"});break;case"5":n({tab:"inner"});break;case"6":n({tab:"memory"});break;case"7":n({tab:"runtime"});break;case"Escape":{document.activeElement instanceof HTMLElement&&document.activeElement.blur();break}}}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n])}const w3={"owed-reply":"red","blocking-obligation":"red","broken-return":"red","stale-delegation":"yellow","return-ready":"lime","overdue-habit":"yellow"},E3={"owed-reply":"owed reply","blocking-obligation":"blocking","broken-return":"broken return","stale-delegation":"stale","return-ready":"ready to return","overdue-habit":"overdue"},j3={"owed-reply":"Someone spoke last and is waiting for your response","blocking-obligation":"This obligation is open and blocking forward progress","broken-return":"Work was done but the result was never returned to the requester","stale-delegation":"This was delegated to you and hasn't been addressed","return-ready":"The result is ready — deliver it to close the loop","overdue-habit":"This routine is past its scheduled cadence"},A3=new Set(["stale-delegation"]),N3=new Set(["owed-reply","blocking-obligation","broken-return","return-ready","overdue-habit"]);function C3({view:n,deskPrefs:a}){const l=Pi(),[o,u]=w.useState(null),[d,f]=w.useState(null),[h,g]=w.useState(null),[p,y]=w.useState(null),[x,T]=w.useState(null),S=n.agent,E=n.work,D=n.inner,M=n.activity,C=S.degraded,R=S.attention,_=E.tasks,z=E.obligations,Y=E.sessions,I=E.coding,Z=S.senses??[],J=E.bridges??[];return w.useEffect(()=>{$e(`/agents/${encodeURIComponent(S.agentName)}/needs-me`).then(u),$e(`/agents/${encodeURIComponent(S.agentName)}/coding`).then(f),$e(`/agents/${encodeURIComponent(S.agentName)}/continuity`).then(g).catch(()=>{}),$e(`/agents/${encodeURIComponent(S.agentName)}/orientation`).then(y).catch(()=>{}),$e(`/agents/${encodeURIComponent(S.agentName)}/changes`).then(T).catch(()=>{})},[S.agentName]),m.jsxs("div",{className:"space-y-6",children:[o&&o.items.length>0&&(()=>{const F=o.items.filter(te=>N3.has(te.urgency)),K=o.items.filter(te=>A3.has(te.urgency));return m.jsxs("div",{className:"space-y-3",children:[F.length>0&&m.jsxs("div",{className:"rounded-xl bg-ouro-fang/5 p-4 ring-1 ring-ouro-fang/15",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-fang",children:["Action now (",F.length,")"]}),m.jsx("div",{className:"mt-2 space-y-1.5",children:F.map((te,ie)=>m.jsx(Q0,{item:te,nav:l,agentName:S.agentName,onDismiss:()=>{u(Te=>Te&&{items:Te.items.filter((Ae,Ne)=>o.items.indexOf(te)!==Ne)})}},`action-${ie}`))})]}),K.length>0&&m.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["Stale (",K.length,")"]}),m.jsx("button",{onClick:async()=>{var te;for(const ie of K)(te=ie.ref)!=null&&te.focus&&await fetch(`/api/agents/${encodeURIComponent(S.agentName)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:ie.ref.focus})});$e(`/agents/${encodeURIComponent(S.agentName)}/needs-me`).then(u)},className:"text-xs text-ouro-gold underline underline-offset-2 hover:text-ouro-bone transition-colors",children:"Clear all stale"})]}),m.jsx("div",{className:"mt-2 space-y-1.5",children:K.map((te,ie)=>m.jsx(Q0,{item:te,nav:l,agentName:S.agentName,onDismiss:()=>{$e(`/agents/${encodeURIComponent(S.agentName)}/needs-me`).then(u)}},`stale-${ie}`))})]})]})})(),(a==null?void 0:a.carrying)&&m.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"What I'm carrying"}),m.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-bone",children:a.carrying})]}),(()=>{const F=(a==null?void 0:a.pinnedConstellations)??[];return F.length===0?null:m.jsxs("div",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Pinned threads"}),m.jsx("div",{className:"mt-2 space-y-2",children:F.map((K,te)=>m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-medium text-ouro-bone",children:K.label}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-1.5",children:[(K.friendIds??[]).map(ie=>m.jsxs("button",{onClick:()=>l({tab:"sessions"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["friend:",ie.slice(0,8),"…"]},ie)),(K.taskRefs??[]).map(ie=>m.jsxs("button",{onClick:()=>l({tab:"work"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["task:",ie]},ie)),(K.bridgeIds??[]).map(ie=>m.jsxs("button",{onClick:()=>l({tab:"connections",focus:ie}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["bridge:",ie.slice(0,8),"…"]},ie))]})]},te))})]})})(),m.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10 sm:p-5",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Center of gravity"}),m.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone sm:text-2xl",children:R.label}),m.jsxs("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:[S.agentName," has"," ",m.jsxs(er,{tab:"work",children:[_.liveCount," live tasks"]}),","," ",m.jsxs(er,{tab:"work",children:[z.openCount," obligations"]}),","," ",m.jsxs(er,{tab:"work",children:[I.activeCount," coding lanes"]}),", and"," ",m.jsxs(er,{tab:"sessions",children:[Y.liveCount," live sessions"]}),"."]}),C.status==="degraded"&&C.issues.length>0&&m.jsxs("div",{className:"mt-3 space-y-1",children:[C.issues.slice(0,5).map((F,K)=>m.jsxs("button",{onClick:()=>l({tab:"runtime"}),className:"flex w-full items-start gap-2 rounded-lg bg-ouro-fang/5 px-3 py-2 text-left text-sm ring-1 ring-ouro-fang/10 hover:ring-ouro-fang/25 transition-colors",children:[m.jsx("span",{className:"mt-0.5 h-2 w-2 shrink-0 rounded-full bg-ouro-fang"}),m.jsxs("span",{className:"text-ouro-mist",children:[m.jsx("span",{className:"font-semibold text-ouro-fang",children:F.code}),m.jsxs("span",{className:"text-ouro-shadow",children:[" — ",jt(F.detail,80)]})]})]},K)),C.issues.length>5&&m.jsxs("button",{onClick:()=>l({tab:"runtime"}),className:"text-xs text-ouro-glow underline underline-offset-2",children:["+",C.issues.length-5," more issues"]})]})]}),p&&m.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Orientation"}),p.currentSession&&m.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[m.jsx(Se,{color:"lime",children:"active session"}),m.jsxs("button",{onClick:()=>l({tab:"sessions",focus:`${p.currentSession.friendId}/${p.currentSession.channel}/${p.currentSession.key}`}),className:"text-sm text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:[p.currentSession.channel,"/",p.currentSession.key]}),p.currentSession.lastActivityAt&&m.jsx("span",{className:"text-xs text-ouro-shadow",children:ct(p.currentSession.lastActivityAt)})]}),p.primaryObligation&&m.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:"yellow",children:p.primaryObligation.status}),m.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:jt(p.primaryObligation.content,80)})]}),p.primaryObligation.nextAction&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-mist",children:["Next: ",p.primaryObligation.nextAction]}),p.primaryObligation.waitingOn&&m.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Waiting on: ",p.primaryObligation.waitingOn]})]}),p.resumeHandle&&m.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Resume handle"}),m.jsxs("div",{className:"mt-1 space-y-0.5 text-sm",children:[p.resumeHandle.lane&&m.jsxs("p",{className:"text-ouro-bone",children:["Lane: ",p.resumeHandle.lane]}),p.resumeHandle.artifact&&m.jsxs("p",{className:"text-ouro-mist",children:["Artifact: ",p.resumeHandle.artifact]}),p.resumeHandle.nextAction&&m.jsxs("p",{className:"text-ouro-mist",children:["Next: ",p.resumeHandle.nextAction]}),p.resumeHandle.blockerOrWaitingOn&&m.jsxs("p",{className:"text-ouro-shadow",children:["Blocked: ",p.resumeHandle.blockerOrWaitingOn]}),m.jsxs(Se,{color:p.resumeHandle.confidence==="high"?"lime":p.resumeHandle.confidence==="medium"?"yellow":"zinc",children:[p.resumeHandle.confidence," confidence"]})]})]}),p.otherActiveSessions.length>0&&m.jsxs("div",{className:"mt-2",children:[m.jsxs("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:["Other sessions (",p.otherActiveSessions.length,")"]}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:p.otherActiveSessions.slice(0,5).map(F=>m.jsx("button",{onClick:()=>l({tab:"sessions",focus:`${F.friendId}/${F.channel}/${F.key}`}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:F.friendName},`${F.friendId}/${F.channel}/${F.key}`))})]})]}),x&&x.changeCount>0&&m.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["What changed (",x.changeCount,")"]}),x.snapshotAge&&m.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Since ",ct(x.snapshotAge)]}),m.jsxs("div",{className:"mt-2 space-y-1",children:[x.items.slice(0,8).map((F,K)=>m.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.jsx(Se,{color:F.kind.includes("status")?"yellow":"zinc",children:F.kind.replace(/_/g," ")}),m.jsx("span",{className:"truncate text-ouro-mist",children:F.summary})]},K)),x.items.length>8&&m.jsxs("p",{className:"text-xs text-ouro-shadow",children:["+",x.items.length-8," more changes"]})]})]}),h&&m.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[m.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Presence"}),h.presence.self?m.jsxs("div",{className:"mt-2 space-y-1",children:[m.jsx("p",{className:"text-sm font-medium text-ouro-bone",children:h.presence.self.availability}),h.presence.self.lane&&m.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Lane: ",h.presence.self.lane]}),h.presence.self.tempo&&m.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Tempo: ",h.presence.self.tempo]})]}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No presence data"}),h.presence.peers.length>0&&m.jsxs("div",{className:"mt-2 border-t border-ouro-moss/20 pt-2",children:[m.jsx("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:"Peers"}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:h.presence.peers.map(F=>m.jsx(Se,{color:F.availability==="active"?"lime":"zinc",children:F.agentName},F.agentName))})]})]}),m.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Cares (",h.cares.activeCount,")"]}),h.cares.items.length>0?m.jsx("div",{className:"mt-2 space-y-1.5",children:h.cares.items.slice(0,5).map(F=>m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:F.salience==="high"?"red":F.salience==="medium"?"yellow":"zinc",children:F.salience}),m.jsx("p",{className:"truncate text-sm text-ouro-bone",children:F.label})]},F.id))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No active cares"})]}),m.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Episodes (",h.episodes.recentCount,")"]}),h.episodes.items.length>0?m.jsx("div",{className:"mt-2 space-y-1.5",children:h.episodes.items.slice(0,5).map(F=>m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Se,{color:"zinc",children:F.kind}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("p",{className:"truncate text-sm text-ouro-bone",children:F.summary}),m.jsx("p",{className:"text-xs text-ouro-shadow",children:ct(F.timestamp)})]})]},F.id))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No recent episodes"})]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[m.jsx(tr,{label:"Tasks",value:_.liveCount,sub:`${_.blockedCount} blocked`,onClick:()=>l({tab:"work"})}),m.jsx(tr,{label:"Obligations",value:z.openCount,sub:`${Y.liveCount} sessions`,onClick:()=>l({tab:"work"})}),m.jsx(tr,{label:"Coding",value:I.activeCount,sub:`${I.blockedCount} blocked`,onClick:()=>l({tab:"work"})}),m.jsx(tr,{label:"Inner",value:D.status,sub:jt(D.summary??"",30),onClick:()=>l({tab:"inner"})})]}),d&&d.items.length>0&&(()=>{const F=d.items.filter(K=>["spawning","running","waiting_input","stalled"].includes(K.status));return F.length===0?null:m.jsx(Il,{title:`Active coding (${F.length})`,children:m.jsx("div",{className:"space-y-1.5",children:F.map(K=>m.jsxs("button",{onClick:()=>l({tab:"work"}),className:"flex w-full items-center gap-2 rounded-lg bg-ouro-void/40 px-3 py-2 text-left ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:[m.jsx(Se,{color:K.status==="running"?"lime":K.status==="waiting_input"?"yellow":"zinc",children:K.status}),m.jsxs("span",{className:"truncate text-sm text-ouro-bone",children:[K.runner," — ",jt(K.workdir,40)]}),m.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:ct(K.lastActivityAt)})]},K.id))})})})(),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[m.jsx(Il,{title:"Senses",children:Z.length>0?m.jsx(M3,{items:Z}):m.jsx(Rf,{children:"No active senses"})}),m.jsx(Il,{title:"Bridges",children:J.length>0?m.jsx("div",{className:"flex flex-wrap gap-1.5",children:J.map(F=>m.jsx("button",{onClick:()=>l({tab:"connections",focus:F}),children:m.jsx(Se,{color:"lime",children:F})},F))}):m.jsx(Rf,{children:"No active bridges"})})]}),(()=>{var te;const K=(((te=E.obligations)==null?void 0:te.items)??[]).filter(ie=>ie.status==="fulfilled");return K.length===0?null:m.jsx(Il,{title:"Recently closed",children:m.jsx("div",{className:"space-y-1",children:K.slice(0,3).map((ie,Te)=>m.jsxs("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2 bg-ouro-glow/5 ring-1 ring-ouro-glow/10",children:[m.jsx(Se,{color:"lime",children:"closed"}),m.jsx("p",{className:"text-sm text-ouro-mist truncate",children:jt(ie.content,80)}),m.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:ct(ie.updatedAt)})]},Te))})})})(),m.jsx(Il,{title:"Recent activity",children:M.recent.length>0?m.jsx("div",{className:"space-y-1",children:M.recent.map((F,K)=>{const te=F.kind==="coding"||F.kind==="obligation"?"work":F.kind==="session"?"sessions":"inner";return m.jsxs("button",{onClick:()=>l({tab:te}),className:"flex w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left hover:bg-ouro-moss/10 transition-colors",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{children:F.kind}),m.jsx("span",{className:"text-xs text-ouro-shadow",children:ct(F.at)})]}),m.jsx("p",{className:"truncate text-sm font-medium text-ouro-bone",children:jt(F.label,100)}),m.jsx("p",{className:"truncate text-xs text-ouro-shadow",children:jt(F.detail,80)})]},K)})}):m.jsx(Rf,{children:"No recent activity yet."})})]})}function Q0({item:n,nav:a,agentName:l,onDismiss:o}){var d;const u=n.urgency==="return-ready";return m.jsxs("div",{className:`flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left ring-1 transition-colors ${u?"bg-ouro-glow/5 ring-ouro-glow/15":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[m.jsxs("button",{onClick:()=>n.ref&&a({tab:n.ref.tab,focus:n.ref.focus}),className:"flex min-w-0 flex-1 items-start gap-2.5",children:[m.jsx(Se,{color:w3[n.urgency]??"zinc",children:E3[n.urgency]??n.urgency}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:`text-sm font-medium ${u?"text-ouro-glow":"text-ouro-bone"}`,children:n.label}),m.jsx("p",{className:"text-xs text-ouro-shadow truncate",children:n.detail}),m.jsx("p",{className:"text-[10px] italic text-ouro-shadow/60 mt-0.5",children:j3[n.urgency]??""})]}),n.ageMs!=null&&m.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:n.ageMs<36e5?`${Math.floor(n.ageMs/6e4)}m`:n.ageMs<864e5?`${Math.floor(n.ageMs/36e5)}h`:`${Math.floor(n.ageMs/864e5)}d`})]}),((d=n.ref)==null?void 0:d.focus)&&m.jsx("button",{onClick:async f=>{f.stopPropagation(),await fetch(`/api/agents/${encodeURIComponent(l)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:n.ref.focus})}),o()},className:"shrink-0 text-xs text-ouro-shadow hover:text-ouro-fang transition-colors",title:"Dismiss",children:"✕"})]})}function er({tab:n,children:a}){const l=Pi();return m.jsx("button",{onClick:()=>l({tab:n}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow transition-colors",children:a})}function tr({label:n,value:a,sub:l,onClick:o}){return m.jsxs("button",{onClick:o,className:"rounded-xl bg-ouro-void/50 p-3 text-left ring-1 ring-ouro-moss/20 hover:ring-ouro-glow/20 transition-all",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),m.jsx("p",{className:"mt-1 text-xl font-semibold tabular-nums text-ouro-bone",children:a}),m.jsx("p",{className:"mt-0.5 truncate text-xs text-ouro-shadow",children:l})]})}function Il({title:n,children:a}){return m.jsxs("div",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n}),m.jsx("div",{className:"mt-2",children:a})]})}function M3({items:n}){return m.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(a=>m.jsx(Se,{color:"lime",children:a},a))})}function Rf({children:n}){return m.jsx("p",{className:"text-sm text-ouro-shadow",children:n})}function bd(n){const a=n.function.name,l=D3(n.function.arguments);return a==="settle"?{kind:"response",name:a,id:n.id,deliveredText:l.answer??null,delegatedThought:null,metadata:l.intent??null,rawArgs:null}:a==="ponder"?{kind:"delegation",name:a,id:n.id,deliveredText:l.say??null,delegatedThought:l.thought??null,metadata:null,rawArgs:null}:a==="rest"?{kind:"rest",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:null}:a==="observe"?{kind:"observe",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:l.reason??null,rawArgs:null}:a==="surface"?{kind:"surface",name:a,id:n.id,deliveredText:l.content??null,delegatedThought:null,metadata:l.delegationId??l.friendId??null,rawArgs:null}:{kind:"action",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:n.function.arguments}}function D3(n){try{const a=JSON.parse(n);if(a&&typeof a=="object")return a}catch{}return{}}function O3(n){return typeof n=="string"?n:Array.isArray(n)?n.map(a=>a.type==="text"&&typeof a.text=="string"?a.text:"").filter(a=>a.length>0).join(""):""}function As(n){return O3(n.content)}function Vb(n){return n.time.authoredAt??n.time.observedAt??n.time.recordedAt}const P0={"needs-reply":{color:"red",label:"needs reply"},"on-hold":{color:"yellow",label:"on hold"},monitoring:{color:"zinc",label:"monitoring"},idle:{color:"zinc",label:"idle"}};function z3(n){return Vb(n)}function Xi(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(z3(n)))}function R3({agentName:n,focus:a,onFocusConsumed:l,deskPrefs:o}){Pi();const[u,d]=w.useState(null),[f,h]=w.useState(null),[g,p]=w.useState(null),[y,x]=w.useState(!1);w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/sessions`).then(R=>{d(R),a&&(T(a),l==null||l())})},[n,a]);function T(R){if(f===R){h(null),p(null);return}h(R),p(null),x(!0);const[_,z,Y]=R.split("/");$e(`/agents/${encodeURIComponent(n)}/sessions/${encodeURIComponent(_)}/${encodeURIComponent(z)}/${encodeURIComponent(Y)}`).then(p).catch(()=>p(null)).finally(()=>x(!1))}const S=new Set((o==null?void 0:o.starredFriends)??[]);if(!u)return m.jsx(_b,{label:"Loading sessions"});const E=new Map;for(const R of u.items)E.has(R.friendId)||E.set(R.friendId,[]),E.get(R.friendId).push(R);const D=[...E.entries()].sort((R,_)=>{const z=S.has(R[0])?0:1,Y=S.has(_[0])?0:1;return z!==Y?z-Y:_[1].length-R[1].length}),M=[],C=new Map;for(const[R,_]of D)C.set(M.length,{name:_[0].friendName,channels:_.length,starred:S.has(R)}),M.push(..._);return m.jsxs("div",{className:"space-y-3",children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:[u.totalCount," sessions · ",u.activeCount," active · ",u.staleCount," stale"]}),m.jsx("div",{className:"space-y-1.5",children:M.map((R,_)=>{var ie;const z=C.get(_),Y=S.has(R.friendId),I=`${R.friendId}/${R.channel}/${R.key}`,Z=f===I,J=P0[R.replyState]??P0.idle,F=((ie=R.lastUsage)==null?void 0:ie.total_tokens)??R.estimatedTokens??0,te=F>0?Math.min(100,Math.round(F/8e4*100)):0;return m.jsxs("div",{children:[z&&z.channels>1&&m.jsxs("div",{className:"flex items-center gap-2 pt-3 pb-1",children:[z.starred&&m.jsx("span",{className:"text-ouro-gold text-sm",children:"★"}),m.jsx("span",{className:"font-medium text-ouro-bone text-sm",children:z.name}),m.jsxs("span",{className:"text-xs text-ouro-shadow",children:[z.channels," channels"]})]}),m.jsxs("button",{onClick:()=>T(I),className:`flex w-full flex-col gap-1.5 rounded-lg px-3 py-3 text-left transition-colors ring-1 ${Z?"bg-ouro-moss/15 ring-ouro-glow/20":"ring-ouro-moss/15 hover:bg-ouro-moss/8"}`,children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[Y&&m.jsx("span",{className:"text-ouro-gold",title:"Starred",children:"★"}),m.jsx("span",{className:"truncate font-medium text-ouro-bone",children:R.friendName}),m.jsxs("span",{className:"shrink-0 text-xs text-ouro-shadow",children:["via ",R.channel]}),m.jsx(Se,{color:J.color,children:J.label})]}),m.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:ct(R.lastActivityAt)})]}),R.latestUserExcerpt&&m.jsxs("p",{className:"truncate text-xs text-ouro-gold/70",children:[m.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"in:"})," ",jt(R.latestUserExcerpt,100)]}),R.latestAssistantExcerpt&&m.jsxs("p",{className:"truncate text-xs text-ouro-glow/60",children:[m.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"out:"})," ",jt(R.latestAssistantExcerpt,100)]}),m.jsxs("div",{className:"flex items-center gap-3 text-xs text-ouro-shadow",children:[m.jsxs("span",{className:"tabular-nums",children:[R.messageCount," msgs"]}),R.lastUsage&&m.jsxs("span",{className:"tabular-nums",children:[R.lastUsage.total_tokens.toLocaleString()," tok"]}),te>0&&m.jsxs("div",{className:"flex items-center gap-1.5 flex-1 max-w-32",title:"Context pressure — steady state oscillates between 80-100%",children:[m.jsx("div",{className:"h-1 flex-1 rounded-full bg-ouro-moss/20",children:m.jsx("div",{className:`h-1 rounded-full transition-all ${te>100?"bg-ouro-fang":te>80?"bg-ouro-gold":"bg-ouro-glow"}`,style:{width:`${Math.min(100,te)}%`}})}),m.jsxs("span",{className:"tabular-nums text-[10px]",children:[te,"%"]})]})]})]}),Z&&m.jsx(L3,{loading:y,transcript:g})]},I)})})]})}function L3({loading:n,transcript:a}){const l=w.useRef(null);return w.useEffect(()=>{a&&l.current&&(l.current.scrollTop=l.current.scrollHeight)},[a]),m.jsxs("div",{ref:l,className:"mt-1 max-h-[70vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15",children:[n&&m.jsx(_b,{label:"Loading transcript"}),a&&m.jsx(k3,{messages:a.messages,usage:a.lastUsage})]})}function k3({messages:n,usage:a}){const l=n.filter(h=>h.role==="system"),o=n.filter(h=>h.role!=="system"),[u,d]=w.useState(!1),f=new Map;for(const h of o)h.role==="tool"&&h.toolCallId&&f.set(h.toolCallId,h);return m.jsxs("div",{className:"space-y-0.5",children:[a&&m.jsxs("p",{className:"pb-2 font-mono text-[10px] text-ouro-shadow",children:[a.input_tokens.toLocaleString()," in · ",a.output_tokens.toLocaleString()," out · ",a.total_tokens.toLocaleString()," total"]}),l.length>0&&m.jsxs("div",{className:"pb-2 mb-2 border-b border-ouro-moss/15",children:[m.jsxs("button",{onClick:()=>d(!u),className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow hover:text-ouro-mist transition-colors",children:[u?"▼":"▶"," system context (",l.length,")"]}),u&&l.map(h=>m.jsxs("div",{className:"mt-2 max-h-60 overflow-y-auto rounded bg-ouro-void/40 p-2 text-xs text-ouro-shadow whitespace-pre-wrap break-words",children:[m.jsx("p",{className:"mb-1 font-mono text-[9px] text-ouro-shadow/70",children:Xi(h)}),As(h)]},h.id))]}),o.map(h=>h.role==="tool"?null:h.role==="user"?m.jsx(V3,{msg:h},h.id):h.role==="assistant"?m.jsx(_3,{msg:h,toolResults:f},h.id):null)]})}function V3({msg:n}){const a=As(n);return m.jsx("div",{className:"flex justify-start py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-sm bg-ouro-moss/25 px-3.5 py-2 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-gold/70",children:"user"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",n.sequence]}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:a})]})})}function _3({msg:n,toolResults:a}){const l=As(n),o=(n.toolCalls??[]).map(bd),u=o.filter(h=>h.kind!=="action"),d=o.filter(h=>h.kind==="action"),f=[];for(const h of u)h.kind==="response"?f.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12",children:[m.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"agent"}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:h.deliveredText}),h.metadata&&h.metadata!=="complete"&&m.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["intent: ",h.metadata]})]})},h.id)):h.kind==="delegation"?f.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12",children:[m.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"agent"}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),h.deliveredText&&m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:h.deliveredText}),h.delegatedThought&&m.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-moss/20 px-2.5 py-1.5 ring-1 ring-ouro-glow/8",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/60",children:"→ inner dialog"}),m.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist",children:h.delegatedThought})]})]})},h.id)):h.kind==="surface"?f.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-scale/12 px-3.5 py-2 ring-1 ring-ouro-scale/15",children:[m.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"surfaced"}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:h.deliveredText}),h.metadata&&m.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",h.metadata]})]})},h.id)):h.kind==="rest"?f.push(m.jsx("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:"— resting —"},h.id)):h.kind==="observe"&&f.push(m.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:["— observed",h.metadata?`: ${h.metadata}`:""," —"]},h.id));return l&&u.length===0&&f.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12",children:[m.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"agent"}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:l})]})},`${n.id}-content`)),d.length>0&&f.push(m.jsx("div",{className:"flex justify-end py-1",children:m.jsx("div",{className:"max-w-[85%] sm:max-w-[75%] space-y-1",children:d.map(h=>m.jsx(U3,{call:h,result:a.get(h.id)},h.id))})},`${n.id}-tools`)),m.jsx(m.Fragment,{children:f})}function U3({call:n,result:a}){const[l,o]=w.useState(!1),u=a?As(a):null;return m.jsxs("button",{onClick:()=>o(!l),className:"w-full text-left rounded-lg bg-ouro-moss/10 px-2.5 py-1.5 text-sm ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/15 transition-colors",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-xs text-ouro-glow",children:n.name}),!l&&m.jsx("span",{className:"text-[10px] text-ouro-shadow",children:"tap to inspect"})]}),l&&m.jsxs(m.Fragment,{children:[n.rawArgs&&m.jsx("pre",{className:"mt-1.5 max-h-24 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap break-words",children:n.rawArgs}),a&&m.jsxs("div",{className:"mt-1.5 border-t border-ouro-moss/15 pt-1.5",children:[m.jsx(Se,{children:"result"}),m.jsx("pre",{className:"mt-1 max-h-32 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-mist whitespace-pre-wrap break-words",children:u})]})]})]})}function _b({label:n}){return m.jsxs("div",{className:"flex items-center gap-2 py-6",children:[m.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),m.jsxs("span",{className:"font-mono text-xs text-ouro-shadow",children:[n,"…"]})]})}function B3({agentName:n,view:a,focus:l,onFocusConsumed:o}){var R,_;const u=Pi(),[d,f]=w.useState(null),[h,g]=w.useState(null),[p,y]=w.useState(null),x=a.work,T=x.obligations,S=x.tasks;w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/coding`).then(f),$e(`/agents/${encodeURIComponent(n)}/obligations`).then(g).catch(()=>{}),$e(`/agents/${encodeURIComponent(n)}/self-fix`).then(y).catch(()=>{})},[n]);const E=(h==null?void 0:h.items)??T.items??[],D=(h==null?void 0:h.openCount)??T.openCount,M=(d==null?void 0:d.items)??[],C=new Map;for(const z of M){const Y=z.obligationId;Y&&(C.has(Y)||C.set(Y,[]),C.get(Y).push(z))}return m.jsxs("div",{className:"space-y-8",children:[m.jsxs("section",{children:[m.jsx(nr,{label:`Obligations (${D} open)`}),(h==null?void 0:h.primarySelectionReason)&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Primary: ",h.primarySelectionReason]}),E.length>0?m.jsx("div",{className:"mt-3 space-y-3",children:E.map(z=>{const Y=C.get(z.id)??[],I="isPrimary"in z&&z.isPrimary,Z="meaning"in z?z.meaning:null;return m.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${I?"bg-ouro-glow/5 ring-ouro-glow/20":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-start gap-2",children:[I&&m.jsx(Se,{color:"lime",children:"primary"}),m.jsx(Se,{color:z.status==="pending"?"yellow":z.status==="fulfilled"?"lime":"zinc",children:z.status}),m.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:jt(z.content,120)})]}),z.origin&&m.jsxs("button",{onClick:()=>u({tab:"sessions",focus:`${z.origin.friendId}/${z.origin.channel}/${z.origin.key}`}),className:"mt-2 flex w-full items-center gap-2 rounded-md bg-ouro-moss/8 px-2.5 py-1.5 text-left text-xs ring-1 ring-ouro-moss/10 hover:ring-ouro-glow/20 transition-colors",children:[m.jsx("span",{className:"text-ouro-shadow",children:"from"}),m.jsx("span",{className:"font-medium text-ouro-glow",children:z.origin.channel}),m.jsx("span",{className:"text-ouro-shadow",children:"→"}),m.jsx("span",{className:"text-ouro-mist truncate",children:z.origin.key}),m.jsx("span",{className:"ml-auto text-ouro-shadow",children:"open session →"})]}),z.currentSurface&&m.jsxs("div",{className:"mt-1 text-xs text-ouro-mist",children:["surface: ",m.jsx("span",{className:"text-ouro-bone",children:z.currentSurface.kind})," — ",z.currentSurface.label]}),(Z==null?void 0:Z.waitingOn)&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Waiting on: ",Z.waitingOn]}),Y.length>0&&m.jsxs("div",{className:"mt-2 space-y-1",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Linked coding"}),Y.map(J=>m.jsxs("div",{className:"flex items-center gap-2 rounded bg-ouro-moss/10 px-2 py-1 text-xs",children:[m.jsx(Se,{color:J.status==="failed"?"red":J.status==="running"?"lime":"zinc",children:J.status}),m.jsxs("span",{className:"text-ouro-mist truncate",children:[J.runner," — ",J.workdir]})]},J.id))]}),z.nextAction&&m.jsxs("p",{className:"mt-1.5 text-xs text-ouro-mist",children:["Next: ",z.nextAction]}),m.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:ct(z.updatedAt)})]},z.id)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No open obligations."})]}),p&&p.steps.length>0&&m.jsxs("section",{children:[m.jsx(nr,{label:`Self-fix ${p.active?"(active)":"(inactive)"}`}),p.currentStep&&m.jsxs("p",{className:"mt-1 text-xs text-ouro-glow",children:["Current: ",p.currentStep]}),m.jsx("div",{className:"mt-3 space-y-1.5",children:p.steps.map((z,Y)=>m.jsxs("div",{className:`flex items-center gap-2.5 rounded-lg px-3 py-2 ring-1 ${z.status==="active"?"bg-ouro-glow/5 ring-ouro-glow/20":z.status==="done"?"bg-ouro-void/40 ring-ouro-glow/10":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[m.jsx(Se,{color:z.status==="done"?"lime":z.status==="active"?"yellow":(z.status==="skipped","zinc"),children:z.status}),m.jsx("span",{className:`text-sm ${z.status==="active"?"font-medium text-ouro-bone":"text-ouro-mist"}`,children:z.label}),z.detail&&m.jsx("span",{className:"ml-auto text-xs text-ouro-shadow",children:z.detail})]},Y))})]}),m.jsxs("section",{children:[m.jsx(nr,{label:`Coding lanes (${M.length})`}),M.length>0?m.jsx("div",{className:"mt-3 space-y-2",children:M.map(z=>{const Y=z.status,I=Y==="failed",Z=z.failure;return m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:I?"red":Y==="running"?"lime":Y==="completed"?"zinc":"yellow",children:Y}),m.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:z.runner}),m.jsx("span",{className:"truncate text-xs text-ouro-shadow",children:z.workdir})]}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-2",children:[z.obligationId&&m.jsxs("button",{onClick:()=>u({tab:"work",focus:z.obligationId}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",z.obligationId.slice(0,20),"…"]}),z.taskRef&&m.jsxs("span",{className:"text-xs text-ouro-glow",children:["task: ",z.taskRef]}),z.originSession&&m.jsx("button",{onClick:()=>{const J=z.originSession;u({tab:"sessions",focus:`${J.friendId}/${J.channel}/${J.key}`})},className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:"origin session"})]}),z.checkpoint&&m.jsx("p",{className:"mt-1.5 text-xs text-ouro-mist",children:jt(z.checkpoint,100)}),m.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["pid ",z.pid??"–"," · restarts ",z.restartCount," · ",ct(z.lastActivityAt)]}),I&&Z&&m.jsxs("div",{className:"mt-2 rounded bg-ouro-fang/5 p-2 text-xs ring-1 ring-ouro-fang/15",children:[m.jsx("span",{className:"font-semibold text-ouro-fang",children:"FAILURE:"})," ",m.jsxs("span",{className:"text-ouro-mist",children:[Z.command," exited ",String(Z.code??Z.signal)]}),Z.stderrTail&&m.jsx("pre",{className:"mt-1 max-h-20 overflow-y-auto font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap",children:Z.stderrTail})]})]},z.id)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No coding sessions."})]}),m.jsxs("section",{children:[m.jsx(nr,{label:`Tasks (${S.liveCount} live, ${S.blockedCount} blocked)`}),((R=S.liveTaskNames)==null?void 0:R.length)>0?m.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:S.liveTaskNames.map(z=>m.jsx(Se,{children:z},z))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No live tasks."}),((_=S.actionRequired)==null?void 0:_.length)>0&&m.jsxs("div",{className:"mt-3",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Action required"}),m.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:S.actionRequired.map(z=>m.jsx(Se,{color:"red",children:z},z))})]})]})]})}function nr({label:n}){return m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function H3({agentName:n,focus:a,onFocusConsumed:l}){const o=Pi(),[u,d]=w.useState(null),[f,h]=w.useState(null),[g,p]=w.useState(null);w.useEffect(()=>{const S=`/agents/${encodeURIComponent(n)}`;Promise.all([$e(`${S}/attention`).then(d),$e(`${S}/bridges`).then(h),$e(`${S}/friends`).then(p)])},[n]);const y=(u==null?void 0:u.queueItems)??[],x=(f==null?void 0:f.items)??[],T=(g==null?void 0:g.friends)??[];return m.jsxs("div",{className:"space-y-8",children:[m.jsxs("section",{children:[m.jsx(Lf,{label:`Who is waiting (${(u==null?void 0:u.queueLength)??0})`}),y.length>0?m.jsx("div",{className:"mt-3 space-y-2",children:y.map((S,E)=>m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("button",{onClick:()=>o({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:S.friendName}),m.jsxs("span",{className:"text-xs text-ouro-shadow",children:["via ",S.channel]}),m.jsxs(Se,{color:"yellow",children:["waiting ",ct(new Date(S.timestamp).toISOString())]})]}),m.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:jt(S.delegatedContent,140)}),m.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-2 text-xs",children:[S.bridgeId&&m.jsxs("button",{onClick:()=>o({tab:"connections",focus:S.bridgeId}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["bridge: ",S.bridgeId.slice(0,12),"…"]}),S.obligationId&&m.jsxs("button",{onClick:()=>o({tab:"work",focus:S.obligationId}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",S.obligationId.slice(0,16),"…"]})]})]},E))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"Nobody waiting."})]}),m.jsxs("section",{children:[m.jsx(Lf,{label:`Bridges (${(f==null?void 0:f.totalCount)??0})`}),x.length>0?m.jsx("div",{className:"mt-3 space-y-3",children:x.map(S=>{const E=S.attachedSessions??[],D=S.task,M=S.lifecycle==="active";return m.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${M?"bg-ouro-moss/10 ring-ouro-glow/12":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Se,{color:M?"lime":"zinc",children:S.lifecycle}),m.jsx("p",{className:"font-medium text-ouro-bone",children:S.objective})]}),S.summary&&m.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:jt(S.summary,160)}),E.length>0&&m.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:E.map((C,R)=>m.jsxs("button",{onClick:()=>o({tab:"sessions",focus:`${C.friendId}/${C.channel}/${C.key}`}),className:"rounded-md bg-ouro-moss/10 px-2 py-0.5 font-mono text-[11px] text-ouro-glow ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/25 transition-colors",children:[C.friendId,"/",C.channel,"/",C.key]},R))}),D&&m.jsxs("p",{className:"mt-1.5 text-xs",children:[m.jsxs("button",{onClick:()=>o({tab:"work"}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["task: ",D.taskName]}),m.jsxs("span",{className:"text-ouro-shadow",children:[" (",D.mode,")"]})]}),m.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:ct(S.updatedAt)})]},S.id)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No bridges."})]}),m.jsxs("section",{children:[m.jsx(Lf,{label:`Friends (${(g==null?void 0:g.totalFriends)??0})`}),T.length>0?m.jsx("div",{className:"mt-3 space-y-1.5",children:T.map(S=>m.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx("button",{onClick:()=>o({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:S.friendName}),m.jsxs("p",{className:"text-xs text-ouro-shadow",children:[S.channels.join(", ")," · ",S.sessionCount," sessions",S.lastActivityAt&&m.jsxs(m.Fragment,{children:[" · ",ct(S.lastActivityAt)]})]})]}),m.jsxs("div",{className:"shrink-0 text-right",children:[m.jsx("p",{className:"tabular-nums text-sm font-medium text-ouro-bone",children:S.totalTokens.toLocaleString()}),m.jsx("p",{className:"text-[10px] text-ouro-shadow",children:"tokens"})]})]},S.friendId))}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No friends."})]})]})}function Lf({label:n}){return m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function $3(n){return Vb(n)}function es(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date($3(n)))}function q3({agentName:n,view:a}){var M;const l=Pi(),[o,u]=w.useState(null),[d,f]=w.useState(null),[h,g]=w.useState(!1),p=a.inner;w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/habits`).then(u)},[n]);function y(){if(d){g(!h);return}$e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(C=>{f(C),g(!0)})}const x=(o==null?void 0:o.items)??[],T=x.filter(C=>C.isOverdue),S=x.filter(C=>C.status==="active"&&!C.isOverdue),E=x.filter(C=>C.status==="paused"),D=x.find(C=>{var R;return((R=C.name)==null?void 0:R.toLowerCase())==="heartbeat"});return m.jsxs("div",{className:"space-y-8",children:[D&&m.jsxs("section",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Heartbeat"}),m.jsx("div",{className:`mt-2 rounded-xl p-4 ring-1 ${D.isOverdue?"bg-ouro-fang/5 ring-ouro-fang/15":"bg-ouro-moss/10 ring-ouro-glow/10"}`,children:m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${D.isOverdue?"bg-ouro-fang animate-pulse":"bg-ouro-glow"}`}),m.jsx("span",{className:"font-medium text-ouro-bone",children:D.isOverdue?"Overdue":"Healthy"}),m.jsxs("span",{className:"text-xs text-ouro-shadow",children:["every ",D.cadence," · last ",D.lastRun?ct(D.lastRun):"never"]})]})})]}),m.jsx("section",{children:m.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Inner work"}),m.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone",children:p.status}),p.summary&&m.jsx("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:p.summary}),m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:p.hasPending?"Pending inner work queued.":"No pending inner work."}),p.mode==="deep"&&p.origin&&m.jsxs("div",{className:"mt-3",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Triggered from"}),m.jsxs("button",{onClick:()=>{const C=p.origin;l({tab:"sessions",focus:`${C.friendId}/${C.channel}/${C.key}`})},className:"mt-1 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:[(M=p.origin.friendId)==null?void 0:M.slice(0,8),"…/",p.origin.channel,"/",p.origin.key]}),p.obligationStatus&&m.jsxs("button",{onClick:()=>l({tab:"work"}),className:"ml-2 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",p.obligationStatus]})]})]})}),m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Inner dialog ",d?`(${d.messages.length} total)`:""]}),d?m.jsx(G3,{messages:d.messages}):m.jsx("button",{onClick:y,className:"mt-2 w-full rounded-lg px-3 py-2.5 text-left font-mono text-xs text-ouro-glow ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:"Load inner dialog"})]}),m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Habits (",(o==null?void 0:o.totalCount)??0,")"]}),T.length>0&&m.jsxs("div",{className:"mt-3",children:[m.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-fang mb-1.5",children:["Overdue (",T.length,")"]}),m.jsx("div",{className:"space-y-1.5",children:T.map(C=>m.jsx(kf,{h:C},C.name))})]}),S.length>0&&m.jsxs("div",{className:"mt-3",children:[m.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow mb-1.5",children:["Running fine (",S.length,")"]}),m.jsx("div",{className:"space-y-1.5",children:S.map(C=>m.jsx(kf,{h:C},C.name))})]}),E.length>0&&m.jsxs("div",{className:"mt-3",children:[m.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow mb-1.5",children:["Paused (",E.length,")"]}),m.jsx("div",{className:"space-y-1.5",children:E.map(C=>m.jsx(kf,{h:C},C.name))})]}),x.length===0&&m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No habits configured."})]})]})}function G3({messages:n}){const a=n.filter(p=>p.role!=="system"&&p.role!=="tool"),[l,o]=w.useState(!1),u=w.useRef(null),d=l?a:a.slice(-30),f=a.length-d.length;w.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[d.length]);const h=[];for(const p of a){if(p.role!=="assistant")continue;const y=(p.toolCalls??[]).map(bd);for(const x of y)x.kind==="surface"&&h.push({index:p.sequence,kind:"surfaced",label:jt(x.deliveredText??"",40)}),x.kind==="rest"&&h.push({index:p.sequence,kind:"resting",label:"resting"}),x.kind==="delegation"&&h.push({index:p.sequence,kind:"delegated",label:"continued thinking"})}function g(p){var x;const y=(x=u.current)==null?void 0:x.querySelector(`[data-msg-index="${p}"]`);y&&y.scrollIntoView({behavior:"smooth",block:"center"})}return m.jsxs("div",{children:[h.length>0&&m.jsx("div",{className:"mt-2 mb-1 flex flex-wrap gap-1",children:h.map((p,y)=>m.jsxs("button",{onClick:()=>{o(!0),setTimeout(()=>g(p.index),100)},className:`rounded-md px-2 py-0.5 text-[10px] font-mono ring-1 transition-colors ${p.kind==="surfaced"?"bg-ouro-scale/10 text-ouro-glow ring-ouro-scale/20 hover:ring-ouro-glow/30":p.kind==="resting"?"bg-ouro-void/40 text-ouro-shadow ring-ouro-moss/10":"bg-ouro-gold/5 text-ouro-gold ring-ouro-gold/10"}`,children:[p.kind==="surfaced"?"★":p.kind==="resting"?"—":"→"," #",p.index]},y))}),m.jsxs("div",{ref:u,className:"max-h-[60vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15 space-y-1",children:[f>0&&m.jsxs("button",{onClick:()=>o(!0),className:"w-full rounded-lg px-3 py-2 text-center font-mono text-xs text-ouro-shadow hover:text-ouro-mist ring-1 ring-ouro-moss/10 hover:ring-ouro-moss/20 transition-colors mb-2",children:["Load ",f," earlier messages"]}),d.map(p=>{const y=As(p);if(p.role==="user"){const x=y.includes("[pending from")||y.includes("[delegated"),T=y.includes("waking up")||y.includes("world-state checkpoint");return m.jsx("div",{"data-msg-index":p.sequence,className:"flex justify-start py-1",children:m.jsxs("div",{className:`max-w-[85%] rounded-2xl rounded-bl-sm px-3 py-2 ring-1 ${x?"bg-ouro-gold/8 ring-ouro-gold/15":T?"bg-ouro-moss/20 ring-ouro-moss/15":"bg-ouro-moss/25 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider",style:{color:x?"var(--color-ouro-gold)":"var(--color-ouro-shadow)"},children:x?"★ delegated":T?"heartbeat":"prompt"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",p.sequence]}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:es(p)})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:y})]})},p.id)}if(p.role==="assistant"){const x=(p.toolCalls??[]).map(bd),T=x.filter(D=>D.kind==="surface"),S=x.filter(D=>D.kind==="rest"),E=x.filter(D=>D.kind==="delegation");return m.jsxs("div",{"data-msg-index":p.sequence,children:[T.map(D=>m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-scale/15 px-3 py-2 ring-1 ring-ouro-scale/20",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow",children:"★ surfaced outward"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",p.sequence]}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:es(p)})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:D.deliveredText}),D.metadata&&m.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",D.metadata]})]})},D.id)),E.length>0&&m.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-gold/50",children:["— still thinking — #",p.sequence," · ",es(p)]}),S.length>0&&m.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/40",children:["— resting — #",p.sequence," · ",es(p)]}),T.length===0&&S.length===0&&E.length===0&&y&&m.jsx("div",{className:"flex justify-end py-1",children:m.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-glow/6 px-3 py-2 ring-1 ring-ouro-glow/8",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/50",children:"thinking"}),m.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",p.sequence]}),m.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:es(p)})]}),m.jsx("p",{className:"text-sm leading-relaxed text-ouro-mist whitespace-pre-wrap break-words",children:y})]})})]},p.id)}return null})]})]})}function kf({h:n}){const a=n.isOverdue,l=n.isDegraded,o=n.status;return m.jsxs("div",{className:`rounded-lg px-3 py-2.5 ring-1 ${a?"bg-ouro-fang/5 ring-ouro-fang/15":l?"bg-ouro-gold/5 ring-ouro-gold/15":o==="paused"?"bg-ouro-void/30 ring-ouro-moss/10":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:a?"red":l?"yellow":o==="active"?"lime":"zinc",children:a?"overdue":l?"degraded":o}),m.jsx("span",{className:"font-medium text-ouro-bone",children:n.title})]}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 text-xs text-ouro-shadow",children:[n.cadence&&m.jsxs("span",{children:["every ",n.cadence]}),m.jsx("span",{children:n.lastRun?`last ${ct(n.lastRun)}`:"never run"}),l&&n.degradedReason&&m.jsx("span",{className:"text-ouro-gold",children:n.degradedReason}),!a&&!l&&o==="active"&&n.lastRun&&m.jsx("span",{className:"text-ouro-glow",children:"on schedule"}),a&&n.overdueMs&&m.jsxs("span",{className:"text-ouro-fang",children:[Math.floor(n.overdueMs/6e4),"m overdue"]}),!n.lastRun&&o==="active"&&m.jsx("span",{className:"text-ouro-gold",children:"never fired — may be misconfigured"})]}),n.bodyExcerpt&&m.jsx("p",{className:"mt-1 text-xs text-ouro-shadow/70",children:n.bodyExcerpt})]})}function Y3({agentName:n}){const[a,l]=w.useState(null),[o,u]=w.useState(null),[d,f]=w.useState("diary");if(w.useEffect(()=>{$e(`/agents/${encodeURIComponent(n)}/memory`).then(l),$e(`/agents/${encodeURIComponent(n)}/memory-decisions`).then(u).catch(()=>{})},[n]),!a)return m.jsxs("div",{className:"flex items-center gap-2 py-6",children:[m.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),m.jsx("span",{className:"font-mono text-xs text-ouro-shadow",children:"Loading…"})]});const h=a.recentDiaryEntries??[],g=a.recentJournalEntries??[];return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs("button",{onClick:()=>f("diary"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="diary"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Diary (",a.diaryEntryCount,")"]}),m.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),m.jsxs("button",{onClick:()=>f("journal"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="journal"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Journal (",a.journalEntryCount,")"]}),m.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),m.jsxs("button",{onClick:()=>f("decisions"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="decisions"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Decisions (",(o==null?void 0:o.totalCount)??0,")"]})]}),d==="diary"&&m.jsx("div",{children:h.length>0?m.jsx("div",{className:"space-y-3",children:h.map(p=>m.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone",children:p.text}),m.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-ouro-shadow",children:[m.jsx(Se,{children:p.source}),m.jsx("span",{children:ct(p.createdAt)})]})]},p.id))}):m.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No diary entries yet. The agent hasn't written anything down."})}),d==="journal"&&m.jsx("div",{children:g.length>0?m.jsx("div",{className:"space-y-3",children:g.map(p=>m.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-medium text-ouro-bone",children:p.filename}),m.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-mist",children:p.preview})]},p.filename))}):m.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No journal entries yet."})}),d==="decisions"&&m.jsx("div",{children:o&&o.items.length>0?m.jsx("div",{className:"space-y-2",children:o.items.map((p,y)=>m.jsxs("div",{className:"rounded-xl bg-ouro-void/40 px-4 py-3 ring-1 ring-ouro-moss/15",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Se,{color:p.decision==="saved"?"lime":"zinc",children:p.decision}),m.jsx(Se,{children:p.kind.replace(/_/g," ")}),m.jsx("span",{className:"text-xs text-ouro-shadow",children:ct(p.timestamp)})]}),p.reason&&m.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:p.reason}),p.excerpt&&m.jsx("p",{className:"mt-0.5 text-xs text-ouro-shadow italic truncate",children:p.excerpt})]},y))}):m.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No memory decisions logged yet."})})]})}function X3({agentName:n,view:a}){const[l,o]=w.useState(null),[u,d]=w.useState(null),f=a.agent,h=f.degraded,g=f.freshness;w.useEffect(()=>{Promise.all([$e("/machine/health").then(o).catch(()=>null),$e("/machine/logs").then(d).catch(()=>null)])},[n]);const p=(l==null?void 0:l.degradedComponents)??[],y=(u==null?void 0:u.entries)??[];return m.jsxs("div",{className:"space-y-8",children:[h.status==="degraded"&&h.issues.length>0&&m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-fang",children:["Agent issues (",h.issues.length,")"]}),m.jsx("div",{className:"mt-3 space-y-1.5",children:h.issues.map((x,T)=>m.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2.5 ring-1 ring-ouro-fang/15",children:[m.jsx("p",{className:"font-mono text-xs font-semibold text-ouro-fang",children:x.code}),m.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist break-all",children:x.detail})]},T))})]}),m.jsxs("section",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Agent config"}),m.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[m.jsx(Hi,{label:"Provider",value:f.provider||"none"}),m.jsx(Hi,{label:"Enabled",value:f.enabled?"yes":"no"}),m.jsx(Hi,{label:"Freshness",value:`${g.status}${g.ageMs!=null?` (${Math.floor(g.ageMs/6e4)}m)`:""}`})]})]}),m.jsxs("section",{children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Daemon health"}),l&&l.status!=="unavailable"?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[m.jsx(Hi,{label:"Status",value:l.status}),m.jsx(Hi,{label:"Mode",value:l.mode}),m.jsx(Hi,{label:"Uptime",value:`${Math.floor(l.uptimeSeconds/60)}m`})]}),p.length>0&&m.jsxs("div",{className:"mt-3 space-y-1.5",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Degraded components"}),p.map((x,T)=>m.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2 ring-1 ring-ouro-fang/15",children:[m.jsx("p",{className:"text-xs font-semibold text-ouro-fang",children:x.component}),m.jsx("p",{className:"text-xs text-ouro-mist",children:x.reason})]},T))]})]}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No health file found. This is normal when not running under the daemon."})]}),m.jsxs("section",{children:[m.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Recent logs (",(u==null?void 0:u.totalLines)??0," total)"]}),y.length>0?m.jsx("div",{className:"mt-3 max-h-96 overflow-y-auto rounded-lg bg-ouro-void/40 ring-1 ring-ouro-moss/15",children:[...y].reverse().slice(0,50).map((x,T)=>{const S=x.level;return m.jsxs("div",{className:"border-b border-ouro-moss/10 px-3 py-1.5 last:border-b-0",children:[m.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[m.jsx(Se,{color:S==="error"?"red":S==="warn"?"yellow":"zinc",children:S}),m.jsx("span",{className:"text-ouro-shadow",children:ct(x.ts)}),m.jsx("span",{className:"font-mono text-ouro-glow",children:x.event})]}),m.jsx("p",{className:"truncate text-xs text-ouro-mist",children:x.message})]},T)})}):m.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No log entries."})]})]})}function Hi({label:n,value:a}){return m.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[m.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),m.jsx("p",{className:"mt-1 text-sm font-medium text-ouro-bone",children:a})]})}const Vf=[{id:"overview",label:"Overview"},{id:"sessions",label:"Sessions"},{id:"work",label:"Work"},{id:"connections",label:"Connections"},{id:"inner",label:"Inner"},{id:"memory",label:"Diary & Journal"},{id:"runtime",label:"Runtime"}];function K3(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function F3({agentName:n,view:a,deskPrefs:l,initialRoute:o}){const[u,d]=w.useState((o==null?void 0:o.tab)??"overview"),[f,h]=w.useState(o==null?void 0:o.focus),g=w.useRef(!1);w.useEffect(()=>{(o==null?void 0:o.agent)===n&&!g.current?(g.current=!0,d(o.tab),h(o.focus)):(d("overview"),h(void 0))},[n]);const p=w.useCallback(E=>{d(E.tab),h(E.focus),window.history.pushState(null,"",_f({agent:n,tab:E.tab,focus:E.focus}))},[n]),y=w.useCallback(E=>{d(E),h(void 0),window.history.pushState(null,"",_f({agent:n,tab:E,focus:void 0}))},[n]),x=w.useCallback(()=>h(void 0),[]);if(T3(p),!a||!n)return m.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[m.jsx("p",{className:"font-display text-2xl italic text-ouro-bone",children:"Choose an agent"}),m.jsx("p",{className:"mt-2 text-sm text-ouro-mist",children:"Select an agent from the sidebar to inspect its state."})]});const S=a.agent.attention;return m.jsx(ey.Provider,{value:p,children:m.jsxs("div",{children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-4 border-b border-ouro-moss/30",children:[m.jsx("div",{className:"min-w-0",children:m.jsx("h1",{className:"font-display text-2xl italic font-semibold text-ouro-bone sm:text-3xl",children:n})}),m.jsx(Se,{color:K3(S.level),children:S.label})]}),m.jsx("nav",{className:"mt-4 flex gap-0.5 overflow-x-auto border-b border-ouro-moss/20 -mx-1",children:(()=>{const E=l==null?void 0:l.tabOrder;if(!E)return Vf;const D=E.map(C=>Vf.find(R=>R.id===C)).filter(C=>C!==void 0),M=Vf.filter(C=>!E.includes(C.id));return[...D,...M]})().map(E=>m.jsx("button",{type:"button",onClick:()=>y(E.id),className:`shrink-0 px-3 py-2 text-xs font-mono uppercase tracking-wider transition-colors rounded-t-md ${u===E.id?"bg-ouro-moss/20 text-ouro-glow border-b-2 border-ouro-glow":"text-ouro-shadow hover:text-ouro-mist hover:bg-ouro-moss/10"}`,children:E.label},E.id))}),m.jsxs("div",{className:"mt-6",children:[u==="overview"&&m.jsx(C3,{view:a,deskPrefs:l}),u==="sessions"&&m.jsx(R3,{agentName:n,focus:f,onFocusConsumed:x,deskPrefs:l}),u==="work"&&m.jsx(B3,{agentName:n,view:a,focus:f,onFocusConsumed:x}),u==="connections"&&m.jsx(H3,{agentName:n,focus:f,onFocusConsumed:x}),u==="inner"&&m.jsx(q3,{agentName:n,view:a}),u==="memory"&&m.jsx(Y3,{agentName:n}),u==="runtime"&&m.jsx(X3,{agentName:n,view:a})]})]})})}function J0(){return ty(window.location.hash)}function Z3(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function Q3(){var E,D;const[n,a]=w.useState(null),[l,o]=w.useState(((E=J0())==null?void 0:E.agent)??""),[u,d]=w.useState(null),f=w.useRef(0),h=w.useRef(J0()),g=w.useCallback(async()=>{var M;try{const C=await $e("/machine");if(a(C),!l&&C.agents.length>0){const R=((M=h.current)==null?void 0:M.agent)??C.agents[0].agentName;o(R)}}catch{}},[l]),[p,y]=w.useState(null),x=w.useCallback(async M=>{if(!M){d(null),y(null);return}try{const[C,R]=await Promise.all([$e(`/agents/${encodeURIComponent(M)}`),$e(`/agents/${encodeURIComponent(M)}/desk-prefs`)]);d(C),y(R)}catch{d(null),y(null)}},[]);w.useEffect(()=>{g()},[g]),w.useEffect(()=>{l&&x(l)},[l,x]),w.useEffect(()=>yT(()=>{const C=++f.current;g().then(()=>{f.current===C&&l&&x(l)})}),[g,x,l]),w.useEffect(()=>{const M=()=>{const C=ty(window.location.hash);C&&o(C.agent)};return window.addEventListener("hashchange",M),()=>window.removeEventListener("hashchange",M)},[]);const T=w.useCallback(M=>{o(M),window.history.pushState(null,"",_f({agent:M,tab:"overview",focus:void 0}))},[]);if(!n)return m.jsx("div",{className:"flex h-screen items-center justify-center bg-ouro-void",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"mx-auto mb-4 h-4 w-4 animate-pulse rounded-full bg-ouro-glow shadow-[0_0_20px_theme(--color-ouro-glow)]"}),m.jsx("p",{className:"font-mono text-sm text-ouro-mist",children:"Connecting to Outlook…"})]})});const S=n.overview.totals;return m.jsx(m3,{navbar:m.jsxs(r3,{children:[m.jsx(c3,{}),m.jsx(u3,{children:m.jsx(ah,{children:m.jsx(Se,{color:n.overview.daemon.mode==="dev"?"yellow":"lime",children:n.overview.daemon.mode})})})]}),sidebar:m.jsxs(p3,{className:"bg-ouro-deep",children:[m.jsx(g3,{className:"border-ouro-moss/30",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"h-3 w-3 shrink-0 rounded-full bg-ouro-glow shadow-[0_0_16px_theme(--color-ouro-glow)]"}),m.jsx("div",{className:"min-w-0",children:m.jsx("p",{className:"truncate font-display text-lg italic font-semibold text-ouro-bone",children:"Ouro Outlook"})})]})}),m.jsxs(v3,{className:"[&>[data-slot=section]+[data-slot=section]]:mt-4",children:[m.jsxs(F0,{children:[m.jsx(Z0,{className:"text-ouro-mist/60",children:"Machine"}),m.jsx("div",{className:"grid grid-cols-3 gap-1.5 px-2",children:[{v:S.liveTasks??0,l:"Tasks",alert:(S.blockedTasks??0)>0},{v:S.openObligations??0,l:"Oblig."},{v:S.activeCodingAgents??0,l:"Coding"}].map(M=>m.jsxs("div",{className:"rounded-md bg-ouro-void/60 px-2 py-1.5 text-center ring-1 ring-ouro-moss/20",children:[m.jsx("div",{className:`text-base font-semibold tabular-nums ${M.alert?"text-ouro-fang":"text-ouro-bone"}`,children:M.v}),m.jsx("div",{className:"text-[9px] uppercase tracking-widest text-ouro-shadow",children:M.l})]},M.l))})]}),m.jsxs(F0,{children:[m.jsx(Z0,{className:"text-ouro-mist/60",children:"Agents"}),n.agents.map(M=>m.jsx(x3,{current:M.agentName===l,onClick:()=>T(M.agentName),children:m.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-2",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx(b3,{className:"text-ouro-bone",children:M.agentName}),m.jsxs("p",{className:"truncate text-xs text-ouro-shadow",children:[M.tasks.liveCount,"t · ",M.obligations.openCount,"o · ",M.coding.activeCount,"c"]})]}),m.jsx(Se,{color:Z3(M.attention.level),children:M.attention.label})]})},M.agentName))]})]}),m.jsx(y3,{className:"border-ouro-moss/30",children:m.jsxs("div",{className:"px-2 text-xs text-ouro-shadow",children:[m.jsx("p",{className:"font-mono",children:n.overview.runtime.version}),m.jsxs("p",{className:"mt-0.5",children:[n.overview.daemon.mode," · ",n.overview.freshness.status]})]})}),l&&u&&m.jsx("div",{className:"px-4 py-2 border-t border-ouro-moss/20",children:m.jsx("p",{className:"text-xs italic text-ouro-shadow/70",children:(()=>{var Y;const M=p==null?void 0:p.statusLine;if(M)return M;const C=u==null?void 0:u.inner;if((C==null?void 0:C.status)==="working"||C!=null&&C.hasPending)return"thinking through something privately";const _=u==null?void 0:u.work,z=((Y=_==null?void 0:_.obligations)==null?void 0:Y.openCount)??0;return z>2?"a few loose ends":z>0?"carrying something":"steady"})()})})]}),children:m.jsx(F3,{agentName:l,view:u,deskPrefs:p,initialRoute:((D=h.current)==null?void 0:D.agent)===l?h.current:void 0})})}vT.createRoot(document.getElementById("app")).render(m.jsx(w.StrictMode,{children:m.jsx(Q3,{})}));
|