@grackle-ai/web 0.31.1 → 0.31.2
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.
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{r as F_,a as S,j as h,v as K_,b as Z_,t as Rr,i as X_,f as Q_,M as wf,c as Df}from"./markdown-gcy1Jmzi.js";import{r as J_,d as dv,H as fv,P as hv,i as W_,B as ex,a as tx,C as nx,M as ax}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(r){if(r.ep)return;r.ep=!0;const u=l(r);fetch(r.href,u)}})();var Cd={exports:{}},ql={},jd={exports:{}},Nd={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* scheduler.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var mv;function sx(){return mv||(mv=1,(function(n){function a(z,F){var ee=z.length;z.push(F);e:for(;0<ee;){var ke=ee-1>>>1,je=z[ke];if(0<r(je,F))z[ke]=F,z[ee]=je,ee=ke;else break e}}function l(z){return z.length===0?null:z[0]}function o(z){if(z.length===0)return null;var F=z[0],ee=z.pop();if(ee!==F){z[0]=ee;e:for(var ke=0,je=z.length,Pe=je>>>1;ke<Pe;){var we=2*(ke+1)-1,_e=z[we],Ae=we+1,Q=z[Ae];if(0>r(_e,ee))Ae<je&&0>r(Q,_e)?(z[ke]=Q,z[Ae]=ee,ke=Ae):(z[ke]=_e,z[we]=ee,ke=we);else if(Ae<je&&0>r(Q,ee))z[ke]=Q,z[Ae]=ee,ke=Ae;else break e}}return F}function r(z,F){var ee=z.sortIndex-F.sortIndex;return ee!==0?ee:z.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],g=[],v=1,b=null,x=3,T=!1,C=!1,j=!1,N=!1,A=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function X(z){for(var F=l(g);F!==null;){if(F.callback===null)o(g);else if(F.startTime<=z)o(g),F.sortIndex=F.expirationTime,a(p,F);else break;F=l(g)}}function H(z){if(j=!1,X(z),!C)if(l(p)!==null)C=!0,J||(J=!0,pe());else{var F=l(g);F!==null&&q(H,F.startTime-z)}}var J=!1,W=-1,$=5,ne=-1;function ge(){return N?!0:!(n.unstable_now()-ne<$)}function U(){if(N=!1,J){var z=n.unstable_now();ne=z;var F=!0;try{e:{C=!1,j&&(j=!1,O(W),W=-1),T=!0;var ee=x;try{t:{for(X(z),b=l(p);b!==null&&!(b.expirationTime>z&&ge());){var ke=b.callback;if(typeof ke=="function"){b.callback=null,x=b.priorityLevel;var je=ke(b.expirationTime<=z);if(z=n.unstable_now(),typeof je=="function"){b.callback=je,X(z),F=!0;break t}b===l(p)&&o(p),X(z)}else o(p);b=l(p)}if(b!==null)F=!0;else{var Pe=l(g);Pe!==null&&q(H,Pe.startTime-z),F=!1}}break e}finally{b=null,x=ee,T=!1}F=void 0}}finally{F?pe():J=!1}}}var pe;if(typeof M=="function")pe=function(){M(U)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ye=te.port2;te.port1.onmessage=U,pe=function(){ye.postMessage(null)}}else pe=function(){A(U,0)};function q(z,F){W=A(function(){z(n.unstable_now())},F)}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(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(z){switch(x){case 1:case 2:case 3:var F=3;break;default:F=x}var ee=x;x=F;try{return z()}finally{x=ee}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(z,F){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ee=x;x=z;try{return F()}finally{x=ee}},n.unstable_scheduleCallback=function(z,F,ee){var ke=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ke+ee:ke):ee=ke,z){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ee+je,z={id:v++,callback:F,priorityLevel:z,startTime:ee,expirationTime:je,sortIndex:-1},ee>ke?(z.sortIndex=ee,a(g,z),l(p)===null&&z===l(g)&&(j?(O(W),W=-1):j=!0,q(H,ee-ke))):(z.sortIndex=je,a(p,z),C||T||(C=!0,J||(J=!0,pe()))),z},n.unstable_shouldYield=ge,n.unstable_wrapCallback=function(z){var F=x;return function(){var ee=x;x=F;try{return z.apply(this,arguments)}finally{x=ee}}}})(Nd)),Nd}var pv;function ix(){return pv||(pv=1,jd.exports=sx()),jd.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-dom-client.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var gv;function lx(){if(gv)return ql;gv=1;var n=ix(),a=F_(),l=J_();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}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 r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(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 m(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 p(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,i=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(i=c.return,i!==null){s=i;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return p(c),e;if(f===i)return p(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==i.return)s=c,i=f;else{for(var y=!1,_=c.child;_;){if(_===s){y=!0,s=c,i=f;break}if(_===i){y=!0,i=c,s=f;break}_=_.sibling}if(!y){for(_=f.child;_;){if(_===s){y=!0,s=f,i=c;break}if(_===i){y=!0,i=f,s=c;break}_=_.sibling}if(!y)throw Error(o(189))}}if(s.alternate!==i)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),M=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function ye(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 j:return"Fragment";case A:return"Profiler";case N:return"StrictMode";case H:return"Suspense";case J:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case M:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var q=Array.isArray,z=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ke=[],je=-1;function Pe(e){return{current:e}}function we(e){0>je||(e.current=ke[je],ke[je]=null,je--)}function _e(e,t){je++,ke[je]=e.current,e.current=t}var Ae=Pe(null),Q=Pe(null),P=Pe(null),I=Pe(null);function De(e,t){switch(_e(P,t),_e(Q,e),_e(Ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Bg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Bg(t),e=Og(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}we(Ae),_e(Ae,e)}function Ye(){we(Ae),we(Q),we(P)}function vt(e){e.memoizedState!==null&&_e(I,e);var t=Ae.current,s=Og(t,e.type);t!==s&&(_e(Q,e),_e(Ae,s))}function xt(e){Q.current===e&&(we(Ae),we(Q)),I.current===e&&(we(I),Ul._currentValue=ee)}var Gt,We;function Ze(e){if(Gt===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Gt=t&&t[1]||"",We=-1<s.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+Gt+e+We}var ze=!1;function Sn(e,t){if(!e||ze)return"";ze=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(V){var L=V}Reflect.construct(e,[],K)}else{try{K.call()}catch(V){L=V}e.call(K.prototype)}}else{try{throw Error()}catch(V){L=V}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(V){if(V&&L&&typeof V.stack=="string")return[V.stack,L.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),y=f[0],_=f[1];if(y&&_){var E=y.split(`
|
|
20
|
+
`),B=_.split(`
|
|
21
|
+
`);for(c=i=0;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;for(;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;if(i===E.length||c===B.length)for(i=E.length-1,c=B.length-1;1<=i&&0<=c&&E[i]!==B[c];)c--;for(;1<=i&&0<=c;i--,c--)if(E[i]!==B[c]){if(i!==1||c!==1)do if(i--,c--,0>c||E[i]!==B[c]){var G=`
|
|
22
|
+
`+E[i].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=i&&0<=c);break}}}finally{ze=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Ze(s):""}function _n(e,t){switch(e.tag){case 26:case 27:case 5:return Ze(e.type);case 16:return Ze("Lazy");case 13:return e.child!==t&&t!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return Sn(e.type,!1);case 11:return Sn(e.type.render,!1);case 1:return Sn(e.type,!0);case 31:return Ze("Activity");default:return""}}function Zn(e){try{var t="",s=null;do t+=_n(e,s),s=e,e=e.return;while(e);return t}catch(i){return`
|
|
23
|
+
Error generating stack: `+i.message+`
|
|
24
|
+
`+i.stack}}var an=Object.prototype.hasOwnProperty,Xn=n.unstable_scheduleCallback,Z=n.unstable_cancelCallback,le=n.unstable_shouldYield,ce=n.unstable_requestPaint,de=n.unstable_now,Te=n.unstable_getCurrentPriorityLevel,Ee=n.unstable_ImmediatePriority,et=n.unstable_UserBlockingPriority,Le=n.unstable_NormalPriority,ot=n.unstable_LowPriority,Dt=n.unstable_IdlePriority,Tt=n.log,Lt=n.unstable_setDisableYieldValue,rt=null,Et=null;function cn(e){if(typeof Tt=="function"&&Lt(e),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(rt,e)}catch{}}var yt=Math.clz32?Math.clz32:bs,Yt=Math.log,Ft=Math.LN2;function bs(e){return e>>>=0,e===0?32:31-(Yt(e)/Ft|0)|0}var ae=256,Re=262144,be=4194304;function re(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 ie(e,t,s){var i=e.pendingLanes;if(i===0)return 0;var c=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var _=i&134217727;return _!==0?(i=_&~f,i!==0?c=re(i):(y&=_,y!==0?c=re(y):s||(s=_&~e,s!==0&&(c=re(s))))):(_=i&~f,_!==0?c=re(_):y!==0?c=re(y):s||(s=i&~e,s!==0&&(c=re(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function se(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function At(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 Rn(){var e=be;return be<<=1,(be&62914560)===0&&(be=4194304),e}function Ks(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Va(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bo(e,t,s,i,c,f){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var _=e.entanglements,E=e.expirationTimes,B=e.hiddenUpdates;for(s=y&~s;0<s;){var G=31-yt(s),K=1<<G;_[G]=0,E[G]=-1;var L=B[G];if(L!==null)for(B[G]=null,G=0;G<L.length;G++){var V=L[G];V!==null&&(V.lane&=-536870913)}s&=~K}i!==0&&Xi(e,i,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~t))}function Xi(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-yt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|s&261930}function Qi(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var i=31-yt(s),c=1<<i;c&t|e[i]&t&&(e[i]|=t),s&=~c}}function Ji(e,t){var s=t&-t;return s=(s&42)!==0?1:Zs(s),(s&(e.suspendedLanes|t))!==0?0:s}function Zs(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 Xs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wi(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:sv(e.type))}function el(e,t){var s=F.p;try{return F.p=e,t()}finally{F.p=s}}var Qn=Math.random().toString(36).slice(2),zt="__reactFiber$"+Qn,Zt="__reactProps$"+Qn,ha="__reactContainer$"+Qn,Qs="__reactEvents$"+Qn,So="__reactListeners$"+Qn,oe="__reactHandles$"+Qn,$e="__reactResources$"+Qn,Oe="__reactMarker$"+Qn;function Ie(e){delete e[zt],delete e[Zt],delete e[Qs],delete e[So],delete e[oe]}function sn(e){var t=e[zt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[ha]||s[zt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=qg(e);e!==null;){if(s=e[zt])return s;e=qg(e)}return t}e=s,s=e.parentNode}return null}function Xt(e){if(e=e[zt]||e[ha]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ht(e){var t=e[$e];return t||(t=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[Oe]=!0}var xh=new Set,Th={};function Ss(e,t){Js(e,t),Js(e+"Capture",t)}function Js(e,t){for(Th[e]=t,e=0;e<t.length;e++)xh.add(t[e])}var U1=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]*$"),Eh={},Ah={};function V1(e){return an.call(Ah,e)?!0:an.call(Eh,e)?!1:U1.test(e)?Ah[e]=!0:(Eh[e]=!0,!1)}function _o(e,t,s){if(V1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function xo(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function ma(e,t,s,i){if(i===null)e.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+i)}}function Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ch(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function I1(e,t,s){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){s=""+y,f.call(this,y)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bc(e){if(!e._valueTracker){var t=Ch(e)?"checked":"value";e._valueTracker=I1(e,t,""+e[t])}}function jh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),i="";return e&&(i=Ch(e)?e.checked?"true":"false":e.value),e=i,e!==s?(t.setValue(e),!0):!1}function To(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 H1=/[\n"\\]/g;function On(e){return e.replace(H1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Sc(e,t,s,i,c,f,y,_){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?_c(e,y,Bn(t)):s!=null?_c(e,y,Bn(s)):i!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Bn(_):e.removeAttribute("name")}function Nh(e,t,s,i,c,f,y,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){bc(e);return}s=s!=null?""+Bn(s):"",t=t!=null?""+Bn(t):s,_||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=_?e.checked:!!i,e.defaultChecked=!!i,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),bc(e)}function _c(e,t,s){t==="number"&&To(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Ws(e,t,s,i){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&i&&(e[s].defaultSelected=!0)}else{for(s=""+Bn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function wh(e,t,s){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+Bn(s):""}function Dh(e,t,s,i){if(t==null){if(i!=null){if(s!=null)throw Error(o(92));if(q(i)){if(1<i.length)throw Error(o(93));i=i[0]}s=i}s==null&&(s=""),t=s}s=Bn(t),e.defaultValue=s,i=e.textContent,i===s&&i!==""&&i!==null&&(e.value=i),bc(e)}function ei(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var q1=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 kh(e,t,s){var i=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,s):typeof s!="number"||s===0||q1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Mh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var i in s)!s.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&s[c]!==i&&kh(e,c,i)}else for(var f in t)t.hasOwnProperty(f)&&kh(e,f,t[f])}function xc(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 G1=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"]]),P1=/^[\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 Eo(e){return P1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function pa(){}var Tc=null;function Ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ti=null,ni=null;function Rh(e){var t=Xt(e);if(t&&(e=t.stateNode)){var s=e[Zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Sc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+On(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var i=s[t];if(i!==e&&i.form===e.form){var c=i[Zt]||null;if(!c)throw Error(o(90));Sc(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)i=s[t],i.form===e.form&&jh(i)}break e;case"textarea":wh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Ws(e,!!s.multiple,t,!1)}}}var Ac=!1;function Bh(e,t,s){if(Ac)return e(t,s);Ac=!0;try{var i=e(t);return i}finally{if(Ac=!1,(ti!==null||ni!==null)&&(dr(),ti&&(t=ti,e=ni,ni=ti=null,Rh(t),e)))for(t=0;t<e.length;t++)Rh(e[t])}}function tl(e,t){var s=e.stateNode;if(s===null)return null;var i=s[Zt]||null;if(i===null)return null;s=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var ga=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cc=!1;if(ga)try{var nl={};Object.defineProperty(nl,"passive",{get:function(){Cc=!0}}),window.addEventListener("test",nl,nl),window.removeEventListener("test",nl,nl)}catch{Cc=!1}var Ia=null,jc=null,Ao=null;function Oh(){if(Ao)return Ao;var e,t=jc,s=t.length,i,c="value"in Ia?Ia.value:Ia.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var y=s-e;for(i=1;i<=y&&t[s-i]===c[f-i];i++);return Ao=c.slice(e,1<i?1-i:void 0)}function Co(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 jo(){return!0}function Lh(){return!1}function mn(e){function t(s,i,c,f,y){this._reactName=s,this._targetInst=c,this.type=i,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(s=e[_],this[_]=s?s(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?jo:Lh,this.isPropagationStopped=Lh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=jo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=jo)},persist:function(){},isPersistent:jo}),t}var _s={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},No=mn(_s),al=b({},_s,{view:0,detail:0}),$1=mn(al),Nc,wc,sl,wo=b({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kc,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!==sl&&(sl&&e.type==="mousemove"?(Nc=e.screenX-sl.screenX,wc=e.screenY-sl.screenY):wc=Nc=0,sl=e),Nc)},movementY:function(e){return"movementY"in e?e.movementY:wc}}),zh=mn(wo),Y1=b({},wo,{dataTransfer:0}),F1=mn(Y1),K1=b({},al,{relatedTarget:0}),Dc=mn(K1),Z1=b({},_s,{animationName:0,elapsedTime:0,pseudoElement:0}),X1=mn(Z1),Q1=b({},_s,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),J1=mn(Q1),W1=b({},_s,{data:0}),Uh=mn(W1),eS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tS={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"},nS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nS[e])?!!t[e]:!1}function kc(){return aS}var sS=b({},al,{key:function(e){if(e.key){var t=eS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Co(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kc,charCode:function(e){return e.type==="keypress"?Co(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Co(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iS=mn(sS),lS=b({},wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vh=mn(lS),oS=b({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kc}),rS=mn(oS),cS=b({},_s,{propertyName:0,elapsedTime:0,pseudoElement:0}),uS=mn(cS),dS=b({},wo,{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}),fS=mn(dS),hS=b({},_s,{newState:0,oldState:0}),mS=mn(hS),pS=[9,13,27,32],Mc=ga&&"CompositionEvent"in window,il=null;ga&&"documentMode"in document&&(il=document.documentMode);var gS=ga&&"TextEvent"in window&&!il,Ih=ga&&(!Mc||il&&8<il&&11>=il),Hh=" ",qh=!1;function Gh(e,t){switch(e){case"keyup":return pS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ph(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function vS(e,t){switch(e){case"compositionend":return Ph(t);case"keypress":return t.which!==32?null:(qh=!0,Hh);case"textInput":return e=t.data,e===Hh&&qh?null:e;default:return null}}function yS(e,t){if(ai)return e==="compositionend"||!Mc&&Gh(e,t)?(e=Oh(),Ao=jc=Ia=null,ai=!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 Ih&&t.locale!=="ko"?null:t.data;default:return null}}var bS={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 $h(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bS[e.type]:t==="textarea"}function Yh(e,t,s,i){ti?ni?ni.push(i):ni=[i]:ti=i,t=yr(t,"onChange"),0<t.length&&(s=new No("onChange","change",null,s,i),e.push({event:s,listeners:t}))}var ll=null,ol=null;function SS(e){Ng(e,0)}function Do(e){var t=bt(e);if(jh(t))return e}function Fh(e,t){if(e==="change")return t}var Kh=!1;if(ga){var Rc;if(ga){var Bc="oninput"in document;if(!Bc){var Zh=document.createElement("div");Zh.setAttribute("oninput","return;"),Bc=typeof Zh.oninput=="function"}Rc=Bc}else Rc=!1;Kh=Rc&&(!document.documentMode||9<document.documentMode)}function Xh(){ll&&(ll.detachEvent("onpropertychange",Qh),ol=ll=null)}function Qh(e){if(e.propertyName==="value"&&Do(ol)){var t=[];Yh(t,ol,e,Ec(e)),Bh(SS,t)}}function _S(e,t,s){e==="focusin"?(Xh(),ll=t,ol=s,ll.attachEvent("onpropertychange",Qh)):e==="focusout"&&Xh()}function xS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Do(ol)}function TS(e,t){if(e==="click")return Do(t)}function ES(e,t){if(e==="input"||e==="change")return Do(t)}function AS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:AS;function rl(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(i=0;i<s.length;i++){var c=s[i];if(!an.call(t,c)||!xn(e[c],t[c]))return!1}return!0}function Jh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wh(e,t){var s=Jh(e);e=0;for(var i;s;){if(s.nodeType===3){if(i=e+s.textContent.length,e<=t&&i>=t)return{node:s,offset:t-e};e=i}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Jh(s)}}function em(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?em(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=To(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=To(e.document)}return t}function Oc(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 CS=ga&&"documentMode"in document&&11>=document.documentMode,si=null,Lc=null,cl=null,zc=!1;function nm(e,t,s){var i=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;zc||si==null||si!==To(i)||(i=si,"selectionStart"in i&&Oc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),cl&&rl(cl,i)||(cl=i,i=yr(Lc,"onSelect"),0<i.length&&(t=new No("onSelect","select",null,t,s),e.push({event:t,listeners:i}),t.target=si)))}function xs(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var ii={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionrun:xs("Transition","TransitionRun"),transitionstart:xs("Transition","TransitionStart"),transitioncancel:xs("Transition","TransitionCancel"),transitionend:xs("Transition","TransitionEnd")},Uc={},am={};ga&&(am=document.createElement("div").style,"AnimationEvent"in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),"TransitionEvent"in window||delete ii.transitionend.transition);function Ts(e){if(Uc[e])return Uc[e];if(!ii[e])return e;var t=ii[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in am)return Uc[e]=t[s];return e}var sm=Ts("animationend"),im=Ts("animationiteration"),lm=Ts("animationstart"),jS=Ts("transitionrun"),NS=Ts("transitionstart"),wS=Ts("transitioncancel"),om=Ts("transitionend"),rm=new Map,Vc="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(" ");Vc.push("scrollEnd");function Jn(e,t){rm.set(e,t),Ss(t,[e])}var ko=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)},Ln=[],li=0,Ic=0;function Mo(){for(var e=li,t=Ic=li=0;t<e;){var s=Ln[t];Ln[t++]=null;var i=Ln[t];Ln[t++]=null;var c=Ln[t];Ln[t++]=null;var f=Ln[t];if(Ln[t++]=null,i!==null&&c!==null){var y=i.pending;y===null?c.next=c:(c.next=y.next,y.next=c),i.pending=c}f!==0&&cm(s,c,f)}}function Ro(e,t,s,i){Ln[li++]=e,Ln[li++]=t,Ln[li++]=s,Ln[li++]=i,Ic|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Hc(e,t,s,i){return Ro(e,t,s,i),Bo(e)}function Es(e,t){return Ro(e,null,null,t),Bo(e)}function cm(e,t,s){e.lanes|=s;var i=e.alternate;i!==null&&(i.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,i=f.alternate,i!==null&&(i.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-yt(s),e=f.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=s|536870912),f):null}function Bo(e){if(50<kl)throw kl=0,Xu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oi={};function DS(e,t,s,i){this.tag=e,this.key=s,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(e,t,s,i){return new DS(e,t,s,i)}function qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function va(e,t){var s=e.alternate;return s===null?(s=Tn(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function um(e,t){e.flags&=65011714;var s=e.alternate;return s===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=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Oo(e,t,s,i,c,f){var y=0;if(i=e,typeof e=="function")qc(e)&&(y=1);else if(typeof e=="string")y=O_(e,s,Ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Tn(31,s,t,c),e.elementType=ne,e.lanes=f,e;case j:return As(s.children,c,f,t);case N:y=8,c|=24;break;case A:return e=Tn(12,s,t,c|2),e.elementType=A,e.lanes=f,e;case H:return e=Tn(13,s,t,c),e.elementType=H,e.lanes=f,e;case J:return e=Tn(19,s,t,c),e.elementType=J,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:y=10;break e;case O:y=9;break e;case X:y=11;break e;case W:y=14;break e;case $:y=16,i=null;break e}y=29,s=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=Tn(y,s,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function As(e,t,s,i){return e=Tn(7,e,i,t),e.lanes=s,e}function Gc(e,t,s){return e=Tn(6,e,null,t),e.lanes=s,e}function dm(e){var t=Tn(18,null,null,0);return t.stateNode=e,t}function Pc(e,t,s){return t=Tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fm=new WeakMap;function zn(e,t){if(typeof e=="object"&&e!==null){var s=fm.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Zn(t)},fm.set(e,t),t)}return{value:e,source:t,stack:Zn(t)}}var ri=[],ci=0,Lo=null,ul=0,Un=[],Vn=0,Ha=null,aa=1,sa="";function ya(e,t){ri[ci++]=ul,ri[ci++]=Lo,Lo=e,ul=t}function hm(e,t,s){Un[Vn++]=aa,Un[Vn++]=sa,Un[Vn++]=Ha,Ha=e;var i=aa;e=sa;var c=32-yt(i)-1;i&=~(1<<c),s+=1;var f=32-yt(t)+c;if(30<f){var y=c-c%5;f=(i&(1<<y)-1).toString(32),i>>=y,c-=y,aa=1<<32-yt(t)+c|s<<c|i,sa=f+e}else aa=1<<f|s<<c|i,sa=e}function $c(e){e.return!==null&&(ya(e,1),hm(e,1,0))}function Yc(e){for(;e===Lo;)Lo=ri[--ci],ri[ci]=null,ul=ri[--ci],ri[ci]=null;for(;e===Ha;)Ha=Un[--Vn],Un[Vn]=null,sa=Un[--Vn],Un[Vn]=null,aa=Un[--Vn],Un[Vn]=null}function mm(e,t){Un[Vn++]=aa,Un[Vn++]=sa,Un[Vn++]=Ha,aa=t.id,sa=t.overflow,Ha=e}var Qt=null,ct=null,Ge=!1,qa=null,In=!1,Fc=Error(o(519));function Ga(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dl(zn(t,e)),Fc}function pm(e){var t=e.stateNode,s=e.type,i=e.memoizedProps;switch(t[zt]=e,t[Zt]=i,s){case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":case"embed":Ve("load",t);break;case"video":case"audio":for(s=0;s<Rl.length;s++)Ve(Rl[s],t);break;case"source":Ve("error",t);break;case"img":case"image":case"link":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"input":Ve("invalid",t),Nh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ve("invalid",t);break;case"textarea":Ve("invalid",t),Dh(t,i.value,i.defaultValue,i.children)}s=i.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||i.suppressHydrationWarning===!0||Mg(t.textContent,s)?(i.popover!=null&&(Ve("beforetoggle",t),Ve("toggle",t)),i.onScroll!=null&&Ve("scroll",t),i.onScrollEnd!=null&&Ve("scrollend",t),i.onClick!=null&&(t.onclick=pa),t=!0):t=!1,t||Ga(e,!0)}function gm(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Qt=Qt.return}}function ui(e){if(e!==Qt)return!1;if(!Ge)return gm(e),Ge=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||dd(e.type,e.memoizedProps)),s=!s),s&&ct&&Ga(e),gm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Hg(e)}else t===27?(t=ct,as(e.type)?(e=gd,gd=null,ct=e):ct=t):ct=Qt?qn(e.stateNode.nextSibling):null;return!0}function Cs(){ct=Qt=null,Ge=!1}function Kc(){var e=qa;return e!==null&&(yn===null?yn=e:yn.push.apply(yn,e),qa=null),e}function dl(e){qa===null?qa=[e]:qa.push(e)}var Zc=Pe(null),js=null,ba=null;function Pa(e,t,s){_e(Zc,t._currentValue),t._currentValue=s}function Sa(e){e._currentValue=Zc.current,we(Zc)}function Xc(e,t,s){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===s)break;e=e.return}}function Qc(e,t,s,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var y=c.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=c;for(var E=0;E<t.length;E++)if(_.context===t[E]){f.lanes|=s,_=f.alternate,_!==null&&(_.lanes|=s),Xc(f.return,s,e),i||(y=null);break e}f=_.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(o(341));y.lanes|=s,f=y.alternate,f!==null&&(f.lanes|=s),Xc(y,s,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function di(e,t,s,i){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var _=c.type;xn(c.pendingProps.value,y.value)||(e!==null?e.push(_):e=[_])}}else if(c===I.current){if(y=c.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ul):e=[Ul])}c=c.return}e!==null&&Qc(t,e,s,i),t.flags|=262144}function zo(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ns(e){js=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Jt(e){return vm(js,e)}function Uo(e,t){return js===null&&Ns(e),vm(e,t)}function vm(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},ba===null){if(e===null)throw Error(o(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return s}var kS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},MS=n.unstable_scheduleCallback,RS=n.unstable_NormalPriority,Ut={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jc(){return{controller:new kS,data:new Map,refCount:0}}function fl(e){e.refCount--,e.refCount===0&&MS(RS,function(){e.controller.abort()})}var hl=null,Wc=0,fi=0,hi=null;function BS(e,t){if(hl===null){var s=hl=[];Wc=0,fi=nd(),hi={status:"pending",value:void 0,then:function(i){s.push(i)}}}return Wc++,t.then(ym,ym),t}function ym(){if(--Wc===0&&hl!==null){hi!==null&&(hi.status="fulfilled");var e=hl;hl=null,fi=0,hi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function OS(e,t){var s=[],i={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),i}var bm=z.S;z.S=function(e,t){ng=de(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&BS(e,t),bm!==null&&bm(e,t)};var ws=Pe(null);function eu(){var e=ws.current;return e!==null?e:lt.pooledCache}function Vo(e,t){t===null?_e(ws,ws.current):_e(ws,t.pool)}function Sm(){var e=eu();return e===null?null:{parent:Ut._currentValue,pool:e}}var mi=Error(o(460)),tu=Error(o(474)),Io=Error(o(542)),Ho={then:function(){}};function _m(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xm(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(pa,pa),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Em(e),e;default:if(typeof t.status=="string")t.then(pa,pa);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Em(e),e}throw ks=t,mi}}function Ds(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ks=s,mi):s}}var ks=null;function Tm(){if(ks===null)throw Error(o(459));var e=ks;return ks=null,e}function Em(e){if(e===mi||e===Io)throw Error(o(483))}var pi=null,ml=0;function qo(e){var t=ml;return ml+=1,pi===null&&(pi=[]),xm(pi,e,t)}function pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Go(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Am(e){function t(k,w){if(e){var R=k.deletions;R===null?(k.deletions=[w],k.flags|=16):R.push(w)}}function s(k,w){if(!e)return null;for(;w!==null;)t(k,w),w=w.sibling;return null}function i(k){for(var w=new Map;k!==null;)k.key!==null?w.set(k.key,k):w.set(k.index,k),k=k.sibling;return w}function c(k,w){return k=va(k,w),k.index=0,k.sibling=null,k}function f(k,w,R){return k.index=R,e?(R=k.alternate,R!==null?(R=R.index,R<w?(k.flags|=67108866,w):R):(k.flags|=67108866,w)):(k.flags|=1048576,w)}function y(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function _(k,w,R,Y){return w===null||w.tag!==6?(w=Gc(R,k.mode,Y),w.return=k,w):(w=c(w,R),w.return=k,w)}function E(k,w,R,Y){var ve=R.type;return ve===j?G(k,w,R.props.children,Y,R.key):w!==null&&(w.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===$&&Ds(ve)===w.type)?(w=c(w,R.props),pl(w,R),w.return=k,w):(w=Oo(R.type,R.key,R.props,null,k.mode,Y),pl(w,R),w.return=k,w)}function B(k,w,R,Y){return w===null||w.tag!==4||w.stateNode.containerInfo!==R.containerInfo||w.stateNode.implementation!==R.implementation?(w=Pc(R,k.mode,Y),w.return=k,w):(w=c(w,R.children||[]),w.return=k,w)}function G(k,w,R,Y,ve){return w===null||w.tag!==7?(w=As(R,k.mode,Y,ve),w.return=k,w):(w=c(w,R),w.return=k,w)}function K(k,w,R){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=Gc(""+w,k.mode,R),w.return=k,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case T:return R=Oo(w.type,w.key,w.props,null,k.mode,R),pl(R,w),R.return=k,R;case C:return w=Pc(w,k.mode,R),w.return=k,w;case $:return w=Ds(w),K(k,w,R)}if(q(w)||pe(w))return w=As(w,k.mode,R,null),w.return=k,w;if(typeof w.then=="function")return K(k,qo(w),R);if(w.$$typeof===M)return K(k,Uo(k,w),R);Go(k,w)}return null}function L(k,w,R,Y){var ve=w!==null?w.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ve!==null?null:_(k,w,""+R,Y);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case T:return R.key===ve?E(k,w,R,Y):null;case C:return R.key===ve?B(k,w,R,Y):null;case $:return R=Ds(R),L(k,w,R,Y)}if(q(R)||pe(R))return ve!==null?null:G(k,w,R,Y,null);if(typeof R.then=="function")return L(k,w,qo(R),Y);if(R.$$typeof===M)return L(k,w,Uo(k,R),Y);Go(k,R)}return null}function V(k,w,R,Y,ve){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return k=k.get(R)||null,_(w,k,""+Y,ve);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case T:return k=k.get(Y.key===null?R:Y.key)||null,E(w,k,Y,ve);case C:return k=k.get(Y.key===null?R:Y.key)||null,B(w,k,Y,ve);case $:return Y=Ds(Y),V(k,w,R,Y,ve)}if(q(Y)||pe(Y))return k=k.get(R)||null,G(w,k,Y,ve,null);if(typeof Y.then=="function")return V(k,w,R,qo(Y),ve);if(Y.$$typeof===M)return V(k,w,R,Uo(w,Y),ve);Go(w,Y)}return null}function ue(k,w,R,Y){for(var ve=null,Fe=null,me=w,Be=w=0,qe=null;me!==null&&Be<R.length;Be++){me.index>Be?(qe=me,me=null):qe=me.sibling;var Ke=L(k,me,R[Be],Y);if(Ke===null){me===null&&(me=qe);break}e&&me&&Ke.alternate===null&&t(k,me),w=f(Ke,w,Be),Fe===null?ve=Ke:Fe.sibling=Ke,Fe=Ke,me=qe}if(Be===R.length)return s(k,me),Ge&&ya(k,Be),ve;if(me===null){for(;Be<R.length;Be++)me=K(k,R[Be],Y),me!==null&&(w=f(me,w,Be),Fe===null?ve=me:Fe.sibling=me,Fe=me);return Ge&&ya(k,Be),ve}for(me=i(me);Be<R.length;Be++)qe=V(me,k,Be,R[Be],Y),qe!==null&&(e&&qe.alternate!==null&&me.delete(qe.key===null?Be:qe.key),w=f(qe,w,Be),Fe===null?ve=qe:Fe.sibling=qe,Fe=qe);return e&&me.forEach(function(rs){return t(k,rs)}),Ge&&ya(k,Be),ve}function Se(k,w,R,Y){if(R==null)throw Error(o(151));for(var ve=null,Fe=null,me=w,Be=w=0,qe=null,Ke=R.next();me!==null&&!Ke.done;Be++,Ke=R.next()){me.index>Be?(qe=me,me=null):qe=me.sibling;var rs=L(k,me,Ke.value,Y);if(rs===null){me===null&&(me=qe);break}e&&me&&rs.alternate===null&&t(k,me),w=f(rs,w,Be),Fe===null?ve=rs:Fe.sibling=rs,Fe=rs,me=qe}if(Ke.done)return s(k,me),Ge&&ya(k,Be),ve;if(me===null){for(;!Ke.done;Be++,Ke=R.next())Ke=K(k,Ke.value,Y),Ke!==null&&(w=f(Ke,w,Be),Fe===null?ve=Ke:Fe.sibling=Ke,Fe=Ke);return Ge&&ya(k,Be),ve}for(me=i(me);!Ke.done;Be++,Ke=R.next())Ke=V(me,k,Be,Ke.value,Y),Ke!==null&&(e&&Ke.alternate!==null&&me.delete(Ke.key===null?Be:Ke.key),w=f(Ke,w,Be),Fe===null?ve=Ke:Fe.sibling=Ke,Fe=Ke);return e&&me.forEach(function(Y_){return t(k,Y_)}),Ge&&ya(k,Be),ve}function it(k,w,R,Y){if(typeof R=="object"&&R!==null&&R.type===j&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case T:e:{for(var ve=R.key;w!==null;){if(w.key===ve){if(ve=R.type,ve===j){if(w.tag===7){s(k,w.sibling),Y=c(w,R.props.children),Y.return=k,k=Y;break e}}else if(w.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===$&&Ds(ve)===w.type){s(k,w.sibling),Y=c(w,R.props),pl(Y,R),Y.return=k,k=Y;break e}s(k,w);break}else t(k,w);w=w.sibling}R.type===j?(Y=As(R.props.children,k.mode,Y,R.key),Y.return=k,k=Y):(Y=Oo(R.type,R.key,R.props,null,k.mode,Y),pl(Y,R),Y.return=k,k=Y)}return y(k);case C:e:{for(ve=R.key;w!==null;){if(w.key===ve)if(w.tag===4&&w.stateNode.containerInfo===R.containerInfo&&w.stateNode.implementation===R.implementation){s(k,w.sibling),Y=c(w,R.children||[]),Y.return=k,k=Y;break e}else{s(k,w);break}else t(k,w);w=w.sibling}Y=Pc(R,k.mode,Y),Y.return=k,k=Y}return y(k);case $:return R=Ds(R),it(k,w,R,Y)}if(q(R))return ue(k,w,R,Y);if(pe(R)){if(ve=pe(R),typeof ve!="function")throw Error(o(150));return R=ve.call(R),Se(k,w,R,Y)}if(typeof R.then=="function")return it(k,w,qo(R),Y);if(R.$$typeof===M)return it(k,w,Uo(k,R),Y);Go(k,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,w!==null&&w.tag===6?(s(k,w.sibling),Y=c(w,R),Y.return=k,k=Y):(s(k,w),Y=Gc(R,k.mode,Y),Y.return=k,k=Y),y(k)):s(k,w)}return function(k,w,R,Y){try{ml=0;var ve=it(k,w,R,Y);return pi=null,ve}catch(me){if(me===mi||me===Io)throw me;var Fe=Tn(29,me,null,k.mode);return Fe.lanes=Y,Fe.return=k,Fe}finally{}}}var Ms=Am(!0),Cm=Am(!1),$a=!1;function nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function au(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 Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,s){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Xe&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Bo(e),cm(e,null,s),t}return Ro(e,i,t,s),Bo(e)}function gl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,s|=i,t.lanes=s,Qi(e,s)}}function su(e,t){var s=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,s===i)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=y:f=f.next=y,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var iu=!1;function vl(){if(iu){var e=hi;if(e!==null)throw e}}function yl(e,t,s,i){iu=!1;var c=e.updateQueue;$a=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,_=c.shared.pending;if(_!==null){c.shared.pending=null;var E=_,B=E.next;E.next=null,y===null?f=B:y.next=B,y=E;var G=e.alternate;G!==null&&(G=G.updateQueue,_=G.lastBaseUpdate,_!==y&&(_===null?G.firstBaseUpdate=B:_.next=B,G.lastBaseUpdate=E))}if(f!==null){var K=c.baseState;y=0,G=B=E=null,_=f;do{var L=_.lane&-536870913,V=L!==_.lane;if(V?(He&L)===L:(i&L)===L){L!==0&&L===fi&&(iu=!0),G!==null&&(G=G.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ue=e,Se=_;L=t;var it=s;switch(Se.tag){case 1:if(ue=Se.payload,typeof ue=="function"){K=ue.call(it,K,L);break e}K=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=Se.payload,L=typeof ue=="function"?ue.call(it,K,L):ue,L==null)break e;K=b({},K,L);break e;case 2:$a=!0}}L=_.callback,L!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[L]:V.push(L))}else V={lane:L,tag:_.tag,payload:_.payload,callback:_.callback,next:null},G===null?(B=G=V,E=K):G=G.next=V,y|=L;if(_=_.next,_===null){if(_=c.shared.pending,_===null)break;V=_,_=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);G===null&&(E=K),c.baseState=E,c.firstBaseUpdate=B,c.lastBaseUpdate=G,f===null&&(c.shared.lanes=0),Ja|=y,e.lanes=y,e.memoizedState=K}}function jm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Nm(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)jm(s[e],t)}var gi=Pe(null),Po=Pe(0);function wm(e,t){e=wa,_e(Po,e),_e(gi,t),wa=e|t.baseLanes}function lu(){_e(Po,wa),_e(gi,gi.current)}function ou(){wa=Po.current,we(gi),we(Po)}var En=Pe(null),Hn=null;function Ka(e){var t=e.alternate;_e(kt,kt.current&1),_e(En,e),Hn===null&&(t===null||gi.current!==null||t.memoizedState!==null)&&(Hn=e)}function ru(e){_e(kt,kt.current),_e(En,e),Hn===null&&(Hn=e)}function Dm(e){e.tag===22?(_e(kt,kt.current),_e(En,e),Hn===null&&(Hn=e)):Za()}function Za(){_e(kt,kt.current),_e(En,En.current)}function An(e){we(En),Hn===e&&(Hn=null),we(kt)}var kt=Pe(0);function $o(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||md(s)||pd(s)))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 _a=0,Me=null,at=null,Vt=null,Yo=!1,vi=!1,Rs=!1,Fo=0,bl=0,yi=null,LS=0;function Ct(){throw Error(o(321))}function cu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!xn(e[s],t[s]))return!1;return!0}function uu(e,t,s,i,c,f){return _a=f,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?hp:Au,Rs=!1,f=s(i,c),Rs=!1,vi&&(f=Mm(t,s,i,c)),km(e),f}function km(e){z.H=xl;var t=at!==null&&at.next!==null;if(_a=0,Vt=at=Me=null,Yo=!1,bl=0,yi=null,t)throw Error(o(300));e===null||It||(e=e.dependencies,e!==null&&zo(e)&&(It=!0))}function Mm(e,t,s,i){Me=e;var c=0;do{if(vi&&(yi=null),bl=0,vi=!1,25<=c)throw Error(o(301));if(c+=1,Vt=at=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=mp,f=t(s,i)}while(vi);return f}function zS(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Sl(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Me.flags|=1024),t}function du(){var e=Fo!==0;return Fo=0,e}function fu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function hu(e){if(Yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Yo=!1}_a=0,Vt=at=Me=null,vi=!1,bl=Fo=0,yi=null}function un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Me.memoizedState=Vt=e:Vt=Vt.next=e,Vt}function Mt(){if(at===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Vt===null?Me.memoizedState:Vt.next;if(t!==null)Vt=t,at=e;else{if(e===null)throw Me.alternate===null?Error(o(467)):Error(o(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Vt===null?Me.memoizedState=Vt=e:Vt=Vt.next=e}return Vt}function Ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Sl(e){var t=bl;return bl+=1,yi===null&&(yi=[]),e=xm(yi,e,t),t=Me,(Vt===null?t.memoizedState:Vt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?hp:Au),e}function Zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Sl(e);if(e.$$typeof===M)return Jt(e)}throw Error(o(438,String(e)))}function mu(e){var t=null,s=Me.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var i=Me.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Ko(),Me.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),i=0;i<e;i++)s[i]=ge;return t.index++,s}function xa(e,t){return typeof t=="function"?t(e):t}function Xo(e){var t=Mt();return pu(t,at,e)}function pu(e,t,s){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=s;var c=e.baseQueue,f=i.pending;if(f!==null){if(c!==null){var y=c.next;c.next=f.next,f.next=y}t.baseQueue=c=f,i.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var _=y=null,E=null,B=t,G=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(He&K)===K:(_a&K)===K){var L=B.revertLane;if(L===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===fi&&(G=!0);else if((_a&L)===L){B=B.next,L===fi&&(G=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},E===null?(_=E=K,y=f):E=E.next=K,Me.lanes|=L,Ja|=L;K=B.action,Rs&&s(f,K),f=B.hasEagerState?B.eagerState:s(f,K)}else L={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},E===null?(_=E=L,y=f):E=E.next=L,Me.lanes|=K,Ja|=K;B=B.next}while(B!==null&&B!==t);if(E===null?y=f:E.next=_,!xn(f,e.memoizedState)&&(It=!0,G&&(s=hi,s!==null)))throw s;e.memoizedState=f,e.baseState=y,e.baseQueue=E,i.lastRenderedState=f}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function gu(e){var t=Mt(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var i=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var y=c=c.next;do f=e(f,y.action),y=y.next;while(y!==c);xn(f,t.memoizedState)||(It=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,i]}function Rm(e,t,s){var i=Me,c=Mt(),f=Ge;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var y=!xn((at||c).memoizedState,s);if(y&&(c.memoizedState=s,It=!0),c=c.queue,bu(Lm.bind(null,i,c,e),[e]),c.getSnapshot!==t||y||Vt!==null&&Vt.memoizedState.tag&1){if(i.flags|=2048,bi(9,{destroy:void 0},Om.bind(null,i,c,s,t),null),lt===null)throw Error(o(349));f||(_a&127)!==0||Bm(i,t,s)}return s}function Bm(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Me.updateQueue,t===null?(t=Ko(),Me.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Om(e,t,s,i){t.value=s,t.getSnapshot=i,zm(t)&&Um(e)}function Lm(e,t,s){return s(function(){zm(t)&&Um(e)})}function zm(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!xn(e,s)}catch{return!0}}function Um(e){var t=Es(e,2);t!==null&&bn(t,e,2)}function vu(e){var t=un();if(typeof e=="function"){var s=e;if(e=s(),Rs){cn(!0);try{s()}finally{cn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t}function Vm(e,t,s,i){return e.baseState=s,pu(e,at,typeof i=="function"?i:xa)}function US(e,t,s,i,c){if(Wo(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};z.T!==null?s(!0):f.isTransition=!1,i(f),s=t.pending,s===null?(f.next=t.pending=f,Im(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Im(e,t){var s=t.action,i=t.payload,c=e.state;if(t.isTransition){var f=z.T,y={};z.T=y;try{var _=s(c,i),E=z.S;E!==null&&E(y,_),Hm(e,t,_)}catch(B){yu(e,t,B)}finally{f!==null&&y.types!==null&&(f.types=y.types),z.T=f}}else try{f=s(c,i),Hm(e,t,f)}catch(B){yu(e,t,B)}}function Hm(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(i){qm(e,t,i)},function(i){return yu(e,t,i)}):qm(e,t,s)}function qm(e,t,s){t.status="fulfilled",t.value=s,Gm(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Im(e,s)))}function yu(e,t,s){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=s,Gm(t),t=t.next;while(t!==i)}e.action=null}function Gm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Pm(e,t){return t}function $m(e,t){if(Ge){var s=lt.formState;if(s!==null){e:{var i=Me;if(Ge){if(ct){t:{for(var c=ct,f=In;c.nodeType!==8;){if(!f){c=null;break t}if(c=qn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ct=qn(c.nextSibling),i=c.data==="F!";break e}}Ga(i)}i=!1}i&&(t=s[0])}}return s=un(),s.memoizedState=s.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pm,lastRenderedState:t},s.queue=i,s=up.bind(null,Me,i),i.dispatch=s,i=vu(!1),f=Eu.bind(null,Me,!1,i.queue),i=un(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,s=US.bind(null,Me,c,f,s),c.dispatch=s,i.memoizedState=e,[t,s,!1]}function Ym(e){var t=Mt();return Fm(t,at,e)}function Fm(e,t,s){if(t=pu(e,t,Pm)[0],e=Xo(xa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Sl(t)}catch(y){throw y===mi?Io:y}else i=t;t=Mt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Me.flags|=2048,bi(9,{destroy:void 0},VS.bind(null,c,s),null)),[i,f,e]}function VS(e,t){e.action=t}function Km(e){var t=Mt(),s=at;if(s!==null)return Fm(t,s,e);Mt(),t=t.memoizedState,s=Mt();var i=s.queue.dispatch;return s.memoizedState=e,[t,i,!1]}function bi(e,t,s,i){return e={tag:e,create:s,deps:i,inst:t,next:null},t=Me.updateQueue,t===null&&(t=Ko(),Me.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(i=s.next,s.next=e,e.next=i,t.lastEffect=e),e}function Zm(){return Mt().memoizedState}function Qo(e,t,s,i){var c=un();Me.flags|=e,c.memoizedState=bi(1|t,{destroy:void 0},s,i===void 0?null:i)}function Jo(e,t,s,i){var c=Mt();i=i===void 0?null:i;var f=c.memoizedState.inst;at!==null&&i!==null&&cu(i,at.memoizedState.deps)?c.memoizedState=bi(t,f,s,i):(Me.flags|=e,c.memoizedState=bi(1|t,f,s,i))}function Xm(e,t){Qo(8390656,8,e,t)}function bu(e,t){Jo(2048,8,e,t)}function IS(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=Ko(),Me.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function Qm(e){var t=Mt().memoizedState;return IS({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Jm(e,t){return Jo(4,2,e,t)}function Wm(e,t){return Jo(4,4,e,t)}function ep(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function tp(e,t,s){s=s!=null?s.concat([e]):null,Jo(4,4,ep.bind(null,t,e),s)}function Su(){}function np(e,t){var s=Mt();t=t===void 0?null:t;var i=s.memoizedState;return t!==null&&cu(t,i[1])?i[0]:(s.memoizedState=[e,t],e)}function ap(e,t){var s=Mt();t=t===void 0?null:t;var i=s.memoizedState;if(t!==null&&cu(t,i[1]))return i[0];if(i=e(),Rs){cn(!0);try{e()}finally{cn(!1)}}return s.memoizedState=[i,t],i}function _u(e,t,s){return s===void 0||(_a&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=sg(),Me.lanes|=e,Ja|=e,s)}function sp(e,t,s,i){return xn(s,t)?s:gi.current!==null?(e=_u(e,s,i),xn(e,t)||(It=!0),e):(_a&42)===0||(_a&1073741824)!==0&&(He&261930)===0?(It=!0,e.memoizedState=s):(e=sg(),Me.lanes|=e,Ja|=e,t)}function ip(e,t,s,i,c){var f=F.p;F.p=f!==0&&8>f?f:8;var y=z.T,_={};z.T=_,Eu(e,!1,t,s);try{var E=c(),B=z.S;if(B!==null&&B(_,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var G=OS(E,i);_l(e,t,G,Nn(e))}else _l(e,t,i,Nn(e))}catch(K){_l(e,t,{then:function(){},status:"rejected",reason:K},Nn())}finally{F.p=f,y!==null&&_.types!==null&&(y.types=_.types),z.T=y}}function HS(){}function xu(e,t,s,i){if(e.tag!==5)throw Error(o(476));var c=lp(e).queue;ip(e,c,t,ee,s===null?HS:function(){return op(e),s(i)})}function lp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:ee},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function op(e){var t=lp(e);t.next===null&&(t=e.alternate.memoizedState),_l(e,t.next.queue,{},Nn())}function Tu(){return Jt(Ul)}function rp(){return Mt().memoizedState}function cp(){return Mt().memoizedState}function qS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=Nn();e=Ya(s);var i=Fa(t,e,s);i!==null&&(bn(i,t,s),gl(i,t,s)),t={cache:Jc()},e.payload=t;return}t=t.return}}function GS(e,t,s){var i=Nn();s={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Wo(e)?dp(t,s):(s=Hc(e,t,s,i),s!==null&&(bn(s,e,i),fp(s,t,i)))}function up(e,t,s){var i=Nn();_l(e,t,s,i)}function _l(e,t,s,i){var c={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Wo(e))dp(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var y=t.lastRenderedState,_=f(y,s);if(c.hasEagerState=!0,c.eagerState=_,xn(_,y))return Ro(e,t,c,0),lt===null&&Mo(),!1}catch{}finally{}if(s=Hc(e,t,c,i),s!==null)return bn(s,e,i),fp(s,t,i),!0}return!1}function Eu(e,t,s,i){if(i={lane:2,revertLane:nd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Wo(e)){if(t)throw Error(o(479))}else t=Hc(e,s,i,2),t!==null&&bn(t,e,2)}function Wo(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function dp(e,t){vi=Yo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function fp(e,t,s){if((s&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,s|=i,t.lanes=s,Qi(e,s)}}var xl={readContext:Jt,use:Zo,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};xl.useEffectEvent=Ct;var hp={readContext:Jt,use:Zo,useCallback:function(e,t){return un().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Xm,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Qo(4194308,4,ep.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){Qo(4,2,e,t)},useMemo:function(e,t){var s=un();t=t===void 0?null:t;var i=e();if(Rs){cn(!0);try{e()}finally{cn(!1)}}return s.memoizedState=[i,t],i},useReducer:function(e,t,s){var i=un();if(s!==void 0){var c=s(t);if(Rs){cn(!0);try{s(t)}finally{cn(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=GS.bind(null,Me,e),[i.memoizedState,e]},useRef:function(e){var t=un();return e={current:e},t.memoizedState=e},useState:function(e){e=vu(e);var t=e.queue,s=up.bind(null,Me,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:Su,useDeferredValue:function(e,t){var s=un();return _u(s,e,t)},useTransition:function(){var e=vu(!1);return e=ip.bind(null,Me,e.queue,!0,!1),un().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var i=Me,c=un();if(Ge){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),lt===null)throw Error(o(349));(He&127)!==0||Bm(i,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,Xm(Lm.bind(null,i,f,e),[e]),i.flags|=2048,bi(9,{destroy:void 0},Om.bind(null,i,f,s,t),null),s},useId:function(){var e=un(),t=lt.identifierPrefix;if(Ge){var s=sa,i=aa;s=(i&~(1<<32-yt(i)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Fo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=LS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Tu,useFormState:$m,useActionState:$m,useOptimistic:function(e){var t=un();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=Eu.bind(null,Me,!0,s),s.dispatch=t,[e,t]},useMemoCache:mu,useCacheRefresh:function(){return un().memoizedState=qS.bind(null,Me)},useEffectEvent:function(e){var t=un(),s={impl:e};return t.memoizedState=s,function(){if((Xe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Au={readContext:Jt,use:Zo,useCallback:np,useContext:Jt,useEffect:bu,useImperativeHandle:tp,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:ap,useReducer:Xo,useRef:Zm,useState:function(){return Xo(xa)},useDebugValue:Su,useDeferredValue:function(e,t){var s=Mt();return sp(s,at.memoizedState,e,t)},useTransition:function(){var e=Xo(xa)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:Sl(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:Tu,useFormState:Ym,useActionState:Ym,useOptimistic:function(e,t){var s=Mt();return Vm(s,at,e,t)},useMemoCache:mu,useCacheRefresh:cp};Au.useEffectEvent=Qm;var mp={readContext:Jt,use:Zo,useCallback:np,useContext:Jt,useEffect:bu,useImperativeHandle:tp,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:ap,useReducer:gu,useRef:Zm,useState:function(){return gu(xa)},useDebugValue:Su,useDeferredValue:function(e,t){var s=Mt();return at===null?_u(s,e,t):sp(s,at.memoizedState,e,t)},useTransition:function(){var e=gu(xa)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:Sl(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:Tu,useFormState:Km,useActionState:Km,useOptimistic:function(e,t){var s=Mt();return at!==null?Vm(s,at,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:mu,useCacheRefresh:cp};mp.useEffectEvent=Qm;function Cu(e,t,s,i){t=e.memoizedState,s=s(i,t),s=s==null?t:b({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var ju={enqueueSetState:function(e,t,s){e=e._reactInternals;var i=Nn(),c=Ya(i);c.payload=t,s!=null&&(c.callback=s),t=Fa(e,c,i),t!==null&&(bn(t,e,i),gl(t,e,i))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var i=Nn(),c=Ya(i);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=Fa(e,c,i),t!==null&&(bn(t,e,i),gl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Nn(),i=Ya(s);i.tag=2,t!=null&&(i.callback=t),t=Fa(e,i,s),t!==null&&(bn(t,e,s),gl(t,e,s))}};function pp(e,t,s,i,c,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,y):t.prototype&&t.prototype.isPureReactComponent?!rl(s,i)||!rl(c,f):!0}function gp(e,t,s,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,i),t.state!==e&&ju.enqueueReplaceState(t,t.state,null)}function Bs(e,t){var s=t;if("ref"in t){s={};for(var i in t)i!=="ref"&&(s[i]=t[i])}if(e=e.defaultProps){s===t&&(s=b({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function vp(e){ko(e)}function yp(e){console.error(e)}function bp(e){ko(e)}function er(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Sp(e,t,s){try{var i=e.onCaughtError;i(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Nu(e,t,s){return s=Ya(s),s.tag=3,s.payload={element:null},s.callback=function(){er(e,t)},s}function _p(e){return e=Ya(e),e.tag=3,e}function xp(e,t,s,i){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=i.value;e.payload=function(){return c(f)},e.callback=function(){Sp(t,s,i)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Sp(t,s,i),typeof c!="function"&&(Wa===null?Wa=new Set([this]):Wa.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})})}function PS(e,t,s,i,c){if(s.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=s.alternate,t!==null&&di(t,s,c,!0),s=En.current,s!==null){switch(s.tag){case 31:case 13:return Hn===null?fr():s.alternate===null&&jt===0&&(jt=3),s.flags&=-257,s.flags|=65536,s.lanes=c,i===Ho?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([i]):t.add(i),Wu(e,i,c)),!1;case 22:return s.flags|=65536,i===Ho?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([i]):s.add(i)),Wu(e,i,c)),!1}throw Error(o(435,s.tag))}return Wu(e,i,c),fr(),!1}if(Ge)return t=En.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==Fc&&(e=Error(o(422),{cause:i}),dl(zn(e,s)))):(i!==Fc&&(t=Error(o(423),{cause:i}),dl(zn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=zn(i,s),c=Nu(e.stateNode,i,c),su(e,c),jt!==4&&(jt=2)),!1;var f=Error(o(520),{cause:i});if(f=zn(f,s),Dl===null?Dl=[f]:Dl.push(f),jt!==4&&(jt=2),t===null)return!0;i=zn(i,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=Nu(s.stateNode,i,e),su(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Wa===null||!Wa.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=_p(c),xp(c,e,s,i),su(s,c),!1}s=s.return}while(s!==null);return!1}var wu=Error(o(461)),It=!1;function Wt(e,t,s,i){t.child=e===null?Cm(t,null,s,i):Ms(t,e.child,s,i)}function Tp(e,t,s,i,c){s=s.render;var f=t.ref;if("ref"in i){var y={};for(var _ in i)_!=="ref"&&(y[_]=i[_])}else y=i;return Ns(t),i=uu(e,t,s,y,f,c),_=du(),e!==null&&!It?(fu(e,t,c),Ta(e,t,c)):(Ge&&_&&$c(t),t.flags|=1,Wt(e,t,i,c),t.child)}function Ep(e,t,s,i,c){if(e===null){var f=s.type;return typeof f=="function"&&!qc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,Ap(e,t,f,i,c)):(e=Oo(s.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!zu(e,c)){var y=f.memoizedProps;if(s=s.compare,s=s!==null?s:rl,s(y,i)&&e.ref===t.ref)return Ta(e,t,c)}return t.flags|=1,e=va(f,i),e.ref=t.ref,e.return=t,t.child=e}function Ap(e,t,s,i,c){if(e!==null){var f=e.memoizedProps;if(rl(f,i)&&e.ref===t.ref)if(It=!1,t.pendingProps=i=f,zu(e,c))(e.flags&131072)!==0&&(It=!0);else return t.lanes=e.lanes,Ta(e,t,c)}return Du(e,t,s,i,c)}function Cp(e,t,s,i){var c=i.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~f}else i=0,t.child=null;return jp(e,t,f,s,i)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vo(t,f!==null?f.cachePool:null),f!==null?wm(t,f):lu(),Dm(t);else return i=t.lanes=536870912,jp(e,t,f!==null?f.baseLanes|s:s,s,i)}else f!==null?(Vo(t,f.cachePool),wm(t,f),Za(),t.memoizedState=null):(e!==null&&Vo(t,null),lu(),Za());return Wt(e,t,c,s),t.child}function Tl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function jp(e,t,s,i,c){var f=eu();return f=f===null?null:{parent:Ut._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&Vo(t,null),lu(),Dm(t),e!==null&&di(e,t,i,!0),t.childLanes=c,null}function tr(e,t){return t=ar({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Np(e,t,s){return Ms(t,e.child,null,s),e=tr(t,t.pendingProps),e.flags|=2,An(t),t.memoizedState=null,e}function $S(e,t,s){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(i.mode==="hidden")return e=tr(t,i),t.lanes=536870912,Tl(null,e);if(ru(t),(e=ct)?(e=Ig(e,In),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},s=dm(e),s.return=t,t.child=s,Qt=t,ct=null)):e=null,e===null)throw Ga(t);return t.lanes=536870912,null}return tr(t,i)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(ru(t),c)if(t.flags&256)t.flags&=-257,t=Np(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(It||di(e,t,s,!1),c=(s&e.childLanes)!==0,It||c){if(i=lt,i!==null&&(y=Ji(i,s),y!==0&&y!==f.retryLane))throw f.retryLane=y,Es(e,y),bn(i,e,y),wu;fr(),t=Np(e,t,s)}else e=f.treeContext,ct=qn(y.nextSibling),Qt=t,Ge=!0,qa=null,In=!1,e!==null&&mm(t,e),t=tr(t,i),t.flags|=4096;return t}return e=va(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nr(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Du(e,t,s,i,c){return Ns(t),s=uu(e,t,s,i,void 0,c),i=du(),e!==null&&!It?(fu(e,t,c),Ta(e,t,c)):(Ge&&i&&$c(t),t.flags|=1,Wt(e,t,s,c),t.child)}function wp(e,t,s,i,c,f){return Ns(t),t.updateQueue=null,s=Mm(t,i,s,c),km(e),i=du(),e!==null&&!It?(fu(e,t,f),Ta(e,t,f)):(Ge&&i&&$c(t),t.flags|=1,Wt(e,t,s,f),t.child)}function Dp(e,t,s,i,c){if(Ns(t),t.stateNode===null){var f=oi,y=s.contextType;typeof y=="object"&&y!==null&&(f=Jt(y)),f=new s(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ju,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},nu(t),y=s.contextType,f.context=typeof y=="object"&&y!==null?Jt(y):oi,f.state=t.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Cu(t,s,y,i),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&ju.enqueueReplaceState(f,f.state,null),yl(t,i,f,c),vl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var _=t.memoizedProps,E=Bs(s,_);f.props=E;var B=f.context,G=s.contextType;y=oi,typeof G=="object"&&G!==null&&(y=Jt(G));var K=s.getDerivedStateFromProps;G=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,G||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||B!==y)&&gp(t,f,i,y),$a=!1;var L=t.memoizedState;f.state=L,yl(t,i,f,c),vl(),B=t.memoizedState,_||L!==B||$a?(typeof K=="function"&&(Cu(t,s,K,i),B=t.memoizedState),(E=$a||pp(t,s,E,i,L,B,y))?(G||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=B),f.props=i,f.state=B,f.context=y,i=E):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,au(e,t),y=t.memoizedProps,G=Bs(s,y),f.props=G,K=t.pendingProps,L=f.context,B=s.contextType,E=oi,typeof B=="object"&&B!==null&&(E=Jt(B)),_=s.getDerivedStateFromProps,(B=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==K||L!==E)&&gp(t,f,i,E),$a=!1,L=t.memoizedState,f.state=L,yl(t,i,f,c),vl();var V=t.memoizedState;y!==K||L!==V||$a||e!==null&&e.dependencies!==null&&zo(e.dependencies)?(typeof _=="function"&&(Cu(t,s,_,i),V=t.memoizedState),(G=$a||pp(t,s,G,i,L,V,E)||e!==null&&e.dependencies!==null&&zo(e.dependencies))?(B||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,V,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,V,E)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=V),f.props=i,f.state=V,f.context=E,i=G):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,nr(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,s=i&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Ms(t,e.child,null,c),t.child=Ms(t,null,s,c)):Wt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=Ta(e,t,c),e}function kp(e,t,s,i){return Cs(),t.flags|=256,Wt(e,t,s,i),t.child}var ku={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mu(e){return{baseLanes:e,cachePool:Sm()}}function Ru(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=jn),e}function Mp(e,t,s){var i=t.pendingProps,c=!1,f=(t.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(kt.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(c?Ka(t):Za(),(e=ct)?(e=Ig(e,In),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},s=dm(e),s.return=t,t.child=s,Qt=t,ct=null)):e=null,e===null)throw Ga(t);return pd(e)?t.lanes=32:t.lanes=536870912,null}var _=i.children;return i=i.fallback,c?(Za(),c=t.mode,_=ar({mode:"hidden",children:_},c),i=As(i,c,s,null),_.return=t,i.return=t,_.sibling=i,t.child=_,i=t.child,i.memoizedState=Mu(s),i.childLanes=Ru(e,y,s),t.memoizedState=ku,Tl(null,i)):(Ka(t),Bu(t,_))}var E=e.memoizedState;if(E!==null&&(_=E.dehydrated,_!==null)){if(f)t.flags&256?(Ka(t),t.flags&=-257,t=Ou(e,t,s)):t.memoizedState!==null?(Za(),t.child=e.child,t.flags|=128,t=null):(Za(),_=i.fallback,c=t.mode,i=ar({mode:"visible",children:i.children},c),_=As(_,c,s,null),_.flags|=2,i.return=t,_.return=t,i.sibling=_,t.child=i,Ms(t,e.child,null,s),i=t.child,i.memoizedState=Mu(s),i.childLanes=Ru(e,y,s),t.memoizedState=ku,t=Tl(null,i));else if(Ka(t),pd(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var B=y.dgst;y=B,i=Error(o(419)),i.stack="",i.digest=y,dl({value:i,source:null,stack:null}),t=Ou(e,t,s)}else if(It||di(e,t,s,!1),y=(s&e.childLanes)!==0,It||y){if(y=lt,y!==null&&(i=Ji(y,s),i!==0&&i!==E.retryLane))throw E.retryLane=i,Es(e,i),bn(y,e,i),wu;md(_)||fr(),t=Ou(e,t,s)}else md(_)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,ct=qn(_.nextSibling),Qt=t,Ge=!0,qa=null,In=!1,e!==null&&mm(t,e),t=Bu(t,i.children),t.flags|=4096);return t}return c?(Za(),_=i.fallback,c=t.mode,E=e.child,B=E.sibling,i=va(E,{mode:"hidden",children:i.children}),i.subtreeFlags=E.subtreeFlags&65011712,B!==null?_=va(B,_):(_=As(_,c,s,null),_.flags|=2),_.return=t,i.return=t,i.sibling=_,t.child=i,Tl(null,i),i=t.child,_=e.child.memoizedState,_===null?_=Mu(s):(c=_.cachePool,c!==null?(E=Ut._currentValue,c=c.parent!==E?{parent:E,pool:E}:c):c=Sm(),_={baseLanes:_.baseLanes|s,cachePool:c}),i.memoizedState=_,i.childLanes=Ru(e,y,s),t.memoizedState=ku,Tl(e.child,i)):(Ka(t),s=e.child,e=s.sibling,s=va(s,{mode:"visible",children:i.children}),s.return=t,s.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=s,t.memoizedState=null,s)}function Bu(e,t){return t=ar({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ar(e,t){return e=Tn(22,e,null,t),e.lanes=0,e}function Ou(e,t,s){return Ms(t,e.child,null,s),e=Bu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rp(e,t,s){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Xc(e.return,t,s)}function Lu(e,t,s,i,c,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:s,tailMode:c,treeForkCount:f}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=i,y.tail=s,y.tailMode=c,y.treeForkCount=f)}function Bp(e,t,s){var i=t.pendingProps,c=i.revealOrder,f=i.tail;i=i.children;var y=kt.current,_=(y&2)!==0;if(_?(y=y&1|2,t.flags|=128):y&=1,_e(kt,y),Wt(e,t,i,s),i=Ge?ul:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rp(e,s,t);else if(e.tag===19)Rp(e,s,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(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&$o(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Lu(t,!1,c,s,f,i);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&$o(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Lu(t,!0,s,null,f,i);break;case"together":Lu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Ta(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Ja|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(di(e,t,s,!1),(s&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,s=va(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=va(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function zu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zo(e)))}function YS(e,t,s){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),Pa(t,Ut,e.memoizedState.cache),Cs();break;case 27:case 5:vt(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:Pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ru(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Ka(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Mp(e,t,s):(Ka(t),e=Ta(e,t,s),e!==null?e.sibling:null);Ka(t);break;case 19:var c=(e.flags&128)!==0;if(i=(s&t.childLanes)!==0,i||(di(e,t,s,!1),i=(s&t.childLanes)!==0),c){if(i)return Bp(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),_e(kt,kt.current),i)break;return null;case 22:return t.lanes=0,Cp(e,t,s,t.pendingProps);case 24:Pa(t,Ut,e.memoizedState.cache)}return Ta(e,t,s)}function Op(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)It=!0;else{if(!zu(e,s)&&(t.flags&128)===0)return It=!1,YS(e,t,s);It=(e.flags&131072)!==0}else It=!1,Ge&&(t.flags&1048576)!==0&&hm(t,ul,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Ds(t.elementType),t.type=e,typeof e=="function")qc(e)?(i=Bs(e,i),t.tag=1,t=Dp(null,t,e,i,s)):(t.tag=0,t=Du(null,t,e,i,s));else{if(e!=null){var c=e.$$typeof;if(c===X){t.tag=11,t=Tp(null,t,e,i,s);break e}else if(c===W){t.tag=14,t=Ep(null,t,e,i,s);break e}}throw t=ye(e)||e,Error(o(306,t,""))}}return t;case 0:return Du(e,t,t.type,t.pendingProps,s);case 1:return i=t.type,c=Bs(i,t.pendingProps),Dp(e,t,i,c,s);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var f=t.memoizedState;c=f.element,au(e,t),yl(t,i,null,s);var y=t.memoizedState;if(i=y.cache,Pa(t,Ut,i),i!==f.cache&&Qc(t,[Ut],s,!0),vl(),i=y.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=kp(e,t,i,s);break e}else if(i!==c){c=zn(Error(o(424)),t),dl(c),t=kp(e,t,i,s);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(ct=qn(e.firstChild),Qt=t,Ge=!0,qa=null,In=!0,s=Cm(t,null,i,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Cs(),i===c){t=Ta(e,t,s);break e}Wt(e,t,i,s)}t=t.child}return t;case 26:return nr(e,t),e===null?(s=Yg(t.type,null,t.pendingProps,null))?t.memoizedState=s:Ge||(s=t.type,e=t.pendingProps,i=br(P.current).createElement(s),i[zt]=t,i[Zt]=e,en(i,s,e),mt(i),t.stateNode=i):t.memoizedState=Yg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return vt(t),e===null&&Ge&&(i=t.stateNode=Gg(t.type,t.pendingProps,P.current),Qt=t,In=!0,c=ct,as(t.type)?(gd=c,ct=qn(i.firstChild)):ct=c),Wt(e,t,t.pendingProps.children,s),nr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((c=i=ct)&&(i=x_(i,t.type,t.pendingProps,In),i!==null?(t.stateNode=i,Qt=t,ct=qn(i.firstChild),In=!1,c=!0):c=!1),c||Ga(t)),vt(t),c=t.type,f=t.pendingProps,y=e!==null?e.memoizedProps:null,i=f.children,dd(c,f)?i=null:y!==null&&dd(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=uu(e,t,zS,null,null,s),Ul._currentValue=c),nr(e,t),Wt(e,t,i,s),t.child;case 6:return e===null&&Ge&&((e=s=ct)&&(s=T_(s,t.pendingProps,In),s!==null?(t.stateNode=s,Qt=t,ct=null,e=!0):e=!1),e||Ga(t)),null;case 13:return Mp(e,t,s);case 4:return De(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ms(t,null,i,s):Wt(e,t,i,s),t.child;case 11:return Tp(e,t,t.type,t.pendingProps,s);case 7:return Wt(e,t,t.pendingProps,s),t.child;case 8:return Wt(e,t,t.pendingProps.children,s),t.child;case 12:return Wt(e,t,t.pendingProps.children,s),t.child;case 10:return i=t.pendingProps,Pa(t,t.type,i.value),Wt(e,t,i.children,s),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,Ns(t),c=Jt(c),i=i(c),t.flags|=1,Wt(e,t,i,s),t.child;case 14:return Ep(e,t,t.type,t.pendingProps,s);case 15:return Ap(e,t,t.type,t.pendingProps,s);case 19:return Bp(e,t,s);case 31:return $S(e,t,s);case 22:return Cp(e,t,s,t.pendingProps);case 24:return Ns(t),i=Jt(Ut),e===null?(c=eu(),c===null&&(c=lt,f=Jc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:i,cache:c},nu(t),Pa(t,Ut,c)):((e.lanes&s)!==0&&(au(e,t),yl(t,null,null,s),vl()),c=e.memoizedState,f=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Pa(t,Ut,i)):(i=f.cache,Pa(t,Ut,i),i!==c.cache&&Qc(t,[Ut],s,!0))),Wt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Ea(e){e.flags|=4}function Uu(e,t,s,i,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(rg())e.flags|=8192;else throw ks=Ho,tu}else e.flags&=-16777217}function Lp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qg(t))if(rg())e.flags|=8192;else throw ks=Ho,tu}function sr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Rn():536870912,e.lanes|=t,Ti|=t)}function El(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,i=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=s,t}function FS(e,t,s){var i=t.pendingProps;switch(Yc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return s=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Sa(Ut),Ye(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ui(t)?Ea(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Kc())),ut(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Ea(t),f!==null?(ut(t),Lp(t,f)):(ut(t),Uu(t,c,null,i,s))):f?f!==e.memoizedState?(Ea(t),ut(t),Lp(t,f)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Ea(t),ut(t),Uu(t,c,e,i,s)),null;case 27:if(xt(t),s=P.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ut(t),null}e=Ae.current,ui(t)?pm(t):(e=Gg(c,i,s),t.stateNode=e,Ea(t))}return ut(t),null;case 5:if(xt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ut(t),null}if(f=Ae.current,ui(t))pm(t);else{var y=br(P.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof i.is=="string"?y.createElement("select",{is:i.is}):y.createElement("select"),i.multiple?f.multiple=!0:i.size&&(f.size=i.size);break;default:f=typeof i.is=="string"?y.createElement(c,{is:i.is}):y.createElement(c)}}f[zt]=t,f[Zt]=i;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=f;e:switch(en(f,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ea(t)}}return ut(t),Uu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=P.current,ui(t)){if(e=t.stateNode,s=t.memoizedProps,i=null,c=Qt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[zt]=t,e=!!(e.nodeValue===s||i!==null&&i.suppressHydrationWarning===!0||Mg(e.nodeValue,s)),e||Ga(t,!0)}else e=br(e).createTextNode(i),e[zt]=t,t.stateNode=e}return ut(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(i=ui(t),s!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[zt]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else s=Kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(An(t),t):(An(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ut(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ui(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[zt]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),c=!1}else c=Kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(An(t),t):(An(t),null)}return An(t),(t.flags&128)!==0?(t.lanes=s,t):(s=i!==null,e=e!==null&&e.memoizedState!==null,s&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==c&&(i.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),sr(t,t.updateQueue),ut(t),null);case 4:return Ye(),e===null&&ld(t.stateNode.containerInfo),ut(t),null;case 10:return Sa(t.type),ut(t),null;case 19:if(we(kt),i=t.memoizedState,i===null)return ut(t),null;if(c=(t.flags&128)!==0,f=i.rendering,f===null)if(c)El(i,!1);else{if(jt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=$o(e),f!==null){for(t.flags|=128,El(i,!1),e=f.updateQueue,t.updateQueue=e,sr(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)um(s,e),s=s.sibling;return _e(kt,kt.current&1|2),Ge&&ya(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&de()>cr&&(t.flags|=128,c=!0,El(i,!1),t.lanes=4194304)}else{if(!c)if(e=$o(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,sr(t,e),El(i,!0),i.tail===null&&i.tailMode==="hidden"&&!f.alternate&&!Ge)return ut(t),null}else 2*de()-i.renderingStartTime>cr&&s!==536870912&&(t.flags|=128,c=!0,El(i,!1),t.lanes=4194304);i.isBackwards?(f.sibling=t.child,t.child=f):(e=i.last,e!==null?e.sibling=f:t.child=f,i.last=f)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=de(),e.sibling=null,s=kt.current,_e(kt,c?s&1|2:s&1),Ge&&ya(t,i.treeForkCount),e):(ut(t),null);case 22:case 23:return An(t),ou(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(s&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),s=t.updateQueue,s!==null&&sr(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==s&&(t.flags|=2048),e!==null&&we(ws),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Sa(Ut),ut(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function KS(e,t){switch(Yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(Ut),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xt(t),null;case 31:if(t.memoizedState!==null){if(An(t),t.alternate===null)throw Error(o(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(An(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(kt),null;case 4:return Ye(),null;case 10:return Sa(t.type),null;case 22:case 23:return An(t),ou(),e!==null&&we(ws),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(Ut),null;case 25:return null;default:return null}}function zp(e,t){switch(Yc(t),t.tag){case 3:Sa(Ut),Ye();break;case 26:case 27:case 5:xt(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&An(t);break;case 13:An(t);break;case 19:we(kt);break;case 10:Sa(t.type);break;case 22:case 23:An(t),ou(),e!==null&&we(ws);break;case 24:Sa(Ut)}}function Al(e,t){try{var s=t.updateQueue,i=s!==null?s.lastEffect:null;if(i!==null){var c=i.next;s=c;do{if((s.tag&e)===e){i=void 0;var f=s.create,y=s.inst;i=f(),y.destroy=i}s=s.next}while(s!==c)}}catch(_){nt(t,t.return,_)}}function Xa(e,t,s){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var f=c.next;i=f;do{if((i.tag&e)===e){var y=i.inst,_=y.destroy;if(_!==void 0){y.destroy=void 0,c=t;var E=s,B=_;try{B()}catch(G){nt(c,E,G)}}}i=i.next}while(i!==f)}}catch(G){nt(t,t.return,G)}}function Up(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Nm(t,s)}catch(i){nt(e,e.return,i)}}}function Vp(e,t,s){s.props=Bs(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(i){nt(e,t,i)}}function Cl(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof s=="function"?e.refCleanup=s(i):s.current=i}}catch(c){nt(e,t,c)}}function ia(e,t){var s=e.ref,i=e.refCleanup;if(s!==null)if(typeof i=="function")try{i()}catch(c){nt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){nt(e,t,c)}else s.current=null}function Ip(e){var t=e.type,s=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&i.focus();break e;case"img":s.src?i.src=s.src:s.srcSet&&(i.srcset=s.srcSet)}}catch(c){nt(e,e.return,c)}}function Vu(e,t,s){try{var i=e.stateNode;g_(i,e.type,s,t),i[Zt]=t}catch(c){nt(e,e.return,c)}}function Hp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&as(e.type)||e.tag===4}function Iu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hp(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&&as(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 Hu(e,t,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=pa));else if(i!==4&&(i===27&&as(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Hu(e,t,s),e=e.sibling;e!==null;)Hu(e,t,s),e=e.sibling}function ir(e,t,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(i!==4&&(i===27&&as(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(ir(e,t,s),e=e.sibling;e!==null;)ir(e,t,s),e=e.sibling}function qp(e){var t=e.stateNode,s=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);en(t,i,s),t[zt]=e,t[Zt]=s}catch(f){nt(e,e.return,f)}}var Aa=!1,Ht=!1,qu=!1,Gp=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function ZS(e,t){if(e=e.containerInfo,cd=Cr,e=tm(e),Oc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var i=s.getSelection&&s.getSelection();if(i&&i.rangeCount!==0){s=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var y=0,_=-1,E=-1,B=0,G=0,K=e,L=null;t:for(;;){for(var V;K!==s||c!==0&&K.nodeType!==3||(_=y+c),K!==f||i!==0&&K.nodeType!==3||(E=y+i),K.nodeType===3&&(y+=K.nodeValue.length),(V=K.firstChild)!==null;)L=K,K=V;for(;;){if(K===e)break t;if(L===s&&++B===c&&(_=y),L===f&&++G===i&&(E=y),(V=K.nextSibling)!==null)break;K=L,L=K.parentNode}K=V}s=_===-1||E===-1?null:{start:_,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(ud={focusedElem:e,selectionRange:s},Cr=!1,Kt=t;Kt!==null;)if(t=Kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Kt=e;else for(;Kt!==null;){switch(t=Kt,f=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(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,i=s.stateNode;try{var ue=Bs(s.type,c);e=i.getSnapshotBeforeUpdate(ue,f),i.__reactInternalSnapshotBeforeUpdate=e}catch(Se){nt(s,s.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)hd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hd(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,Kt=e;break}Kt=t.return}}function Pp(e,t,s){var i=s.flags;switch(s.tag){case 0:case 11:case 15:ja(e,s),i&4&&Al(5,s);break;case 1:if(ja(e,s),i&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(y){nt(s,s.return,y)}else{var c=Bs(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){nt(s,s.return,y)}}i&64&&Up(s),i&512&&Cl(s,s.return);break;case 3:if(ja(e,s),i&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Nm(e,t)}catch(y){nt(s,s.return,y)}}break;case 27:t===null&&i&4&&qp(s);case 26:case 5:ja(e,s),t===null&&i&4&&Ip(s),i&512&&Cl(s,s.return);break;case 12:ja(e,s);break;case 31:ja(e,s),i&4&&Fp(e,s);break;case 13:ja(e,s),i&4&&Kp(e,s),i&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=s_.bind(null,s),E_(e,s))));break;case 22:if(i=s.memoizedState!==null||Aa,!i){t=t!==null&&t.memoizedState!==null||Ht,c=Aa;var f=Ht;Aa=i,(Ht=t)&&!f?Na(e,s,(s.subtreeFlags&8772)!==0):ja(e,s),Aa=c,Ht=f}break;case 30:break;default:ja(e,s)}}function $p(e){var t=e.alternate;t!==null&&(e.alternate=null,$p(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ie(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 pt=null,pn=!1;function Ca(e,t,s){for(s=s.child;s!==null;)Yp(e,t,s),s=s.sibling}function Yp(e,t,s){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(rt,s)}catch{}switch(s.tag){case 26:Ht||ia(s,t),Ca(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ht||ia(s,t);var i=pt,c=pn;as(s.type)&&(pt=s.stateNode,pn=!1),Ca(e,t,s),Ol(s.stateNode),pt=i,pn=c;break;case 5:Ht||ia(s,t);case 6:if(i=pt,c=pn,pt=null,Ca(e,t,s),pt=i,pn=c,pt!==null)if(pn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(s.stateNode)}catch(f){nt(s,t,f)}else try{pt.removeChild(s.stateNode)}catch(f){nt(s,t,f)}break;case 18:pt!==null&&(pn?(e=pt,Ug(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ki(e)):Ug(pt,s.stateNode));break;case 4:i=pt,c=pn,pt=s.stateNode.containerInfo,pn=!0,Ca(e,t,s),pt=i,pn=c;break;case 0:case 11:case 14:case 15:Xa(2,s,t),Ht||Xa(4,s,t),Ca(e,t,s);break;case 1:Ht||(ia(s,t),i=s.stateNode,typeof i.componentWillUnmount=="function"&&Vp(s,t,i)),Ca(e,t,s);break;case 21:Ca(e,t,s);break;case 22:Ht=(i=Ht)||s.memoizedState!==null,Ca(e,t,s),Ht=i;break;default:Ca(e,t,s)}}function Fp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ki(e)}catch(s){nt(t,t.return,s)}}}function Kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ki(e)}catch(s){nt(t,t.return,s)}}function XS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Gp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Gp),t;default:throw Error(o(435,e.tag))}}function lr(e,t){var s=XS(e);t.forEach(function(i){if(!s.has(i)){s.add(i);var c=i_.bind(null,e,i);i.then(c,c)}})}function gn(e,t){var s=t.deletions;if(s!==null)for(var i=0;i<s.length;i++){var c=s[i],f=e,y=t,_=y;e:for(;_!==null;){switch(_.tag){case 27:if(as(_.type)){pt=_.stateNode,pn=!1;break e}break;case 5:pt=_.stateNode,pn=!1;break e;case 3:case 4:pt=_.stateNode.containerInfo,pn=!0;break e}_=_.return}if(pt===null)throw Error(o(160));Yp(f,y,c),pt=null,pn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zp(t,e),t=t.sibling}var Wn=null;function Zp(e,t){var s=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(t,e),vn(e),i&4&&(Xa(3,e,e.return),Al(3,e),Xa(5,e,e.return));break;case 1:gn(t,e),vn(e),i&512&&(Ht||s===null||ia(s,s.return)),i&64&&Aa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?i:s.concat(i))));break;case 26:var c=Wn;if(gn(t,e),vn(e),i&512&&(Ht||s===null||ia(s,s.return)),i&4){var f=s!==null?s.memoizedState:null;if(i=e.memoizedState,s===null)if(i===null)if(e.stateNode===null){e:{i=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Oe]||f[zt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(i),c.head.insertBefore(f,c.querySelector("head > title"))),en(f,i,s),f[zt]=e,mt(f),i=f;break e;case"link":var y=Zg("link","href",c).get(i+(s.href||""));if(y){for(var _=0;_<y.length;_++)if(f=y[_],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(_,1);break t}}f=c.createElement(i),en(f,i,s),c.head.appendChild(f);break;case"meta":if(y=Zg("meta","content",c).get(i+(s.content||""))){for(_=0;_<y.length;_++)if(f=y[_],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(_,1);break t}}f=c.createElement(i),en(f,i,s),c.head.appendChild(f);break;default:throw Error(o(468,i))}f[zt]=e,mt(f),i=f}e.stateNode=i}else Xg(c,e.type,e.stateNode);else e.stateNode=Kg(c,i,e.memoizedProps);else f!==i?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,i===null?Xg(c,e.type,e.stateNode):Kg(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Vu(e,e.memoizedProps,s.memoizedProps)}break;case 27:gn(t,e),vn(e),i&512&&(Ht||s===null||ia(s,s.return)),s!==null&&i&4&&Vu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(gn(t,e),vn(e),i&512&&(Ht||s===null||ia(s,s.return)),e.flags&32){c=e.stateNode;try{ei(c,"")}catch(ue){nt(e,e.return,ue)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,Vu(e,c,s!==null?s.memoizedProps:c)),i&1024&&(qu=!0);break;case 6:if(gn(t,e),vn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,s=e.stateNode;try{s.nodeValue=i}catch(ue){nt(e,e.return,ue)}}break;case 3:if(xr=null,c=Wn,Wn=Sr(t.containerInfo),gn(t,e),Wn=c,vn(e),i&4&&s!==null&&s.memoizedState.isDehydrated)try{ki(t.containerInfo)}catch(ue){nt(e,e.return,ue)}qu&&(qu=!1,Xp(e));break;case 4:i=Wn,Wn=Sr(e.stateNode.containerInfo),gn(t,e),vn(e),Wn=i;break;case 12:gn(t,e),vn(e);break;case 31:gn(t,e),vn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,lr(e,i)));break;case 13:gn(t,e),vn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(rr=de()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,lr(e,i)));break;case 22:c=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,B=Aa,G=Ht;if(Aa=B||c,Ht=G||E,gn(t,e),Ht=G,Aa=B,vn(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||E||Aa||Ht||Os(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){E=s=t;try{if(f=E.stateNode,c)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{_=E.stateNode;var K=E.memoizedProps.style,L=K!=null&&K.hasOwnProperty("display")?K.display:null;_.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ue){nt(E,E.return,ue)}}}else if(t.tag===6){if(s===null){E=t;try{E.stateNode.nodeValue=c?"":E.memoizedProps}catch(ue){nt(E,E.return,ue)}}}else if(t.tag===18){if(s===null){E=t;try{var V=E.stateNode;c?Vg(V,!0):Vg(E.stateNode,!1)}catch(ue){nt(E,E.return,ue)}}}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;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(s=i.retryQueue,s!==null&&(i.retryQueue=null,lr(e,s))));break;case 19:gn(t,e),vn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,lr(e,i)));break;case 30:break;case 21:break;default:gn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{for(var s,i=e.return;i!==null;){if(Hp(i)){s=i;break}i=i.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Iu(e);ir(e,f,c);break;case 5:var y=s.stateNode;s.flags&32&&(ei(y,""),s.flags&=-33);var _=Iu(e);ir(e,_,y);break;case 3:case 4:var E=s.stateNode.containerInfo,B=Iu(e);Hu(e,B,E);break;default:throw Error(o(161))}}catch(G){nt(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Pp(e,t.alternate,t),t=t.sibling}function Os(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Xa(4,t,t.return),Os(t);break;case 1:ia(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Vp(t,t.return,s),Os(t);break;case 27:Ol(t.stateNode);case 26:case 5:ia(t,t.return),Os(t);break;case 22:t.memoizedState===null&&Os(t);break;case 30:Os(t);break;default:Os(t)}e=e.sibling}}function Na(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,f=t,y=f.flags;switch(f.tag){case 0:case 11:case 15:Na(c,f,s),Al(4,f);break;case 1:if(Na(c,f,s),i=f,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(B){nt(i,i.return,B)}if(i=f,c=i.updateQueue,c!==null){var _=i.stateNode;try{var E=c.shared.hiddenCallbacks;if(E!==null)for(c.shared.hiddenCallbacks=null,c=0;c<E.length;c++)jm(E[c],_)}catch(B){nt(i,i.return,B)}}s&&y&64&&Up(f),Cl(f,f.return);break;case 27:qp(f);case 26:case 5:Na(c,f,s),s&&i===null&&y&4&&Ip(f),Cl(f,f.return);break;case 12:Na(c,f,s);break;case 31:Na(c,f,s),s&&y&4&&Fp(c,f);break;case 13:Na(c,f,s),s&&y&4&&Kp(c,f);break;case 22:f.memoizedState===null&&Na(c,f,s),Cl(f,f.return);break;case 30:break;default:Na(c,f,s)}t=t.sibling}}function Gu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&fl(s))}function Pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fl(e))}function ea(e,t,s,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qp(e,t,s,i),t=t.sibling}function Qp(e,t,s,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:ea(e,t,s,i),c&2048&&Al(9,t);break;case 1:ea(e,t,s,i);break;case 3:ea(e,t,s,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fl(e)));break;case 12:if(c&2048){ea(e,t,s,i),e=t.stateNode;try{var f=t.memoizedProps,y=f.id,_=f.onPostCommit;typeof _=="function"&&_(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){nt(t,t.return,E)}}else ea(e,t,s,i);break;case 31:ea(e,t,s,i);break;case 13:ea(e,t,s,i);break;case 23:break;case 22:f=t.stateNode,y=t.alternate,t.memoizedState!==null?f._visibility&2?ea(e,t,s,i):jl(e,t):f._visibility&2?ea(e,t,s,i):(f._visibility|=2,Si(e,t,s,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Gu(y,t);break;case 24:ea(e,t,s,i),c&2048&&Pu(t.alternate,t);break;default:ea(e,t,s,i)}}function Si(e,t,s,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,y=t,_=s,E=i,B=y.flags;switch(y.tag){case 0:case 11:case 15:Si(f,y,_,E,c),Al(8,y);break;case 23:break;case 22:var G=y.stateNode;y.memoizedState!==null?G._visibility&2?Si(f,y,_,E,c):jl(f,y):(G._visibility|=2,Si(f,y,_,E,c)),c&&B&2048&&Gu(y.alternate,y);break;case 24:Si(f,y,_,E,c),c&&B&2048&&Pu(y.alternate,y);break;default:Si(f,y,_,E,c)}t=t.sibling}}function jl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,i=t,c=i.flags;switch(i.tag){case 22:jl(s,i),c&2048&&Gu(i.alternate,i);break;case 24:jl(s,i),c&2048&&Pu(i.alternate,i);break;default:jl(s,i)}t=t.sibling}}var Nl=8192;function _i(e,t,s){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Jp(e,t,s),e=e.sibling}function Jp(e,t,s){switch(e.tag){case 26:_i(e,t,s),e.flags&Nl&&e.memoizedState!==null&&L_(s,Wn,e.memoizedState,e.memoizedProps);break;case 5:_i(e,t,s);break;case 3:case 4:var i=Wn;Wn=Sr(e.stateNode.containerInfo),_i(e,t,s),Wn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Nl,Nl=16777216,_i(e,t,s),Nl=i):_i(e,t,s));break;default:_i(e,t,s)}}function Wp(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 wl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var i=t[s];Kt=i,tg(i,e)}Wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)eg(e),e=e.sibling}function eg(e){switch(e.tag){case 0:case 11:case 15:wl(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:wl(e);break;case 12:wl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,or(e)):wl(e);break;default:wl(e)}}function or(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var i=t[s];Kt=i,tg(i,e)}Wp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xa(8,t,t.return),or(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,or(t));break;default:or(t)}e=e.sibling}}function tg(e,t){for(;Kt!==null;){var s=Kt;switch(s.tag){case 0:case 11:case 15:Xa(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var i=s.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:fl(s.memoizedState.cache)}if(i=s.child,i!==null)i.return=s,Kt=i;else e:for(s=e;Kt!==null;){i=Kt;var c=i.sibling,f=i.return;if($p(i),i===s){Kt=null;break e}if(c!==null){c.return=f,Kt=c;break e}Kt=f}}}var QS={getCacheForType:function(e){var t=Jt(Ut),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Jt(Ut).controller.signal}},JS=typeof WeakMap=="function"?WeakMap:Map,Xe=0,lt=null,Ue=null,He=0,tt=0,Cn=null,Qa=!1,xi=!1,$u=!1,wa=0,jt=0,Ja=0,Ls=0,Yu=0,jn=0,Ti=0,Dl=null,yn=null,Fu=!1,rr=0,ng=0,cr=1/0,ur=null,Wa=null,Pt=0,es=null,Ei=null,Da=0,Ku=0,Zu=null,ag=null,kl=0,Xu=null;function Nn(){return(Xe&2)!==0&&He!==0?He&-He:z.T!==null?nd():Wi()}function sg(){if(jn===0)if((He&536870912)===0||Ge){var e=Re;Re<<=1,(Re&3932160)===0&&(Re=262144),jn=e}else jn=536870912;return e=En.current,e!==null&&(e.flags|=32),jn}function bn(e,t,s){(e===lt&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Ai(e,0),ts(e,He,jn,!1)),Va(e,s),((Xe&2)===0||e!==lt)&&(e===lt&&((Xe&2)===0&&(Ls|=s),jt===4&&ts(e,He,jn,!1)),la(e))}function ig(e,t,s){if((Xe&6)!==0)throw Error(o(327));var i=!s&&(t&127)===0&&(t&e.expiredLanes)===0||se(e,t),c=i?t_(e,t):Ju(e,t,!0),f=i;do{if(c===0){xi&&!i&&ts(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!WS(s)){c=Ju(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var _=e;c=Dl;var E=_.current.memoizedState.isDehydrated;if(E&&(Ai(_,y).flags|=256),y=Ju(_,y,!1),y!==2){if($u&&!E){_.errorRecoveryDisabledLanes|=f,Ls|=f,c=4;break e}f=yn,yn=c,f!==null&&(yn===null?yn=f:yn.push.apply(yn,f))}c=y}if(f=!1,c!==2)continue}}if(c===1){Ai(e,0),ts(e,t,0,!0);break}e:{switch(i=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ts(i,t,jn,!Qa);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=rr+300-de(),10<c)){if(ts(i,t,jn,!Qa),ie(i,0,!0)!==0)break e;Da=t,i.timeoutHandle=Lg(lg.bind(null,i,s,yn,ur,Fu,t,jn,Ls,Ti,Qa,f,"Throttled",-0,0),c);break e}lg(i,s,yn,ur,Fu,t,jn,Ls,Ti,Qa,f,null,-0,0)}}break}while(!0);la(e)}function lg(e,t,s,i,c,f,y,_,E,B,G,K,L,V){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pa},Jp(t,f,K);var ue=(f&62914560)===f?rr-de():(f&4194048)===f?ng-de():0;if(ue=z_(K,ue),ue!==null){Da=f,e.cancelPendingCommit=ue(mg.bind(null,e,t,f,s,i,c,y,_,E,G,K,null,L,V)),ts(e,f,y,!B);return}}mg(e,t,f,s,i,c,y,_,E)}function WS(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var i=0;i<s.length;i++){var c=s[i],f=c.getSnapshot;c=c.value;try{if(!xn(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;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 ts(e,t,s,i){t&=~Yu,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var f=31-yt(c),y=1<<f;i[f]=-1,c&=~y}s!==0&&Xi(e,s,t)}function dr(){return(Xe&6)===0?(Ml(0),!1):!0}function Qu(){if(Ue!==null){if(tt===0)var e=Ue.return;else e=Ue,ba=js=null,hu(e),pi=null,ml=0,e=Ue;for(;e!==null;)zp(e.alternate,e),e=e.return;Ue=null}}function Ai(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,b_(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Da=0,Qu(),lt=e,Ue=s=va(e.current,null),He=t,tt=0,Cn=null,Qa=!1,xi=se(e,t),$u=!1,Ti=jn=Yu=Ls=Ja=jt=0,yn=Dl=null,Fu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-yt(i),f=1<<c;t|=e[c],i&=~f}return wa=t,Mo(),s}function og(e,t){Me=null,z.H=xl,t===mi||t===Io?(t=Tm(),tt=3):t===tu?(t=Tm(),tt=4):tt=t===wu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Cn=t,Ue===null&&(jt=1,er(e,zn(t,e.current)))}function rg(){var e=En.current;return e===null?!0:(He&4194048)===He?Hn===null:(He&62914560)===He||(He&536870912)!==0?e===Hn:!1}function cg(){var e=z.H;return z.H=xl,e===null?xl:e}function ug(){var e=z.A;return z.A=QS,e}function fr(){jt=4,Qa||(He&4194048)!==He&&En.current!==null||(xi=!0),(Ja&134217727)===0&&(Ls&134217727)===0||lt===null||ts(lt,He,jn,!1)}function Ju(e,t,s){var i=Xe;Xe|=2;var c=cg(),f=ug();(lt!==e||He!==t)&&(ur=null,Ai(e,t)),t=!1;var y=jt;e:do try{if(tt!==0&&Ue!==null){var _=Ue,E=Cn;switch(tt){case 8:Qu(),y=6;break e;case 3:case 2:case 9:case 6:En.current===null&&(t=!0);var B=tt;if(tt=0,Cn=null,Ci(e,_,E,B),s&&xi){y=0;break e}break;default:B=tt,tt=0,Cn=null,Ci(e,_,E,B)}}e_(),y=jt;break}catch(G){og(e,G)}while(!0);return t&&e.shellSuspendCounter++,ba=js=null,Xe=i,z.H=c,z.A=f,Ue===null&&(lt=null,He=0,Mo()),y}function e_(){for(;Ue!==null;)dg(Ue)}function t_(e,t){var s=Xe;Xe|=2;var i=cg(),c=ug();lt!==e||He!==t?(ur=null,cr=de()+500,Ai(e,t)):xi=se(e,t);e:do try{if(tt!==0&&Ue!==null){t=Ue;var f=Cn;t:switch(tt){case 1:tt=0,Cn=null,Ci(e,t,f,1);break;case 2:case 9:if(_m(f)){tt=0,Cn=null,fg(t);break}t=function(){tt!==2&&tt!==9||lt!==e||(tt=7),la(e)},f.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:_m(f)?(tt=0,Cn=null,fg(t)):(tt=0,Cn=null,Ci(e,t,f,7));break;case 5:var y=null;switch(Ue.tag){case 26:y=Ue.memoizedState;case 5:case 27:var _=Ue;if(y?Qg(y):_.stateNode.complete){tt=0,Cn=null;var E=_.sibling;if(E!==null)Ue=E;else{var B=_.return;B!==null?(Ue=B,hr(B)):Ue=null}break t}}tt=0,Cn=null,Ci(e,t,f,5);break;case 6:tt=0,Cn=null,Ci(e,t,f,6);break;case 8:Qu(),jt=6;break e;default:throw Error(o(462))}}n_();break}catch(G){og(e,G)}while(!0);return ba=js=null,z.H=i,z.A=c,Xe=s,Ue!==null?0:(lt=null,He=0,Mo(),jt)}function n_(){for(;Ue!==null&&!le();)dg(Ue)}function dg(e){var t=Op(e.alternate,e,wa);e.memoizedProps=e.pendingProps,t===null?hr(e):Ue=t}function fg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=wp(s,t,t.pendingProps,t.type,void 0,He);break;case 11:t=wp(s,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:hu(t);default:zp(s,t),t=Ue=um(t,wa),t=Op(s,t,wa)}e.memoizedProps=e.pendingProps,t===null?hr(e):Ue=t}function Ci(e,t,s,i){ba=js=null,hu(t),pi=null,ml=0;var c=t.return;try{if(PS(e,c,t,s,He)){jt=1,er(e,zn(s,e.current)),Ue=null;return}}catch(f){if(c!==null)throw Ue=c,f;jt=1,er(e,zn(s,e.current)),Ue=null;return}t.flags&32768?(Ge||i===1?e=!0:xi||(He&536870912)!==0?e=!1:(Qa=e=!0,(i===2||i===9||i===3||i===6)&&(i=En.current,i!==null&&i.tag===13&&(i.flags|=16384))),hg(t,e)):hr(t)}function hr(e){var t=e;do{if((t.flags&32768)!==0){hg(t,Qa);return}e=t.return;var s=FS(t.alternate,t,wa);if(s!==null){Ue=s;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);jt===0&&(jt=5)}function hg(e,t){do{var s=KS(e.alternate,e);if(s!==null){s.flags&=32767,Ue=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=s}while(e!==null);jt=6,Ue=null}function mg(e,t,s,i,c,f,y,_,E){e.cancelPendingCommit=null;do mr();while(Pt!==0);if((Xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Ic,bo(e,s,f,y,_,E),e===lt&&(Ue=lt=null,He=0),Ei=t,es=e,Da=s,Ku=f,Zu=c,ag=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,l_(Le,function(){return bg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=z.T,z.T=null,c=F.p,F.p=2,y=Xe,Xe|=4;try{ZS(e,t,s)}finally{Xe=y,F.p=c,z.T=i}}Pt=1,pg(),gg(),vg()}}function pg(){if(Pt===1){Pt=0;var e=es,t=Ei,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null;var i=F.p;F.p=2;var c=Xe;Xe|=4;try{Zp(t,e);var f=ud,y=tm(e.containerInfo),_=f.focusedElem,E=f.selectionRange;if(y!==_&&_&&_.ownerDocument&&em(_.ownerDocument.documentElement,_)){if(E!==null&&Oc(_)){var B=E.start,G=E.end;if(G===void 0&&(G=B),"selectionStart"in _)_.selectionStart=B,_.selectionEnd=Math.min(G,_.value.length);else{var K=_.ownerDocument||document,L=K&&K.defaultView||window;if(L.getSelection){var V=L.getSelection(),ue=_.textContent.length,Se=Math.min(E.start,ue),it=E.end===void 0?Se:Math.min(E.end,ue);!V.extend&&Se>it&&(y=it,it=Se,Se=y);var k=Wh(_,Se),w=Wh(_,it);if(k&&w&&(V.rangeCount!==1||V.anchorNode!==k.node||V.anchorOffset!==k.offset||V.focusNode!==w.node||V.focusOffset!==w.offset)){var R=K.createRange();R.setStart(k.node,k.offset),V.removeAllRanges(),Se>it?(V.addRange(R),V.extend(w.node,w.offset)):(R.setEnd(w.node,w.offset),V.addRange(R))}}}}for(K=[],V=_;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<K.length;_++){var Y=K[_];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Cr=!!cd,ud=cd=null}finally{Xe=c,F.p=i,z.T=s}}e.current=t,Pt=2}}function gg(){if(Pt===2){Pt=0;var e=es,t=Ei,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=z.T,z.T=null;var i=F.p;F.p=2;var c=Xe;Xe|=4;try{Pp(e,t.alternate,t)}finally{Xe=c,F.p=i,z.T=s}}Pt=3}}function vg(){if(Pt===4||Pt===3){Pt=0,ce();var e=es,t=Ei,s=Da,i=ag;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pt=5:(Pt=0,Ei=es=null,yg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Wa=null),Xs(s),t=t.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(rt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=z.T,c=F.p,F.p=2,z.T=null;try{for(var f=e.onRecoverableError,y=0;y<i.length;y++){var _=i[y];f(_.value,{componentStack:_.stack})}}finally{z.T=t,F.p=c}}(Da&3)!==0&&mr(),la(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===Xu?kl++:(kl=0,Xu=e):kl=0,Ml(0)}}function yg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fl(t)))}function mr(){return pg(),gg(),vg(),bg()}function bg(){if(Pt!==5)return!1;var e=es,t=Ku;Ku=0;var s=Xs(Da),i=z.T,c=F.p;try{F.p=32>s?32:s,z.T=null,s=Zu,Zu=null;var f=es,y=Da;if(Pt=0,Ei=es=null,Da=0,(Xe&6)!==0)throw Error(o(331));var _=Xe;if(Xe|=4,eg(f.current),Qp(f,f.current,y,s),Xe=_,Ml(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(rt,f)}catch{}return!0}finally{F.p=c,z.T=i,yg(e,t)}}function Sg(e,t,s){t=zn(s,t),t=Nu(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(Va(e,2),la(e))}function nt(e,t,s){if(e.tag===3)Sg(e,e,s);else for(;t!==null;){if(t.tag===3){Sg(t,e,s);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Wa===null||!Wa.has(i))){e=zn(s,e),s=_p(2),i=Fa(t,s,2),i!==null&&(xp(s,i,t,e),Va(i,2),la(i));break}}t=t.return}}function Wu(e,t,s){var i=e.pingCache;if(i===null){i=e.pingCache=new JS;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(s)||($u=!0,c.add(s),e=a_.bind(null,e,t,s),t.then(e,e))}function a_(e,t,s){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,lt===e&&(He&s)===s&&(jt===4||jt===3&&(He&62914560)===He&&300>de()-rr?(Xe&2)===0&&Ai(e,0):Yu|=s,Ti===He&&(Ti=0)),la(e)}function _g(e,t){t===0&&(t=Rn()),e=Es(e,t),e!==null&&(Va(e,t),la(e))}function s_(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),_g(e,s)}function i_(e,t){var s=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),_g(e,s)}function l_(e,t){return Xn(e,t)}var pr=null,ji=null,ed=!1,gr=!1,td=!1,ns=0;function la(e){e!==ji&&e.next===null&&(ji===null?pr=ji=e:ji=ji.next=e),gr=!0,ed||(ed=!0,r_())}function Ml(e,t){if(!td&&gr){td=!0;do for(var s=!1,i=pr;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var f=0;else{var y=i.suspendedLanes,_=i.pingedLanes;f=(1<<31-yt(42|e)+1)-1,f&=c&~(y&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,Ag(i,f))}else f=He,f=ie(i,i===lt?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||se(i,f)||(s=!0,Ag(i,f));i=i.next}while(s);td=!1}}function o_(){xg()}function xg(){gr=ed=!1;var e=0;ns!==0&&y_()&&(e=ns);for(var t=de(),s=null,i=pr;i!==null;){var c=i.next,f=Tg(i,t);f===0?(i.next=null,s===null?pr=c:s.next=c,c===null&&(ji=s)):(s=i,(e!==0||(f&3)!==0)&&(gr=!0)),i=c}Pt!==0&&Pt!==5||Ml(e),ns!==0&&(ns=0)}function Tg(e,t){for(var s=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-yt(f),_=1<<y,E=c[y];E===-1?((_&s)===0||(_&i)!==0)&&(c[y]=At(_,t)):E<=t&&(e.expiredLanes|=_),f&=~_}if(t=lt,s=He,s=ie(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,s===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Z(i),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||se(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(i!==null&&Z(i),Xs(s)){case 2:case 8:s=et;break;case 32:s=Le;break;case 268435456:s=Dt;break;default:s=Le}return i=Eg.bind(null,e),s=Xn(s,i),e.callbackPriority=t,e.callbackNode=s,t}return i!==null&&i!==null&&Z(i),e.callbackPriority=2,e.callbackNode=null,2}function Eg(e,t){if(Pt!==0&&Pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(mr()&&e.callbackNode!==s)return null;var i=He;return i=ie(e,e===lt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(ig(e,i,t),Tg(e,de()),e.callbackNode!=null&&e.callbackNode===s?Eg.bind(null,e):null)}function Ag(e,t){if(mr())return null;ig(e,t,!0)}function r_(){S_(function(){(Xe&6)!==0?Xn(Ee,o_):xg()})}function nd(){if(ns===0){var e=fi;e===0&&(e=ae,ae<<=1,(ae&261888)===0&&(ae=256)),ns=e}return ns}function Cg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Eo(""+e)}function jg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function c_(e,t,s,i,c){if(t==="submit"&&s&&s.stateNode===c){var f=Cg((c[Zt]||null).action),y=i.submitter;y&&(t=(t=y[Zt]||null)?Cg(t.formAction):y.getAttribute("formAction"),t!==null&&(f=t,y=null));var _=new No("action","action",null,i,c);e.push({event:_,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(ns!==0){var E=y?jg(c,y):new FormData(c);xu(s,{pending:!0,data:E,method:c.method,action:f},null,E)}}else typeof f=="function"&&(_.preventDefault(),E=y?jg(c,y):new FormData(c),xu(s,{pending:!0,data:E,method:c.method,action:f},f,E))},currentTarget:c}]})}}for(var ad=0;ad<Vc.length;ad++){var sd=Vc[ad],u_=sd.toLowerCase(),d_=sd[0].toUpperCase()+sd.slice(1);Jn(u_,"on"+d_)}Jn(sm,"onAnimationEnd"),Jn(im,"onAnimationIteration"),Jn(lm,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(jS,"onTransitionRun"),Jn(NS,"onTransitionStart"),Jn(wS,"onTransitionCancel"),Jn(om,"onTransitionEnd"),Js("onMouseEnter",["mouseout","mouseover"]),Js("onMouseLeave",["mouseout","mouseover"]),Js("onPointerEnter",["pointerout","pointerover"]),Js("onPointerLeave",["pointerout","pointerover"]),Ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rl="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(" "),f_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rl));function Ng(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var i=e[s],c=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var y=i.length-1;0<=y;y--){var _=i[y],E=_.instance,B=_.currentTarget;if(_=_.listener,E!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=B;try{f(c)}catch(G){ko(G)}c.currentTarget=null,f=E}else for(y=0;y<i.length;y++){if(_=i[y],E=_.instance,B=_.currentTarget,_=_.listener,E!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=B;try{f(c)}catch(G){ko(G)}c.currentTarget=null,f=E}}}}function Ve(e,t){var s=t[Qs];s===void 0&&(s=t[Qs]=new Set);var i=e+"__bubble";s.has(i)||(wg(t,e,2,!1),s.add(i))}function id(e,t,s){var i=0;t&&(i|=4),wg(s,e,i,t)}var vr="_reactListening"+Math.random().toString(36).slice(2);function ld(e){if(!e[vr]){e[vr]=!0,xh.forEach(function(s){s!=="selectionchange"&&(f_.has(s)||id(s,!1,e),id(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vr]||(t[vr]=!0,id("selectionchange",!1,t))}}function wg(e,t,s,i){switch(sv(t)){case 2:var c=I_;break;case 8:c=H_;break;default:c=_d}s=c.bind(null,t,s,e),c=void 0,!Cc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function od(e,t,s,i,c){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var _=i.stateNode.containerInfo;if(_===c)break;if(y===4)for(y=i.return;y!==null;){var E=y.tag;if((E===3||E===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;_!==null;){if(y=sn(_),y===null)return;if(E=y.tag,E===5||E===6||E===26||E===27){i=f=y;continue e}_=_.parentNode}}i=i.return}Bh(function(){var B=f,G=Ec(s),K=[];e:{var L=rm.get(e);if(L!==void 0){var V=No,ue=e;switch(e){case"keypress":if(Co(s)===0)break e;case"keydown":case"keyup":V=iS;break;case"focusin":ue="focus",V=Dc;break;case"focusout":ue="blur",V=Dc;break;case"beforeblur":case"afterblur":V=Dc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=F1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=rS;break;case sm:case im:case lm:V=X1;break;case om:V=uS;break;case"scroll":case"scrollend":V=$1;break;case"wheel":V=fS;break;case"copy":case"cut":case"paste":V=J1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Vh;break;case"toggle":case"beforetoggle":V=mS}var Se=(t&4)!==0,it=!Se&&(e==="scroll"||e==="scrollend"),k=Se?L!==null?L+"Capture":null:L;Se=[];for(var w=B,R;w!==null;){var Y=w;if(R=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||R===null||k===null||(Y=tl(w,k),Y!=null&&Se.push(Bl(w,Y,R))),it)break;w=w.return}0<Se.length&&(L=new V(L,ue,null,s,G),K.push({event:L,listeners:Se}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",L&&s!==Tc&&(ue=s.relatedTarget||s.fromElement)&&(sn(ue)||ue[ha]))break e;if((V||L)&&(L=G.window===G?G:(L=G.ownerDocument)?L.defaultView||L.parentWindow:window,V?(ue=s.relatedTarget||s.toElement,V=B,ue=ue?sn(ue):null,ue!==null&&(it=u(ue),Se=ue.tag,ue!==it||Se!==5&&Se!==27&&Se!==6)&&(ue=null)):(V=null,ue=B),V!==ue)){if(Se=zh,Y="onMouseLeave",k="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(Se=Vh,Y="onPointerLeave",k="onPointerEnter",w="pointer"),it=V==null?L:bt(V),R=ue==null?L:bt(ue),L=new Se(Y,w+"leave",V,s,G),L.target=it,L.relatedTarget=R,Y=null,sn(G)===B&&(Se=new Se(k,w+"enter",ue,s,G),Se.target=R,Se.relatedTarget=it,Y=Se),it=Y,V&&ue)t:{for(Se=h_,k=V,w=ue,R=0,Y=k;Y;Y=Se(Y))R++;Y=0;for(var ve=w;ve;ve=Se(ve))Y++;for(;0<R-Y;)k=Se(k),R--;for(;0<Y-R;)w=Se(w),Y--;for(;R--;){if(k===w||w!==null&&k===w.alternate){Se=k;break t}k=Se(k),w=Se(w)}Se=null}else Se=null;V!==null&&Dg(K,L,V,Se,!1),ue!==null&&it!==null&&Dg(K,it,ue,Se,!0)}}e:{if(L=B?bt(B):window,V=L.nodeName&&L.nodeName.toLowerCase(),V==="select"||V==="input"&&L.type==="file")var Fe=Fh;else if($h(L))if(Kh)Fe=ES;else{Fe=xS;var me=_S}else V=L.nodeName,!V||V.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?B&&xc(B.elementType)&&(Fe=Fh):Fe=TS;if(Fe&&(Fe=Fe(e,B))){Yh(K,Fe,s,G);break e}me&&me(e,L,B),e==="focusout"&&B&&L.type==="number"&&B.memoizedProps.value!=null&&_c(L,"number",L.value)}switch(me=B?bt(B):window,e){case"focusin":($h(me)||me.contentEditable==="true")&&(si=me,Lc=B,cl=null);break;case"focusout":cl=Lc=si=null;break;case"mousedown":zc=!0;break;case"contextmenu":case"mouseup":case"dragend":zc=!1,nm(K,s,G);break;case"selectionchange":if(CS)break;case"keydown":case"keyup":nm(K,s,G)}var Be;if(Mc)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else ai?Gh(e,s)&&(qe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(qe="onCompositionStart");qe&&(Ih&&s.locale!=="ko"&&(ai||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&ai&&(Be=Oh()):(Ia=G,jc="value"in Ia?Ia.value:Ia.textContent,ai=!0)),me=yr(B,qe),0<me.length&&(qe=new Uh(qe,e,null,s,G),K.push({event:qe,listeners:me}),Be?qe.data=Be:(Be=Ph(s),Be!==null&&(qe.data=Be)))),(Be=gS?vS(e,s):yS(e,s))&&(qe=yr(B,"onBeforeInput"),0<qe.length&&(me=new Uh("onBeforeInput","beforeinput",null,s,G),K.push({event:me,listeners:qe}),me.data=Be)),c_(K,e,B,s,G)}Ng(K,t)})}function Bl(e,t,s){return{instance:e,listener:t,currentTarget:s}}function yr(e,t){for(var s=t+"Capture",i=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=tl(e,s),c!=null&&i.unshift(Bl(e,c,f)),c=tl(e,t),c!=null&&i.push(Bl(e,c,f))),e.tag===3)return i;e=e.return}return[]}function h_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dg(e,t,s,i,c){for(var f=t._reactName,y=[];s!==null&&s!==i;){var _=s,E=_.alternate,B=_.stateNode;if(_=_.tag,E!==null&&E===i)break;_!==5&&_!==26&&_!==27||B===null||(E=B,c?(B=tl(s,f),B!=null&&y.unshift(Bl(s,B,E))):c||(B=tl(s,f),B!=null&&y.push(Bl(s,B,E)))),s=s.return}y.length!==0&&e.push({event:t,listeners:y})}var m_=/\r\n?/g,p_=/\u0000|\uFFFD/g;function kg(e){return(typeof e=="string"?e:""+e).replace(m_,`
|
|
25
|
+
`).replace(p_,"")}function Mg(e,t){return t=kg(t),kg(e)===t}function st(e,t,s,i,c,f){switch(s){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||ei(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&ei(e,""+i);break;case"className":xo(e,"class",i);break;case"tabIndex":xo(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":xo(e,s,i);break;case"style":Mh(e,i,f);break;case"data":if(t!=="object"){xo(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(s);break}i=Eo(""+i),e.setAttribute(s,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(s,"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 f=="function"&&(s==="formAction"?(t!=="input"&&st(e,t,"name",c.name,c,null),st(e,t,"formEncType",c.formEncType,c,null),st(e,t,"formMethod",c.formMethod,c,null),st(e,t,"formTarget",c.formTarget,c,null)):(st(e,t,"encType",c.encType,c,null),st(e,t,"method",c.method,c,null),st(e,t,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(s);break}i=Eo(""+i),e.setAttribute(s,i);break;case"onClick":i!=null&&(e.onclick=pa);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(s=i.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}s=Eo(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(s,""+i):e.removeAttribute(s);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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":i===!0?e.setAttribute(s,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(s,i):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(s,i):e.removeAttribute(s);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(s):e.setAttribute(s,i);break;case"popover":Ve("beforetoggle",e),Ve("toggle",e),_o(e,"popover",i);break;case"xlinkActuate":ma(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ma(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ma(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ma(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ma(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ma(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ma(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ma(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ma(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":_o(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=G1.get(s)||s,_o(e,s,i))}}function rd(e,t,s,i,c,f){switch(s){case"style":Mh(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(s=i.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof i=="string"?ei(e,i):(typeof i=="number"||typeof i=="bigint")&&ei(e,""+i);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"onClick":i!=null&&(e.onclick=pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Th.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[Zt]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof i=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,i,c);break e}s in e?e[s]=i:i===!0?e.setAttribute(s,""):_o(e,s,i)}}}function en(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",e),Ve("load",e);var i=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var y=s[f];if(y!=null)switch(f){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,f,y,s,null)}}c&&st(e,t,"srcSet",s.srcSet,s,null),i&&st(e,t,"src",s.src,s,null);return;case"input":Ve("invalid",e);var _=f=y=c=null,E=null,B=null;for(i in s)if(s.hasOwnProperty(i)){var G=s[i];if(G!=null)switch(i){case"name":c=G;break;case"type":y=G;break;case"checked":E=G;break;case"defaultChecked":B=G;break;case"value":f=G;break;case"defaultValue":_=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,t));break;default:st(e,t,i,G,s,null)}}Nh(e,f,_,E,B,y,c,!1);return;case"select":Ve("invalid",e),i=y=f=null;for(c in s)if(s.hasOwnProperty(c)&&(_=s[c],_!=null))switch(c){case"value":f=_;break;case"defaultValue":y=_;break;case"multiple":i=_;default:st(e,t,c,_,s,null)}t=f,s=y,e.multiple=!!i,t!=null?Ws(e,!!i,t,!1):s!=null&&Ws(e,!!i,s,!0);return;case"textarea":Ve("invalid",e),f=c=i=null;for(y in s)if(s.hasOwnProperty(y)&&(_=s[y],_!=null))switch(y){case"value":i=_;break;case"defaultValue":c=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(91));break;default:st(e,t,y,_,s,null)}Dh(e,i,c,f);return;case"option":for(E in s)if(s.hasOwnProperty(E)&&(i=s[E],i!=null))switch(E){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:st(e,t,E,i,s,null)}return;case"dialog":Ve("beforetoggle",e),Ve("toggle",e),Ve("cancel",e),Ve("close",e);break;case"iframe":case"object":Ve("load",e);break;case"video":case"audio":for(i=0;i<Rl.length;i++)Ve(Rl[i],e);break;case"image":Ve("error",e),Ve("load",e);break;case"details":Ve("toggle",e);break;case"embed":case"source":case"link":Ve("error",e),Ve("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(B in s)if(s.hasOwnProperty(B)&&(i=s[B],i!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,B,i,s,null)}return;default:if(xc(t)){for(G in s)s.hasOwnProperty(G)&&(i=s[G],i!==void 0&&rd(e,t,G,i,s,void 0));return}}for(_ in s)s.hasOwnProperty(_)&&(i=s[_],i!=null&&st(e,t,_,i,s,null))}function g_(e,t,s,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,y=null,_=null,E=null,B=null,G=null;for(V in s){var K=s[V];if(s.hasOwnProperty(V)&&K!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":E=K;default:i.hasOwnProperty(V)||st(e,t,V,null,i,K)}}for(var L in i){var V=i[L];if(K=s[L],i.hasOwnProperty(L)&&(V!=null||K!=null))switch(L){case"type":f=V;break;case"name":c=V;break;case"checked":B=V;break;case"defaultChecked":G=V;break;case"value":y=V;break;case"defaultValue":_=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==K&&st(e,t,L,V,i,K)}}Sc(e,y,_,E,B,G,f,c);return;case"select":V=y=_=L=null;for(f in s)if(E=s[f],s.hasOwnProperty(f)&&E!=null)switch(f){case"value":break;case"multiple":V=E;default:i.hasOwnProperty(f)||st(e,t,f,null,i,E)}for(c in i)if(f=i[c],E=s[c],i.hasOwnProperty(c)&&(f!=null||E!=null))switch(c){case"value":L=f;break;case"defaultValue":_=f;break;case"multiple":y=f;default:f!==E&&st(e,t,c,f,i,E)}t=_,s=y,i=V,L!=null?Ws(e,!!s,L,!1):!!i!=!!s&&(t!=null?Ws(e,!!s,t,!0):Ws(e,!!s,s?[]:"",!1));return;case"textarea":V=L=null;for(_ in s)if(c=s[_],s.hasOwnProperty(_)&&c!=null&&!i.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:st(e,t,_,null,i,c)}for(y in i)if(c=i[y],f=s[y],i.hasOwnProperty(y)&&(c!=null||f!=null))switch(y){case"value":L=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&st(e,t,y,c,i,f)}wh(e,L,V);return;case"option":for(var ue in s)if(L=s[ue],s.hasOwnProperty(ue)&&L!=null&&!i.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:st(e,t,ue,null,i,L)}for(E in i)if(L=i[E],V=s[E],i.hasOwnProperty(E)&&L!==V&&(L!=null||V!=null))switch(E){case"selected":e.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:st(e,t,E,L,i,V)}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 s)L=s[Se],s.hasOwnProperty(Se)&&L!=null&&!i.hasOwnProperty(Se)&&st(e,t,Se,null,i,L);for(B in i)if(L=i[B],V=s[B],i.hasOwnProperty(B)&&L!==V&&(L!=null||V!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:st(e,t,B,L,i,V)}return;default:if(xc(t)){for(var it in s)L=s[it],s.hasOwnProperty(it)&&L!==void 0&&!i.hasOwnProperty(it)&&rd(e,t,it,void 0,i,L);for(G in i)L=i[G],V=s[G],!i.hasOwnProperty(G)||L===V||L===void 0&&V===void 0||rd(e,t,G,L,i,V);return}}for(var k in s)L=s[k],s.hasOwnProperty(k)&&L!=null&&!i.hasOwnProperty(k)&&st(e,t,k,null,i,L);for(K in i)L=i[K],V=s[K],!i.hasOwnProperty(K)||L===V||L==null&&V==null||st(e,t,K,L,i,V)}function Rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function v_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),i=0;i<s.length;i++){var c=s[i],f=c.transferSize,y=c.initiatorType,_=c.duration;if(f&&_&&Rg(y)){for(y=0,_=c.responseEnd,i+=1;i<s.length;i++){var E=s[i],B=E.startTime;if(B>_)break;var G=E.transferSize,K=E.initiatorType;G&&Rg(K)&&(E=E.responseEnd,y+=G*(E<_?1:(_-B)/(E-B)))}if(--i,t+=8*(f+y)/(c.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 cd=null,ud=null;function br(e){return e.nodeType===9?e:e.ownerDocument}function Bg(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 Og(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 dd(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 fd=null;function y_(){var e=window.event;return e&&e.type==="popstate"?e===fd?!1:(fd=e,!0):(fd=null,!1)}var Lg=typeof setTimeout=="function"?setTimeout:void 0,b_=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,S_=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(__)}:Lg;function __(e){setTimeout(function(){throw e})}function as(e){return e==="head"}function Ug(e,t){var s=t,i=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(i===0){e.removeChild(c),ki(t);return}i--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")i++;else if(s==="html")Ol(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Ol(s);for(var f=s.firstChild;f;){var y=f.nextSibling,_=f.nodeName;f[Oe]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=y}}else s==="body"&&Ol(e.ownerDocument.body);s=c}while(s);ki(t)}function Vg(e,t){var s=e;e=0;do{var i=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),i&&i.nodeType===8)if(s=i.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=i}while(s)}function hd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":hd(s),Ie(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function x_(e,t,s,i){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Oe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function T_(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=qn(e.nextSibling),e===null))return null;return e}function Ig(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qn(e.nextSibling),e===null))return null;return e}function md(e){return e.data==="$?"||e.data==="$~"}function pd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function E_(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var i=function(){t(),s.removeEventListener("DOMContentLoaded",i)};s.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function qn(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 gd=null;function Hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return qn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function qg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Gg(e,t,s){switch(t=br(s),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 Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ie(e)}var Gn=new Map,Pg=new Set;function Sr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ka=F.d;F.d={f:A_,r:C_,D:j_,C:N_,L:w_,m:D_,X:M_,S:k_,M:R_};function A_(){var e=ka.f(),t=dr();return e||t}function C_(e){var t=Xt(e);t!==null&&t.tag===5&&t.type==="form"?op(t):ka.r(e)}var Ni=typeof document>"u"?null:document;function $g(e,t,s){var i=Ni;if(i&&typeof t=="string"&&t){var c=On(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Pg.has(c)||(Pg.add(c),e={rel:e,crossOrigin:s,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),en(t,"link",e),mt(t),i.head.appendChild(t)))}}function j_(e){ka.D(e),$g("dns-prefetch",e,null)}function N_(e,t){ka.C(e,t),$g("preconnect",e,t)}function w_(e,t,s){ka.L(e,t,s);var i=Ni;if(i&&e&&t){var c='link[rel="preload"][as="'+On(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+On(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+On(s.imageSizes)+'"]')):c+='[href="'+On(e)+'"]';var f=c;switch(t){case"style":f=wi(e);break;case"script":f=Di(e)}Gn.has(f)||(e=b({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Gn.set(f,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Ll(f))||t==="script"&&i.querySelector(zl(f))||(t=i.createElement("link"),en(t,"link",e),mt(t),i.head.appendChild(t)))}}function D_(e,t){ka.m(e,t);var s=Ni;if(s&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+On(i)+'"][href="'+On(e)+'"]',f=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Di(e)}if(!Gn.has(f)&&(e=b({rel:"modulepreload",href:e},t),Gn.set(f,e),s.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(zl(f)))return}i=s.createElement("link"),en(i,"link",e),mt(i),s.head.appendChild(i)}}}function k_(e,t,s){ka.S(e,t,s);var i=Ni;if(i&&e){var c=ht(i).hoistableStyles,f=wi(e);t=t||"default";var y=c.get(f);if(!y){var _={loading:0,preload:null};if(y=i.querySelector(Ll(f)))_.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Gn.get(f))&&vd(e,s);var E=y=i.createElement("link");mt(E),en(E,"link",e),E._p=new Promise(function(B,G){E.onload=B,E.onerror=G}),E.addEventListener("load",function(){_.loading|=1}),E.addEventListener("error",function(){_.loading|=2}),_.loading|=4,_r(y,t,i)}y={type:"stylesheet",instance:y,count:1,state:_},c.set(f,y)}}}function M_(e,t){ka.X(e,t);var s=Ni;if(s&&e){var i=ht(s).hoistableScripts,c=Di(e),f=i.get(c);f||(f=s.querySelector(zl(c)),f||(e=b({src:e,async:!0},t),(t=Gn.get(c))&&yd(e,t),f=s.createElement("script"),mt(f),en(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function R_(e,t){ka.M(e,t);var s=Ni;if(s&&e){var i=ht(s).hoistableScripts,c=Di(e),f=i.get(c);f||(f=s.querySelector(zl(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=Gn.get(c))&&yd(e,t),f=s.createElement("script"),mt(f),en(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Yg(e,t,s,i){var c=(c=P.current)?Sr(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=wi(s.href),s=ht(c).hoistableStyles,i=s.get(t),i||(i={type:"style",instance:null,count:0,state:null},s.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=wi(s.href);var f=ht(c).hoistableStyles,y=f.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=c.querySelector(Ll(e)))&&!f._p&&(y.instance=f,y.state.loading=5),Gn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Gn.set(e,s),f||B_(c,e,s,y.state))),t&&i===null)throw Error(o(528,""));return y}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Di(s),s=ht(c).hoistableScripts,i=s.get(t),i||(i={type:"script",instance:null,count:0,state:null},s.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function wi(e){return'href="'+On(e)+'"'}function Ll(e){return'link[rel="stylesheet"]['+e+"]"}function Fg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function B_(e,t,s,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),en(t,"link",s),mt(t),e.head.appendChild(t))}function Di(e){return'[src="'+On(e)+'"]'}function zl(e){return"script[async]"+e}function Kg(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+On(s.href)+'"]');if(i)return t.instance=i,mt(i),i;var c=b({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),mt(i),en(i,"style",c),_r(i,s.precedence,e),t.instance=i;case"stylesheet":c=wi(s.href);var f=e.querySelector(Ll(c));if(f)return t.state.loading|=4,t.instance=f,mt(f),f;i=Fg(s),(c=Gn.get(c))&&vd(i,c),f=(e.ownerDocument||e).createElement("link"),mt(f);var y=f;return y._p=new Promise(function(_,E){y.onload=_,y.onerror=E}),en(f,"link",i),t.state.loading|=4,_r(f,s.precedence,e),t.instance=f;case"script":return f=Di(s.src),(c=e.querySelector(zl(f)))?(t.instance=c,mt(c),c):(i=s,(c=Gn.get(f))&&(i=b({},s),yd(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),mt(c),en(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,_r(i,s.precedence,e));return t.instance}function _r(e,t,s){for(var i=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,f=c,y=0;y<i.length;y++){var _=i[y];if(_.dataset.precedence===t)f=_;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function vd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xr=null;function Zg(e,t,s){if(xr===null){var i=new Map,c=xr=new Map;c.set(s,i)}else c=xr,i=c.get(s),i||(i=new Map,c.set(s,i));if(i.has(e))return i;for(i.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Oe]||f[zt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(t)||"";y=e+y;var _=i.get(y);_?_.push(f):i.set(y,[f])}}return i}function Xg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function O_(e,t,s){if(s===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 Qg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function L_(e,t,s,i){if(s.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=wi(i.href),f=t.querySelector(Ll(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Tr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,mt(f);return}f=t.ownerDocument||t,i=Fg(i),(c=Gn.get(c))&&vd(i,c),f=f.createElement("link"),mt(f);var y=f;y._p=new Promise(function(_,E){y.onload=_,y.onerror=E}),en(f,"link",i),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Tr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var bd=0;function z_(e,t){return e.stylesheets&&e.count===0&&Ar(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var i=setTimeout(function(){if(e.stylesheets&&Ar(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&bd===0&&(bd=62500*v_());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ar(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>bd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Tr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ar(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Er=null;function Ar(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Er=new Map,t.forEach(U_,e),Er=null,Tr.call(e))}function U_(e,t){if(!(t.state.loading&4)){var s=Er.get(e);if(s)var i=s.get(null);else{s=new Map,Er.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var y=c[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),i=y)}i&&s.set(null,i)}c=t.instance,y=c.getAttribute("data-precedence"),f=s.get(y)||i,f===i&&s.set(null,c),s.set(y,c),this.count++,i=Tr.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ul={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function V_(e,t,s,i,c,f,y,_,E){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=Ks(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ks(0),this.hiddenUpdates=Ks(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Jg(e,t,s,i,c,f,y,_,E,B,G,K){return e=new V_(e,t,s,y,E,B,G,K,_),t=1,f===!0&&(t|=24),f=Tn(3,null,null,t),e.current=f,f.stateNode=e,t=Jc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:s,cache:t},nu(f),e}function Wg(e){return e?(e=oi,e):oi}function ev(e,t,s,i,c,f){c=Wg(c),i.context===null?i.context=c:i.pendingContext=c,i=Ya(t),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Fa(e,i,t),s!==null&&(bn(s,e,t),gl(s,e,t))}function tv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Sd(e,t){tv(e,t),(e=e.alternate)&&tv(e,t)}function nv(e){if(e.tag===13||e.tag===31){var t=Es(e,67108864);t!==null&&bn(t,e,67108864),Sd(e,67108864)}}function av(e){if(e.tag===13||e.tag===31){var t=Nn();t=Zs(t);var s=Es(e,t);s!==null&&bn(s,e,t),Sd(e,t)}}var Cr=!0;function I_(e,t,s,i){var c=z.T;z.T=null;var f=F.p;try{F.p=2,_d(e,t,s,i)}finally{F.p=f,z.T=c}}function H_(e,t,s,i){var c=z.T;z.T=null;var f=F.p;try{F.p=8,_d(e,t,s,i)}finally{F.p=f,z.T=c}}function _d(e,t,s,i){if(Cr){var c=xd(i);if(c===null)od(e,t,i,jr,s),iv(e,i);else if(G_(c,e,t,s,i))i.stopPropagation();else if(iv(e,i),t&4&&-1<q_.indexOf(e)){for(;c!==null;){var f=Xt(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=re(f.pendingLanes);if(y!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var E=1<<31-yt(y);_.entanglements[1]|=E,y&=~E}la(f),(Xe&6)===0&&(cr=de()+500,Ml(0))}}break;case 31:case 13:_=Es(f,2),_!==null&&bn(_,f,2),dr(),Sd(f,2)}if(f=xd(i),f===null&&od(e,t,i,jr,s),f===c)break;c=f}c!==null&&i.stopPropagation()}else od(e,t,i,null,s)}}function xd(e){return e=Ec(e),Td(e)}var jr=null;function Td(e){if(jr=null,e=sn(e),e!==null){var t=u(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=m(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return jr=e,null}function sv(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(Te()){case Ee:return 2;case et:return 8;case Le:case ot:return 32;case Dt:return 268435456;default:return 32}default:return 32}}var Ed=!1,ss=null,is=null,ls=null,Vl=new Map,Il=new Map,os=[],q_="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 iv(e,t){switch(e){case"focusin":case"focusout":ss=null;break;case"dragenter":case"dragleave":is=null;break;case"mouseover":case"mouseout":ls=null;break;case"pointerover":case"pointerout":Vl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Il.delete(t.pointerId)}}function Hl(e,t,s,i,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:i,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Xt(t),t!==null&&nv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function G_(e,t,s,i,c){switch(t){case"focusin":return ss=Hl(ss,e,t,s,i,c),!0;case"dragenter":return is=Hl(is,e,t,s,i,c),!0;case"mouseover":return ls=Hl(ls,e,t,s,i,c),!0;case"pointerover":var f=c.pointerId;return Vl.set(f,Hl(Vl.get(f)||null,e,t,s,i,c)),!0;case"gotpointercapture":return f=c.pointerId,Il.set(f,Hl(Il.get(f)||null,e,t,s,i,c)),!0}return!1}function lv(e){var t=sn(e.target);if(t!==null){var s=u(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,el(e.priority,function(){av(s)});return}}else if(t===31){if(t=m(s),t!==null){e.blockedOn=t,el(e.priority,function(){av(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=xd(e.nativeEvent);if(s===null){s=e.nativeEvent;var i=new s.constructor(s.type,s);Tc=i,s.target.dispatchEvent(i),Tc=null}else return t=Xt(s),t!==null&&nv(t),e.blockedOn=s,!1;t.shift()}return!0}function ov(e,t,s){Nr(e)&&s.delete(t)}function P_(){Ed=!1,ss!==null&&Nr(ss)&&(ss=null),is!==null&&Nr(is)&&(is=null),ls!==null&&Nr(ls)&&(ls=null),Vl.forEach(ov),Il.forEach(ov)}function wr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ed||(Ed=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,P_)))}var Dr=null;function rv(e){Dr!==e&&(Dr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Dr===e&&(Dr=null);for(var t=0;t<e.length;t+=3){var s=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(Td(i||s)===null)continue;break}var f=Xt(s);f!==null&&(e.splice(t,3),t-=3,xu(f,{pending:!0,data:c,method:s.method,action:i},i,c))}}))}function ki(e){function t(E){return wr(E,e)}ss!==null&&wr(ss,e),is!==null&&wr(is,e),ls!==null&&wr(ls,e),Vl.forEach(t),Il.forEach(t);for(var s=0;s<os.length;s++){var i=os[s];i.blockedOn===e&&(i.blockedOn=null)}for(;0<os.length&&(s=os[0],s.blockedOn===null);)lv(s),s.blockedOn===null&&os.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(i=0;i<s.length;i+=3){var c=s[i],f=s[i+1],y=c[Zt]||null;if(typeof f=="function")y||rv(s);else if(y){var _=null;if(f&&f.hasAttribute("formAction")){if(c=f,y=f[Zt]||null)_=y.formAction;else if(Td(c)!==null)continue}else _=y.action;typeof _=="function"?s[i+1]=_:(s.splice(i,3),i-=3),rv(s)}}}function cv(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),i||setTimeout(s,20)}function s(){if(!i&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Ad(e){this._internalRoot=e}kr.prototype.render=Ad.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,i=Nn();ev(s,i,e,t,null,null)},kr.prototype.unmount=Ad.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ev(e.current,2,null,e,null,null),dr(),t[ha]=null}};function kr(e){this._internalRoot=e}kr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wi();e={blockedOn:null,target:e,priority:t};for(var s=0;s<os.length&&t!==0&&t<os[s].priority;s++);os.splice(s,0,e),s===0&&lv(e)}};var uv=a.version;if(uv!=="19.2.4")throw Error(o(527,uv,"19.2.4"));F.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=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var $_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mr.isDisabled&&Mr.supportsFiber)try{rt=Mr.inject($_),Et=Mr}catch{}}return ql.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,i="",c=vp,f=yp,y=bp;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Jg(e,1,!1,null,null,s,i,null,c,f,y,cv),e[ha]=t.current,ld(e),new Ad(t)},ql.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var i=!1,c="",f=vp,y=yp,_=bp,E=null;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError),s.formState!==void 0&&(E=s.formState)),t=Jg(e,1,!0,t,s??null,i,c,E,f,y,_,cv),t.context=Wg(null),s=t.current,i=Nn(),i=Zs(i),c=Ya(i),c.callback=null,Fa(s,c,i),s=i,t.current.lanes=s,Va(t,s),la(t),e[ha]=t.current,ld(e),new kr(t)},ql.version="19.2.4",ql}var vv;function ox(){if(vv)return Cd.exports;vv=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(),Cd.exports=lx(),Cd.exports}var rx=ox();/**
|
|
26
|
+
* react-router v7.13.1
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Remix Software Inc.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
+
*
|
|
33
|
+
* @license MIT
|
|
34
|
+
*/var yv="popstate";function bv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function cx(n={}){function a(o,r){var g;let u=(g=r.state)==null?void 0:g.masked,{pathname:d,search:m,hash:p}=u||o.location;return Qd("",{pathname:d,search:m,hash:p},r.state&&r.state.usr||null,r.state&&r.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function l(o,r){return typeof r=="string"?r:ao(r)}return dx(a,l,null,n)}function dt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Fn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function ux(){return Math.random().toString(36).substring(2,10)}function Sv(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Qd(n,a,l=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Pi(a):a,state:l,key:a&&a.key||o||ux(),unstable_mask:r}}function ao({pathname:n="/",search:a="",hash:l=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Pi(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function dx(n,a,l,o={}){let{window:r=document.defaultView,v5Compat:u=!1}=o,d=r.history,m="POP",p=null,g=v();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function v(){return(d.state||{idx:null}).idx}function b(){m="POP";let N=v(),A=N==null?null:N-g;g=N,p&&p({action:m,location:j.location,delta:A})}function x(N,A){m="PUSH";let O=bv(N)?N:Qd(j.location,N,A);g=v()+1;let M=Sv(O,g),X=j.createHref(O.unstable_mask||O);try{d.pushState(M,"",X)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;r.location.assign(X)}u&&p&&p({action:m,location:j.location,delta:1})}function T(N,A){m="REPLACE";let O=bv(N)?N:Qd(j.location,N,A);g=v();let M=Sv(O,g),X=j.createHref(O.unstable_mask||O);d.replaceState(M,"",X),u&&p&&p({action:m,location:j.location,delta:0})}function C(N){return fx(N)}let j={get action(){return m},get location(){return n(r,d)},listen(N){if(p)throw new Error("A history only accepts one active listener");return r.addEventListener(yv,b),p=N,()=>{r.removeEventListener(yv,b),p=null}},createHref(N){return a(r,N)},createURL:C,encodeLocation(N){let A=C(N);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:x,replace:T,go(N){return d.go(N)}};return j}function fx(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),dt(l,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:ao(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function p0(n,a,l="/"){return hx(n,a,l,!1)}function hx(n,a,l,o){let r=typeof a=="string"?Pi(a):a,u=La(r.pathname||"/",l);if(u==null)return null;let d=g0(n);mx(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let g=y0(u);m=Tx(d[p],g,o)}return m}function g0(n,a=[],l=[],o="",r=!1){let u=(d,m,p=r,g)=>{let v={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(o)&&p)return;dt(v.relativePath.startsWith(o),`Absolute route path "${v.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(o.length)}let b=ua([o,v.relativePath]),x=l.concat(v);d.children&&d.children.length>0&&(dt(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),g0(d.children,a,x,b,p)),!(d.path==null&&!d.index)&&a.push({path:b,score:_x(b,d.index),routesMeta:x})};return n.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))u(d,m);else for(let g of v0(d.path))u(d,m,!0,g)}),a}function v0(n){let a=n.split("/");if(a.length===0)return[];let[l,...o]=a,r=l.endsWith("?"),u=l.replace(/\?$/,"");if(o.length===0)return r?[u,""]:[u];let d=v0(o.join("/")),m=[];return m.push(...d.map(p=>p===""?u:[u,p].join("/"))),r&&m.push(...d),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function mx(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:xx(a.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var px=/^:[\w-]+$/,gx=3,vx=2,yx=1,bx=10,Sx=-2,_v=n=>n==="*";function _x(n,a){let l=n.split("/"),o=l.length;return l.some(_v)&&(o+=Sx),a&&(o+=vx),l.filter(r=>!_v(r)).reduce((r,u)=>r+(px.test(u)?gx:u===""?yx:bx),o)}function xx(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function Tx(n,a,l=!1){let{routesMeta:o}=n,r={},u="/",d=[];for(let m=0;m<o.length;++m){let p=o[m],g=m===o.length-1,v=u==="/"?a:a.slice(u.length)||"/",b=so({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},v),x=p.route;if(!b&&g&&l&&!o[o.length-1].route.index&&(b=so({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!b)return null;Object.assign(r,b.params),d.push({params:r,pathname:ua([u,b.pathname]),pathnameBase:Nx(ua([u,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(u=ua([u,b.pathnameBase]))}return d}function so(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=Ex(n.path,n.caseSensitive,n.end),r=a.match(l);if(!r)return null;let u=r[0],d=u.replace(/(.)\/+$/,"$1"),m=r.slice(1);return{params:o.reduce((g,{paramName:v,isOptional:b},x)=>{if(v==="*"){let C=m[x]||"";d=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const T=m[x];return b&&!T?g[v]=void 0:g[v]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Ex(n,a=!1,l=!0){Fn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p,g,v)=>{if(o.push({paramName:m,isOptional:p!=null}),p){let b=v.charAt(g+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function y0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Fn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function La(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,o=n.charAt(l);return o&&o!=="/"?null:n.slice(l)||"/"}var Ax=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Cx(n,a="/"){let{pathname:l,search:o="",hash:r=""}=typeof n=="string"?Pi(n):n,u;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?u=xv(l.substring(1),"/"):u=xv(l,a)):u=a,{pathname:u,search:wx(o),hash:Dx(r)}}function xv(n,a){let l=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?l.length>1&&l.pop():r!=="."&&l.push(r)}),l.length>1?l.join("/"):"/"}function wd(n,a,l,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function jx(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function kf(n){let a=jx(n);return a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase)}function lc(n,a,l,o=!1){let r;typeof n=="string"?r=Pi(n):(r={...n},dt(!r.pathname||!r.pathname.includes("?"),wd("?","pathname","search",r)),dt(!r.pathname||!r.pathname.includes("#"),wd("#","pathname","hash",r)),dt(!r.search||!r.search.includes("#"),wd("#","search","hash",r)));let u=n===""||r.pathname==="",d=u?"/":r.pathname,m;if(d==null)m=l;else{let b=a.length-1;if(!o&&d.startsWith("..")){let x=d.split("/");for(;x[0]==="..";)x.shift(),b-=1;r.pathname=x.join("/")}m=b>=0?a[b]:"/"}let p=Cx(r,m),g=d&&d!=="/"&&d.endsWith("/"),v=(u||d===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(g||v)&&(p.pathname+="/"),p}var ua=n=>n.join("/").replace(/\/\/+/g,"/"),Nx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),wx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Dx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,kx=class{constructor(n,a,l,o=!1){this.status=n,this.statusText=a||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function Mx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Rx(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var b0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function S0(n,a){let l=n;if(typeof l!="string"||!Ax.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,r=!1;if(b0)try{let u=new URL(window.location.href),d=l.startsWith("//")?new URL(u.protocol+l):new URL(l),m=La(d.pathname,a);d.origin===u.origin&&m!=null?l=m+d.search+d.hash:r=!0}catch{Fn(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _0=["POST","PUT","PATCH","DELETE"];new Set(_0);var Bx=["GET",..._0];new Set(Bx);var $i=S.createContext(null);$i.displayName="DataRouter";var oc=S.createContext(null);oc.displayName="DataRouterState";var Ox=S.createContext(!1),x0=S.createContext({isTransitioning:!1});x0.displayName="ViewTransition";var Lx=S.createContext(new Map);Lx.displayName="Fetchers";var zx=S.createContext(null);zx.displayName="Await";var Mn=S.createContext(null);Mn.displayName="Navigation";var fo=S.createContext(null);fo.displayName="Location";var Kn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Kn.displayName="Route";var Mf=S.createContext(null);Mf.displayName="RouteError";var T0="REACT_ROUTER_ERROR",Ux="REDIRECT",Vx="ROUTE_ERROR_RESPONSE";function Ix(n){if(n.startsWith(`${T0}:${Ux}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function Hx(n){if(n.startsWith(`${T0}:${Vx}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new kx(a.status,a.statusText,a.data)}catch{}}function qx(n,{relative:a}={}){dt(Ys(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=S.useContext(Mn),{hash:r,pathname:u,search:d}=ho(n,{relative:a}),m=u;return l!=="/"&&(m=u==="/"?l:ua([l,u])),o.createHref({pathname:m,search:d,hash:r})}function Ys(){return S.useContext(fo)!=null}function hn(){return dt(Ys(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(fo).location}function dn(n){dt(Ys(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=hn();return S.useMemo(()=>so(n,y0(a)),[a,n])}var E0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function A0(n){S.useContext(Mn).static||S.useLayoutEffect(n)}function rc(){let{isDataRoute:n}=S.useContext(Kn);return n?aT():Gx()}function Gx(){dt(Ys(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext($i),{basename:a,navigator:l}=S.useContext(Mn),{matches:o}=S.useContext(Kn),{pathname:r}=hn(),u=JSON.stringify(kf(o)),d=S.useRef(!1);return A0(()=>{d.current=!0}),S.useCallback((p,g={})=>{if(Fn(d.current,E0),!d.current)return;if(typeof p=="number"){l.go(p);return}let v=lc(p,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:ua([a,v.pathname])),(g.replace?l.replace:l.push)(v,g.state,g)},[a,l,u,r,n])}var Px=S.createContext(null);function $x(n){let a=S.useContext(Kn).outlet;return S.useMemo(()=>a&&S.createElement(Px.Provider,{value:n},a),[a,n])}function cc(){let{matches:n}=S.useContext(Kn),a=n[n.length-1];return a?a.params:{}}function ho(n,{relative:a}={}){let{matches:l}=S.useContext(Kn),{pathname:o}=hn(),r=JSON.stringify(kf(l));return S.useMemo(()=>lc(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function Yx(n,a){return C0(n,a)}function C0(n,a,l){var N;dt(Ys(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(Mn),{matches:r}=S.useContext(Kn),u=r[r.length-1],d=u?u.params:{},m=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let A=g&&g.path||"";N0(m,!g||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
35
|
+
|
|
36
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let v=hn(),b;if(a){let A=typeof a=="string"?Pi(a):a;dt(p==="/"||((N=A.pathname)==null?void 0:N.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${A.pathname}" was given in the \`location\` prop.`),b=A}else b=v;let x=b.pathname||"/",T=x;if(p!=="/"){let A=p.replace(/^\//,"").split("/");T="/"+x.replace(/^\//,"").split("/").slice(A.length).join("/")}let C=p0(n,{pathname:T});Fn(g||C!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Fn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let j=Qx(C&&C.map(A=>Object.assign({},A,{params:Object.assign({},d,A.params),pathname:ua([p,o.encodeLocation?o.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?p:ua([p,o.encodeLocation?o.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),r,l);return a&&j?S.createElement(fo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},j):j}function Fx(){let n=nT(),a=Mx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),l?S.createElement("pre",{style:r},l):null,d)}var Kx=S.createElement(Fx,null),j0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const l=Hx(n.digest);l&&(n=l)}let a=n!==void 0?S.createElement(Kn.Provider,{value:this.props.routeContext},S.createElement(Mf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(Zx,{error:n},a):a}};j0.contextType=Ox;var Dd=new WeakMap;function Zx({children:n,error:a}){let{basename:l}=S.useContext(Mn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=Ix(a.digest);if(o){let r=Dd.get(a);if(r)throw r;let u=S0(o.location,l);if(b0&&!Dd.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Dd.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function Xx({routeContext:n,match:a,children:l}){let o=S.useContext($i);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Kn.Provider,{value:n},l)}function Qx(n,a=[],l){let o=l==null?void 0:l.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,u=o==null?void 0:o.errors;if(u!=null){let v=r.findIndex(b=>b.route.id&&(u==null?void 0:u[b.route.id])!==void 0);dt(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),r=r.slice(0,Math.min(r.length,v+1))}let d=!1,m=-1;if(l&&o){d=o.renderFallback;for(let v=0;v<r.length;v++){let b=r[v];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=v),b.route.id){let{loaderData:x,errors:T}=o,C=b.route.loader&&!x.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||C){l.isStatic&&(d=!0),m>=0?r=r.slice(0,m+1):r=[r[0]];break}}}}let p=l==null?void 0:l.onError,g=o&&p?(v,b)=>{var x,T;p(v,{location:o.location,params:((T=(x=o.matches)==null?void 0:x[0])==null?void 0:T.params)??{},unstable_pattern:Rx(o.matches),errorInfo:b})}:void 0;return r.reduceRight((v,b,x)=>{let T,C=!1,j=null,N=null;o&&(T=u&&b.route.id?u[b.route.id]:void 0,j=b.route.errorElement||Kx,d&&(m<0&&x===0?(N0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,N=null):m===x&&(C=!0,N=b.route.hydrateFallbackElement||null)));let A=a.concat(r.slice(0,x+1)),O=()=>{let M;return T?M=j:C?M=N:b.route.Component?M=S.createElement(b.route.Component,null):b.route.element?M=b.route.element:M=v,S.createElement(Xx,{match:b,routeContext:{outlet:v,matches:A,isDataRoute:o!=null},children:M})};return o&&(b.route.ErrorBoundary||b.route.errorElement||x===0)?S.createElement(j0,{location:o.location,revalidation:o.revalidation,component:j,error:T,children:O(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:g}):O()},null)}function Rf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jx(n){let a=S.useContext($i);return dt(a,Rf(n)),a}function Wx(n){let a=S.useContext(oc);return dt(a,Rf(n)),a}function eT(n){let a=S.useContext(Kn);return dt(a,Rf(n)),a}function Bf(n){let a=eT(n),l=a.matches[a.matches.length-1];return dt(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function tT(){return Bf("useRouteId")}function nT(){var o;let n=S.useContext(Mf),a=Wx("useRouteError"),l=Bf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[l]}function aT(){let{router:n}=Jx("useNavigate"),a=Bf("useNavigate"),l=S.useRef(!1);return A0(()=>{l.current=!0}),S.useCallback(async(r,u={})=>{Fn(l.current,E0),l.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var Tv={};function N0(n,a,l){!a&&!Tv[n]&&(Tv[n]=!0,Fn(!1,l))}S.memo(sT);function sT({routes:n,future:a,state:l,isStatic:o,onError:r}){return C0(n,void 0,{state:l,isStatic:o,onError:r})}function qr({to:n,replace:a,state:l,relative:o}){dt(Ys(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(Mn);Fn(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=S.useContext(Kn),{pathname:d}=hn(),m=rc(),p=lc(n,kf(u),d,o==="path"),g=JSON.stringify(p);return S.useEffect(()=>{m(JSON.parse(g),{replace:a,state:l,relative:o})},[m,g,o,a,l]),null}function w0(n){return $x(n.context)}function Bt(n){dt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function iT({basename:n="/",children:a=null,location:l,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){dt(!Ys(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:m,navigator:r,static:u,unstable_useTransitions:d,future:{}}),[m,r,u,d]);typeof l=="string"&&(l=Pi(l));let{pathname:g="/",search:v="",hash:b="",state:x=null,key:T="default",unstable_mask:C}=l,j=S.useMemo(()=>{let N=La(g,m);return N==null?null:{location:{pathname:N,search:v,hash:b,state:x,key:T,unstable_mask:C},navigationType:o}},[m,g,v,b,x,T,o,C]);return Fn(j!=null,`<Router basename="${m}"> is not able to match the URL "${g}${v}${b}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:S.createElement(Mn.Provider,{value:p},S.createElement(fo.Provider,{children:a,value:j}))}function lT({children:n,location:a}){return Yx(Jd(n),a)}function Jd(n,a=[]){let l=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let u=[...a,r];if(o.type===S.Fragment){l.push.apply(l,Jd(o.props.children,u));return}dt(o.type===Bt,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),dt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Jd(o.props.children,u)),l.push(d)}),l}var Gr="get",Pr="application/x-www-form-urlencoded";function uc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function oT(n){return uc(n)&&n.tagName.toLowerCase()==="button"}function rT(n){return uc(n)&&n.tagName.toLowerCase()==="form"}function cT(n){return uc(n)&&n.tagName.toLowerCase()==="input"}function uT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function dT(n,a){return n.button===0&&(!a||a==="_self")&&!uT(n)}function Wd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,l)=>{let o=n[l];return a.concat(Array.isArray(o)?o.map(r=>[l,r]):[[l,o]])},[]))}function fT(n,a){let l=Wd(n);return a&&a.forEach((o,r)=>{l.has(r)||a.getAll(r).forEach(u=>{l.append(r,u)})}),l}var Br=null;function hT(){if(Br===null)try{new FormData(document.createElement("form"),0),Br=!1}catch{Br=!0}return Br}var mT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kd(n){return n!=null&&!mT.has(n)?(Fn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pr}"`),null):n}function pT(n,a){let l,o,r,u,d;if(rT(n)){let m=n.getAttribute("action");o=m?La(m,a):null,l=n.getAttribute("method")||Gr,r=kd(n.getAttribute("enctype"))||Pr,u=new FormData(n)}else if(oT(n)||cT(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||m.getAttribute("action");if(o=p?La(p,a):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||Gr,r=kd(n.getAttribute("formenctype"))||kd(m.getAttribute("enctype"))||Pr,u=new FormData(m,n),!hT()){let{name:g,type:v,value:b}=n;if(v==="image"){let x=g?`${g}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else g&&u.append(g,b)}}else{if(uc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Gr,o=null,r=Pr,d=n}return u&&r==="text/plain"&&(d=u,u=void 0),{action:o,method:l.toLowerCase(),encType:r,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Of(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function gT(n,a,l,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&La(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function vT(n,a){if(n.id in a)return a[n.id];try{let l=await import(n.module);return a[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function yT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function bT(n,a,l){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await vT(u,l);return d.links?d.links():[]}return[]}));return TT(o.flat(1).filter(yT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Ev(n,a,l,o,r,u){let d=(p,g)=>l[g]?p.route.id!==l[g].route.id:!0,m=(p,g)=>{var v;return l[g].pathname!==p.pathname||((v=l[g].route.path)==null?void 0:v.endsWith("*"))&&l[g].params["*"]!==p.params["*"]};return u==="assets"?a.filter((p,g)=>d(p,g)||m(p,g)):u==="data"?a.filter((p,g)=>{var b;let v=o.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(d(p,g)||m(p,g))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((b=l[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function ST(n,a,{includeHydrateFallback:l}={}){return _T(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let u=[r.module];return r.clientActionModule&&(u=u.concat(r.clientActionModule)),r.clientLoaderModule&&(u=u.concat(r.clientLoaderModule)),l&&r.hydrateFallbackModule&&(u=u.concat(r.hydrateFallbackModule)),r.imports&&(u=u.concat(r.imports)),u}).flat(1))}function _T(n){return[...new Set(n)]}function xT(n){let a={},l=Object.keys(n).sort();for(let o of l)a[o]=n[o];return a}function TT(n,a){let l=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(xT(r));return l.has(u)||(l.add(u),o.push({key:u,link:r})),o},[])}function D0(){let n=S.useContext($i);return Of(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function ET(){let n=S.useContext(oc);return Of(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Lf=S.createContext(void 0);Lf.displayName="FrameworkContext";function k0(){let n=S.useContext(Lf);return Of(n,"You must render this element inside a <HydratedRouter> element"),n}function AT(n,a){let l=S.useContext(Lf),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:g,onMouseLeave:v,onTouchStart:b}=a,x=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let j=A=>{A.forEach(O=>{d(O.isIntersecting)})},N=new IntersectionObserver(j,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[n]),S.useEffect(()=>{if(o){let j=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(j)}}},[o]);let T=()=>{r(!0)},C=()=>{r(!1),d(!1)};return l?n!=="intent"?[u,x,{}]:[u,x,{onFocus:Gl(m,T),onBlur:Gl(p,C),onMouseEnter:Gl(g,T),onMouseLeave:Gl(v,C),onTouchStart:Gl(b,T)}]:[!1,x,{}]}function Gl(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function CT({page:n,...a}){let{router:l}=D0(),o=S.useMemo(()=>p0(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?S.createElement(NT,{page:n,matches:o,...a}):null}function jT(n){let{manifest:a,routeModules:l}=k0(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return bT(n,a,l).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,l]),o}function NT({page:n,matches:a,...l}){let o=hn(),{future:r,manifest:u,routeModules:d}=k0(),{basename:m}=D0(),{loaderData:p,matches:g}=ET(),v=S.useMemo(()=>Ev(n,a,g,u,o,"data"),[n,a,g,u,o]),b=S.useMemo(()=>Ev(n,a,g,u,o,"assets"),[n,a,g,u,o]),x=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let j=new Set,N=!1;if(a.forEach(O=>{var X;let M=u.routes[O.route.id];!M||!M.hasLoader||(!v.some(H=>H.route.id===O.route.id)&&O.route.id in p&&((X=d[O.route.id])!=null&&X.shouldRevalidate)||M.hasClientLoader?N=!0:j.add(O.route.id))}),j.size===0)return[];let A=gT(n,m,r.unstable_trailingSlashAwareDataRequests,"data");return N&&j.size>0&&A.searchParams.set("_routes",a.filter(O=>j.has(O.route.id)).map(O=>O.route.id).join(",")),[A.pathname+A.search]},[m,r.unstable_trailingSlashAwareDataRequests,p,o,u,v,a,n,d]),T=S.useMemo(()=>ST(b,u),[b,u]),C=jT(b);return S.createElement(S.Fragment,null,x.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...l})),T.map(j=>S.createElement("link",{key:j,rel:"modulepreload",href:j,...l})),C.map(({key:j,link:N})=>S.createElement("link",{key:j,nonce:l.nonce,...N,crossOrigin:N.crossOrigin??l.crossOrigin})))}function wT(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var DT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{DT&&(window.__reactRouterVersion="7.13.1")}catch{}function kT({basename:n,children:a,unstable_useTransitions:l,window:o}){let r=S.useRef();r.current==null&&(r.current=cx({window:o,v5Compat:!0}));let u=r.current,[d,m]=S.useState({action:u.action,location:u.location}),p=S.useCallback(g=>{l===!1?m(g):S.startTransition(()=>m(g))},[l]);return S.useLayoutEffect(()=>u.listen(p),[u,p]),S.createElement(iT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:l})}var M0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zf=S.forwardRef(function({onClick:a,discover:l="render",prefetch:o="none",relative:r,reloadDocument:u,replace:d,unstable_mask:m,state:p,target:g,to:v,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:T,...C},j){let{basename:N,navigator:A,unstable_useTransitions:O}=S.useContext(Mn),M=typeof v=="string"&&M0.test(v),X=S0(v,N);v=X.to;let H=qx(v,{relative:r}),J=hn(),W=null;if(m){let q=lc(m,[],J.unstable_mask?J.unstable_mask.pathname:"/",!0);N!=="/"&&(q.pathname=q.pathname==="/"?N:ua([N,q.pathname])),W=A.createHref(q)}let[$,ne,ge]=AT(o,C),U=OT(v,{replace:d,unstable_mask:m,state:p,target:g,preventScrollReset:b,relative:r,viewTransition:x,unstable_defaultShouldRevalidate:T,unstable_useTransitions:O});function pe(q){a&&a(q),q.defaultPrevented||U(q)}let te=!(X.isExternal||u),ye=S.createElement("a",{...C,...ge,href:(te?W:void 0)||X.absoluteURL||H,onClick:te?pe:a,ref:wT(j,ne),target:g,"data-discover":!M&&l==="render"?"true":void 0});return $&&!M?S.createElement(S.Fragment,null,ye,S.createElement(CT,{page:H})):ye});zf.displayName="Link";var MT=S.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:o="",end:r=!1,style:u,to:d,viewTransition:m,children:p,...g},v){let b=ho(d,{relative:g.relative}),x=hn(),T=S.useContext(oc),{navigator:C,basename:j}=S.useContext(Mn),N=T!=null&&IT(b)&&m===!0,A=C.encodeLocation?C.encodeLocation(b).pathname:b.pathname,O=x.pathname,M=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;l||(O=O.toLowerCase(),M=M?M.toLowerCase():null,A=A.toLowerCase()),M&&j&&(M=La(M,j)||M);const X=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let H=O===A||!r&&O.startsWith(A)&&O.charAt(X)==="/",J=M!=null&&(M===A||!r&&M.startsWith(A)&&M.charAt(A.length)==="/"),W={isActive:H,isPending:J,isTransitioning:N},$=H?a:void 0,ne;typeof o=="function"?ne=o(W):ne=[o,H?"active":null,J?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let ge=typeof u=="function"?u(W):u;return S.createElement(zf,{...g,"aria-current":$,className:ne,ref:v,style:ge,to:d,viewTransition:m},typeof p=="function"?p(W):p)});MT.displayName="NavLink";var RT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:o,replace:r,state:u,method:d=Gr,action:m,onSubmit:p,relative:g,preventScrollReset:v,viewTransition:b,unstable_defaultShouldRevalidate:x,...T},C)=>{let{unstable_useTransitions:j}=S.useContext(Mn),N=UT(),A=VT(m,{relative:g}),O=d.toLowerCase()==="get"?"get":"post",M=typeof m=="string"&&M0.test(m),X=H=>{if(p&&p(H),H.defaultPrevented)return;H.preventDefault();let J=H.nativeEvent.submitter,W=(J==null?void 0:J.getAttribute("formmethod"))||d,$=()=>N(J||H.currentTarget,{fetcherKey:a,method:W,navigate:l,replace:r,state:u,relative:g,preventScrollReset:v,viewTransition:b,unstable_defaultShouldRevalidate:x});j&&l!==!1?S.startTransition(()=>$()):$()};return S.createElement("form",{ref:C,method:O,action:A,onSubmit:o?p:X,...T,"data-discover":!M&&n==="render"?"true":void 0})});RT.displayName="Form";function BT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function R0(n){let a=S.useContext($i);return dt(a,BT(n)),a}function OT(n,{target:a,replace:l,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g}={}){let v=rc(),b=hn(),x=ho(n,{relative:d});return S.useCallback(T=>{if(dT(T,a)){T.preventDefault();let C=l!==void 0?l:ao(b)===ao(x),j=()=>v(n,{replace:C,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p});g?S.startTransition(()=>j()):j()}},[b,v,x,l,o,r,a,n,u,d,m,p,g])}function Uf(n){Fn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Wd(n)),l=S.useRef(!1),o=hn(),r=S.useMemo(()=>fT(o.search,l.current?null:a.current),[o.search]),u=rc(),d=S.useCallback((m,p)=>{const g=Wd(typeof m=="function"?m(new URLSearchParams(r)):m);l.current=!0,u("?"+g,p)},[u,r]);return[r,d]}var LT=0,zT=()=>`__${String(++LT)}__`;function UT(){let{router:n}=R0("useSubmit"),{basename:a}=S.useContext(Mn),l=tT(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:m,method:p,encType:g,formData:v,body:b}=pT(u,a);if(d.navigate===!1){let x=d.fetcherKey||zT();await o(x,l,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:b,formMethod:d.method||p,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:b,formMethod:d.method||p,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:l,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,r,a,l])}function VT(n,{relative:a}={}){let{basename:l}=S.useContext(Mn),o=S.useContext(Kn);dt(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...ho(n||".",{relative:a})},d=hn();if(n==null){u.search=d.search;let m=new URLSearchParams(u.search),p=m.getAll("index");if(p.some(v=>v==="")){m.delete("index"),p.filter(b=>b).forEach(b=>m.append("index",b));let v=m.toString();u.search=v?`?${v}`:""}}return(!n||n===".")&&r.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:ua([l,u.pathname])),ao(u)}function IT(n,{relative:a}={}){let l=S.useContext(x0);dt(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=R0("useViewTransitionState"),r=ho(n,{relative:a});if(!l.isTransitioning)return!1;let u=La(l.currentLocation.pathname,o)||l.currentLocation.pathname,d=La(l.nextLocation.pathname,o)||l.nextLocation.pathname;return so(r.pathname,d)!=null||so(r.pathname,u)!=null}function na(){const n=rc();return S.useCallback((a,l)=>{typeof a=="number"?n(a):n(a,l)},[n])}function B0(n){return`/sessions/${encodeURIComponent(n)}`}function io(n){return`/projects/${encodeURIComponent(n)}`}function fs(n,a){const l=`/tasks/${encodeURIComponent(n)}`;return a?`${l}/${a}`:l}function HT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Ps(n,a){const l=new URLSearchParams({project:n});return a&&l.set("parent",a),`/tasks/new?${l.toString()}`}function O0(n,a){return`/sessions/new?${new URLSearchParams({env:n,runtime:a}).toString()}`}const Av="/environments/new",Ii="/settings",qT="/pair";function rn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Ql(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function GT(n){return rn(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.defaultRuntime=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Cv(n){return rn(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function jv(n){return rn(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function PT(n){return rn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function $T(n){return rn(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function YT(n){return rn(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function FT(n){return rn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const KT=new Set(["off","subscription","api_key"]),Md=new Set(["off","on"]);function ZT(n){return rn(n)&&KT.has(n.claude)&&Md.has(n.github)&&Md.has(n.copilot)&&Md.has(n.codex)}function XT(n){return rn(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function QT(n){return rn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function JT(n){return rn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function oa(n,a,l,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:(Ql(l,`item at index ${u} in "${o}" has unexpected shape`),!1)):(Ql(l,`expected "${o}" to be an array, got ${typeof n}`),[])}function WT(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!rn(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}return{type:a.type,payload:rn(a.payload)?a.payload:void 0}}function eE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const tE=3e3,Mi=5e3,nE=4001;function aE(n){const a=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",l=S.useRef(void 0),[o,r]=S.useState(!1),[u,d]=S.useState([]),[m,p]=S.useState([]),[g,v]=S.useState([]),[b,x]=S.useState(0),[T,C]=S.useState(void 0),[j,N]=S.useState([]),[A,O]=S.useState([]),[M,X]=S.useState([]),[H,J]=S.useState([]),[W,$]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[ne,ge]=S.useState({}),[U,pe]=S.useState([]),[te,ye]=S.useState(""),[q,z]=S.useState(""),[F,ee]=S.useState(!1),[ke,je]=S.useState([]),[Pe,we]=S.useState({}),[_e,Ae]=S.useState(!1),[Q,P]=S.useState(void 0),I=S.useCallback(ae=>{var Re;((Re=l.current)==null?void 0:Re.readyState)===WebSocket.OPEN&&l.current.send(JSON.stringify(ae))},[]);S.useEffect(()=>{let ae,Re;function be(){ae=new WebSocket(a),l.current=ae,ae.onopen=()=>{r(!0),I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"}),I({type:"get_credential_providers"}),I({type:"list_personas"}),I({type:"subscribe_all"})},ae.onmessage=re=>{var se,At,Rn,Ks,Va,bo,Xi,Qi,Ji,Zs,Xs,Wi,el,Qn,zt,Zt,ha,Qs,So;if(typeof re.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const ie=WT(re.data);if(ie)switch(ie.type){case"environments":d(oa((se=ie.payload)==null?void 0:se.environments,GT,"environments","environments"));break;case"sessions":p(oe=>{var Xt;const $e=oa((Xt=ie.payload)==null?void 0:Xt.sessions,Cv,"sessions","sessions"),Oe=new Map(oe.map(bt=>[bt.id,bt.status])),Ie=new Set(["pending","running","idle"]),sn=new Set(["completed","failed","interrupted"]);return $e.map(bt=>{const ht=Oe.get(bt.id);if(!ht||ht===bt.status)return bt;if(sn.has(ht)&&Ie.has(bt.status))return{...bt,status:ht};if(Ie.has(ht)&&Ie.has(bt.status)){const mt=["pending","running","idle"];if(mt.indexOf(ht)>mt.indexOf(bt.status))return{...bt,status:ht}}return bt})});break;case"session_event":{if(!jv(ie.payload)){Ql("session_event","payload is not a valid SessionEvent");break}const oe=ie.payload;let $e=0;if(v(Oe=>{const Ie=[...Oe,oe];return Ie.length>Mi?($e=Ie.length-Mi,Ie.slice(-Mi)):Ie}),$e>0&&x(Oe=>Oe+$e),oe.eventType==="status"){const Oe=eE(oe.content);p(Ie=>Ie.some(Xt=>Xt.id===oe.sessionId)?Ie.map(Xt=>Xt.id===oe.sessionId?{...Xt,status:Oe}:Xt):[...Ie,{id:oe.sessionId,environmentId:"",runtime:"",status:Oe,prompt:"",startedAt:oe.timestamp}])}break}case"session_events":{const oe=oa((At=ie.payload)==null?void 0:At.events,jv,"session_events","events"),$e=(Rn=ie.payload)==null?void 0:Rn.sessionId;if(typeof $e!="string"){Ql("session_events","missing or non-string sessionId");break}if(oe.length>0){let Oe=0;v(Ie=>{const sn=new Set;for(const ht of Ie)ht.sessionId===$e&&sn.add(`${ht.timestamp}|${ht.eventType}`);const Xt=oe.filter(ht=>!sn.has(`${ht.timestamp}|${ht.eventType}`)),bt=[...Ie,...Xt].sort((ht,mt)=>ht.sessionId!==mt.sessionId?0:ht.timestamp.localeCompare(mt.timestamp));return bt.length>Mi?(Oe=bt.length-Mi,bt.slice(-Mi)):bt}),Oe>0&&x(Ie=>Ie+Oe)}break}case"spawned":{const oe=(Ks=ie.payload)==null?void 0:Ks.sessionId;typeof oe=="string"&&oe&&C(oe),I({type:"list_sessions"});break}case"projects":N(oa((Va=ie.payload)==null?void 0:Va.projects,PT,"projects","projects"));break;case"project_created":Ae(!1),I({type:"list_projects"});break;case"project_archived":I({type:"list_projects"});break;case"project_updated":I({type:"list_projects"});break;case"tasks":{const oe=oa((bo=ie.payload)==null?void 0:bo.tasks,$T,"tasks","tasks"),$e=(typeof((Xi=ie.payload)==null?void 0:Xi.projectId)=="string"?ie.payload.projectId:"")||(oe.length>0?oe[0].projectId:"");if(!$e){O(oe);break}O(Oe=>[...Oe.filter(Ie=>Ie.projectId!==$e),...oe]);break}case"task_created":{const oe=(Qi=ie.payload)==null?void 0:Qi.task;if(rn(oe)){const $e=typeof oe.project_id=="string"?oe.project_id:typeof oe.projectId=="string"?oe.projectId:"";$e&&I({type:"list_tasks",payload:{projectId:$e}})}break}case"task_started":{const oe=ie.payload;if(!rn(oe))break;P(Oe=>oe.taskId&&Oe===oe.taskId?void 0:Oe),oe.sessionId&&(I({type:"list_sessions"}),typeof oe.taskId=="string"&&typeof oe.sessionId=="string"&&O(Oe=>Oe.map(Ie=>Ie.id===oe.taskId?{...Ie,latestSessionId:oe.sessionId}:Ie)));const $e=typeof oe.projectId=="string"?oe.projectId:void 0;$e?I({type:"list_tasks",payload:{projectId:$e}}):oe.taskId&&O(Oe=>{const Ie=Oe.find(sn=>sn.id===oe.taskId);return Ie&&I({type:"list_tasks",payload:{projectId:Ie.projectId}}),Oe});break}case"task_completed":case"task_deleted":case"task_updated":{const oe=ie.payload;if(!rn(oe))break;const $e=typeof oe.projectId=="string"?oe.projectId:void 0;$e?I({type:"list_tasks",payload:{projectId:$e}}):oe.taskId&&O(Oe=>{const Ie=Oe.find(sn=>sn.id===oe.taskId);return Ie&&I({type:"list_tasks",payload:{projectId:Ie.projectId}}),Oe});break}case"findings":X(oa((Ji=ie.payload)==null?void 0:Ji.findings,YT,"findings","findings"));break;case"finding_posted":typeof((Zs=ie.payload)==null?void 0:Zs.projectId)=="string"&&I({type:"list_findings",payload:{projectId:ie.payload.projectId}});break;case"tokens":J(oa((Xs=ie.payload)==null?void 0:Xs.tokens,FT,"tokens","tokens"));break;case"token_changed":I({type:"list_tokens"});break;case"credential_providers":ZT(ie.payload)&&$(ie.payload);break;case"provision_progress":{if(!XT(ie.payload)){Ql("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const oe=ie.payload;ge($e=>({...$e,[oe.environmentId]:{stage:oe.stage,message:oe.message,progress:oe.progress}})),oe.stage==="ready"&&setTimeout(()=>{ge(Oe=>{const Ie={...Oe};return delete Ie[oe.environmentId],Ie})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((Wi=ie.payload)==null?void 0:Wi.environmentId)=="string"){const oe=ie.payload.environmentId;d($e=>$e.filter(Oe=>Oe.id!==oe)),ge($e=>{const Oe={...$e};return delete Oe[oe],Oe})}I({type:"list_sessions"});break;case"codespaces_list":{const oe=oa((el=ie.payload)==null?void 0:el.codespaces,QT,"codespaces_list","codespaces"),$e=typeof((Qn=ie.payload)==null?void 0:Qn.error)=="string"?ie.payload.error:"";pe(oe),z($e);break}case"codespace_created":{ee(!1),I({type:"list_codespaces"});break}case"codespace_create_error":{ee(!1);const oe=typeof((zt=ie.payload)==null?void 0:zt.message)=="string"?ie.payload.message:"Failed to create codespace";ye(oe);break}case"personas":{const oe=oa((Zt=ie.payload)==null?void 0:Zt.personas,JT,"personas","personas");je(oe);break}case"persona_created":case"persona_updated":case"persona_deleted":I({type:"list_personas"});break;case"task_sessions":{const oe=(ha=ie.payload)==null?void 0:ha.taskId;if(typeof oe!="string"||!oe)break;const $e=oa((Qs=ie.payload)==null?void 0:Qs.sessions,Cv,"task_sessions","sessions");we(Oe=>({...Oe,[oe]:$e}));break}case"error":console.error("[ws]",(So=ie.payload)==null?void 0:So.message);break}},ae.onclose=re=>{if(r(!1),l.current=void 0,Ae(!1),P(void 0),clearTimeout(Re),re.code===nE){window.location.href=qT;return}Re=setTimeout(be,tE)},ae.onerror=()=>{ae.close()}}return be(),()=>{clearTimeout(Re),ae==null||ae.close()}},[a,I]);const De=S.useCallback((ae,Re,be,re,ie,se)=>{I({type:"spawn",payload:{environmentId:ae,prompt:Re,model:be||"",runtime:re||"",personaId:ie||"",worktreeBasePath:se||""}})},[I]),Ye=S.useCallback((ae,Re)=>{I({type:"send_input",payload:{sessionId:ae,text:Re}})},[I]),vt=S.useCallback(ae=>{I({type:"kill",payload:{sessionId:ae}})},[I]),xt=S.useCallback(()=>{I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"})},[I]),Gt=S.useCallback(ae=>{I({type:"get_session_events",payload:{sessionId:ae}})},[I]),We=S.useCallback(()=>{v([]),x(0)},[]),Ze=S.useCallback((ae,Re,be,re)=>{Ae(!0),I({type:"create_project",payload:{name:ae,description:Re||"",repoUrl:be||"",defaultEnvironmentId:re||""}})},[I]),ze=S.useCallback(ae=>{I({type:"archive_project",payload:{projectId:ae}})},[I]),Sn=S.useCallback((ae,Re)=>{I({type:"update_project",payload:{projectId:ae,...Re}})},[I]),_n=S.useCallback(ae=>{I({type:"list_tasks",payload:{projectId:ae}})},[I]),Zn=S.useCallback((ae,Re,be,re,ie)=>{I({type:"create_task",payload:{projectId:ae,title:Re,description:be||"",dependsOn:re||[],parentTaskId:ie||""}})},[I]),an=S.useCallback((ae,Re,be,re,ie,se)=>{P(ae),I({type:"start_task",payload:{taskId:ae,runtime:Re||"",model:be||"",personaId:re||"",environmentId:ie||"",notes:se||""}})},[I]),Xn=S.useCallback(ae=>{I({type:"complete_task",payload:{taskId:ae}})},[I]),Z=S.useCallback(ae=>{I({type:"resume_task",payload:{taskId:ae}})},[I]),le=S.useCallback((ae,Re,be,re)=>{I({type:"update_task",payload:{taskId:ae,title:Re,description:be,dependsOn:re}})},[I]),ce=S.useCallback(ae=>{I({type:"delete_task",payload:{taskId:ae}})},[I]),de=S.useCallback(ae=>{I({type:"list_findings",payload:{projectId:ae}})},[I]),Te=S.useCallback((ae,Re,be,re,ie)=>{I({type:"post_finding",payload:{projectId:ae,title:Re,content:be,category:re||"general",tags:ie||[]}})},[I]),Ee=S.useCallback(()=>{I({type:"list_tokens"})},[I]),et=S.useCallback((ae,Re,be,re,ie)=>{I({type:"set_token",payload:{name:ae,value:Re,tokenType:be,envVar:re,filePath:ie}})},[I]),Le=S.useCallback(ae=>{I({type:"delete_token",payload:{name:ae}})},[I]),ot=S.useCallback(ae=>{I({type:"set_credential_providers",payload:ae})},[I]),Dt=S.useCallback((ae,Re,be,re)=>{const ie={displayName:ae,adapterType:Re,adapterConfig:be||{}};re&&(ie.defaultRuntime=re),I({type:"add_environment",payload:ie})},[I]),Tt=S.useCallback(ae=>{I({type:"provision_environment",payload:{environmentId:ae}})},[I]),Lt=S.useCallback(ae=>{I({type:"stop_environment",payload:{environmentId:ae}})},[I]),rt=S.useCallback(ae=>{I({type:"remove_environment",payload:{environmentId:ae}})},[I]),Et=S.useCallback(()=>{I({type:"list_codespaces"})},[I]),cn=S.useCallback((ae,Re)=>{if(!o){ye("Not connected to server. Please try again once the connection is restored.");return}ee(!0),ye("");const be={repo:ae};Re&&(be.machine=Re),I({type:"create_codespace",payload:be})},[I,o]),yt=S.useCallback((ae,Re,be,re,ie,se)=>{I({type:"create_persona",payload:{name:ae,description:Re,systemPrompt:be,runtime:re||"",model:ie||"",maxTurns:se||0}})},[I]),Yt=S.useCallback((ae,Re,be,re,ie,se,At)=>{I({type:"update_persona",payload:{personaId:ae,name:Re||"",description:be||"",systemPrompt:re||"",runtime:ie||"",model:se||"",maxTurns:At||0}})},[I]),Ft=S.useCallback(ae=>{I({type:"delete_persona",payload:{personaId:ae}})},[I]),bs=S.useCallback(ae=>{I({type:"get_task_sessions",payload:{taskId:ae}})},[I]);return{connected:o,environments:u,sessions:m,events:g,eventsDropped:b,lastSpawnedId:T,projects:j,tasks:A,findings:M,tokens:H,spawn:De,sendInput:Ye,kill:vt,refresh:xt,loadSessionEvents:Gt,clearEvents:We,createProject:Ze,archiveProject:ze,updateProject:Sn,loadTasks:_n,createTask:Zn,startTask:an,completeTask:Xn,resumeTask:Z,updateTask:le,deleteTask:ce,loadFindings:de,postFinding:Te,addEnvironment:Dt,loadTokens:Ee,setToken:et,deleteToken:Le,credentialProviders:W,updateCredentialProviders:ot,provisionStatus:ne,provisionEnvironment:Tt,stopEnvironment:Lt,removeEnvironment:rt,codespaces:U,codespaceError:te,codespaceListError:q,codespaceCreating:F,listCodespaces:Et,createCodespace:cn,projectCreating:_e,taskStartingId:Q,personas:ke,createPersona:yt,updatePersona:Yt,deletePersona:Ft,taskSessions:Pe,loadTaskSessions:bs}}const Vf=S.createContext(void 0);function sE({children:n}){const a=aE();return h.jsx(Vf.Provider,{value:a,children:n})}function nn(){const n=S.useContext(Vf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const iE=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",defaultRuntime:"claude-code",status:"disconnected",bootstrapped:!1}],lE=[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z",endedAt:"2026-02-26T15:12:00Z",error:"Context window exceeded before completing implementation"},{id:"sess-001",environmentId:"env-local-01",runtime:"node",status:"running",prompt:"Refactor the authentication middleware to use JWT tokens",startedAt:"2026-02-27T08:15:00Z"},{id:"sess-002",environmentId:"env-docker-01",runtime:"python",status:"completed",prompt:"Write unit tests for the user registration endpoint",startedAt:"2026-02-27T07:30:00Z"},{id:"sess-003",environmentId:"env-local-01",runtime:"node",status:"failed",prompt:"Migrate database schema to add audit_log table",startedAt:"2026-02-26T22:45:00Z"},{id:"sess-004",environmentId:"env-docker-01",runtime:"python",status:"running",prompt:"Implement rate limiting for the public API",startedAt:"2026-02-27T09:00:00Z"}],oE=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
|
|
37
|
+
- src/middleware/auth.ts
|
|
38
|
+
- src/routes/login.ts
|
|
39
|
+
- src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
|
|
40
|
+
\`\`\`typescript
|
|
41
|
+
import jwt from "jsonwebtoken";
|
|
42
|
+
import type { Request, Response, NextFunction } from "express";
|
|
43
|
+
|
|
44
|
+
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
45
|
+
|
|
46
|
+
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
47
|
+
const header = req.headers.authorization;
|
|
48
|
+
if (!header?.startsWith("Bearer ")) {
|
|
49
|
+
res.status(401).json({ error: "Missing token" });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
54
|
+
req.user = decoded;
|
|
55
|
+
next();
|
|
56
|
+
} catch {
|
|
57
|
+
res.status(403).json({ error: "Invalid token" });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
\`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],rE=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],cE=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1}],Nv=[{id:"find-001",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"architecture",title:"Auth middleware is tightly coupled to Express",content:"The current auth middleware directly references Express Request/Response types. Consider extracting a framework-agnostic token verification layer so we can reuse it in the WebSocket auth path.",tags:["auth","decoupling","middleware"],createdAt:"2026-02-27T08:16:00Z"},{id:"find-002",projectId:"proj-alpha",taskId:"task-003",sessionId:"sess-002",category:"api",title:"Missing pagination on GET /api/users",content:"The users endpoint returns all rows without limit/offset. For datasets over 10k rows this will cause timeouts. Recommend cursor-based pagination with a default page size of 50.",tags:["api","pagination","performance"],createdAt:"2026-02-27T07:31:00Z"},{id:"find-003",projectId:"proj-alpha",taskId:"task-005",sessionId:"sess-003",category:"bug",title:"Race condition in session cleanup",content:"When two requests hit /api/logout concurrently, the second call throws a 500 because the session row has already been deleted. Needs an idempotent DELETE or a conditional check.",tags:["bug","concurrency","sessions"],createdAt:"2026-02-26T22:50:00Z"},{id:"find-004",projectId:"proj-alpha",taskId:"task-004",sessionId:"",category:"decision",title:"Chose pg-pool over knex connection pool",content:"pg-pool gives us direct control over idle timeout, max connections, and health check queries. Knex wraps pg-pool anyway and adds overhead we don't need since we write raw SQL.",tags:["database","decision","postgres"],createdAt:"2026-02-23T11:30:00Z"},{id:"find-005",projectId:"proj-alpha",taskId:"",sessionId:"",category:"dependency",title:"jsonwebtoken has 3 high-severity CVEs",content:"The jsonwebtoken package (v8.x) has known vulnerabilities. Consider migrating to jose which is maintained, supports ESM, and covers the same JWS/JWE surface area with zero dependencies.",tags:["security","dependency","jwt"],createdAt:"2026-02-27T08:20:00Z"},{id:"find-006",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"pattern",title:"Consistent error response shape",content:"All error responses should follow the shape `{ error: string, code: string, details?: unknown }`. Currently some routes return `{ message: string }` and others return `{ error: string }`.",tags:["api","consistency","error-handling"],createdAt:"2026-02-27T08:17:00Z"},{id:"find-007",projectId:"proj-beta",taskId:"task-007",sessionId:"sess-004",category:"architecture",title:"Watermark storage should be pluggable",content:"The incremental load watermarks are currently stored in a local SQLite file. For production multi-worker scenarios, this needs to be backed by a shared store (Redis or Postgres).",tags:["architecture","pipeline","scalability"],createdAt:"2026-02-27T09:05:00Z"}],uE=[{name:"anthropic",tokenType:"env_var",envVar:"ANTHROPIC_API_KEY",filePath:"",expiresAt:""},{name:"github",tokenType:"env_var",envVar:"GITHUB_TOKEN",filePath:"",expiresAt:"2026-12-31T23:59:59Z"},{name:"gcp-service-account",tokenType:"file",envVar:"",filePath:"/home/user/.config/gcloud/credentials.json",expiresAt:""}],dE=[{id:"persona-arch",name:"Software Architect",description:"Designs system architecture, defines interfaces, and decomposes large features into implementable tasks.",systemPrompt:"You are a senior software architect. Focus on clean interfaces, separation of concerns, and scalable patterns. When decomposing work, create concrete subtasks with clear acceptance criteria.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:50,mcpServers:"[]",createdAt:"2026-02-20T10:00:00Z",updatedAt:"2026-02-20T10:00:00Z"},{id:"persona-fe",name:"Frontend Engineer",description:"React specialist — builds UI components, writes CSS, implements routing, and creates Playwright tests.",systemPrompt:"You are a frontend engineer specializing in React, TypeScript, and modern CSS. Follow component composition patterns, use semantic HTML, and write accessible markup.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:100,mcpServers:"[]",createdAt:"2026-02-20T10:05:00Z",updatedAt:"2026-02-20T10:05:00Z"},{id:"persona-reviewer",name:"Code Reviewer",description:"Reviews diffs for correctness, security, and style. Posts findings for issues discovered.",systemPrompt:"You are a meticulous code reviewer. Check for security vulnerabilities, performance issues, and style consistency. Post findings for anything noteworthy.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:30,mcpServers:"[]",createdAt:"2026-02-20T10:10:00Z",updatedAt:"2026-02-20T10:10:00Z"},{id:"persona-tester",name:"QA Engineer",description:"Writes comprehensive test suites — unit tests, integration tests, and E2E Playwright specs.",systemPrompt:"You are a QA engineer focused on test coverage. Write tests that cover happy paths, edge cases, error scenarios, and accessibility. Use Playwright for E2E tests.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:80,mcpServers:"[]",createdAt:"2026-02-20T10:15:00Z",updatedAt:"2026-02-20T10:15:00Z"}],fE={"task-001b":[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z"},{id:"sess-001",environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:"Implement auth middleware",startedAt:"2026-02-27T08:15:00Z"}],"task-006c":[{id:"sess-004",environmentId:"env-docker-01",runtime:"claude-code",status:"running",prompt:"Add compression options",startedAt:"2026-02-27T09:00:00Z"}]};function $t(n){return new Date(Date.now()+n).toISOString()}const wv=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:$t(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:$t(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:$t(1600),content:`Found 5 endpoints that need refactoring:
|
|
61
|
+
- GET /api/users
|
|
62
|
+
- POST /api/users
|
|
63
|
+
- GET /api/users/:id
|
|
64
|
+
- PUT /api/users/:id
|
|
65
|
+
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:$t(2800),content:"Refactoring to use Express Router with middleware chain...\n```typescript\nconst router = Router();\nrouter.use(authenticate);\nrouter.use(validateBody);\n```"}},{delayMs:4e3,event:{eventType:"output",timestamp:$t(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:$t(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:$t(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:$t(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:$t(1400),content:`Found tables to modify:
|
|
66
|
+
- users (add column: last_login_at)
|
|
67
|
+
- sessions (add index on expires_at)
|
|
68
|
+
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:$t(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
69
|
+
The table has 50,000+ rows — this may lock the table briefly.
|
|
70
|
+
|
|
71
|
+
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:$t(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:$t(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
72
|
+
Migration 002_sessions_index.sql applied successfully.
|
|
73
|
+
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:$t(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:$t(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:$t(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:$t(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:$t(1800),content:`Writing test cases:
|
|
74
|
+
- should calculate monthly total
|
|
75
|
+
- should apply discount codes
|
|
76
|
+
- should handle currency conversion
|
|
77
|
+
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:$t(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
|
|
78
|
+
The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:$t(3500),content:"failed"}}]}],Dv=400;function hE({children:n}){const[a,l]=S.useState(lE),[o,r]=S.useState(oE),[u,d]=S.useState(void 0),[m,p]=S.useState(rE),[g,v]=S.useState(cE),[b,x]=S.useState(Nv),[T,C]=S.useState(uE),[j,N]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[A,O]=S.useState(dE),[M]=S.useState(fE),X=S.useRef(0),H=S.useRef(0),J=S.useRef(new Set),W=S.useRef(new Map),$=S.useRef(g);$.current=g;const ne=S.useRef(new Map),ge=S.useRef(new Map),U=S.useCallback(Z=>(X.current+=1,`mock-${Z}-${String(X.current).padStart(3,"0")}`),[]),pe=S.useCallback(()=>{const Z=wv[H.current%wv.length];return H.current+=1,Z},[]),te=S.useCallback((Z,le,ce)=>{const de=setTimeout(()=>{var Te;J.current.delete(de),ce&&((Te=W.current.get(ce))==null||Te.delete(de)),Z()},le);J.current.add(de),ce&&(W.current.has(ce)||W.current.set(ce,new Set),W.current.get(ce).add(de))},[]),ye=S.useCallback(Z=>{const le=W.current.get(Z);le&&(le.forEach(ce=>{clearTimeout(ce),J.current.delete(ce)}),W.current.delete(Z))},[]),q=S.useCallback((Z,le)=>{l(ce=>ce.map(de=>de.id===Z?{...de,status:le}:de))},[]),z=S.useCallback(Z=>{r(le=>[...le,Z])},[]),F=S.useCallback((Z,le,ce)=>{le.forEach((de,Te)=>{te(()=>{const Ee={sessionId:Z,...de.event,timestamp:new Date().toISOString()};z(Ee),de.event.eventType==="status"&&q(Z,de.event.content),Te===le.length-1&&ce&&ce()},de.delayMs,Z)})},[te,z,q]),ee=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:le,runtime:de});const Te=U("sess"),Ee={id:Te,environmentId:Z,runtime:de||"claude-code",status:"running",prompt:le,startedAt:new Date().toISOString()};l(Le=>[...Le,Ee]),d(Te);const et=pe();if(console.log(`[MockGrackle] Playing scenario: ${et.label}`),et.pauseForInput){const Le=et.pauseAfterStep??et.steps.length-1,ot=et.steps.slice(0,Le+1),Dt=ot.length>0?ot[ot.length-1].delayMs:0;F(Te,ot),te(()=>{q(Te,"idle"),z({sessionId:Te,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Dt+Dv,Te),et.resumeSteps&&ne.current.set(Te,et.resumeSteps)}else F(Te,et.steps)},[U,pe,F,te,q,z]),ke=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),ye(Z),ne.current.delete(Z),q(Z,"interrupted"),z({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),v(le=>le.map(ce=>ce.latestSessionId===Z&&ce.status==="working"?{...ce,status:"not_started"}:ce))},[ye,q,z]),je=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Pe=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),we=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),_e=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] createProject",{name:Z,description:le});const Te={id:U("proj"),name:Z,description:le||"",repoUrl:ce||"",defaultEnvironmentId:de||"",status:"active",worktreeBasePath:"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(Ee=>[...Ee,Te])},[U]),Ae=S.useCallback(Z=>{console.log("[MockGrackle] archiveProject",Z),p(le=>le.map(ce=>ce.id===Z?{...ce,status:"archived"}:ce))},[]),Q=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),P=S.useCallback((Z,le,ce,de,Te)=>{console.log("[MockGrackle] createTask",{projectId:Z,title:le,parentTaskId:Te}),v(Ee=>{const Le=Ee.filter(Lt=>Lt.projectId===Z).reduce((Lt,rt)=>Math.max(Lt,rt.sortOrder),0),ot=Te?Ee.find(Lt=>Lt.id===Te):void 0;if(Te&&!ot)return console.warn("[MockGrackle] Parent task not found:",Te),Ee;if(ot&&!ot.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",Te),Ee;const Dt=ot?ot.depth+1:0,Tt={id:U("task"),projectId:Z,title:le,description:ce||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:de||[],reviewNotes:void 0,sortOrder:Le+1,createdAt:new Date().toISOString(),parentTaskId:Te||"",depth:Dt,childTaskIds:[],canDecompose:!Te};return[...Ee,Tt]})},[U]),I=S.useCallback((Z,le,ce)=>{var ot;console.log("[MockGrackle] startTask",{taskId:Z,runtime:le});const de=$.current.find(Dt=>Dt.id===Z),Te=(de==null?void 0:de.title)??"",Ee=U("sess"),et={id:Ee,environmentId:"env-local-01",runtime:le||"claude-code",status:"running",prompt:Te||Z,startedAt:new Date().toISOString()};l(Dt=>[...Dt,et]),v(Dt=>Dt.map(Tt=>Tt.id===Z?{...Tt,status:"working",latestSessionId:Ee,branch:`mock/${Z.slice(0,8)}`}:Tt));const Le=pe();if(console.log(`[MockGrackle] Playing task scenario: ${Le.label}`),Le.pauseForInput){const Dt=Le.pauseAfterStep??Le.steps.length-1,Tt=Le.steps.slice(0,Dt+1),Lt=Tt.length>0?Tt[Tt.length-1].delayMs:0;if(F(Ee,Tt),te(()=>{q(Ee,"idle"),z({sessionId:Ee,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Lt+Dv,Ee),Le.resumeSteps){const rt=[...Le.resumeSteps];ne.current.set(Ee,rt);const Et=rt.reduce((cn,yt)=>Math.max(cn,yt.delayMs),0);ge.current.set(Ee,{taskId:Z,delayAfterResume:Et+200})}}else{const Dt=Le.steps.length>0?Le.steps[Le.steps.length-1].delayMs:0;F(Ee,Le.steps);const Tt=(ot=Le.steps[Le.steps.length-1])==null?void 0:ot.event.content;te(()=>{Tt==="completed"?v(Lt=>Lt.map(rt=>rt.id===Z&&rt.status==="working"?{...rt,status:"paused"}:rt)):Tt==="failed"&&v(Lt=>Lt.map(rt=>rt.id===Z&&rt.status==="working"?{...rt,status:"failed"}:rt))},Dt+100,Ee)}},[U,pe,F,te,q,z]),De=S.useCallback((Z,le)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:le}),z({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${le}`}),q(Z,"running"),z({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const ce=ne.current.get(Z);if(ce)ne.current.delete(Z),F(Z,ce);else{const Te=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];F(Z,Te)}const de=ge.current.get(Z);de&&(ge.current.delete(Z),te(()=>{v(Te=>Te.map(Ee=>Ee.id===de.taskId&&Ee.status==="working"?{...Ee,status:"paused"}:Ee))},de.delayAfterResume,Z))},[z,q,F,te]),Ye=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),v(le=>le.map(ce=>ce.id===Z?{...ce,status:"complete"}:ce))},[]),vt=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),xt=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:le}),v(Te=>Te.map(Ee=>Ee.id===Z?{...Ee,title:le.trim()||Ee.title,description:ce,dependsOn:de}:Ee))},[]),Gt=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),v(le=>le.filter(ce=>ce.id!==Z))},[]),We=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),x(Nv.filter(le=>le.projectId===Z))},[]),Ze=S.useCallback((Z,le,ce,de,Te)=>{console.log("[MockGrackle] postFinding",{projectId:Z,title:le});const Ee={id:U("find"),projectId:Z,taskId:"",sessionId:"",category:de||"general",title:le,content:ce,tags:Te||[],createdAt:new Date().toISOString()};x(et=>[...et,Ee])},[U]),ze=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:le,adapterConfig:ce,defaultRuntime:de})},[]),Sn=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),_n=S.useCallback((Z,le,ce,de,Te)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:ce}),C(Ee=>[...Ee.filter(Le=>Le.name!==Z),{name:Z,tokenType:ce,envVar:de,filePath:Te,expiresAt:""}])},[]),Zn=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),C(le=>le.filter(ce=>ce.name!==Z))},[]),an=S.useCallback(Z=>{console.log("[MockGrackle] updateCredentialProviders",Z),N(Z)},[]);S.useEffect(()=>()=>{J.current.forEach(clearTimeout),J.current.clear()},[]);const Xn=S.useMemo(()=>({connected:!0,environments:iE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:m,tasks:g,findings:b,tokens:T,credentialProviders:j,spawn:ee,sendInput:De,kill:ke,refresh:je,loadSessionEvents:Pe,clearEvents:we,createProject:_e,archiveProject:Ae,updateProject:(Z,le)=>{console.log("[MockGrackle] updateProject",{projectId:Z,...le}),p(ce=>ce.map(de=>de.id!==Z?de:{...de,...le.name!==void 0?{name:le.name}:{},...le.description!==void 0?{description:le.description}:{},...le.repoUrl!==void 0?{repoUrl:le.repoUrl}:{},...le.defaultEnvironmentId!==void 0?{defaultEnvironmentId:le.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:Q,createTask:P,startTask:I,completeTask:Ye,resumeTask:vt,updateTask:xt,deleteTask:Gt,loadFindings:We,postFinding:Ze,addEnvironment:ze,loadTokens:Sn,setToken:_n,deleteToken:Zn,updateCredentialProviders:an,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:A,createPersona:(Z,le,ce,de,Te,Ee)=>{console.log("[MockGrackle] createPersona",{name:Z});const et={id:`mock-persona-${Date.now()}`,name:Z,description:le,systemPrompt:ce,toolConfig:"{}",runtime:de??"claude-code",model:Te||"",maxTurns:Ee||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};O(Le=>[...Le,et])},updatePersona:(Z,le,ce,de,Te,Ee,et)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:le}),O(Le=>Le.map(ot=>ot.id!==Z?ot:{...ot,...le!==void 0?{name:le}:{},...ce!==void 0?{description:ce}:{},...de!==void 0?{systemPrompt:de}:{},...Te!==void 0?{runtime:Te}:{},...Ee!==void 0?{model:Ee}:{},...et!==void 0?{maxTurns:et}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),O(le=>le.filter(ce=>ce.id!==Z))},taskSessions:M,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)}}),[a,o,u,m,g,b,T,j,A,M,ee,De,ke,je,Pe,we,_e,Ae,Q,P,I,Ye,vt,xt,Gt,We,Ze,ze,Sn,_n,Zn,an]);return h.jsx(Vf.Provider,{value:Xn,children:n})}const L0=S.createContext(void 0),mE=4e3;function pE({children:n}){const[a,l]=S.useState([]),o=S.useRef(0),r=S.useCallback(d=>{l(m=>m.filter(p=>p.id!==d))},[]),u=S.useCallback((d,m="info",p=mE)=>{const g=`toast-${++o.current}`;l(v=>[...v,{id:g,message:d,variant:m,duration:p}])},[]);return h.jsx(L0.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function mo(){const n=S.useContext(L0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const dc=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],z0=new Set(dc.map(n=>n.id)),kv="grackle";function ef(n){return dc.find(a=>a.id===n)}const tf="grackle-theme",U0="grackle-prefer-system",V0="(prefers-color-scheme: dark)";let Fl=[],$r;function Rd(){$r=void 0;for(const n of Fl)n()}function nf(){return typeof window>"u"?!1:window.matchMedia(V0).matches}function Jl(){if(typeof localStorage>"u")return kv;try{const n=localStorage.getItem(tf);if(n!==null&&z0.has(n))return n}catch{}return kv}function Zr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(U0)==="true"}catch{return!1}}function af(n){return dc.find(a=>a.variantLightId===n||a.variantDarkId===n)}function I0(n,a){const l=ef(n);if(l!=null&&l.variantDarkId)return a&&l.variantLightId?nf()?l.variantDarkId:l.variantLightId:l.variantDarkId;if(l!=null&&l.hidden&&a){const o=af(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return nf()?o.variantDarkId:o.variantLightId}return n}function Bi(n,a,l=!1){l&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=I0(n,a),l&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Bi(Jl(),Zr());function gE(){return $r===void 0&&($r={themeId:Jl(),systemDark:nf(),preferSystem:Zr()}),$r}function vE(n){return Fl=[...Fl,n],()=>{Fl=Fl.filter(a=>a!==n)}}function yE(){const n=S.useSyncExternalStore(vE,gE),{themeId:a,preferSystem:l}=n,o=I0(a,l),r=S.useCallback(d=>{if(z0.has(d)){try{localStorage.setItem(tf,d)}catch{}Bi(d,Zr(),!0),Rd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem(U0,d?"true":"false")}catch{}if(d){const m=Jl(),p=ef(m);if(p!=null&&p.hidden){const g=af(m);if(g)try{localStorage.setItem(tf,g.id)}catch{}}}Bi(Jl(),d,!0),Rd()},[]);return S.useEffect(()=>{Bi(a,l)},[a,l]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(V0),m=()=>{const p=Jl(),g=Zr();if(g){const v=ef(p);if(v!=null&&v.variantDarkId&&v.variantLightId&&Bi(p,g),v!=null&&v.hidden){const b=af(p);b!=null&&b.variantDarkId&&b.variantLightId&&Bi(p,g)}}Rd()};return d.addEventListener("change",m),()=>{d.removeEventListener("change",m)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:l,setPreferSystem:u}}const H0=S.createContext(void 0);function bE({children:n}){const a=yE();return h.jsx(H0.Provider,{value:a,children:n})}function q0(){const n=S.useContext(H0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const SE="_container_eix8p_1",_E="_hamburger_eix8p_33",xE="_brand_eix8p_49",TE="_info_eix8p_65",EE="_connectionLabel_eix8p_80",AE="_connectionDot_eix8p_93",CE="_connected_eix8p_96",jE="_disconnected_eix8p_100",NE="_settingsButton_eix8p_104",Ma={container:SE,hamburger:_E,brand:xE,info:TE,connectionLabel:EE,connectionDot:AE,connected:CE,disconnected:jE,settingsButton:NE};function wE({onToggleSidebar:n,sidebarOpen:a}){const{connected:l,environments:o,sessions:r}=nn(),u=na(),d=o.length,m=o.filter(g=>g.status==="connected").length,p=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:Ma.container,children:[n&&h.jsx("button",{type:"button",className:Ma.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:Ma.brand,onClick:()=>u("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Ma.info,children:[h.jsxs("span",{"aria-label":l?"Connected":"Disconnected",children:[h.jsx("span",{className:`${Ma.connectionDot} ${l?Ma.connected:Ma.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:Ma.connectionLabel,"aria-hidden":"true",children:l?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[m,"/",d," env",d!==1?"s":""]}),h.jsxs("span",{children:[p," active"]}),h.jsx("button",{className:Ma.settingsButton,onClick:()=>u(Ii),title:"Settings",children:"⚙"})]})]})}const If=S.createContext({});function Hf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const fc=S.createContext(null),qf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class DE extends S.Component{getSnapshotBeforeUpdate(a){const l=this.props.childRef.current;if(l&&a.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=l.offsetHeight||0,o.width=l.offsetWidth||0,o.top=l.offsetTop,o.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function kE({children:n,isPresent:a}){const l=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=S.useContext(qf);return S.useInsertionEffect(()=>{const{width:d,height:m,top:p,left:g}=r.current;if(a||!o.current||!d||!m)return;o.current.dataset.motionPopId=l;const v=document.createElement("style");return u&&(v.nonce=u),document.head.appendChild(v),v.sheet&&v.sheet.insertRule(`
|
|
79
|
+
[data-motion-pop-id="${l}"] {
|
|
80
|
+
position: absolute !important;
|
|
81
|
+
width: ${d}px !important;
|
|
82
|
+
height: ${m}px !important;
|
|
83
|
+
top: ${p}px !important;
|
|
84
|
+
left: ${g}px !important;
|
|
85
|
+
}
|
|
86
|
+
`),()=>{document.head.removeChild(v)}},[a]),h.jsx(DE,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const ME=({children:n,initial:a,isPresent:l,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const m=Hf(RE),p=S.useId(),g=S.useCallback(b=>{m.set(b,!0);for(const x of m.values())if(!x)return;o&&o()},[m,o]),v=S.useMemo(()=>({id:p,initial:a,isPresent:l,custom:r,onExitComplete:g,register:b=>(m.set(b,!1),()=>m.delete(b))}),u?[Math.random(),g]:[l,g]);return S.useMemo(()=>{m.forEach((b,x)=>m.set(x,!1))},[l]),S.useEffect(()=>{!l&&!m.size&&o&&o()},[l]),d==="popLayout"&&(n=h.jsx(kE,{isPresent:l,children:n})),h.jsx(fc.Provider,{value:v,children:n})};function RE(){return new Map}function G0(n=!0){const a=S.useContext(fc);if(a===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:r}=a,u=S.useId();S.useEffect(()=>{n&&r(u)},[n]);const d=S.useCallback(()=>n&&o&&o(u),[u,o,n]);return!l&&o?[!1,d]:[!0]}const Or=n=>n.key||"";function Mv(n){const a=[];return S.Children.forEach(n,l=>{S.isValidElement(l)&&a.push(l)}),a}const Gf=typeof window<"u",P0=Gf?S.useLayoutEffect:S.useEffect,gs=({children:n,custom:a,initial:l=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[m,p]=G0(d),g=S.useMemo(()=>Mv(n),[n]),v=d&&!m?[]:g.map(Or),b=S.useRef(!0),x=S.useRef(g),T=Hf(()=>new Map),[C,j]=S.useState(g),[N,A]=S.useState(g);P0(()=>{b.current=!1,x.current=g;for(let X=0;X<N.length;X++){const H=Or(N[X]);v.includes(H)?T.delete(H):T.get(H)!==!0&&T.set(H,!1)}},[N,v.length,v.join("-")]);const O=[];if(g!==C){let X=[...g];for(let H=0;H<N.length;H++){const J=N[H],W=Or(J);v.includes(W)||(X.splice(H,0,J),O.push(J))}u==="wait"&&O.length&&(X=O),A(Mv(X)),j(g);return}const{forceRender:M}=S.useContext(If);return h.jsx(h.Fragment,{children:N.map(X=>{const H=Or(X),J=d&&!m?!1:g===N||v.includes(H),W=()=>{if(T.has(H))T.set(H,!0);else return;let $=!0;T.forEach(ne=>{ne||($=!1)}),$&&(M==null||M(),A(x.current),d&&(p==null||p()),o&&o())};return h.jsx(ME,{isPresent:J,initial:!b.current||l?void 0:!1,custom:J?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:J?void 0:W,children:X},H)})})},Dn=n=>n;let $0=Dn;const BE={useManualTiming:!1};function OE(n){let a=new Set,l=new Set,o=!1,r=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function m(g){u.has(g)&&(p.schedule(g),n()),g(d)}const p={schedule:(g,v=!1,b=!1)=>{const T=b&&o?a:l;return v&&u.add(g),T.has(g)||T.add(g),g},cancel:g=>{l.delete(g),u.delete(g)},process:g=>{if(d=g,o){r=!0;return}o=!0,[a,l]=[l,a],a.forEach(m),a.clear(),o=!1,r&&(r=!1,p.process(g))}};return p}const Lr=["read","resolveKeyframes","update","preRender","render","postRender"],LE=40;function Y0(n,a){let l=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>l=!0,d=Lr.reduce((A,O)=>(A[O]=OE(u),A),{}),{read:m,resolveKeyframes:p,update:g,preRender:v,render:b,postRender:x}=d,T=()=>{const A=performance.now();l=!1,r.delta=o?1e3/60:Math.max(Math.min(A-r.timestamp,LE),1),r.timestamp=A,r.isProcessing=!0,m.process(r),p.process(r),g.process(r),v.process(r),b.process(r),x.process(r),r.isProcessing=!1,l&&a&&(o=!1,n(T))},C=()=>{l=!0,o=!0,r.isProcessing||n(T)};return{schedule:Lr.reduce((A,O)=>{const M=d[O];return A[O]=(X,H=!1,J=!1)=>(l||C(),M.schedule(X,H,J)),A},{}),cancel:A=>{for(let O=0;O<Lr.length;O++)d[Lr[O]].cancel(A)},state:r,steps:d}}const{schedule:ft,cancel:hs,state:tn,steps:Bd}=Y0(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dn,!0),F0=S.createContext({strict:!1}),Rv={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"]},Hi={};for(const n in Rv)Hi[n]={isEnabled:a=>Rv[n].some(l=>!!a[l])};function zE(n){for(const a in n)Hi[a]={...Hi[a],...n[a]}}const UE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||UE.has(n)}let K0=n=>!Xr(n);function VE(n){n&&(K0=a=>a.startsWith("on")?!Xr(a):n(a))}try{VE(require("@emotion/is-prop-valid").default)}catch{}function IE(n,a,l){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(K0(r)||l===!0&&Xr(r)||!a&&!Xr(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function HE(n){if(typeof Proxy>"u")return n;const a=new Map,l=(...o)=>n(...o);return new Proxy(l,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const hc=S.createContext({});function lo(n){return typeof n=="string"||Array.isArray(n)}function mc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Pf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$f=["initial",...Pf];function pc(n){return mc(n.animate)||$f.some(a=>lo(n[a]))}function Z0(n){return!!(pc(n)||n.variants)}function qE(n,a){if(pc(n)){const{initial:l,animate:o}=n;return{initial:l===!1||lo(l)?l:void 0,animate:lo(o)?o:void 0}}return n.inherit!==!1?a:{}}function GE(n){const{initial:a,animate:l}=qE(n,S.useContext(hc));return S.useMemo(()=>({initial:a,animate:l}),[Bv(a),Bv(l)])}function Bv(n){return Array.isArray(n)?n.join(" "):n}const PE=Symbol.for("motionComponentSymbol");function Oi(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function $E(n,a,l){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),l&&(typeof l=="function"?l(o):Oi(l)&&(l.current=o))},[a])}const Yf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),YE="framerAppearId",X0="data-"+Yf(YE),{schedule:Ff}=Y0(queueMicrotask,!1),Q0=S.createContext({});function FE(n,a,l,o,r){var u,d;const{visualElement:m}=S.useContext(hc),p=S.useContext(F0),g=S.useContext(fc),v=S.useContext(qf).reducedMotion,b=S.useRef(null);o=o||p.renderer,!b.current&&o&&(b.current=o(n,{visualState:a,parent:m,props:l,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const x=b.current,T=S.useContext(Q0);x&&!x.projection&&r&&(x.type==="html"||x.type==="svg")&&KE(b.current,l,r,T);const C=S.useRef(!1);S.useInsertionEffect(()=>{x&&C.current&&x.update(l,g)});const j=l[X0],N=S.useRef(!!j&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,j))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,j)));return P0(()=>{x&&(C.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),Ff.render(x.render),N.current&&x.animationState&&x.animationState.animateChanges())}),S.useEffect(()=>{x&&(!N.current&&x.animationState&&x.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)===null||A===void 0||A.call(window,j)}),N.current=!1))}),x}function KE(n,a,l,o){const{layoutId:r,layout:u,drag:d,dragConstraints:m,layoutScroll:p,layoutRoot:g}=a;n.projection=new l(n.latestValues,a["data-framer-portal-id"]?void 0:J0(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||m&&Oi(m),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:g})}function J0(n){if(n)return n.options.allowProjection!==!1?n.projection:J0(n.parent)}function ZE({preloadedFeatures:n,createVisualElement:a,useRender:l,useVisualState:o,Component:r}){var u,d;n&&zE(n);function m(g,v){let b;const x={...S.useContext(qf),...g,layoutId:XE(g)},{isStatic:T}=x,C=GE(g),j=o(g,T);if(!T&&Gf){QE();const N=JE(x);b=N.MeasureLayout,C.visualElement=FE(r,j,x,a,N.ProjectionNode)}return h.jsxs(hc.Provider,{value:C,children:[b&&C.visualElement?h.jsx(b,{visualElement:C.visualElement,...x}):null,l(r,g,$E(j,C.visualElement,v),j,T,C.visualElement)]})}m.displayName=`motion.${typeof r=="string"?r:`create(${(d=(u=r.displayName)!==null&&u!==void 0?u:r.name)!==null&&d!==void 0?d:""})`}`;const p=S.forwardRef(m);return p[PE]=r,p}function XE({layoutId:n}){const a=S.useContext(If).id;return a&&n!==void 0?a+"-"+n:n}function QE(n,a){S.useContext(F0).strict}function JE(n){const{drag:a,layout:l}=Hi;if(!a&&!l)return{};const o={...a,...l};return{MeasureLayout:a!=null&&a.isEnabled(n)||l!=null&&l.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const WE=["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 Kf(n){return typeof n!="string"||n.includes("-")?!1:!!(WE.indexOf(n)>-1||/[A-Z]/u.test(n))}function Ov(n){const a=[{},{}];return n==null||n.values.forEach((l,o)=>{a[0][o]=l.get(),a[1][o]=l.getVelocity()}),a}function Zf(n,a,l,o){if(typeof a=="function"){const[r,u]=Ov(o);a=a(l!==void 0?l:n.custom,r,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,u]=Ov(o);a=a(l!==void 0?l:n.custom,r,u)}return a}const sf=n=>Array.isArray(n),e2=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),t2=n=>sf(n)?n[n.length-1]||0:n,on=n=>!!(n&&n.getVelocity);function Yr(n){const a=on(n)?n.get():n;return e2(a)?a.toValue():a}function n2({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:l},o,r,u){const d={latestValues:a2(o,r,u,n),renderState:a()};return l&&(d.onMount=m=>l({props:o,current:m,...d}),d.onUpdate=m=>l(m)),d}const W0=n=>(a,l)=>{const o=S.useContext(hc),r=S.useContext(fc),u=()=>n2(n,a,o,r);return l?u():Hf(u)};function a2(n,a,l,o){const r={},u=o(n,{});for(const x in u)r[x]=Yr(u[x]);let{initial:d,animate:m}=n;const p=pc(n),g=Z0(n);a&&g&&!p&&n.inherit!==!1&&(d===void 0&&(d=a.initial),m===void 0&&(m=a.animate));let v=l?l.initial===!1:!1;v=v||d===!1;const b=v?m:d;if(b&&typeof b!="boolean"&&!mc(b)){const x=Array.isArray(b)?b:[b];for(let T=0;T<x.length;T++){const C=Zf(n,x[T]);if(C){const{transitionEnd:j,transition:N,...A}=C;for(const O in A){let M=A[O];if(Array.isArray(M)){const X=v?M.length-1:0;M=M[X]}M!==null&&(r[O]=M)}for(const O in j)r[O]=j[O]}}}return r}const Yi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fs=new Set(Yi),eb=n=>a=>typeof a=="string"&&a.startsWith(n),tb=eb("--"),s2=eb("var(--"),Xf=n=>s2(n)?i2.test(n.split("/*")[0].trim()):!1,i2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,nb=(n,a)=>a&&typeof n=="number"?a.transform(n):n,za=(n,a,l)=>l>a?a:l<n?n:l,Fi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},oo={...Fi,transform:n=>za(0,1,n)},zr={...Fi,default:1},po=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),cs=po("deg"),da=po("%"),xe=po("px"),l2=po("vh"),o2=po("vw"),Lv={...da,parse:n=>da.parse(n)/100,transform:n=>da.transform(n*100)},r2={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,backgroundPositionX:xe,backgroundPositionY:xe},c2={rotate:cs,rotateX:cs,rotateY:cs,rotateZ:cs,scale:zr,scaleX:zr,scaleY:zr,scaleZ:zr,skew:cs,skewX:cs,skewY:cs,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:oo,originX:Lv,originY:Lv,originZ:xe},zv={...Fi,transform:Math.round},Qf={...r2,...c2,zIndex:zv,size:xe,fillOpacity:oo,strokeOpacity:oo,numOctaves:zv},u2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},d2=Yi.length;function f2(n,a,l){let o="",r=!0;for(let u=0;u<d2;u++){const d=Yi[u],m=n[d];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(d.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||l){const g=nb(m,Qf[d]);if(!p){r=!1;const v=u2[d]||d;o+=`${v}(${g}) `}l&&(a[d]=g)}}return o=o.trim(),l?o=l(a,r?"":o):r&&(o="none"),o}function Jf(n,a,l){const{style:o,vars:r,transformOrigin:u}=n;let d=!1,m=!1;for(const p in a){const g=a[p];if(Fs.has(p)){d=!0;continue}else if(tb(p)){r[p]=g;continue}else{const v=nb(g,Qf[p]);p.startsWith("origin")?(m=!0,u[p]=v):o[p]=v}}if(a.transform||(d||l?o.transform=f2(a,n.transform,l):o.transform&&(o.transform="none")),m){const{originX:p="50%",originY:g="50%",originZ:v=0}=u;o.transformOrigin=`${p} ${g} ${v}`}}const h2={offset:"stroke-dashoffset",array:"stroke-dasharray"},m2={offset:"strokeDashoffset",array:"strokeDasharray"};function p2(n,a,l=1,o=0,r=!0){n.pathLength=1;const u=r?h2:m2;n[u.offset]=xe.transform(-o);const d=xe.transform(a),m=xe.transform(l);n[u.array]=`${d} ${m}`}function Uv(n,a,l){return typeof n=="string"?n:xe.transform(a+l*n)}function g2(n,a,l){const o=Uv(a,n.x,n.width),r=Uv(l,n.y,n.height);return`${o} ${r}`}function Wf(n,{attrX:a,attrY:l,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:m=1,pathOffset:p=0,...g},v,b){if(Jf(n,g,b),v){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:T,dimensions:C}=n;x.transform&&(C&&(T.transform=x.transform),delete x.transform),C&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=g2(C,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(x.x=a),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),d!==void 0&&p2(x,d,m,p,!1)}const eh=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ab=()=>({...eh(),attrs:{}}),th=n=>typeof n=="string"&&n.toLowerCase()==="svg";function sb(n,{style:a,vars:l},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const u in l)n.style.setProperty(u,l[u])}const ib=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lb(n,a,l,o){sb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(ib.has(r)?r:Yf(r),a.attrs[r])}const Qr={};function v2(n){Object.assign(Qr,n)}function ob(n,{layout:a,layoutId:l}){return Fs.has(n)||n.startsWith("origin")||(a||l!==void 0)&&(!!Qr[n]||n==="opacity")}function nh(n,a,l){var o;const{style:r}=n,u={};for(const d in r)(on(r[d])||a.style&&on(a.style[d])||ob(d,n)||((o=l==null?void 0:l.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(u[d]=r[d]);return u}function rb(n,a,l){const o=nh(n,a,l);for(const r in n)if(on(n[r])||on(a[r])){const u=Yi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function y2(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const Vv=["x","y","width","height","cx","cy","r"],b2={useVisualState:W0({scrapeMotionValuesFromProps:rb,createRenderState:ab,onUpdate:({props:n,prevProps:a,current:l,renderState:o,latestValues:r})=>{if(!l)return;let u=!!n.drag;if(!u){for(const m in r)if(Fs.has(m)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let m=0;m<Vv.length;m++){const p=Vv[m];n[p]!==a[p]&&(d=!0)}d&&ft.read(()=>{y2(l,o),ft.render(()=>{Wf(o,r,th(l.tagName),n.transformTemplate),lb(l,o)})})}})},S2={useVisualState:W0({scrapeMotionValuesFromProps:nh,createRenderState:eh})};function cb(n,a,l){for(const o in a)!on(a[o])&&!ob(o,l)&&(n[o]=a[o])}function _2({transformTemplate:n},a){return S.useMemo(()=>{const l=eh();return Jf(l,a,n),Object.assign({},l.vars,l.style)},[a])}function x2(n,a){const l=n.style||{},o={};return cb(o,l,n),Object.assign(o,_2(n,a)),o}function T2(n,a){const l={},o=x2(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}function E2(n,a,l,o){const r=S.useMemo(()=>{const u=ab();return Wf(u,a,th(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};cb(u,n.style,n),r.style={...u,...r.style}}return r}function A2(n=!1){return(l,o,r,{latestValues:u},d)=>{const p=(Kf(l)?E2:T2)(o,u,d,l),g=IE(o,typeof l=="string",n),v=l!==S.Fragment?{...g,...p,ref:r}:{},{children:b}=o,x=S.useMemo(()=>on(b)?b.get():b,[b]);return S.createElement(l,{...v,children:x})}}function C2(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...Kf(o)?b2:S2,preloadedFeatures:n,useRender:A2(r),createVisualElement:a,Component:o};return ZE(d)}}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}function gc(n,a,l){const o=n.getProps();return Zf(o,a,l!==void 0?l:o.custom,n)}function ah(n,a){return n?n[a]||n.default||n:void 0}const db=new Set(["width","height","top","left","right","bottom",...Yi]);let Fr;function j2(){Fr=void 0}const fa={now:()=>(Fr===void 0&&fa.set(tn.isProcessing||BE.useManualTiming?tn.timestamp:performance.now()),Fr),set:n=>{Fr=n,queueMicrotask(j2)}};function sh(n,a){n.indexOf(a)===-1&&n.push(a)}function ih(n,a){const l=n.indexOf(a);l>-1&&n.splice(l,1)}class lh{constructor(){this.subscriptions=[]}add(a){return sh(this.subscriptions,a),()=>ih(this.subscriptions,a)}notify(a,l,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,l,o);else for(let u=0;u<r;u++){const d=this.subscriptions[u];d&&d(a,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function fb(n,a){return a?n*(1e3/a):0}const Iv=30,N2=n=>!isNaN(parseFloat(n));class w2{constructor(a,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=fa.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=l.owner}setCurrent(a){this.current=a,this.updatedAt=fa.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=N2(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 lh);const o=this.events[a].add(l);return a==="change"?()=>{o(),ft.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,l=!0){!l||!this.passiveEffect?this.updateAndNotify(a,l):this.passiveEffect(a,this.updateAndNotify)}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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=fa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Iv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,Iv);return fb(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ro(n,a){return new w2(n,a)}function D2(n,a,l){n.hasValue(a)?n.getValue(a).set(l):n.addValue(a,ro(l))}function k2(n,a){const l=gc(n,a);let{transitionEnd:o={},transition:r={},...u}=l||{};u={...u,...o};for(const d in u){const m=t2(u[d]);D2(n,d,m)}}function M2(n){return!!(on(n)&&n.add)}function lf(n,a){const l=n.getValue("willChange");if(M2(l))return l.add(a)}function hb(n){return n.props[X0]}function oh(n){let a;return()=>(a===void 0&&(a=n()),a)}const R2=oh(()=>window.ScrollTimeline!==void 0);class B2{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,l){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=l}attachTimeline(a,l){const o=this.animations.map(r=>{if(R2()&&r.attachTimeline)return r.attachTimeline(a);if(typeof l=="function")return l(r)});return()=>{o.forEach((r,u)=>{r&&r(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let l=0;l<this.animations.length;l++)a=Math.max(a,this.animations[l].duration);return a}runAll(a){this.animations.forEach(l=>l[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class O2 extends B2{then(a,l){return Promise.all(this.animations).then(a).catch(l)}}const Ba=n=>n*1e3,Oa=n=>n/1e3;function rh(n){return typeof n=="function"}function Hv(n,a){n.timeline=a,n.onfinish=null}const ch=n=>Array.isArray(n)&&typeof n[0]=="number",L2={linearEasing:void 0};function z2(n,a){const l=oh(n);return()=>{var o;return(o=L2[a])!==null&&o!==void 0?o:l()}}const Jr=z2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),qi=(n,a,l)=>{const o=a-n;return o===0?1:(l-n)/o},mb=(n,a,l=10)=>{let o="";const r=Math.max(Math.round(a/l),2);for(let u=0;u<r;u++)o+=n(qi(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function pb(n){return!!(typeof n=="function"&&Jr()||!n||typeof n=="string"&&(n in of||Jr())||ch(n)||Array.isArray(n)&&n.every(pb))}const Kl=([n,a,l,o])=>`cubic-bezier(${n}, ${a}, ${l}, ${o})`,of={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kl([0,.65,.55,1]),circOut:Kl([.55,0,1,.45]),backIn:Kl([.31,.01,.66,-.59]),backOut:Kl([.33,1.53,.69,.99])};function gb(n,a){if(n)return typeof n=="function"&&Jr()?mb(n,a):ch(n)?Kl(n):Array.isArray(n)?n.map(l=>gb(l,a)||of.easeOut):of[n]}const vb=(n,a,l)=>(((1-3*l+3*a)*n+(3*l-6*a))*n+3*a)*n,U2=1e-7,V2=12;function I2(n,a,l,o,r){let u,d,m=0;do d=a+(l-a)/2,u=vb(d,o,r)-n,u>0?l=d:a=d;while(Math.abs(u)>U2&&++m<V2);return d}function go(n,a,l,o){if(n===a&&l===o)return Dn;const r=u=>I2(u,0,1,n,l);return u=>u===0||u===1?u:vb(r(u),a,o)}const yb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,bb=n=>a=>1-n(1-a),Sb=go(.33,1.53,.69,.99),uh=bb(Sb),_b=yb(uh),xb=n=>(n*=2)<1?.5*uh(n):.5*(2-Math.pow(2,-10*(n-1))),dh=n=>1-Math.sin(Math.acos(n)),Tb=bb(dh),Eb=yb(dh),Ab=n=>/^0[^.\s]+$/u.test(n);function H2(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Ab(n):!0}const Wl=n=>Math.round(n*1e5)/1e5,fh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function q2(n){return n==null}const G2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hh=(n,a)=>l=>!!(typeof l=="string"&&G2.test(l)&&l.startsWith(n)||a&&!q2(l)&&Object.prototype.hasOwnProperty.call(l,a)),Cb=(n,a,l)=>o=>{if(typeof o!="string")return o;const[r,u,d,m]=o.match(fh);return{[n]:parseFloat(r),[a]:parseFloat(u),[l]:parseFloat(d),alpha:m!==void 0?parseFloat(m):1}},P2=n=>za(0,255,n),Od={...Fi,transform:n=>Math.round(P2(n))},qs={test:hh("rgb","red"),parse:Cb("red","green","blue"),transform:({red:n,green:a,blue:l,alpha:o=1})=>"rgba("+Od.transform(n)+", "+Od.transform(a)+", "+Od.transform(l)+", "+Wl(oo.transform(o))+")"};function $2(n){let a="",l="",o="",r="";return n.length>5?(a=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,l+=l,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const rf={test:hh("#"),parse:$2,transform:qs.transform},Li={test:hh("hsl","hue"),parse:Cb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+da.transform(Wl(a))+", "+da.transform(Wl(l))+", "+Wl(oo.transform(o))+")"},ln={test:n=>qs.test(n)||rf.test(n)||Li.test(n),parse:n=>qs.test(n)?qs.parse(n):Li.test(n)?Li.parse(n):rf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?qs.transform(n):Li.transform(n)},Y2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function F2(n){var a,l;return isNaN(n)&&typeof n=="string"&&(((a=n.match(fh))===null||a===void 0?void 0:a.length)||0)+(((l=n.match(Y2))===null||l===void 0?void 0:l.length)||0)>0}const jb="number",Nb="color",K2="var",Z2="var(",qv="${}",X2=/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 co(n){const a=n.toString(),l=[],o={color:[],number:[],var:[]},r=[];let u=0;const m=a.replace(X2,p=>(ln.test(p)?(o.color.push(u),r.push(Nb),l.push(ln.parse(p))):p.startsWith(Z2)?(o.var.push(u),r.push(K2),l.push(p)):(o.number.push(u),r.push(jb),l.push(parseFloat(p))),++u,qv)).split(qv);return{values:l,split:m,indexes:o,types:r}}function wb(n){return co(n).values}function Db(n){const{split:a,types:l}=co(n),o=a.length;return r=>{let u="";for(let d=0;d<o;d++)if(u+=a[d],r[d]!==void 0){const m=l[d];m===jb?u+=Wl(r[d]):m===Nb?u+=ln.transform(r[d]):u+=r[d]}return u}}const Q2=n=>typeof n=="number"?0:n;function J2(n){const a=wb(n);return Db(n)(a.map(Q2))}const ms={test:F2,parse:wb,createTransformer:Db,getAnimatableNone:J2},W2=new Set(["brightness","contrast","saturate","opacity"]);function eA(n){const[a,l]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=l.match(fh)||[];if(!o)return n;const r=l.replace(o,"");let u=W2.has(a)?1:0;return o!==l&&(u*=100),a+"("+u+r+")"}const tA=/\b([a-z-]*)\(.*?\)/gu,cf={...ms,getAnimatableNone:n=>{const a=n.match(tA);return a?a.map(eA).join(" "):n}},nA={...Qf,color:ln,backgroundColor:ln,outlineColor:ln,fill:ln,stroke:ln,borderColor:ln,borderTopColor:ln,borderRightColor:ln,borderBottomColor:ln,borderLeftColor:ln,filter:cf,WebkitFilter:cf},mh=n=>nA[n];function kb(n,a){let l=mh(n);return l!==cf&&(l=ms),l.getAnimatableNone?l.getAnimatableNone(a):void 0}const aA=new Set(["auto","none","0"]);function sA(n,a,l){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!aA.has(u)&&co(u).values.length&&(r=n[o]),o++}if(r&&l)for(const u of a)n[u]=kb(l,r)}const Gv=n=>n===Fi||n===xe,Pv=(n,a)=>parseFloat(n.split(", ")[a]),$v=(n,a)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Pv(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?Pv(u[1],n):0}},iA=new Set(["x","y","z"]),lA=Yi.filter(n=>!iA.has(n));function oA(n){const a=[];return lA.forEach(l=>{const o=n.getValue(l);o!==void 0&&(a.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),a}const Gi={width:({x:n},{paddingLeft:a="0",paddingRight:l="0"})=>n.max-n.min-parseFloat(a)-parseFloat(l),height:({y:n},{paddingTop:a="0",paddingBottom:l="0"})=>n.max-n.min-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:$v(4,13),y:$v(5,14)};Gi.translateX=Gi.x;Gi.translateY=Gi.y;const Gs=new Set;let uf=!1,df=!1;function Mb(){if(df){const n=Array.from(Gs).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),l=new Map;a.forEach(o=>{const r=oA(o);r.length&&(l.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=l.get(o);r&&r.forEach(([u,d])=>{var m;(m=o.getValue(u))===null||m===void 0||m.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}df=!1,uf=!1,Gs.forEach(n=>n.complete()),Gs.clear()}function Rb(){Gs.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(df=!0)})}function rA(){Rb(),Mb()}class ph{constructor(a,l,o,r,u,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=l,this.name=o,this.motionValue=r,this.element=u,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Gs.add(this),uf||(uf=!0,ft.read(Rb),ft.resolveKeyframes(Mb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:l,element:o,motionValue:r}=this;for(let u=0;u<a.length;u++)if(a[u]===null)if(u===0){const d=r==null?void 0:r.get(),m=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&l){const p=o.readValue(l,m);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=m),r&&d===void 0&&r.set(a[0])}else a[u]=a[u-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Gs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Gs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Bb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),cA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uA(n){const a=cA.exec(n);if(!a)return[,];const[,l,o,r]=a;return[`--${l??o}`,r]}function Ob(n,a,l=1){const[o,r]=uA(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return Bb(d)?parseFloat(d):d}return Xf(r)?Ob(r,a,l+1):r}const Lb=n=>a=>a.test(n),dA={test:n=>n==="auto",parse:n=>n},zb=[Fi,xe,da,cs,o2,l2,dA],Yv=n=>zb.find(Lb(n));class Ub extends ph{constructor(a,l,o,r,u){super(a,l,o,r,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let p=0;p<a.length;p++){let g=a[p];if(typeof g=="string"&&(g=g.trim(),Xf(g))){const v=Ob(g,l.current);v!==void 0&&(a[p]=v),p===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!db.has(o)||a.length!==2)return;const[r,u]=a,d=Yv(r),m=Yv(u);if(d!==m)if(Gv(d)&&Gv(m))for(let p=0;p<a.length;p++){const g=a[p];typeof g=="string"&&(a[p]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:l}=this,o=[];for(let r=0;r<a.length;r++)H2(a[r])&&o.push(r);o.length&&sA(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=Gi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),l[0]=this.measuredOrigin;const r=l[l.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:l,name:o,unresolvedKeyframes:r}=this;if(!l||!l.current)return;const u=l.getValue(o);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,m=r[d];r[d]=Gi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([p,g])=>{l.getValue(p).set(g)}),this.resolveNoneKeyframes()}}const Fv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ms.test(n)||n==="0")&&!n.startsWith("url("));function fA(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 hA(n,a,l,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=Fv(r,a),m=Fv(u,a);return!d||!m?!1:fA(n)||(l==="spring"||rh(l))&&o}const mA=n=>n!==null;function vc(n,{repeat:a,repeatType:l="loop"},o){const r=n.filter(mA),u=a&&l!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const pA=40;class Vb{constructor({autoplay:a=!0,delay:l=0,type:o="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:d="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=fa.now(),this.options={autoplay:a,delay:l,type:o,repeat:r,repeatDelay:u,repeatType:d,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>pA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&rA(),this._resolved}onKeyframesResolved(a,l){this.resolvedAt=fa.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:m,onUpdate:p,isGenerator:g}=this.options;if(!g&&!hA(a,o,r,u))if(d)this.options.duration=0;else{p&&p(vc(a,this.options,l)),m&&m(),this.resolveFinishedPromise();return}const v=this.initPlayback(a,l);v!==!1&&(this._resolved={keyframes:a,finalKeyframe:l,...v},this.onPostResolved())}onPostResolved(){}then(a,l){return this.currentFinishedPromise.then(a,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const ff=2e4;function Ib(n){let a=0;const l=50;let o=n.next(a);for(;!o.done&&a<ff;)a+=l,o=n.next(a);return a>=ff?1/0:a}const _t=(n,a,l)=>n+(a-n)*l;function Ld(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 gA({hue:n,saturation:a,lightness:l,alpha:o}){n/=360,a/=100,l/=100;let r=0,u=0,d=0;if(!a)r=u=d=l;else{const m=l<.5?l*(1+a):l+a-l*a,p=2*l-m;r=Ld(p,m,n+1/3),u=Ld(p,m,n),d=Ld(p,m,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Wr(n,a){return l=>l>0?a:n}const zd=(n,a,l)=>{const o=n*n,r=l*(a*a-o)+o;return r<0?0:Math.sqrt(r)},vA=[rf,qs,Li],yA=n=>vA.find(a=>a.test(n));function Kv(n){const a=yA(n);if(!a)return!1;let l=a.parse(n);return a===Li&&(l=gA(l)),l}const Zv=(n,a)=>{const l=Kv(n),o=Kv(a);if(!l||!o)return Wr(n,a);const r={...l};return u=>(r.red=zd(l.red,o.red,u),r.green=zd(l.green,o.green,u),r.blue=zd(l.blue,o.blue,u),r.alpha=_t(l.alpha,o.alpha,u),qs.transform(r))},bA=(n,a)=>l=>a(n(l)),vo=(...n)=>n.reduce(bA),hf=new Set(["none","hidden"]);function SA(n,a){return hf.has(n)?l=>l<=0?n:a:l=>l>=1?a:n}function _A(n,a){return l=>_t(n,a,l)}function gh(n){return typeof n=="number"?_A:typeof n=="string"?Xf(n)?Wr:ln.test(n)?Zv:EA:Array.isArray(n)?Hb:typeof n=="object"?ln.test(n)?Zv:xA:Wr}function Hb(n,a){const l=[...n],o=l.length,r=n.map((u,d)=>gh(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)l[d]=r[d](u);return l}}function xA(n,a){const l={...n,...a},o={};for(const r in l)n[r]!==void 0&&a[r]!==void 0&&(o[r]=gh(n[r])(n[r],a[r]));return r=>{for(const u in o)l[u]=o[u](r);return l}}function TA(n,a){var l;const o=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],m=n.indexes[d][r[d]],p=(l=n.values[m])!==null&&l!==void 0?l:0;o[u]=p,r[d]++}return o}const EA=(n,a)=>{const l=ms.createTransformer(a),o=co(n),r=co(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?hf.has(n)&&!r.values.length||hf.has(a)&&!o.values.length?SA(n,a):vo(Hb(TA(o,r),r.values),l):Wr(n,a)};function qb(n,a,l){return typeof n=="number"&&typeof a=="number"&&typeof l=="number"?_t(n,a,l):gh(n)(n,a)}const AA=5;function Gb(n,a,l){const o=Math.max(a-AA,0);return fb(l-n(o),a-o)}const Nt={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},Ud=.001;function CA({duration:n=Nt.duration,bounce:a=Nt.bounce,velocity:l=Nt.velocity,mass:o=Nt.mass}){let r,u,d=1-a;d=za(Nt.minDamping,Nt.maxDamping,d),n=za(Nt.minDuration,Nt.maxDuration,Oa(n)),d<1?(r=g=>{const v=g*d,b=v*n,x=v-l,T=mf(g,d),C=Math.exp(-b);return Ud-x/T*C},u=g=>{const b=g*d*n,x=b*l+l,T=Math.pow(d,2)*Math.pow(g,2)*n,C=Math.exp(-b),j=mf(Math.pow(g,2),d);return(-r(g)+Ud>0?-1:1)*((x-T)*C)/j}):(r=g=>{const v=Math.exp(-g*n),b=(g-l)*n+1;return-Ud+v*b},u=g=>{const v=Math.exp(-g*n),b=(l-g)*(n*n);return v*b});const m=5/n,p=NA(r,u,m);if(n=Ba(n),isNaN(p))return{stiffness:Nt.stiffness,damping:Nt.damping,duration:n};{const g=Math.pow(p,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const jA=12;function NA(n,a,l){let o=l;for(let r=1;r<jA;r++)o=o-n(o)/a(o);return o}function mf(n,a){return n*Math.sqrt(1-a*a)}const wA=["duration","bounce"],DA=["stiffness","damping","mass"];function Xv(n,a){return a.some(l=>n[l]!==void 0)}function kA(n){let a={velocity:Nt.velocity,stiffness:Nt.stiffness,damping:Nt.damping,mass:Nt.mass,isResolvedFromDuration:!1,...n};if(!Xv(n,DA)&&Xv(n,wA))if(n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),r=o*o,u=2*za(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:Nt.mass,stiffness:r,damping:u}}else{const l=CA(n);a={...a,...l,mass:Nt.mass},a.isResolvedFromDuration=!0}return a}function Pb(n=Nt.visualDuration,a=Nt.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=l;const u=l.keyframes[0],d=l.keyframes[l.keyframes.length-1],m={done:!1,value:u},{stiffness:p,damping:g,mass:v,duration:b,velocity:x,isResolvedFromDuration:T}=kA({...l,velocity:-Oa(l.velocity||0)}),C=x||0,j=g/(2*Math.sqrt(p*v)),N=d-u,A=Oa(Math.sqrt(p/v)),O=Math.abs(N)<5;o||(o=O?Nt.restSpeed.granular:Nt.restSpeed.default),r||(r=O?Nt.restDelta.granular:Nt.restDelta.default);let M;if(j<1){const H=mf(A,j);M=J=>{const W=Math.exp(-j*A*J);return d-W*((C+j*A*N)/H*Math.sin(H*J)+N*Math.cos(H*J))}}else if(j===1)M=H=>d-Math.exp(-A*H)*(N+(C+A*N)*H);else{const H=A*Math.sqrt(j*j-1);M=J=>{const W=Math.exp(-j*A*J),$=Math.min(H*J,300);return d-W*((C+j*A*N)*Math.sinh($)+H*N*Math.cosh($))/H}}const X={calculatedDuration:T&&b||null,next:H=>{const J=M(H);if(T)m.done=H>=b;else{let W=0;j<1&&(W=H===0?Ba(C):Gb(M,H,J));const $=Math.abs(W)<=o,ne=Math.abs(d-J)<=r;m.done=$&&ne}return m.value=m.done?d:J,m},toString:()=>{const H=Math.min(Ib(X),ff),J=mb(W=>X.next(H*W).value,H,30);return H+"ms "+J}};return X}function Qv({keyframes:n,velocity:a=0,power:l=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:u=500,modifyTarget:d,min:m,max:p,restDelta:g=.5,restSpeed:v}){const b=n[0],x={done:!1,value:b},T=$=>m!==void 0&&$<m||p!==void 0&&$>p,C=$=>m===void 0?p:p===void 0||Math.abs(m-$)<Math.abs(p-$)?m:p;let j=l*a;const N=b+j,A=d===void 0?N:d(N);A!==N&&(j=A-b);const O=$=>-j*Math.exp(-$/o),M=$=>A+O($),X=$=>{const ne=O($),ge=M($);x.done=Math.abs(ne)<=g,x.value=x.done?A:ge};let H,J;const W=$=>{T(x.value)&&(H=$,J=Pb({keyframes:[x.value,C(x.value)],velocity:Gb(M,$,x.value),damping:r,stiffness:u,restDelta:g,restSpeed:v}))};return W(0),{calculatedDuration:null,next:$=>{let ne=!1;return!J&&H===void 0&&(ne=!0,X($),W($)),H!==void 0&&$>=H?J.next($-H):(!ne&&X($),x)}}}const MA=go(.42,0,1,1),RA=go(0,0,.58,1),$b=go(.42,0,.58,1),BA=n=>Array.isArray(n)&&typeof n[0]!="number",OA={linear:Dn,easeIn:MA,easeInOut:$b,easeOut:RA,circIn:dh,circInOut:Eb,circOut:Tb,backIn:uh,backInOut:_b,backOut:Sb,anticipate:xb},Jv=n=>{if(ch(n)){$0(n.length===4);const[a,l,o,r]=n;return go(a,l,o,r)}else if(typeof n=="string")return OA[n];return n};function LA(n,a,l){const o=[],r=l||qb,u=n.length-1;for(let d=0;d<u;d++){let m=r(n[d],n[d+1]);if(a){const p=Array.isArray(a)?a[d]||Dn:a;m=vo(p,m)}o.push(m)}return o}function zA(n,a,{clamp:l=!0,ease:o,mixer:r}={}){const u=n.length;if($0(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const m=LA(a,o,r),p=m.length,g=v=>{if(d&&v<n[0])return a[0];let b=0;if(p>1)for(;b<n.length-2&&!(v<n[b+1]);b++);const x=qi(n[b],n[b+1],v);return m[b](x)};return l?v=>g(za(n[0],n[u-1],v)):g}function UA(n,a){const l=n[n.length-1];for(let o=1;o<=a;o++){const r=qi(0,a,o);n.push(_t(l,1,r))}}function VA(n){const a=[0];return UA(a,n.length-1),a}function IA(n,a){return n.map(l=>l*a)}function HA(n,a){return n.map(()=>a||$b).splice(0,n.length-1)}function ec({duration:n=300,keyframes:a,times:l,ease:o="easeInOut"}){const r=BA(o)?o.map(Jv):Jv(o),u={done:!1,value:a[0]},d=IA(l&&l.length===a.length?l:VA(a),n),m=zA(d,a,{ease:Array.isArray(r)?r:HA(a,r)});return{calculatedDuration:n,next:p=>(u.value=m(p),u.done=p>=n,u)}}const qA=n=>{const a=({timestamp:l})=>n(l);return{start:()=>ft.update(a,!0),stop:()=>hs(a),now:()=>tn.isProcessing?tn.timestamp:fa.now()}},GA={decay:Qv,inertia:Qv,tween:ec,keyframes:ec,spring:Pb},PA=n=>n/100;class vh extends Vb{constructor(a){super(a),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:p}=this.options;p&&p()};const{name:l,motionValue:o,element:r,keyframes:u}=this.options,d=(r==null?void 0:r.KeyframeResolver)||ph,m=(p,g)=>this.onKeyframesResolved(p,g);this.resolver=new d(u,m,l,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:l="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:u,velocity:d=0}=this.options,m=rh(l)?l:GA[l]||ec;let p,g;m!==ec&&typeof a[0]!="number"&&(p=vo(PA,qb(a[0],a[1])),a=[0,100]);const v=m({...this.options,keyframes:a});u==="mirror"&&(g=m({...this.options,keyframes:[...a].reverse(),velocity:-d})),v.calculatedDuration===null&&(v.calculatedDuration=Ib(v));const{calculatedDuration:b}=v,x=b+r,T=x*(o+1)-r;return{generator:v,mirroredGenerator:g,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:x,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,l=!1){const{resolved:o}=this;if(!o){const{keyframes:$}=this.options;return{done:!0,value:$[$.length-1]}}const{finalKeyframe:r,generator:u,mirroredGenerator:d,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:g,totalDuration:v,resolvedDuration:b}=o;if(this.startTime===null)return u.next(0);const{delay:x,repeat:T,repeatType:C,repeatDelay:j,onUpdate:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-v/this.speed,this.startTime)),l?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const A=this.currentTime-x*(this.speed>=0?1:-1),O=this.speed>=0?A<0:A>v;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let M=this.currentTime,X=u;if(T){const $=Math.min(this.currentTime,v)/b;let ne=Math.floor($),ge=$%1;!ge&&$>=1&&(ge=1),ge===1&&ne--,ne=Math.min(ne,T+1),!!(ne%2)&&(C==="reverse"?(ge=1-ge,j&&(ge-=j/b)):C==="mirror"&&(X=d)),M=za(0,1,ge)*b}const H=O?{done:!1,value:p[0]}:X.next(M);m&&(H.value=m(H.value));let{done:J}=H;!O&&g!==null&&(J=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&J);return W&&r!==void 0&&(H.value=vc(p,this.options,r)),N&&N(H.value),W&&this.finish(),H}get duration(){const{resolved:a}=this;return a?Oa(a.calculatedDuration):0}get time(){return Oa(this.currentTime)}set time(a){a=Ba(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const l=this.playbackSpeed!==a;this.playbackSpeed=a,l&&(this.time=Oa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=qA,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),l&&l();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}}const $A=new Set(["opacity","clipPath","filter","transform"]);function YA(n,a,l,{delay:o=0,duration:r=300,repeat:u=0,repeatType:d="loop",ease:m="easeInOut",times:p}={}){const g={[a]:l};p&&(g.offset=p);const v=gb(m,r);return Array.isArray(v)&&(g.easing=v),n.animate(g,{delay:o,duration:r,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"})}const FA=oh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tc=10,KA=2e4;function ZA(n){return rh(n.type)||n.type==="spring"||!pb(n.ease)}function XA(n,a){const l=new vh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let u=0;for(;!o.done&&u<KA;)o=l.sample(u),r.push(o.value),u+=tc;return{times:void 0,keyframes:r,duration:u-tc,ease:"linear"}}const Yb={anticipate:xb,backInOut:_b,circInOut:Eb};function QA(n){return n in Yb}class Wv extends Vb{constructor(a){super(a);const{name:l,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new Ub(u,(d,m)=>this.onKeyframesResolved(d,m),l,o,r),this.resolver.scheduleResolve()}initPlayback(a,l){let{duration:o=300,times:r,ease:u,type:d,motionValue:m,name:p,startTime:g}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof u=="string"&&Jr()&&QA(u)&&(u=Yb[u]),ZA(this.options)){const{onComplete:b,onUpdate:x,motionValue:T,element:C,...j}=this.options,N=XA(a,j);a=N.keyframes,a.length===1&&(a[1]=a[0]),o=N.duration,r=N.times,u=N.ease,d="keyframes"}const v=YA(m.owner.current,p,a,{...this.options,duration:o,times:r,ease:u});return v.startTime=g??this.calcStartTime(),this.pendingTimeline?(Hv(v,this.pendingTimeline),this.pendingTimeline=void 0):v.onfinish=()=>{const{onComplete:b}=this.options;m.set(vc(a,this.options,l)),b&&b(),this.cancel(),this.resolveFinishedPromise()},{animation:v,duration:o,times:r,type:d,ease:u,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:l}=a;return Oa(l)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:l}=a;return Oa(l.currentTime||0)}set time(a){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=Ba(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:l}=a;return l.playbackRate}set speed(a){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:l}=a;return l.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:l}=a;return l.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:l}=this;if(!l)return Dn;const{animation:o}=l;Hv(o,a)}return Dn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:l}=a;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:l}=a;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:l,keyframes:o,duration:r,type:u,ease:d,times:m}=a;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:v,onComplete:b,element:x,...T}=this.options,C=new vh({...T,keyframes:o,duration:r,type:u,ease:d,times:m,isGenerator:!0}),j=Ba(this.time);g.setWithVelocity(C.sample(j-tc).value,C.sample(j).value,tc)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:l,name:o,repeatDelay:r,repeatType:u,damping:d,type:m}=a;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:g}=l.owner.getProps();return FA()&&o&&$A.has(o)&&!p&&!g&&!r&&u!=="mirror"&&d!==0&&m!=="inertia"}}const JA={type:"spring",stiffness:500,damping:25,restSpeed:10},WA=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),eC={type:"keyframes",duration:.8},tC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nC=(n,{keyframes:a})=>a.length>2?eC:Fs.has(n)?n.startsWith("scale")?WA(a[1]):JA:tC;function aC({when:n,delay:a,delayChildren:l,staggerChildren:o,staggerDirection:r,repeat:u,repeatType:d,repeatDelay:m,from:p,elapsed:g,...v}){return!!Object.keys(v).length}const yh=(n,a,l,o={},r,u)=>d=>{const m=ah(o,n)||{},p=m.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ba(p);let v={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:a.getVelocity(),...m,delay:-g,onUpdate:x=>{a.set(x),m.onUpdate&&m.onUpdate(x)},onComplete:()=>{d(),m.onComplete&&m.onComplete()},name:n,motionValue:a,element:u?void 0:r};aC(m)||(v={...v,...nC(n,v)}),v.duration&&(v.duration=Ba(v.duration)),v.repeatDelay&&(v.repeatDelay=Ba(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let b=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(b=!0)),b&&!u&&a.get()!==void 0){const x=vc(v.keyframes,m);if(x!==void 0)return ft.update(()=>{v.onUpdate(x),v.onComplete()}),new O2([])}return!u&&Wv.supports(v)?new Wv(v):new vh(v)};function sC({protectedKeys:n,needsAnimating:a},l){const o=n.hasOwnProperty(l)&&a[l]!==!0;return a[l]=!1,o}function Fb(n,a,{delay:l=0,transitionOverride:o,type:r}={}){var u;let{transition:d=n.getDefaultTransition(),transitionEnd:m,...p}=a;o&&(d=o);const g=[],v=r&&n.animationState&&n.animationState.getState()[r];for(const b in p){const x=n.getValue(b,(u=n.latestValues[b])!==null&&u!==void 0?u:null),T=p[b];if(T===void 0||v&&sC(v,b))continue;const C={delay:l,...ah(d||{},b)};let j=!1;if(window.MotionHandoffAnimation){const A=hb(n);if(A){const O=window.MotionHandoffAnimation(A,b,ft);O!==null&&(C.startTime=O,j=!0)}}lf(n,b),x.start(yh(b,x,T,n.shouldReduceMotion&&db.has(b)?{type:!1}:C,n,j));const N=x.animation;N&&g.push(N)}return m&&Promise.all(g).then(()=>{ft.update(()=>{m&&k2(n,m)})}),g}function pf(n,a,l={}){var o;const r=gc(n,a,l.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};l.transitionOverride&&(u=l.transitionOverride);const d=r?()=>Promise.all(Fb(n,r,l)):()=>Promise.resolve(),m=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:v=0,staggerChildren:b,staggerDirection:x}=u;return iC(n,a,v+g,b,x,l)}:()=>Promise.resolve(),{when:p}=u;if(p){const[g,v]=p==="beforeChildren"?[d,m]:[m,d];return g().then(()=>v())}else return Promise.all([d(),m(l.delay)])}function iC(n,a,l=0,o=0,r=1,u){const d=[],m=(n.variantChildren.size-1)*o,p=r===1?(g=0)=>g*o:(g=0)=>m-g*o;return Array.from(n.variantChildren).sort(lC).forEach((g,v)=>{g.notify("AnimationStart",a),d.push(pf(g,a,{...u,delay:l+p(v)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function lC(n,a){return n.sortNodePosition(a)}function oC(n,a,l={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>pf(n,u,l));o=Promise.all(r)}else if(typeof a=="string")o=pf(n,a,l);else{const r=typeof a=="function"?gc(n,a,l.custom):a;o=Promise.all(Fb(n,r,l))}return o.then(()=>{n.notify("AnimationComplete",a)})}const rC=$f.length;function Kb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?Kb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const a={};for(let l=0;l<rC;l++){const o=$f[l],r=n.props[o];(lo(r)||r===!1)&&(a[o]=r)}return a}const cC=[...Pf].reverse(),uC=Pf.length;function dC(n){return a=>Promise.all(a.map(({animation:l,options:o})=>oC(n,l,o)))}function fC(n){let a=dC(n),l=ey(),o=!0;const r=p=>(g,v)=>{var b;const x=gc(n,v,p==="exit"?(b=n.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(x){const{transition:T,transitionEnd:C,...j}=x;g={...g,...j,...C}}return g};function u(p){a=p(n)}function d(p){const{props:g}=n,v=Kb(n.parent)||{},b=[],x=new Set;let T={},C=1/0;for(let N=0;N<uC;N++){const A=cC[N],O=l[A],M=g[A]!==void 0?g[A]:v[A],X=lo(M),H=A===p?O.isActive:null;H===!1&&(C=N);let J=M===v[A]&&M!==g[A]&&X;if(J&&o&&n.manuallyAnimateOnMount&&(J=!1),O.protectedKeys={...T},!O.isActive&&H===null||!M&&!O.prevProp||mc(M)||typeof M=="boolean")continue;const W=hC(O.prevProp,M);let $=W||A===p&&O.isActive&&!J&&X||N>C&&X,ne=!1;const ge=Array.isArray(M)?M:[M];let U=ge.reduce(r(A),{});H===!1&&(U={});const{prevResolvedValues:pe={}}=O,te={...pe,...U},ye=F=>{$=!0,x.has(F)&&(ne=!0,x.delete(F)),O.needsAnimating[F]=!0;const ee=n.getValue(F);ee&&(ee.liveStyle=!1)};for(const F in te){const ee=U[F],ke=pe[F];if(T.hasOwnProperty(F))continue;let je=!1;sf(ee)&&sf(ke)?je=!ub(ee,ke):je=ee!==ke,je?ee!=null?ye(F):x.add(F):ee!==void 0&&x.has(F)?ye(F):O.protectedKeys[F]=!0}O.prevProp=M,O.prevResolvedValues=U,O.isActive&&(T={...T,...U}),o&&n.blockInitialAnimation&&($=!1),$&&(!(J&&W)||ne)&&b.push(...ge.map(F=>({animation:F,options:{type:A}})))}if(x.size){const N={};x.forEach(A=>{const O=n.getBaseTarget(A),M=n.getValue(A);M&&(M.liveStyle=!0),N[A]=O??null}),b.push({animation:N})}let j=!!b.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(j=!1),o=!1,j?a(b):Promise.resolve()}function m(p,g){var v;if(l[p].isActive===g)return Promise.resolve();(v=n.variantChildren)===null||v===void 0||v.forEach(x=>{var T;return(T=x.animationState)===null||T===void 0?void 0:T.setActive(p,g)}),l[p].isActive=g;const b=d(p);for(const x in l)l[x].protectedKeys={};return b}return{animateChanges:d,setActive:m,setAnimateFunction:u,getState:()=>l,reset:()=>{l=ey(),o=!0}}}function hC(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!ub(a,n):!1}function zs(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ey(){return{animate:zs(!0),whileInView:zs(),whileHover:zs(),whileTap:zs(),whileDrag:zs(),whileFocus:zs(),exit:zs()}}class vs{constructor(a){this.isMounted=!1,this.node=a}update(){}}class mC extends vs{constructor(a){super(a),a.animationState||(a.animationState=fC(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();mc(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===void 0||a.call(this)}}let pC=0;class gC extends vs{constructor(){super(...arguments),this.id=pC++}update(){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;const r=this.node.animationState.setActive("exit",!a);l&&!a&&r.then(()=>l(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const vC={animation:{Feature:mC},exit:{Feature:gC}},ta={x:!1,y:!1};function Zb(){return ta.x||ta.y}function yC(n){return n==="x"||n==="y"?ta[n]?null:(ta[n]=!0,()=>{ta[n]=!1}):ta.x||ta.y?null:(ta.x=ta.y=!0,()=>{ta.x=ta.y=!1})}const bh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function uo(n,a,l,o={passive:!0}){return n.addEventListener(a,l,o),()=>n.removeEventListener(a,l)}function yo(n){return{point:{x:n.pageX,y:n.pageY}}}const bC=n=>a=>bh(a)&&n(a,yo(a));function eo(n,a,l,o){return uo(n,a,bC(l),o)}const ty=(n,a)=>Math.abs(n-a);function SC(n,a){const l=ty(n.x,a.x),o=ty(n.y,a.y);return Math.sqrt(l**2+o**2)}class Xb{constructor(a,l,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:u=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Id(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,T=SC(b.offset,{x:0,y:0})>=3;if(!x&&!T)return;const{point:C}=b,{timestamp:j}=tn;this.history.push({...C,timestamp:j});const{onStart:N,onMove:A}=this.handlers;x||(N&&N(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Vd(x,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:T,onSessionEnd:C,resumeAnimation:j}=this.handlers;if(this.dragSnapToOrigin&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=Id(b.type==="pointercancel"?this.lastMoveEventInfo:Vd(x,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,N),C&&C(b,N)},!bh(a))return;this.dragSnapToOrigin=u,this.handlers=l,this.transformPagePoint=o,this.contextWindow=r||window;const d=yo(a),m=Vd(d,this.transformPagePoint),{point:p}=m,{timestamp:g}=tn;this.history=[{...p,timestamp:g}];const{onSessionStart:v}=l;v&&v(a,Id(m,this.history)),this.removeListeners=vo(eo(this.contextWindow,"pointermove",this.handlePointerMove),eo(this.contextWindow,"pointerup",this.handlePointerUp),eo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),hs(this.updatePoint)}}function Vd(n,a){return a?{point:a(n.point)}:n}function ny(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Id({point:n},a){return{point:n,delta:ny(n,Qb(a)),offset:ny(n,_C(a)),velocity:xC(a,.1)}}function _C(n){return n[0]}function Qb(n){return n[n.length-1]}function xC(n,a){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const r=Qb(n);for(;l>=0&&(o=n[l],!(r.timestamp-o.timestamp>Ba(a)));)l--;if(!o)return{x:0,y:0};const u=Oa(r.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(r.x-o.x)/u,y:(r.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const Jb=1e-4,TC=1-Jb,EC=1+Jb,Wb=.01,AC=0-Wb,CC=0+Wb;function kn(n){return n.max-n.min}function jC(n,a,l){return Math.abs(n-a)<=l}function ay(n,a,l,o=.5){n.origin=o,n.originPoint=_t(a.min,a.max,n.origin),n.scale=kn(l)/kn(a),n.translate=_t(l.min,l.max,n.origin)-n.originPoint,(n.scale>=TC&&n.scale<=EC||isNaN(n.scale))&&(n.scale=1),(n.translate>=AC&&n.translate<=CC||isNaN(n.translate))&&(n.translate=0)}function to(n,a,l,o){ay(n.x,a.x,l.x,o?o.originX:void 0),ay(n.y,a.y,l.y,o?o.originY:void 0)}function sy(n,a,l){n.min=l.min+a.min,n.max=n.min+kn(a)}function NC(n,a,l){sy(n.x,a.x,l.x),sy(n.y,a.y,l.y)}function iy(n,a,l){n.min=a.min-l.min,n.max=n.min+kn(a)}function no(n,a,l){iy(n.x,a.x,l.x),iy(n.y,a.y,l.y)}function wC(n,{min:a,max:l},o){return a!==void 0&&n<a?n=o?_t(a,n,o.min):Math.max(n,a):l!==void 0&&n>l&&(n=o?_t(l,n,o.max):Math.min(n,l)),n}function ly(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 DC(n,{top:a,left:l,bottom:o,right:r}){return{x:ly(n.x,l,r),y:ly(n.y,a,o)}}function oy(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 kC(n,a){return{x:oy(n.x,a.x),y:oy(n.y,a.y)}}function MC(n,a){let l=.5;const o=kn(n),r=kn(a);return r>o?l=qi(a.min,a.max-o,n.min):o>r&&(l=qi(n.min,n.max-r,a.min)),za(0,1,l)}function RC(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 gf=.35;function BC(n=gf){return n===!1?n=0:n===!0&&(n=gf),{x:ry(n,"left","right"),y:ry(n,"top","bottom")}}function ry(n,a,l){return{min:cy(n,a),max:cy(n,l)}}function cy(n,a){return typeof n=="number"?n:n[a]||0}const uy=()=>({translate:0,scale:1,origin:0,originPoint:0}),zi=()=>({x:uy(),y:uy()}),dy=()=>({min:0,max:0}),Ot=()=>({x:dy(),y:dy()});function $n(n){return[n("x"),n("y")]}function e1({top:n,left:a,right:l,bottom:o}){return{x:{min:a,max:l},y:{min:n,max:o}}}function OC({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function LC(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 Hd(n){return n===void 0||n===1}function vf({scale:n,scaleX:a,scaleY:l}){return!Hd(n)||!Hd(a)||!Hd(l)}function Vs(n){return vf(n)||t1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function t1(n){return fy(n.x)||fy(n.y)}function fy(n){return n&&n!=="0%"}function nc(n,a,l){const o=n-l,r=a*o;return l+r}function hy(n,a,l,o,r){return r!==void 0&&(n=nc(n,r,o)),nc(n,l,o)+a}function yf(n,a=0,l=1,o,r){n.min=hy(n.min,a,l,o,r),n.max=hy(n.max,a,l,o,r)}function n1(n,{x:a,y:l}){yf(n.x,a.translate,a.scale,a.originPoint),yf(n.y,l.translate,l.scale,l.originPoint)}const my=.999999999999,py=1.0000000000001;function zC(n,a,l,o=!1){const r=l.length;if(!r)return;a.x=a.y=1;let u,d;for(let m=0;m<r;m++){u=l[m],d=u.projectionDelta;const{visualElement:p}=u.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Vi(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,n1(n,d)),o&&Vs(u.latestValues)&&Vi(n,u.latestValues))}a.x<py&&a.x>my&&(a.x=1),a.y<py&&a.y>my&&(a.y=1)}function Ui(n,a){n.min=n.min+a,n.max=n.max+a}function gy(n,a,l,o,r=.5){const u=_t(n.min,n.max,r);yf(n,a,l,u,o)}function Vi(n,a){gy(n.x,a.x,a.scaleX,a.scale,a.originX),gy(n.y,a.y,a.scaleY,a.scale,a.originY)}function a1(n,a){return e1(LC(n.getBoundingClientRect(),a))}function UC(n,a,l){const o=a1(n,l),{scroll:r}=a;return r&&(Ui(o.x,r.offset.x),Ui(o.y,r.offset.y)),o}const s1=({current:n})=>n?n.ownerDocument.defaultView:null,VC=new WeakMap;class IC{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=Ot(),this.visualElement=a}start(a,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=v=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(yo(v).point)},u=(v,b)=>{const{drag:x,dragPropagation:T,onDragStart:C}=this.getProps();if(x&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yC(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$n(N=>{let A=this.getAxisMotionValue(N).get()||0;if(da.test(A)){const{projection:O}=this.visualElement;if(O&&O.layout){const M=O.layout.layoutBox[N];M&&(A=kn(M)*(parseFloat(A)/100))}}this.originPoint[N]=A}),C&&ft.postRender(()=>C(v,b)),lf(this.visualElement,"transform");const{animationState:j}=this.visualElement;j&&j.setActive("whileDrag",!0)},d=(v,b)=>{const{dragPropagation:x,dragDirectionLock:T,onDirectionLock:C,onDrag:j}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:N}=b;if(T&&this.currentDirection===null){this.currentDirection=HC(N),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",b.point,N),this.updateAxis("y",b.point,N),this.visualElement.render(),j&&j(v,b)},m=(v,b)=>this.stop(v,b),p=()=>$n(v=>{var b;return this.getAnimationState(v)==="paused"&&((b=this.getAxisMotionValue(v).animation)===null||b===void 0?void 0:b.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Xb(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:s1(this.visualElement)})}stop(a,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=l;this.startAnimation(r);const{onDragEnd:u}=this.getProps();u&&ft.postRender(()=>u(a,l))}cancel(){this.isDragging=!1;const{projection:a,animationState:l}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(a,l,o){const{drag:r}=this.getProps();if(!o||!Ur(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=wC(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){var a;const{dragConstraints:l,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,u=this.constraints;l&&Oi(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&r?this.constraints=DC(r.layoutBox,l):this.constraints=!1,this.elastic=BC(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&$n(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=RC(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:l}=this.getProps();if(!a||!Oi(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=UC(o,r.root,this.visualElement.getTransformPagePoint());let d=kC(r.layout.layoutBox,u);if(l){const m=l(OC(d));this.hasMutatedConstraints=!!m,m&&(d=e1(m))}return d}startAnimation(a){const{drag:l,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},g=$n(v=>{if(!Ur(v,l,this.currentDirection))return;let b=p&&p[v]||{};d&&(b={min:0,max:0});const x=r?200:1e6,T=r?40:1e7,C={type:"inertia",velocity:o?a[v]:0,bounceStiffness:x,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...b};return this.startAxisValueAnimation(v,C)});return Promise.all(g).then(m)}startAxisValueAnimation(a,l){const o=this.getAxisMotionValue(a);return lf(this.visualElement,a),o.start(yh(a,o,0,l,this.visualElement,!1))}stopAnimation(){$n(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){$n(a=>{var l;return(l=this.getAxisMotionValue(a).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(a){var l;return(l=this.getAxisMotionValue(a).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(a){const l=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[l];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){$n(l=>{const{drag:o}=this.getProps();if(!Ur(l,o,this.currentDirection))return;const{projection:r}=this.visualElement,u=this.getAxisMotionValue(l);if(r&&r.layout){const{min:d,max:m}=r.layout.layoutBox[l];u.set(a[l]-_t(d,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!Oi(l)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};$n(d=>{const m=this.getAxisMotionValue(d);if(m&&this.constraints!==!1){const p=m.get();r[d]=MC({min:p,max:p},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),$n(d=>{if(!Ur(d,a,null))return;const m=this.getAxisMotionValue(d),{min:p,max:g}=this.constraints[d];m.set(_t(p,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;VC.set(this.visualElement,this);const a=this.visualElement.current,l=eo(a,"pointerdown",p=>{const{drag:g,dragListener:v=!0}=this.getProps();g&&v&&this.start(p)}),o=()=>{const{dragConstraints:p}=this.getProps();Oi(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,u=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ft.read(o);const d=uo(window,"resize",()=>this.scalePositionWithinConstraints()),m=r.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:g})=>{this.isDragging&&g&&($n(v=>{const b=this.getAxisMotionValue(v);b&&(this.originPoint[v]+=p[v].translate,b.set(b.get()+p[v].translate))}),this.visualElement.render())}));return()=>{d(),l(),u(),m&&m()}}getProps(){const a=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:u=!1,dragElastic:d=gf,dragMomentum:m=!0}=a;return{...a,drag:l,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:m}}}function Ur(n,a,l){return(a===!0||a===n)&&(l===null||l===n)}function HC(n,a=10){let l=null;return Math.abs(n.y)>a?l="y":Math.abs(n.x)>a&&(l="x"),l}class qC extends vs{constructor(a){super(a),this.removeGroupControls=Dn,this.removeListeners=Dn,this.controls=new IC(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const vy=n=>(a,l)=>{n&&ft.postRender(()=>n(a,l))};class GC extends vs{constructor(){super(...arguments),this.removePointerDownListener=Dn}onPointerDown(a){this.session=new Xb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:s1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:l,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:vy(a),onStart:vy(l),onMove:o,onEnd:(u,d)=>{delete this.session,r&&ft.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=eo(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Kr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yy(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(xe.test(n))n=parseFloat(n);else return n;const l=yy(n,a.target.x),o=yy(n,a.target.y);return`${l}% ${o}%`}},PC={correct:(n,{treeScale:a,projectionDelta:l})=>{const o=n,r=ms.parse(n);if(r.length>5)return o;const u=ms.createTransformer(n),d=typeof r[0]!="number"?1:0,m=l.x.scale*a.x,p=l.y.scale*a.y;r[0+d]/=m,r[1+d]/=p;const g=_t(m,p,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),u(r)}};class $C extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;v2(YC),u&&(l.group&&l.group.add(u),o&&o.register&&r&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),Kr.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:l,visualElement:o,drag:r,isPresent:u}=this.props,d=o.projection;return d&&(d.isPresent=u,r||a.layoutDependency!==l||l===void 0?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||ft.postRender(()=>{const m=d.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Ff.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function i1(n){const[a,l]=G0(),o=S.useContext(If);return h.jsx($C,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(Q0),isPresent:a,safeToRemove:l})}const YC={borderRadius:{...Pl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pl,borderTopRightRadius:Pl,borderBottomLeftRadius:Pl,borderBottomRightRadius:Pl,boxShadow:PC};function FC(n,a,l){const o=on(n)?n:ro(n);return o.start(yh("",o,a,l)),o.animation}function KC(n){return n instanceof SVGElement&&n.tagName!=="svg"}const ZC=(n,a)=>n.depth-a.depth;class XC{constructor(){this.children=[],this.isDirty=!1}add(a){sh(this.children,a),this.isDirty=!0}remove(a){ih(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(ZC),this.isDirty=!1,this.children.forEach(a)}}function QC(n,a){const l=fa.now(),o=({timestamp:r})=>{const u=r-l;u>=a&&(hs(o),n(u-a))};return ft.read(o,!0),()=>hs(o)}const l1=["TopLeft","TopRight","BottomLeft","BottomRight"],JC=l1.length,by=n=>typeof n=="string"?parseFloat(n):n,Sy=n=>typeof n=="number"||xe.test(n);function WC(n,a,l,o,r,u){r?(n.opacity=_t(0,l.opacity!==void 0?l.opacity:1,ej(o)),n.opacityExit=_t(a.opacity!==void 0?a.opacity:1,0,tj(o))):u&&(n.opacity=_t(a.opacity!==void 0?a.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let d=0;d<JC;d++){const m=`border${l1[d]}Radius`;let p=_y(a,m),g=_y(l,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||Sy(p)===Sy(g)?(n[m]=Math.max(_t(by(p),by(g),o),0),(da.test(g)||da.test(p))&&(n[m]+="%")):n[m]=g}(a.rotate||l.rotate)&&(n.rotate=_t(a.rotate||0,l.rotate||0,o))}function _y(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const ej=o1(0,.5,Tb),tj=o1(.5,.95,Dn);function o1(n,a,l){return o=>o<n?0:o>a?1:l(qi(n,a,o))}function xy(n,a){n.min=a.min,n.max=a.max}function Pn(n,a){xy(n.x,a.x),xy(n.y,a.y)}function Ty(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Ey(n,a,l,o,r){return n-=a,n=nc(n,1/l,o),r!==void 0&&(n=nc(n,1/r,o)),n}function nj(n,a=0,l=1,o=.5,r,u=n,d=n){if(da.test(a)&&(a=parseFloat(a),a=_t(d.min,d.max,a/100)-d.min),typeof a!="number")return;let m=_t(u.min,u.max,o);n===u&&(m-=a),n.min=Ey(n.min,a,l,m,r),n.max=Ey(n.max,a,l,m,r)}function Ay(n,a,[l,o,r],u,d){nj(n,a[l],a[o],a[r],a.scale,u,d)}const aj=["x","scaleX","originX"],sj=["y","scaleY","originY"];function Cy(n,a,l,o){Ay(n.x,a,aj,l?l.x:void 0,o?o.x:void 0),Ay(n.y,a,sj,l?l.y:void 0,o?o.y:void 0)}function jy(n){return n.translate===0&&n.scale===1}function r1(n){return jy(n.x)&&jy(n.y)}function Ny(n,a){return n.min===a.min&&n.max===a.max}function ij(n,a){return Ny(n.x,a.x)&&Ny(n.y,a.y)}function wy(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function c1(n,a){return wy(n.x,a.x)&&wy(n.y,a.y)}function Dy(n){return kn(n.x)/kn(n.y)}function ky(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class lj{constructor(){this.members=[]}add(a){sh(this.members,a),a.scheduleRender()}remove(a){if(ih(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){const l=this.members.findIndex(r=>a===r);if(l===0)return!1;let o;for(let r=l;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(a,l){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,l&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:l,resumingFrom:o}=a;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function oj(n,a,l){let o="";const r=n.x.translate/a.x,u=n.y.translate/a.y,d=(l==null?void 0:l.z)||0;if((r||u||d)&&(o=`translate3d(${r}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),l){const{transformPerspective:g,rotate:v,rotateX:b,rotateY:x,skewX:T,skewY:C}=l;g&&(o=`perspective(${g}px) ${o}`),v&&(o+=`rotate(${v}deg) `),b&&(o+=`rotateX(${b}deg) `),x&&(o+=`rotateY(${x}deg) `),T&&(o+=`skewX(${T}deg) `),C&&(o+=`skewY(${C}deg) `)}const m=n.x.scale*a.x,p=n.y.scale*a.y;return(m!==1||p!==1)&&(o+=`scale(${m}, ${p})`),o||"none"}const Is={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Zl=typeof window<"u"&&window.MotionDebug!==void 0,qd=["","X","Y","Z"],rj={visibility:"hidden"},My=1e3;let cj=0;function Gd(n,a,l,o){const{latestValues:r}=a;r[n]&&(l[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function u1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const l=hb(a);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:r,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",ft,!(r||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&u1(o)}function d1({attachResizeListener:n,defaultParent:a,measureScroll:l,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},m=a==null?void 0:a()){this.id=cj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Zl&&(Is.totalNodes=Is.resolvedTargetDeltas=Is.recalculatedProjection=0),this.nodes.forEach(fj),this.nodes.forEach(vj),this.nodes.forEach(yj),this.nodes.forEach(hj),Zl&&window.MotionDebug.record(Is)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new XC)}addEventListener(d,m){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new lh),this.eventHandlers.get(d).add(m)}notifyListeners(d,...m){const p=this.eventHandlers.get(d);p&&p.notify(...m)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=KC(d),this.instance=d;const{layoutId:p,layout:g,visualElement:v}=this.options;if(v&&!v.current&&v.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(g||p)&&(this.isLayoutDirty=!0),n){let b;const x=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=QC(x,250),Kr.hasAnimatedSinceResize&&(Kr.hasAnimatedSinceResize=!1,this.nodes.forEach(By))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&v&&(p||g)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:x,hasRelativeTargetChanged:T,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||v.getDefaultTransition()||Tj,{onLayoutAnimationStart:N,onLayoutAnimationComplete:A}=v.getProps(),O=!this.targetLayout||!c1(this.targetLayout,C)||T,M=!x&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||M||x&&(O||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,M);const X={...ah(j,"layout"),onPlay:N,onComplete:A};(v.shouldReduceMotion||this.options.layoutRoot)&&(X.delay=0,X.type=!1),this.startAnimation(X)}else x||By(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,hs(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(bj),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&u1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const b=this.path[v];b.shouldResetTransform=!0,b.updateScroll("snapshot"),b.options.layoutRoot&&b.willUpdate(!1)}const{layoutId:m,layout:p}=this.options;if(m===void 0&&!p)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ry);return}this.isUpdating||this.nodes.forEach(pj),this.isUpdating=!1,this.nodes.forEach(gj),this.nodes.forEach(uj),this.nodes.forEach(dj),this.clearAllSnapshots();const m=fa.now();tn.delta=za(0,1e3/60,m-tn.timestamp),tn.timestamp=m,tn.isProcessing=!0,Bd.update.process(tn),Bd.preRender.process(tn),Bd.render.process(tn),tn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ff.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mj),this.sharedNodes.forEach(Sj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ot(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(m=!1),m){const p=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:p,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!r1(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,v=g!==this.prevTransformTemplateValue;d&&(m||Vs(this.latestValues)||v)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return d&&(p=this.removeTransform(p)),Ej(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:m}=this.options;if(!m)return Ot();const p=m.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(Aj))){const{scroll:v}=this.root;v&&(Ui(p.x,v.offset.x),Ui(p.y,v.offset.y))}return p}removeElementScroll(d){var m;const p=Ot();if(Pn(p,d),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const v=this.path[g],{scroll:b,options:x}=v;v!==this.root&&b&&x.layoutScroll&&(b.wasRoot&&Pn(p,d),Ui(p.x,b.offset.x),Ui(p.y,b.offset.y))}return p}applyTransform(d,m=!1){const p=Ot();Pn(p,d);for(let g=0;g<this.path.length;g++){const v=this.path[g];!m&&v.options.layoutScroll&&v.scroll&&v!==v.root&&Vi(p,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),Vs(v.latestValues)&&Vi(p,v.latestValues)}return Vs(this.latestValues)&&Vi(p,this.latestValues),p}removeTransform(d){const m=Ot();Pn(m,d);for(let p=0;p<this.path.length;p++){const g=this.path[p];if(!g.instance||!Vs(g.latestValues))continue;vf(g.latestValues)&&g.updateSnapshot();const v=Ot(),b=g.measurePageBox();Pn(v,b),Cy(m,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,v)}return Vs(this.latestValues)&&Cy(m,this.latestValues),m}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.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!==tn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var m;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==p;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:x}=this.options;if(!(!this.layout||!(b||x))){if(this.resolvedRelativeTargetAt=tn.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),no(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ot(),this.targetWithTransforms=Ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Pn(this.target,this.layout.layoutBox),n1(this.target,this.targetDelta)):Pn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),no(this.relativeTargetOrigin,this.target,T.target),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Zl&&Is.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||vf(this.parent.latestValues)||t1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var d;const m=this.getLead(),p=!!this.resumingFrom||this!==m;let g=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(g=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===tn.timestamp&&(g=!1),g)return;const{layout:v,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(v||b))return;Pn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,T=this.treeScale.y;zC(this.layoutCorrected,this.treeScale,this.path,p),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=Ot());const{target:C}=m;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ty(this.prevProjectionDelta.x,this.projectionDelta.x),Ty(this.prevProjectionDelta.y,this.projectionDelta.y)),to(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==T||!ky(this.projectionDelta.x,this.prevProjectionDelta.x)||!ky(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",C)),Zl&&Is.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),d){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zi(),this.projectionDelta=zi(),this.projectionDeltaWithTransform=zi()}setAnimationOrigin(d,m=!1){const p=this.snapshot,g=p?p.latestValues:{},v={...this.latestValues},b=zi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const x=Ot(),T=p?p.source:void 0,C=this.layout?this.layout.source:void 0,j=T!==C,N=this.getStack(),A=!N||N.members.length<=1,O=!!(j&&!A&&this.options.crossfade===!0&&!this.path.some(xj));this.animationProgress=0;let M;this.mixTargetDelta=X=>{const H=X/1e3;Oy(b.x,d.x,H),Oy(b.y,d.y,H),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(no(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_j(this.relativeTarget,this.relativeTargetOrigin,x,H),M&&ij(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=Ot()),Pn(M,this.relativeTarget)),j&&(this.animationValues=v,WC(v,g,this.latestValues,H,O,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=H},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(hs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Kr.hasAnimatedSinceResize=!0,this.currentAnimation=FC(0,My,{...d,onUpdate:m=>{this.mixTargetDelta(m),d.onUpdate&&d.onUpdate(m)},onComplete:()=>{d.onComplete&&d.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 d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(My),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:m,target:p,layout:g,latestValues:v}=d;if(!(!m||!p||!g)){if(this!==d&&this.layout&&g&&f1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||Ot();const b=kn(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+b;const x=kn(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+x}Pn(m,p),Vi(m,v),to(this.projectionDeltaWithTransform,this.layoutCorrected,m,v)}}registerSharedNode(d,m){this.sharedNodes.has(d)||this.sharedNodes.set(d,new lj),this.sharedNodes.get(d).add(m);const g=m.options.initialPromotionConfig;m.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(m):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:m}=this.options;return m?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:m}=this.options;return m?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:m,preserveFollowOpacity:p}={}){const g=this.getStack();g&&g.promote(this,p),d&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let m=!1;const{latestValues:p}=d;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const g={};p.z&&Gd("z",d,g,this.animationValues);for(let v=0;v<qd.length;v++)Gd(`rotate${qd[v]}`,d,g,this.animationValues),Gd(`skew${qd[v]}`,d,g,this.animationValues);d.render();for(const v in g)d.setStaticValue(v,g[v]),this.animationValues&&(this.animationValues[v]=g[v]);d.scheduleRender()}getProjectionStyles(d){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return rj;const g={visibility:""},v=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Yr(d==null?void 0:d.pointerEvents)||"",g.transform=v?v(this.latestValues,""):"none",g;const b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){const j={};return this.options.layoutId&&(j.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,j.pointerEvents=Yr(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Vs(this.latestValues)&&(j.transform=v?v({},""):"none",this.hasProjected=!1),j}const x=b.animationValues||b.latestValues;this.applyTransformsToTarget(),g.transform=oj(this.projectionDeltaWithTransform,this.treeScale,x),v&&(g.transform=v(x,g.transform));const{x:T,y:C}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${C.origin*100}% 0`,b.animationValues?g.opacity=b===this?(p=(m=x.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:g.opacity=b===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const j in Qr){if(x[j]===void 0)continue;const{correct:N,applyTo:A}=Qr[j],O=g.transform==="none"?x[j]:N(x[j],b);if(A){const M=A.length;for(let X=0;X<M;X++)g[A[X]]=O}else g[j]=O}return this.options.layoutId&&(g.pointerEvents=b===this?Yr(d==null?void 0:d.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var m;return(m=d.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(Ry),this.root.sharedNodes.clear()}}}function uj(n){n.updateLayout()}function dj(n){var a;const l=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&l&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:u}=n.options,d=l.source!==n.layout.source;u==="size"?$n(b=>{const x=d?l.measuredBox[b]:l.layoutBox[b],T=kn(x);x.min=o[b].min,x.max=x.min+T}):f1(u,l.layoutBox,o)&&$n(b=>{const x=d?l.measuredBox[b]:l.layoutBox[b],T=kn(o[b]);x.max=x.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+T)});const m=zi();to(m,o,l.layoutBox);const p=zi();d?to(p,n.applyTransform(r,!0),l.measuredBox):to(p,o,l.layoutBox);const g=!r1(m);let v=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:x,layout:T}=b;if(x&&T){const C=Ot();no(C,l.layoutBox,x.layoutBox);const j=Ot();no(j,o,T.layoutBox),c1(C,j)||(v=!0),b.options.layoutRoot&&(n.relativeTarget=j,n.relativeTargetOrigin=C,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:p,layoutDelta:m,hasLayoutChanged:g,hasRelativeTargetChanged:v})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function fj(n){Zl&&Is.totalNodes++,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 hj(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function mj(n){n.clearSnapshot()}function Ry(n){n.clearMeasurements()}function pj(n){n.isLayoutDirty=!1}function gj(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function By(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function vj(n){n.resolveTargetDelta()}function yj(n){n.calcProjection()}function bj(n){n.resetSkewAndRotation()}function Sj(n){n.removeLeadSnapshot()}function Oy(n,a,l){n.translate=_t(a.translate,0,l),n.scale=_t(a.scale,1,l),n.origin=a.origin,n.originPoint=a.originPoint}function Ly(n,a,l,o){n.min=_t(a.min,l.min,o),n.max=_t(a.max,l.max,o)}function _j(n,a,l,o){Ly(n.x,a.x,l.x,o),Ly(n.y,a.y,l.y,o)}function xj(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const Tj={duration:.45,ease:[.4,0,.1,1]},zy=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Uy=zy("applewebkit/")&&!zy("chrome/")?Math.round:Dn;function Vy(n){n.min=Uy(n.min),n.max=Uy(n.max)}function Ej(n){Vy(n.x),Vy(n.y)}function f1(n,a,l){return n==="position"||n==="preserve-aspect"&&!jC(Dy(a),Dy(l),.2)}function Aj(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const Cj=d1({attachResizeListener:(n,a)=>uo(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pd={current:void 0},h1=d1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Pd.current){const n=new Cj({});n.mount(window),n.setOptions({layoutScroll:!0}),Pd.current=n}return Pd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),jj={pan:{Feature:GC},drag:{Feature:qC,ProjectionNode:h1,MeasureLayout:i1}};function Nj(n,a,l){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const u=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}function m1(n,a){const l=Nj(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[l,r,()=>o.abort()]}function Iy(n){return a=>{a.pointerType==="touch"||Zb()||n(a)}}function wj(n,a,l={}){const[o,r,u]=m1(n,l),d=Iy(m=>{const{target:p}=m,g=a(m);if(typeof g!="function"||!p)return;const v=Iy(b=>{g(b),p.removeEventListener("pointerleave",v)});p.addEventListener("pointerleave",v,r)});return o.forEach(m=>{m.addEventListener("pointerenter",d,r)}),u}function Hy(n,a,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const r="onHover"+l,u=o[r];u&&ft.postRender(()=>u(a,yo(a)))}class Dj extends vs{mount(){const{current:a}=this.node;a&&(this.unmount=wj(a,l=>(Hy(this.node,l,"Start"),o=>Hy(this.node,o,"End"))))}unmount(){}}class kj extends vs{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=vo(uo(this.node.current,"focus",()=>this.onFocus()),uo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const p1=(n,a)=>a?n===a?!0:p1(n,a.parentElement):!1,Mj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Rj(n){return Mj.has(n.tagName)||n.tabIndex!==-1}const Xl=new WeakSet;function qy(n){return a=>{a.key==="Enter"&&n(a)}}function $d(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const Bj=(n,a)=>{const l=n.currentTarget;if(!l)return;const o=qy(()=>{if(Xl.has(l))return;$d(l,"down");const r=qy(()=>{$d(l,"up")}),u=()=>$d(l,"cancel");l.addEventListener("keyup",r,a),l.addEventListener("blur",u,a)});l.addEventListener("keydown",o,a),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),a)};function Gy(n){return bh(n)&&!Zb()}function Oj(n,a,l={}){const[o,r,u]=m1(n,l),d=m=>{const p=m.currentTarget;if(!Gy(m)||Xl.has(p))return;Xl.add(p);const g=a(m),v=(T,C)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",x),!(!Gy(T)||!Xl.has(p))&&(Xl.delete(p),typeof g=="function"&&g(T,{success:C}))},b=T=>{v(T,l.useGlobalTarget||p1(p,T.target))},x=T=>{v(T,!1)};window.addEventListener("pointerup",b,r),window.addEventListener("pointercancel",x,r)};return o.forEach(m=>{!Rj(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(l.useGlobalTarget?window:m).addEventListener("pointerdown",d,r),m.addEventListener("focus",g=>Bj(g,r),r)}),u}function Py(n,a,l){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const r="onTap"+(l==="End"?"":l),u=o[r];u&&ft.postRender(()=>u(a,yo(a)))}class Lj extends vs{mount(){const{current:a}=this.node;a&&(this.unmount=Oj(a,l=>(Py(this.node,l,"Start"),(o,{success:r})=>Py(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bf=new WeakMap,Yd=new WeakMap,zj=n=>{const a=bf.get(n.target);a&&a(n)},Uj=n=>{n.forEach(zj)};function Vj({root:n,...a}){const l=n||document;Yd.has(l)||Yd.set(l,{});const o=Yd.get(l),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(Uj,{root:n,...a})),o[r]}function Ij(n,a,l){const o=Vj(a);return bf.set(n,l),o.observe(n),()=>{bf.delete(n),o.unobserve(n)}}const Hj={some:0,all:1};class qj extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:l,margin:o,amount:r="some",once:u}=a,d={root:l?l.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Hj[r]},m=p=>{const{isIntersecting:g}=p;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:b}=this.node.getProps(),x=g?v:b;x&&x(p)};return Ij(this.node.current,d,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:l}=this.node;["amount","margin","root"].some(Gj(a,l))&&this.startObserver()}unmount(){}}function Gj({viewport:n={}},{viewport:a={}}={}){return l=>n[l]!==a[l]}const Pj={inView:{Feature:qj},tap:{Feature:Lj},focus:{Feature:kj},hover:{Feature:Dj}},$j={layout:{ProjectionNode:h1,MeasureLayout:i1}},Sf={current:null},g1={current:!1};function Yj(){if(g1.current=!0,!!Gf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>Sf.current=n.matches;n.addListener(a),a()}else Sf.current=!1}const Fj=[...zb,ln,ms],Kj=n=>Fj.find(Lb(n)),$y=new WeakMap;function Zj(n,a,l){for(const o in a){const r=a[o],u=l[o];if(on(r))n.addValue(o,r);else if(on(u))n.addValue(o,ro(r,{owner:n}));else if(u!==r)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(o);n.addValue(o,ro(d!==void 0?d:r,{owner:n}))}}for(const o in l)a[o]===void 0&&n.removeValue(o);return a}const Yy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xj{scrapeMotionValuesFromProps(a,l,o){return{}}constructor({parent:a,props:l,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:u,visualState:d},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ph,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=fa.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,ft.render(this.render,!1,!0))};const{latestValues:p,renderState:g,onUpdate:v}=d;this.onUpdate=v,this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=g,this.parent=a,this.props=l,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=m,this.blockInitialAnimation=!!u,this.isControllingVariants=pc(l),this.isVariantNode=Z0(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:b,...x}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in x){const C=x[T];p[T]!==void 0&&on(C)&&C.set(p[T],!1)}}mount(a){this.current=a,$y.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((l,o)=>this.bindToMotionValue(o,l)),g1.current||Yj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Sf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$y.delete(this.current),this.projection&&this.projection.unmount(),hs(this.notifyUpdate),hs(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const l=this.features[a];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(a,l){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Fs.has(a),r=l.on("change",m=>{this.latestValues[a]=m,this.props.onUpdate&&ft.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),u=l.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,l)),this.valueSubscriptions.set(a,()=>{r(),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 Hi){const l=Hi[a];if(!l)continue;const{isEnabled:o,Feature:r}=l;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ot()}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<Yy.length;o++){const r=Yy[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const u="on"+r,d=a[u];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=Zj(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=ro(l===null?void 0:l,{owner:this}),this.addValue(a,o)),o}readValue(a,l){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Bb(r)||Ab(r))?r=parseFloat(r):!Kj(r)&&ms.test(l)&&(r=kb(a,l)),this.setBaseTarget(a,on(r)?r.get():r)),on(r)?r.get():r}setBaseTarget(a,l){this.baseTarget[a]=l}getBaseTarget(a){var l;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const d=Zf(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);d&&(r=d[a])}if(o&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!on(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,l){return this.events[a]||(this.events[a]=new lh),this.events[a].add(l)}notify(a,...l){this.events[a]&&this.events[a].notify(...l)}}class v1 extends Xj{constructor(){super(...arguments),this.KeyframeResolver=Ub}sortInstanceNodePosition(a,l){return a.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(a,l){return a.style?a.style[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;on(a)&&(this.childSubscription=a.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function Qj(n){return window.getComputedStyle(n)}class Jj extends v1{constructor(){super(...arguments),this.type="html",this.renderInstance=sb}readValueFromInstance(a,l){if(Fs.has(l)){const o=mh(l);return o&&o.default||0}else{const o=Qj(a),r=(tb(l)?o.getPropertyValue(l):o[l])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:l}){return a1(a,l)}build(a,l,o){Jf(a,l,o.transformTemplate)}scrapeMotionValuesFromProps(a,l,o){return nh(a,l,o)}}class Wj extends v1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(a,l){return a[l]}readValueFromInstance(a,l){if(Fs.has(l)){const o=mh(l);return o&&o.default||0}return l=ib.has(l)?l:Yf(l),a.getAttribute(l)}scrapeMotionValuesFromProps(a,l,o){return rb(a,l,o)}build(a,l,o){Wf(a,l,this.isSVGTag,o.transformTemplate)}renderInstance(a,l,o,r){lb(a,l,o,r)}mount(a){this.isSVGTag=th(a.tagName),super.mount(a)}}const eN=(n,a)=>Kf(n)?new Wj(a):new Jj(a,{allowProjection:n!==S.Fragment}),tN=C2({...vC,...Pj,...jj,...$j},eN),Yn=HE(tN);var wt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(wt||(wt={}));var qt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(qt||(qt={}));var us;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(us||(us={}));var ds;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(ds||(ds={}));const nN=8;Object.assign(Object.create(null),{"":wt.UNSPECIFIED,text:wt.TEXT,tool_use:wt.TOOL_USE,tool_result:wt.TOOL_RESULT,error:wt.ERROR,status:wt.STATUS,system:wt.SYSTEM,finding:wt.FINDING,subtask_create:wt.SUBTASK_CREATE,user_input:wt.USER_INPUT});wt.UNSPECIFIED+"",wt.TEXT+"",wt.TOOL_USE+"",wt.TOOL_RESULT+"",wt.ERROR+"",wt.STATUS+"",wt.SYSTEM+"",wt.FINDING+"",wt.SUBTASK_CREATE+"",wt.USER_INPUT+"";Object.assign(Object.create(null),{"":qt.UNSPECIFIED,not_started:qt.NOT_STARTED,working:qt.WORKING,paused:qt.PAUSED,complete:qt.COMPLETE,failed:qt.FAILED,pending:qt.NOT_STARTED,assigned:qt.NOT_STARTED,in_progress:qt.WORKING,waiting_input:qt.PAUSED,review:qt.PAUSED,done:qt.COMPLETE});qt.UNSPECIFIED+"",qt.NOT_STARTED+"",qt.WORKING+"",qt.PAUSED+"",qt.COMPLETE+"",qt.FAILED+"";Object.assign(Object.create(null),{"":us.UNSPECIFIED,active:us.ACTIVE,archived:us.ARCHIVED});us.UNSPECIFIED+"",us.ACTIVE+"",us.ARCHIVED+"";Object.assign(Object.create(null),{"":ds.UNSPECIFIED,open:ds.OPEN,closed:ds.CLOSED});ds.UNSPECIFIED+"",ds.OPEN+"",ds.CLOSED+"";function Ua(n){return Array.isArray?Array.isArray(n):S1(n)==="[object Array]"}function aN(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function sN(n){return n==null?"":aN(n)}function ca(n){return typeof n=="string"}function y1(n){return typeof n=="number"}function iN(n){return n===!0||n===!1||lN(n)&&S1(n)=="[object Boolean]"}function b1(n){return typeof n=="object"}function lN(n){return b1(n)&&n!==null}function wn(n){return n!=null}function Fd(n){return!n.trim().length}function S1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const oN="Incorrect 'index' type",rN=n=>`Invalid value for key ${n}`,cN=n=>`Pattern length exceeds max of ${n}.`,uN=n=>`Missing ${n} property in key`,dN=n=>`Property 'weight' in key '${n}' must be a positive integer`,Fy=Object.prototype.hasOwnProperty;class fN{constructor(a){this._keys=[],this._keyMap={};let l=0;a.forEach(o=>{let r=_1(o);this._keys.push(r),this._keyMap[r.id]=r,l+=r.weight}),this._keys.forEach(o=>{o.weight/=l})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function _1(n){let a=null,l=null,o=null,r=1,u=null;if(ca(n)||Ua(n))o=n,a=Ky(n),l=_f(n);else{if(!Fy.call(n,"name"))throw new Error(uN("name"));const d=n.name;if(o=d,Fy.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(dN(d));a=Ky(d),l=_f(d),u=n.getFn}return{path:a,id:l,weight:r,src:o,getFn:u}}function Ky(n){return Ua(n)?n:n.split(".")}function _f(n){return Ua(n)?n.join("."):n}function hN(n,a){let l=[],o=!1;const r=(u,d,m)=>{if(wn(u))if(!d[m])l.push(u);else{let p=d[m];const g=u[p];if(!wn(g))return;if(m===d.length-1&&(ca(g)||y1(g)||iN(g)))l.push(sN(g));else if(Ua(g)){o=!0;for(let v=0,b=g.length;v<b;v+=1)r(g[v],d,m+1)}else d.length&&r(g,d,m+1)}};return r(n,ca(a)?a.split("."):a,0),o?l:l[0]}const mN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},pN={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},gN={location:0,threshold:.6,distance:100},vN={useExtendedSearch:!1,getFn:hN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ce={...pN,...mN,...gN,...vN};const yN=/[^ ]+/g;function bN(n=1,a=3){const l=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(yN).length;if(l.has(u))return l.get(u);const d=1/Math.pow(u,.5*n),m=parseFloat(Math.round(d*o)/o);return l.set(u,m),m},clear(){l.clear()}}}class Sh{constructor({getFn:a=Ce.getFn,fieldNormWeight:l=Ce.fieldNormWeight}={}){this.norm=bN(l,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((l,o)=>{this._keysMap[l.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ca(this.docs[0])?this.docs.forEach((a,l)=>{this._addString(a,l)}):this.docs.forEach((a,l)=>{this._addObject(a,l)}),this.norm.clear())}add(a){const l=this.size();ca(a)?this._addString(a,l):this._addObject(a,l)}removeAt(a){this.records.splice(a,1);for(let l=a,o=this.size();l<o;l+=1)this.records[l].i-=1}getValueForItemAtKeyId(a,l){return a[this._keysMap[l]]}size(){return this.records.length}_addString(a,l){if(!wn(a)||Fd(a))return;let o={v:a,i:l,n:this.norm.get(a)};this.records.push(o)}_addObject(a,l){let o={i:l,$:{}};this.keys.forEach((r,u)=>{let d=r.getFn?r.getFn(a):this.getFn(a,r.path);if(wn(d)){if(Ua(d)){let m=[];const p=[{nestedArrIndex:-1,value:d}];for(;p.length;){const{nestedArrIndex:g,value:v}=p.pop();if(wn(v))if(ca(v)&&!Fd(v)){let b={v,i:g,n:this.norm.get(v)};m.push(b)}else Ua(v)&&v.forEach((b,x)=>{p.push({nestedArrIndex:x,value:b})})}o.$[u]=m}else if(ca(d)&&!Fd(d)){let m={v:d,n:this.norm.get(d)};o.$[u]=m}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function x1(n,a,{getFn:l=Ce.getFn,fieldNormWeight:o=Ce.fieldNormWeight}={}){const r=new Sh({getFn:l,fieldNormWeight:o});return r.setKeys(n.map(_1)),r.setSources(a),r.create(),r}function SN(n,{getFn:a=Ce.getFn,fieldNormWeight:l=Ce.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new Sh({getFn:a,fieldNormWeight:l});return u.setKeys(o),u.setIndexRecords(r),u}function Vr(n,{errors:a=0,currentLocation:l=0,expectedLocation:o=0,distance:r=Ce.distance,ignoreLocation:u=Ce.ignoreLocation}={}){const d=a/n.length;if(u)return d;const m=Math.abs(o-l);return r?d+m/r:m?1:d}function _N(n=[],a=Ce.minMatchCharLength){let l=[],o=-1,r=-1,u=0;for(let d=n.length;u<d;u+=1){let m=n[u];m&&o===-1?o=u:!m&&o!==-1&&(r=u-1,r-o+1>=a&&l.push([o,r]),o=-1)}return n[u-1]&&u-o>=a&&l.push([o,u-1]),l}const Hs=32;function xN(n,a,l,{location:o=Ce.location,distance:r=Ce.distance,threshold:u=Ce.threshold,findAllMatches:d=Ce.findAllMatches,minMatchCharLength:m=Ce.minMatchCharLength,includeMatches:p=Ce.includeMatches,ignoreLocation:g=Ce.ignoreLocation}={}){if(a.length>Hs)throw new Error(cN(Hs));const v=a.length,b=n.length,x=Math.max(0,Math.min(o,b));let T=u,C=x;const j=m>1||p,N=j?Array(b):[];let A;for(;(A=n.indexOf(a,C))>-1;){let W=Vr(a,{currentLocation:A,expectedLocation:x,distance:r,ignoreLocation:g});if(T=Math.min(W,T),C=A+v,j){let $=0;for(;$<v;)N[A+$]=1,$+=1}}C=-1;let O=[],M=1,X=v+b;const H=1<<v-1;for(let W=0;W<v;W+=1){let $=0,ne=X;for(;$<ne;)Vr(a,{errors:W,currentLocation:x+ne,expectedLocation:x,distance:r,ignoreLocation:g})<=T?$=ne:X=ne,ne=Math.floor((X-$)/2+$);X=ne;let ge=Math.max(1,x-ne+1),U=d?b:Math.min(x+ne,b)+v,pe=Array(U+2);pe[U+1]=(1<<W)-1;for(let ye=U;ye>=ge;ye-=1){let q=ye-1,z=l[n.charAt(q)];if(j&&(N[q]=+!!z),pe[ye]=(pe[ye+1]<<1|1)&z,W&&(pe[ye]|=(O[ye+1]|O[ye])<<1|1|O[ye+1]),pe[ye]&H&&(M=Vr(a,{errors:W,currentLocation:q,expectedLocation:x,distance:r,ignoreLocation:g}),M<=T)){if(T=M,C=q,C<=x)break;ge=Math.max(1,2*x-C)}}if(Vr(a,{errors:W+1,currentLocation:x,expectedLocation:x,distance:r,ignoreLocation:g})>T)break;O=pe}const J={isMatch:C>=0,score:Math.max(.001,M)};if(j){const W=_N(N,m);W.length?p&&(J.indices=W):J.isMatch=!1}return J}function TN(n){let a={};for(let l=0,o=n.length;l<o;l+=1){const r=n.charAt(l);a[r]=(a[r]||0)|1<<o-l-1}return a}const ac=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class T1{constructor(a,{location:l=Ce.location,threshold:o=Ce.threshold,distance:r=Ce.distance,includeMatches:u=Ce.includeMatches,findAllMatches:d=Ce.findAllMatches,minMatchCharLength:m=Ce.minMatchCharLength,isCaseSensitive:p=Ce.isCaseSensitive,ignoreDiacritics:g=Ce.ignoreDiacritics,ignoreLocation:v=Ce.ignoreLocation}={}){if(this.options={location:l,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:m,isCaseSensitive:p,ignoreDiacritics:g,ignoreLocation:v},a=p?a:a.toLowerCase(),a=g?ac(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const b=(T,C)=>{this.chunks.push({pattern:T,alphabet:TN(T),startIndex:C})},x=this.pattern.length;if(x>Hs){let T=0;const C=x%Hs,j=x-C;for(;T<j;)b(this.pattern.substr(T,Hs),T),T+=Hs;if(C){const N=x-Hs;b(this.pattern.substr(N),N)}}else b(this.pattern,0)}searchIn(a){const{isCaseSensitive:l,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=l?a:a.toLowerCase(),a=o?ac(a):a,this.pattern===a){let j={isMatch:!0,score:0};return r&&(j.indices=[[0,a.length-1]]),j}const{location:u,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,ignoreLocation:v}=this.options;let b=[],x=0,T=!1;this.chunks.forEach(({pattern:j,alphabet:N,startIndex:A})=>{const{isMatch:O,score:M,indices:X}=xN(a,j,N,{location:u+A,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,includeMatches:r,ignoreLocation:v});O&&(T=!0),x+=M,O&&X&&(b=[...b,...X])});let C={isMatch:T,score:T?x/this.chunks.length:1};return T&&r&&(C.indices=b),C}}class ys{constructor(a){this.pattern=a}static isMultiMatch(a){return Zy(a,this.multiRegex)}static isSingleMatch(a){return Zy(a,this.singleRegex)}search(){}}function Zy(n,a){const l=n.match(a);return l?l[1]:null}class EN extends ys{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const l=a===this.pattern;return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class AN extends ys{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class CN extends ys{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const l=a.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class jN extends ys{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const l=!a.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,a.length-1]}}}class NN extends ys{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const l=a.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class wN extends ys{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const l=!a.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,a.length-1]}}}class E1 extends ys{constructor(a,{location:l=Ce.location,threshold:o=Ce.threshold,distance:r=Ce.distance,includeMatches:u=Ce.includeMatches,findAllMatches:d=Ce.findAllMatches,minMatchCharLength:m=Ce.minMatchCharLength,isCaseSensitive:p=Ce.isCaseSensitive,ignoreDiacritics:g=Ce.ignoreDiacritics,ignoreLocation:v=Ce.ignoreLocation}={}){super(a),this._bitapSearch=new T1(a,{location:l,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:m,isCaseSensitive:p,ignoreDiacritics:g,ignoreLocation:v})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class A1 extends ys{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let l=0,o;const r=[],u=this.pattern.length;for(;(o=a.indexOf(this.pattern,l))>-1;)l=o+u,r.push([o,l-1]);const d=!!r.length;return{isMatch:d,score:d?0:1,indices:r}}}const xf=[EN,A1,CN,jN,wN,NN,AN,E1],Xy=xf.length,DN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,kN="|";function MN(n,a={}){return n.split(kN).map(l=>{let o=l.trim().split(DN).filter(u=>u&&!!u.trim()),r=[];for(let u=0,d=o.length;u<d;u+=1){const m=o[u];let p=!1,g=-1;for(;!p&&++g<Xy;){const v=xf[g];let b=v.isMultiMatch(m);b&&(r.push(new v(b,a)),p=!0)}if(!p)for(g=-1;++g<Xy;){const v=xf[g];let b=v.isSingleMatch(m);if(b){r.push(new v(b,a));break}}}return r})}const RN=new Set([E1.type,A1.type]);class BN{constructor(a,{isCaseSensitive:l=Ce.isCaseSensitive,ignoreDiacritics:o=Ce.ignoreDiacritics,includeMatches:r=Ce.includeMatches,minMatchCharLength:u=Ce.minMatchCharLength,ignoreLocation:d=Ce.ignoreLocation,findAllMatches:m=Ce.findAllMatches,location:p=Ce.location,threshold:g=Ce.threshold,distance:v=Ce.distance}={}){this.query=null,this.options={isCaseSensitive:l,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:u,findAllMatches:m,ignoreLocation:d,location:p,threshold:g,distance:v},a=l?a:a.toLowerCase(),a=o?ac(a):a,this.pattern=a,this.query=MN(this.pattern,this.options)}static condition(a,l){return l.useExtendedSearch}searchIn(a){const l=this.query;if(!l)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:u}=this.options;a=r?a:a.toLowerCase(),a=u?ac(a):a;let d=0,m=[],p=0;for(let g=0,v=l.length;g<v;g+=1){const b=l[g];m.length=0,d=0;for(let x=0,T=b.length;x<T;x+=1){const C=b[x],{isMatch:j,indices:N,score:A}=C.search(a);if(j){if(d+=1,p+=A,o){const O=C.constructor.type;RN.has(O)?m=[...m,...N]:m.push(N)}}else{p=0,d=0,m.length=0;break}}if(d){let x={isMatch:!0,score:p/d};return o&&(x.indices=m),x}}return{isMatch:!1,score:1}}}const Tf=[];function ON(...n){Tf.push(...n)}function Ef(n,a){for(let l=0,o=Tf.length;l<o;l+=1){let r=Tf[l];if(r.condition(n,a))return new r(n,a)}return new T1(n,a)}const sc={AND:"$and",OR:"$or"},Af={PATH:"$path",PATTERN:"$val"},Cf=n=>!!(n[sc.AND]||n[sc.OR]),LN=n=>!!n[Af.PATH],zN=n=>!Ua(n)&&b1(n)&&!Cf(n),Qy=n=>({[sc.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function C1(n,a,{auto:l=!0}={}){const o=r=>{let u=Object.keys(r);const d=LN(r);if(!d&&u.length>1&&!Cf(r))return o(Qy(r));if(zN(r)){const p=d?r[Af.PATH]:u[0],g=d?r[Af.PATTERN]:r[p];if(!ca(g))throw new Error(rN(p));const v={keyId:_f(p),pattern:g};return l&&(v.searcher=Ef(g,a)),v}let m={children:[],operator:u[0]};return u.forEach(p=>{const g=r[p];Ua(g)&&g.forEach(v=>{m.children.push(o(v))})}),m};return Cf(n)||(n=Qy(n)),o(n)}function UN(n,{ignoreFieldNorm:a=Ce.ignoreFieldNorm}){n.forEach(l=>{let o=1;l.matches.forEach(({key:r,norm:u,score:d})=>{const m=r?r.weight:null;o*=Math.pow(d===0&&m?Number.EPSILON:d,(m||1)*(a?1:u))}),l.score=o})}function VN(n,a){const l=n.matches;a.matches=[],wn(l)&&l.forEach(o=>{if(!wn(o.indices)||!o.indices.length)return;const{indices:r,value:u}=o;let d={indices:r,value:u};o.key&&(d.key=o.key.src),o.idx>-1&&(d.refIndex=o.idx),a.matches.push(d)})}function IN(n,a){a.score=n.score}function HN(n,a,{includeMatches:l=Ce.includeMatches,includeScore:o=Ce.includeScore}={}){const r=[];return l&&r.push(VN),o&&r.push(IN),n.map(u=>{const{idx:d}=u,m={item:a[d],refIndex:d};return r.length&&r.forEach(p=>{p(u,m)}),m})}class Ki{constructor(a,l={},o){this.options={...Ce,...l},this.options.useExtendedSearch,this._keyStore=new fN(this.options.keys),this.setCollection(a,o)}setCollection(a,l){if(this._docs=a,l&&!(l instanceof Sh))throw new Error(oN);this._myIndex=l||x1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){wn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const l=[];for(let o=0,r=this._docs.length;o<r;o+=1){const u=this._docs[o];a(u,o)&&(this.removeAt(o),o-=1,r-=1,l.push(u))}return l}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:l=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:u,sortFn:d,ignoreFieldNorm:m}=this.options;let p=ca(a)?ca(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return UN(p,{ignoreFieldNorm:m}),u&&p.sort(d),y1(l)&&l>-1&&(p=p.slice(0,l)),HN(p,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const l=Ef(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:m})=>{if(!wn(u))return;const{isMatch:p,score:g,indices:v}=l.searchIn(u);p&&r.push({item:u,idx:d,matches:[{score:g,value:u,norm:m,indices:v}]})}),r}_searchLogical(a){const l=C1(a,this.options),o=(m,p,g)=>{if(!m.children){const{keyId:b,searcher:x}=m,T=this._findMatches({key:this._keyStore.get(b),value:this._myIndex.getValueForItemAtKeyId(p,b),searcher:x});return T&&T.length?[{idx:g,item:p,matches:T}]:[]}const v=[];for(let b=0,x=m.children.length;b<x;b+=1){const T=m.children[b],C=o(T,p,g);if(C.length)v.push(...C);else if(m.operator===sc.AND)return[]}return v},r=this._myIndex.records,u={},d=[];return r.forEach(({$:m,i:p})=>{if(wn(m)){let g=o(l,m,p);g.length&&(u[p]||(u[p]={idx:p,item:m,matches:[]},d.push(u[p])),g.forEach(({matches:v})=>{u[p].matches.push(...v)}))}}),d}_searchObjectList(a){const l=Ef(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:m})=>{if(!wn(d))return;let p=[];o.forEach((g,v)=>{p.push(...this._findMatches({key:g,value:d[v],searcher:l}))}),p.length&&u.push({idx:m,item:d,matches:p})}),u}_findMatches({key:a,value:l,searcher:o}){if(!wn(l))return[];let r=[];if(Ua(l))l.forEach(({v:u,i:d,n:m})=>{if(!wn(u))return;const{isMatch:p,score:g,indices:v}=o.searchIn(u);p&&r.push({score:g,key:a,value:u,idx:d,norm:m,indices:v})});else{const{v:u,n:d}=l,{isMatch:m,score:p,indices:g}=o.searchIn(u);m&&r.push({score:p,key:a,value:u,norm:d,indices:g})}return r}}Ki.version="7.1.0";Ki.createIndex=x1;Ki.parseIndex=SN;Ki.config=Ce;Ki.parseQuery=C1;ON(BN);function Jy(n,a,l,o){if(!a.trim())return[];const r=.3;return new Ki(n,{keys:l,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(p=>({item:p.item,score:p.score??1,matches:(p.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const qN="_breadcrumbs_17or2_1",GN="_list_17or2_11",PN="_item_17or2_21",$N="_separator_17or2_28",YN="_link_17or2_34",FN="_current_17or2_57",Ri={breadcrumbs:qN,list:GN,item:PN,separator:$N,link:YN,current:FN},KN="›";function Zi({segments:n}){return h.jsx("nav",{className:Ri.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:Ri.list,children:n.map((a,l)=>{const o=l===n.length-1;return h.jsxs("li",{className:Ri.item,children:[l>0&&h.jsx("span",{className:Ri.separator,"aria-hidden":"true",children:KN}),a.url&&!o?h.jsx(zf,{className:Ri.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:Ri.current,"aria-current":"page",title:a.label,children:a.label})]},l)})})})}function jf(){jf=function(r,u){return new l(r,void 0,u)};var n=RegExp.prototype,a=new WeakMap;function l(r,u,d){var m=new RegExp(r,u);return a.set(m,d||a.get(r)),ic(m,l.prototype)}function o(r,u){var d=a.get(u);return Object.keys(d).reduce(function(m,p){var g=d[p];if(typeof g=="number")m[p]=r[g];else{for(var v=0;r[g[v]]===void 0&&v+1<g.length;)v++;m[p]=r[g[v]]}return m},Object.create(null))}return(function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),u&&ic(r,u)})(l,RegExp),l.prototype.exec=function(r){var u=n.exec.call(this,r);if(u){u.groups=o(u,this);var d=u.indices;d&&(d.groups=o(d,this))}return u},l.prototype[Symbol.replace]=function(r,u){if(typeof u=="string"){var d=a.get(this);return n[Symbol.replace].call(this,r,u.replace(/\$<([^>]+)>/g,function(p,g){var v=d[g];return"$"+(Array.isArray(v)?v.join("$"):v)}))}if(typeof u=="function"){var m=this;return n[Symbol.replace].call(this,r,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(o(p,m)),u.apply(this,p)})}return n[Symbol.replace].call(this,r,u)},jf.apply(this,arguments)}function ic(n,a){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},ic(n,a)}function Wy(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,o=new Array(a);l<a;l++)o[l]=n[l];return o}function Kd(n,a){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=(function(r,u){if(r){if(typeof r=="string")return Wy(r,u);var d=Object.prototype.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Wy(r,u):void 0}})(n))||a){l&&(n=l);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
87
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ZN=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){K_(o,"element",l)};function l(o,r,u){var d,m;if(u&&u.tagName==="pre"&&o.tagName==="code"){var p=(o==null||(d=o.data)==null?void 0:d.meta)||(o==null||(m=o.properties)==null?void 0:m.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,v,b=(function(H){for(var J,W=Kd(H.properties.className);!(J=W()).done;){var $=J.value;if($.slice(0,9)==="language-")return $.slice(9).toLowerCase()}return null})(o);if(!b&&a.defaultLanguage&&o.properties.className.push("language-"+(b=a.defaultLanguage)),o.properties.className.push("code-highlight"),b)try{var x,T;T=(x=b)!=null&&x.includes("diff-")?b.split("-")[1]:b,g=n.highlight(Rr(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(H){if(!a.ignoreMissing||!/Unknown language/.test(H.message))throw H;g=o}else g=o;g.children=(v=1,function H(J){return J.reduce(function(W,$){if($.type==="text"){var ne=$.value,ge=(ne.match(/\n/g)||"").length;if(ge===0)$.position={start:{line:v,column:1},end:{line:v,column:1}},W.push($);else for(var U,pe=ne.split(`
|
|
88
|
+
`),te=Kd(pe.entries());!(U=te()).done;){var ye=U.value,q=ye[0],z=ye[1];W.push({type:"text",value:q===pe.length-1?z:z+`
|
|
89
|
+
`,position:{start:{line:v+q,column:1},end:{line:v+q,column:1}}})}return v+=ge,W}if(Object.prototype.hasOwnProperty.call($,"children")){var F=v;return $.children=H($.children),W.push($),$.position={start:{line:F,column:1},end:{line:v,column:1}},W}return W.push($),W},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var C,j=(function(H){var J=/{([\d,-]+)}/,W=H.split(",").map(function(ge){return ge.trim()}).join();if(J.test(W)){var $=J.exec(W)[1],ne=X_($);return function(ge){return ne.includes(ge+1)}}return function(){return!1}})(p),N=(function(H){var J=jf(/showLineNumbers=(\d+)/i,{lines:1});if(J.test(H)){var W=J.exec(H);return Number(W.groups.lines)}return 1})(p),A=(function(H){for(var J=new Array(H),W=0;W<H;W++)J[W]={type:"element",tagName:"span",properties:{className:[]},children:[]};return J})(g.position.end.line),O=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],M=function(){var H,J,W=C.value,$=W[0],ne=W[1];ne.properties.className=["code-line"];var ge=Q_(g,function(U){return U.position.start.line<=$+1&&U.position.end.line>=$+1});ne.children=ge.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(b))&&!O.some(function(U){return p.toLowerCase().includes(U)})&&(ne.properties.line=[($+N).toString()],ne.properties.className.push("line-number")),j($)&&ne.properties.className.push("highlight-line"),(b==="diff"||(H=b)!=null&&H.includes("diff-"))&&Rr(ne).substring(0,1)==="-"?ne.properties.className.push("deleted"):(b==="diff"||(J=b)!=null&&J.includes("diff-"))&&Rr(ne).substring(0,1)==="+"&&ne.properties.className.push("inserted")},X=Kd(A.entries());!(C=X()).done;)M();A.length>0&&Rr(A[A.length-1]).trim()===""&&A.pop(),o.children=A}}}})(Z_);const XN="_systemEvent_qvd33_1",QN="_systemTimestamp_qvd33_9",JN="_textEvent_qvd33_13",WN="_toolUseEvent_qvd33_100",ew="_toolUseHeader_qvd33_121",tw="_toolUsePrefix_qvd33_128",nw="_toolUseName_qvd33_133",aw="_toolUseArgs_qvd33_138",sw="_toolResultEvent_qvd33_149",iw="_toolResultHeader_qvd33_155",lw="_toolResultIndicatorOk_qvd33_179",ow="_toolResultIndicatorError_qvd33_186",rw="_toolResultLabel_qvd33_193",cw="_toolResultToggle_qvd33_197",uw="_toolResultCommand_qvd33_203",dw="_toolResultEllipsis_qvd33_213",fw="_toolResultPre_qvd33_217",hw="_errorEvent_qvd33_238",mw="_statusEvent_qvd33_247",pw="_userInputEvent_qvd33_257",gw="_userInputContent_qvd33_264",vw="_defaultEvent_qvd33_281",St={systemEvent:XN,systemTimestamp:QN,textEvent:JN,toolUseEvent:WN,toolUseHeader:ew,toolUsePrefix:tw,toolUseName:nw,toolUseArgs:aw,toolResultEvent:sw,toolResultHeader:iw,toolResultIndicatorOk:lw,toolResultIndicatorError:ow,toolResultLabel:rw,toolResultToggle:cw,toolResultCommand:uw,toolResultEllipsis:dw,toolResultPre:fw,errorEvent:hw,statusEvent:mw,userInputEvent:pw,userInputContent:gw,defaultEvent:vw};function yw({time:n,content:a}){return h.jsxs("div",{className:St.systemEvent,children:[h.jsxs("span",{className:St.systemTimestamp,children:["[",n,"]"]})," ",a]})}function bw({content:n}){return h.jsx("div",{className:St.textEvent,children:h.jsx(wf,{remarkPlugins:[Df],rehypePlugins:[ZN],children:n})})}function Sw({content:n}){let a="",l=n;try{const o=JSON.parse(n);a=o.tool||"",l=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:St.toolUseEvent,children:[h.jsxs("div",{className:St.toolUseHeader,children:[h.jsx("span",{className:St.toolUsePrefix,children:">"}),a?h.jsx("span",{className:St.toolUseName,children:a}):null]}),h.jsx("pre",{className:St.toolUseArgs,children:l})]})}const e0=5;function _w(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const l=a;if(typeof l.command=="string")return l.command;if(typeof l.file_path=="string")return l.file_path;if(typeof l.pattern=="string"){const o=typeof l.path=="string"?` in ${l.path}`:"";return`${l.pattern}${o}`}if(typeof l.path=="string")return l.path;if(typeof l.query=="string")return l.query;try{const o=JSON.stringify(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function xw({content:n,raw:a,toolUseCtx:l}){const[o,r]=S.useState(!1);let u=!1;if(a)try{u=JSON.parse(a).is_error===!0}catch{}const d=n.split(`
|
|
90
|
+
`),m=d.length>e0,p=o?n:d.slice(0,e0).join(`
|
|
91
|
+
`),v=((l==null?void 0:l.tool)??"")||(u?"Tool error":"Tool output"),b=l?_w(l.tool,l.args):"",x=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?St.toolResultIndicatorError:St.toolResultIndicatorOk,"aria-label":u?"error":"success",children:u?"✗":"✓"}),h.jsx("span",{className:St.toolResultLabel,children:v}),m&&h.jsx("span",{className:St.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:St.toolResultEvent,children:[m?h.jsx("button",{className:St.toolResultHeader,onClick:()=>{r(T=>!T)},"aria-expanded":o,children:x}):h.jsx("div",{className:St.toolResultHeader,children:x}),b&&h.jsx("div",{className:St.toolResultCommand,children:b}),h.jsxs("pre",{className:St.toolResultPre,children:[p,!o&&m&&h.jsx("span",{className:St.toolResultEllipsis,children:"…"})]})]})}function Tw({content:n}){return h.jsxs("div",{className:St.errorEvent,children:["Error: ",n]})}function Ew({content:n}){return h.jsxs("div",{className:St.statusEvent,children:["--- ",n," ---"]})}function Aw({content:n}){return h.jsx("div",{className:St.userInputEvent,children:h.jsx("span",{className:St.userInputContent,children:n})})}function Cw({content:n}){return h.jsx("div",{className:St.defaultEvent,children:n})}function j1({event:n,toolUseCtx:a}){const l=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(yw,{time:l,content:n.content});case"text":case"output":return h.jsx(bw,{content:n.content});case"tool_use":return h.jsx(Sw,{content:n.content});case"tool_result":return h.jsx(xw,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(Tw,{content:n.content});case"status":return h.jsx(Ew,{content:n.content});case"user_input":return h.jsx(Aw,{content:n.content});default:return h.jsx(Cw,{content:n.content})}}const jw="_overlay_cmicx_1",Nw="_dialog_cmicx_11",ww="_title_cmicx_30",Dw="_description_cmicx_38",kw="_actions_cmicx_45",Mw="_cancelButton_cmicx_52",Rw="_confirmButton_cmicx_79",Us={overlay:jw,dialog:Nw,title:ww,description:Dw,actions:kw,cancelButton:Mw,confirmButton:Rw};function yc({isOpen:n,title:a,description:l,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),m=S.useId();return h.jsx(gs,{children:n&&h.jsx(Yn.div,{className:Us.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:u,onKeyDown:p=>{p.key==="Escape"&&u()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":l?m:void 0,children:h.jsxs(Yn.div,{className:Us.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:p=>p.stopPropagation(),children:[h.jsx("h3",{id:d,className:Us.title,children:a}),l&&h.jsx("p",{id:m,className:Us.description,children:l}),h.jsxs("div",{className:Us.actions,children:[h.jsx("button",{type:"button",className:Us.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:Us.confirmButton,onClick:r,children:o})]})]})})})}const Bw="_spinner_13c8l_1",Ow="_spin_13c8l_1",Lw="_sm_13c8l_14",zw="_md_13c8l_20",Uw="_lg_13c8l_26",t0={spinner:Bw,spin:Ow,sm:Lw,md:zw,lg:Uw};function n0({size:n="md",className:a,label:l="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${t0.spinner} ${t0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const Nf={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function ps(n){return n==="blocked"?Nf.blocked:Nf[_h(n)]}const Vw={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function Iw(n){return Vw[_h(n)]??"statusPending"}const Hw=["working","paused","failed","not_started","blocked","complete"],a0=["not_started","working","paused","complete","failed"],qw={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function _h(n){return n in Nf&&n!=="blocked"?n:qw[n]??"not_started"}const Gw={not_started:"--text-tertiary",working:"--accent-green",paused:"--accent-yellow",complete:"--accent-green",failed:"--accent-red",pending:"--text-tertiary",assigned:"--text-tertiary",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",waiting_input:"--accent-yellow"},Pw="_container_15oob_1",$w="_header_15oob_5",Yw="_searchInput_15oob_17",Fw="_searchHighlight_15oob_50",Kw="_addButton_15oob_56",Zw="_createForm_15oob_83",Xw="_createInput_15oob_89",Qw="_createButton_15oob_120",Jw="_creatingHint_15oob_161",Ww="_projectRow_15oob_170",eD="_selected_15oob_188",tD="_expandArrow_15oob_193",nD="_expanded_15oob_200",aD="_projectName_15oob_204",sD="_taskCount_15oob_208",iD="_newTaskButton_15oob_214",lD="_taskRow_15oob_241",oD="_taskStatusIcon_15oob_271",rD="_taskTitle_15oob_275",cD="_dependencyBadge_15oob_282",uD="_blockedBadge_15oob_294",dD="_leafSpacer_15oob_299",fD="_childCountBadge_15oob_304",hD="_addChildButton_15oob_317",mD="_emptyCta_15oob_366",pD="_ctaDescription_15oob_379",gD="_ctaButton_15oob_385",vD="_emptyTaskCta_15oob_420",yD="_headerActions_15oob_425",bD="_groupToggle_15oob_431",SD="_groupToggleActive_15oob_458",_D="_statusGroupHeader_15oob_462",xD="_statusGroupIcon_15oob_481",TD="_statusGroupLabel_15oob_485",ED="_statusGroupCount_15oob_490",AD="_createTaskLink_15oob_503",Ne={container:Pw,header:$w,searchInput:Yw,searchHighlight:Fw,addButton:Kw,createForm:Zw,createInput:Xw,createButton:Qw,creatingHint:Jw,projectRow:Ww,selected:eD,expandArrow:tD,expanded:nD,projectName:aD,taskCount:sD,newTaskButton:iD,taskRow:lD,taskStatusIcon:oD,taskTitle:rD,dependencyBadge:cD,blockedBadge:uD,leafSpacer:dD,childCountBadge:fD,addChildButton:hD,emptyCta:mD,ctaDescription:pD,ctaButton:gD,emptyTaskCta:vD,headerActions:yD,groupToggle:bD,groupToggleActive:SD,statusGroupHeader:_D,statusGroupIcon:xD,statusGroupLabel:TD,statusGroupCount:ED,createTaskLink:AD};function CD(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),l=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=l[l.length-1],[u,d]=a[o];u<=r[1]+1?r[1]=Math.max(r[1],d):l.push([u,d])}return l}function N1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const l=CD(a),o=[];let r=0;for(const[u,d]of l)u>r&&o.push(h.jsx("span",{children:n.slice(r,u)},`p${r}`)),o.push(h.jsx("mark",{className:Ne.searchHighlight,children:n.slice(u,d+1)},`m${u}`)),r=d+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const jD=[{name:"name",weight:2},{name:"description",weight:1}],ND=[{name:"title",weight:2},{name:"description",weight:1}],w1=34,wD=16,D1="grackle-group-by-status";function s0(){try{return localStorage.getItem(D1)==="true"}catch{return!1}}function DD(n){try{localStorage.setItem(D1,String(n))}catch{}}function kD(n,a){const l=new Map;for(const u of n){const m=u.dependsOn.length>0&&u.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":u.status,p=l.get(m);p?p.push(u):l.set(m,[u])}const o=[],r=new Set;for(const u of Hw){r.add(u);const d=l.get(u);if(d&&d.length>0){d.sort((p,g)=>p.sortOrder-g.sortOrder);const m=ps(u);o.push({status:u,label:m.label,style:m,tasks:d})}}for(const[u,d]of l)if(!r.has(u)&&d.length>0){d.sort((p,g)=>p.sortOrder-g.sortOrder);const m=ps(u);o.push({status:u,label:m.label,style:m,tasks:d})}return o}function MD({group:n,isExpanded:a,onToggle:l,selectedTaskId:o,navigate:r,titleHighlights:u}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:Ne.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:l,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),l())},children:[h.jsx("span",{className:`${Ne.expandArrow} ${a?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:Ne.statusGroupLabel,children:n.label}),h.jsx("span",{className:Ne.statusGroupCount,children:n.tasks.length})]}),h.jsx(gs,{children:a&&h.jsx(Yn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const m=ps(d.status),p=o===d.id;return h.jsxs("div",{onClick:()=>r(fs(d.id)),className:`${Ne.taskRow} ${p?Ne.selected:""}`,style:{"--task-indent":`${w1}px`},"data-task-id":d.id,children:[h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:m.color},children:m.icon}),h.jsx("span",{className:Ne.taskTitle,title:d.title,children:h.jsx(N1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function RD(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):l.push(o);for(const o of a.values())o.children.sort((r,u)=>r.sortOrder-u.sortOrder);return l.sort((o,r)=>o.sortOrder-r.sortOrder)}function k1({node:n,depth:a,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p}){const g=ps(n.status),v=n.dependsOn.length>0&&n.dependsOn.some(j=>m.get(j)!=="complete"),b=l.has(n.id),x=n.children.length>0,T=r===n.id,C=w1+a*wD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(fs(n.id)),className:`${Ne.taskRow} ${T?Ne.selected:""}`,style:{"--task-indent":`${C}px`},"data-task-id":n.id,children:[x&&h.jsx("span",{className:`${Ne.expandArrow} ${b?Ne.expanded:""}`,role:"button",tabIndex:0,"aria-label":b?"Collapse task":"Expand task",onClick:j=>{j.stopPropagation(),o(n.id)},onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),j.stopPropagation(),o(n.id))},children:"▸"}),!x&&h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:Ne.taskTitle,title:n.title,children:h.jsx(N1,{text:n.title,indices:p.get(n.id)})}),x&&h.jsxs("span",{className:Ne.childCountBadge,children:[n.children.filter(j=>j.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Ne.dependencyBadge} ${v?Ne.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),a<nN&&h.jsx("button",{onClick:j=>{j.stopPropagation(),u(Ps(d,n.id))},title:"Add child task","aria-label":"Add child task",className:Ne.addChildButton,children:"+"})]}),h.jsx(gs,{children:x&&b&&h.jsx(Yn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(j=>h.jsx(k1,{node:j,depth:a+1,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p},j.id))})})]})}function BD(){const{projects:n,tasks:a,loadTasks:l,createProject:o,projectCreating:r}=nn(),u=na(),[d,m]=S.useState(new Set),[p,g]=S.useState(new Set),[v,b]=S.useState(new Set),[x,T]=S.useState(!1),[C,j]=S.useState(""),[N,A]=S.useState(s0),[O,M]=S.useState(s0),[X,H]=S.useState(new Map),J=()=>{const P=!N;DD(P),A(P),P&&(M(!0),H(new Map))},W=(P,I)=>{const De=`${P}:${I}`;H(Ye=>{const vt=new Map(Ye),xt=vt.has(De)?vt.get(De):O;return vt.set(De,!xt),vt})},$=(P,I)=>{const De=`${P}:${I}`;return X.has(De)?X.get(De):O},ne=dn("/tasks/:taskId/*"),ge=dn("/projects/:projectId"),U=(ne==null?void 0:ne.params.taskId)!=="new"?ne==null?void 0:ne.params.taskId:void 0,pe=ge==null?void 0:ge.params.projectId,te=S.useRef(d);te.current=d;const ye=S.useMemo(()=>new Map(a.map(P=>[P.id,P.status])),[a]),q=P=>{m(I=>{const De=new Set(I);return De.has(P)?De.delete(P):(De.add(P),l(P)),De})},z=P=>{g(I=>{const De=new Set(I);return De.has(P)?(De.delete(P),b(Ye=>new Set(Ye).add(P))):(De.add(P),b(Ye=>{const vt=new Set(Ye);return vt.delete(P),vt})),De})};S.useEffect(()=>{const P=new Set(a.filter(I=>I.parentTaskId).map(I=>I.parentTaskId));P.size>0&&g(I=>{const De=new Set(I);for(const Ye of P)v.has(Ye)||De.add(Ye);return De})},[a,v]),S.useEffect(()=>{pe&&!te.current.has(pe)&&(m(P=>new Set(P).add(pe)),l(pe))},[pe,l]);const F=()=>{!C.trim()||r||(o(C.trim()),j(""),T(!1))},[ee,ke]=S.useState(""),{directMatchTaskIds:je,treeMatchTaskIds:Pe,visibleProjectIds:we,matchedProjectIds:_e,titleHighlights:Ae}=S.useMemo(()=>{if(!ee.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const P=Jy(n,ee,jD),I=Jy(a,ee,ND),De=new Set(P.map(Ze=>Ze.item.id)),Ye=new Set(I.map(Ze=>Ze.item.id)),vt=new Map;for(const Ze of I){const ze=Ze.matches.find(Sn=>Sn.key==="title");ze&&vt.set(Ze.item.id,ze.indices)}const xt=new Set(De);for(const Ze of I)xt.add(Ze.item.projectId);const Gt=new Set(Ye),We=new Map(a.map(Ze=>[Ze.id,Ze]));for(const Ze of[...Ye]){let ze=We.get(Ze);for(;ze!=null&&ze.parentTaskId;)Gt.add(ze.parentTaskId),ze=We.get(ze.parentTaskId)}return{directMatchTaskIds:Ye,treeMatchTaskIds:Gt,visibleProjectIds:xt,matchedProjectIds:De,titleHighlights:vt}},[ee,n,a]),Q=S.useRef(new Set);return S.useEffect(()=>{if(ee.trim())for(const P of n)!d.has(P.id)&&!Q.current.has(P.id)&&(Q.current.add(P.id),l(P.id))},[ee,n,d,l]),h.jsxs("div",{className:Ne.container,children:[h.jsxs("div",{className:Ne.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:Ne.headerActions,children:[h.jsx("button",{className:`${Ne.groupToggle} ${N?Ne.groupToggleActive:""}`,onClick:J,"aria-label":N?"Switch to tree view":"Group tasks by status","aria-pressed":N,title:N?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:Ne.addButton,onClick:()=>T(!x),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:ee,onChange:P=>ke(P.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:Ne.searchInput,"data-testid":"sidebar-search"}),x&&h.jsxs("div",{className:Ne.createForm,children:[h.jsx("input",{type:"text",value:C,onChange:P=>j(P.target.value),onKeyDown:P=>P.key==="Enter"&&F(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:Ne.createInput}),h.jsx("button",{onClick:F,className:Ne.createButton,disabled:r,children:r?h.jsx(n0,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:Ne.creatingHint,children:[h.jsx(n0,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!x&&h.jsxs("div",{className:Ne.emptyCta,children:[h.jsx("button",{className:Ne.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:Ne.ctaDescription,children:"Organize your work into projects"})]}),n.map(P=>{if(we&&!we.has(P.id))return null;const I=je!==null,De=d.has(P.id)||I,Ye=a.filter(ze=>ze.projectId===P.id),vt=(_e==null?void 0:_e.has(P.id))??!1,xt=I&&!vt?N?je:Pe:null,Gt=xt?Ye.filter(ze=>xt.has(ze.id)):Ye,We=pe===P.id,Ze=De&&!N?RD(Gt):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{We?q(P.id):(De||q(P.id),u(io(P.id)))},className:`${Ne.projectRow} ${We?Ne.selected:""}`,children:[h.jsx("span",{className:`${Ne.expandArrow} ${De?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.projectName,title:P.name,children:P.name}),h.jsx("span",{className:Ne.taskCount,children:Ye.length>0&&`${Ye.filter(ze=>ze.status==="complete").length}/${Ye.length}`}),h.jsx("button",{onClick:ze=>{ze.stopPropagation(),u(Ps(P.id))},title:"New task",className:Ne.newTaskButton,children:"+"})]}),h.jsx(gs,{children:De&&h.jsxs(Yn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[N?kD(Gt,ye).map(ze=>h.jsx(MD,{group:ze,isExpanded:$(P.id,ze.status),onToggle:()=>W(P.id,ze.status),selectedTaskId:U,navigate:u,titleHighlights:Ae},ze.status)):Ze.map(ze=>h.jsx(k1,{node:ze,depth:0,expandedTasks:p,toggleTask:z,selectedTaskId:U,navigate:u,projectId:P.id,taskStatusById:ye,titleHighlights:Ae},ze.id)),Gt.length===0&&h.jsx("div",{className:Ne.emptyTaskCta,children:h.jsx("button",{className:Ne.createTaskLink,onClick:()=>u(Ps(P.id)),children:"+ Create Task"})})]})})]},P.id)})]})}const OD="_container_lovia_1",LD="_content_lovia_40",i0={container:OD,content:LD},zD=320,M1=220,R1=600,B1="grackle-sidebar-width";function UD(){try{const n=localStorage.getItem(B1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=M1&&a<=R1)return a}}catch{}return zD}function VD(n){try{localStorage.setItem(B1,String(n))}catch{}}function ID(){const[n]=S.useState(UD),a=S.useRef(null);return S.useEffect(()=>{const l=a.current;if(!l)return;const o=new ResizeObserver(r=>{for(const u of r){const d=u.borderBoxSize[0];if(d){const m=Math.round(d.inlineSize);m>=M1&&m<=R1&&VD(m)}}});return o.observe(l),()=>{o.disconnect()}},[]),h.jsx("div",{className:i0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:i0.content,children:h.jsx(BD,{})})})}const HD="_bar_8ghh5_1",qD="_barColumn_8ghh5_32",GD="_barRow_8ghh5_63",PD="_input_8ghh5_74",$D="_inputSmall_8ghh5_109",YD="_select_8ghh5_178",FD="_btnPrimary_8ghh5_214",KD="_btnDanger_8ghh5_245",ZD="_btnGhost_8ghh5_284",XD="_badge_8ghh5_312",QD="_statusText_8ghh5_322",JD="_statusCompleted_8ghh5_327",WD="_statusFailed_8ghh5_331",ek="_statusBlocked_8ghh5_335",tk="_hintText_8ghh5_340",nk="_creatingHint_8ghh5_345",ak="_errorHint_8ghh5_353",sk="_disconnectHint_8ghh5_359",fe={bar:HD,barColumn:qD,barRow:GD,input:PD,inputSmall:$D,select:YD,btnPrimary:FD,btnDanger:KD,btnGhost:ZD,badge:XD,statusText:QD,statusCompleted:JD,statusFailed:WD,statusBlocked:ek,hintText:tk,creatingHint:nk,errorHint:ak,disconnectHint:sk};function l0({value:n,onChange:a,testId:l}){return h.jsxs("select",{"data-testid":l,value:n,onChange:o=>a(o.target.value),className:fe.select,children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"})]})}function o0(n,a){if(!n)return!1;const l=a.find(o=>o.id===n);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function r0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:fe.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function ik(){const{spawn:n,sendInput:a,kill:l,sessions:o,tasks:r,environments:u,personas:d,addEnvironment:m,provisionEnvironment:p,codespaces:g,codespaceError:v,codespaceListError:b,codespaceCreating:x,listCodespaces:T,createCodespace:C}=nn(),{showToast:j}=mo(),N=na(),[A]=Uf(),O=dn("/sessions/:sessionId"),M=dn("/tasks/:taskId"),X=dn("/tasks/:taskId/stream"),H=dn("/tasks/:taskId/findings"),J=dn("/tasks/:taskId/edit"),W=dn("/sessions/new"),$=dn("/environments/new"),ne=dn("/projects/:projectId"),ge=dn("/tasks/new"),U=dn("/"),pe=dn("/settings/*"),te=O==null?void 0:O.params.sessionId,ye=(M==null?void 0:M.params.taskId)??(X==null?void 0:X.params.taskId)??(H==null?void 0:H.params.taskId),q=!!W,z=!!$,F=!!ne,ee=!!ge,ke=!!J,je=!!U&&!q&&!z&&!F&&!ee,Pe=!!pe,we=q?A.get("env")??"":"",_e=q?A.get("runtime")??"claude-code":"claude-code",[Ae,Q]=S.useState(""),[P,I]=S.useState(q?_e:"claude-code"),[De,Ye]=S.useState(""),vt=be=>{if(Ye(be),be){const re=d.find(ie=>ie.id===be);re!=null&&re.runtime&&I(re.runtime)}},[xt,Gt]=S.useState(""),[We,Ze]=S.useState("local"),[ze,Sn]=S.useState("claude-code"),[_n,Zn]=S.useState(""),[an,Xn]=S.useState(""),[Z,le]=S.useState(""),[ce,de]=S.useState(""),[Te,Ee]=S.useState(""),[et,Le]=S.useState(""),[ot,Dt]=S.useState(""),[Tt,Lt]=S.useState(""),[rt,Et]=S.useState(""),[cn,yt]=S.useState("pick");S.useEffect(()=>{q&&I(_e)},[q,_e]);const Yt=te?o.find(be=>be.id===te):void 0,Ft=ye?r.find(be=>be.id===ye):void 0,bs=(Ft==null?void 0:Ft.latestSessionId)||void 0,ae=bs?o.find(be=>be.id===bs):void 0,Re=Ft?Ft.dependsOn.some(be=>{const re=r.find(ie=>ie.id===be);return re&&re.status!=="complete"}):!1;if(je||Pe)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a session or click + to start"})});if(ke||ee)return h.jsx(h.Fragment,{});if(z){const be=se=>{if(!se.trim())return!0;const At=Number(se);return Number.isInteger(At)&&At>=1&&At<=65535},re=()=>!(!xt.trim()||We==="ssh"&&!_n.trim()||We==="codespace"&&!et.trim()||(We==="local"||We==="ssh")&&!be(an)),ie=()=>{if(!re())return;const se={};if(We==="local"){if(_n.trim()&&(se.host=_n.trim()),an.trim()){const At=Number(an);Number.isInteger(At)&&(se.port=At)}}else if(We==="ssh"){if(se.host=_n.trim(),Z.trim()&&(se.user=Z.trim()),an.trim()){const At=Number(an);Number.isInteger(At)&&(se.sshPort=At)}ot.trim()&&(se.identityFile=ot.trim())}else We==="docker"?(ce.trim()&&(se.image=ce.trim()),Te.trim()&&(se.repo=Te.trim())):We==="codespace"&&(se.codespaceName=et.trim());m(xt.trim(),We,se,ze),j("Environment added successfully","success"),Gt(""),Ze("local"),Sn("claude-code"),Zn(""),Xn(""),le(""),de(""),Ee(""),Le(""),Dt(""),Lt(""),Et(""),yt("pick"),N(Ii,{replace:!0})};return h.jsxs("div",{className:fe.barColumn,children:[h.jsxs("div",{className:fe.barRow,children:[h.jsx("span",{className:fe.badge,children:"new env"}),h.jsx("input",{type:"text",value:xt,onChange:se=>Gt(se.target.value),placeholder:"Environment name...",autoFocus:!0,className:fe.input}),h.jsxs("select",{value:We,onChange:se=>{Ze(se.target.value),se.target.value==="codespace"&&(T(),yt("pick"),Le(""))},className:fe.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx(l0,{value:ze,onChange:Sn,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:ie,disabled:!re(),className:fe.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:fe.barRow,children:[We==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:_n,onChange:se=>Zn(se.target.value),placeholder:"Host (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:an,onChange:se=>Xn(se.target.value),placeholder:"Port (optional)...",className:fe.inputSmall})]}),We==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:_n,onChange:se=>Zn(se.target.value),placeholder:"Host (required)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:Z,onChange:se=>le(se.target.value),placeholder:"User (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:an,onChange:se=>Xn(se.target.value),placeholder:"SSH port (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:ot,onChange:se=>Dt(se.target.value),placeholder:"Identity file (optional)...",className:fe.inputSmall})]}),We==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ce,onChange:se=>de(se.target.value),placeholder:"Image (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:Te,onChange:se=>Ee(se.target.value),placeholder:"Repo (optional)...",className:fe.inputSmall})]}),We==="codespace"&&cn==="pick"&&h.jsxs(h.Fragment,{children:[!b&&h.jsxs("select",{value:et,onChange:se=>{se.target.value==="__create__"?(yt("create"),Le("")):(Le(se.target.value),se.target.value&&!xt.trim()&&Gt(se.target.value))},disabled:x,className:fe.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(se=>h.jsxs("option",{value:se.name,children:[se.name," (",se.repository,") — ",se.state]},se.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),x&&h.jsx("span",{className:fe.creatingHint,children:"Creating codespace..."}),b&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.errorHint,children:b}),h.jsx("input",{type:"text",value:et,onChange:se=>Le(se.target.value),placeholder:"Or enter codespace name manually...",className:fe.inputSmall})]}),v&&!b&&h.jsx("span",{className:fe.errorHint,children:v})]}),We==="codespace"&&cn==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Tt,onChange:se=>Lt(se.target.value),placeholder:"owner/repo",className:fe.inputSmall}),h.jsx("input",{type:"text",value:rt,onChange:se=>Et(se.target.value),placeholder:"Machine type (optional)...",className:fe.inputSmall}),h.jsx("button",{onClick:()=>{Tt.trim()&&(C(Tt.trim(),rt.trim()||void 0),yt("pick"),Lt(""),Et(""))},disabled:!Tt.trim(),className:fe.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{yt("pick"),Lt(""),Et("")},className:fe.btnGhost,children:"Cancel"})]})]})]})}if(F)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a task or click + to create one"})});if(ye&&Ft){if(Ft.status==="not_started"){const be=Re?Ft.dependsOn.map(re=>r.find(ie=>ie.id===re)).filter(re=>re&&re.status!=="complete").map(re=>re.title):[];return h.jsx("div",{className:fe.bar,children:Re?h.jsxs("span",{className:fe.statusBlocked,children:["Blocked by: ",be.join(", ")]}):h.jsx("span",{className:fe.hintText,children:"Use the buttons above to start or manage this task"})})}if(Ft.status==="working"||Ft.status==="paused"){if((ae==null?void 0:ae.status)==="idle"){const re=ae.environmentId,ie=o0(re,u),se=At=>{At.preventDefault();const Rn=Ft.latestSessionId||bs;!Ae.trim()||!Rn||ie||(a(Rn,Ae),Q(""))};return h.jsxs("form",{onSubmit:se,className:fe.bar,children:[ie&&re&&h.jsx(r0,{environmentId:re,onReconnect:p}),h.jsx("input",{type:"text",value:Ae,onChange:At=>Q(At.target.value),placeholder:"Type a message...",autoFocus:!ie,disabled:ie,className:fe.input}),h.jsx("span",{title:ie?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ae.trim()||ie,className:fe.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input})})}if(Ft.status==="complete")return h.jsxs("div",{className:fe.bar,children:[h.jsx("span",{className:`${fe.statusText} ${fe.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>N(Ps(Ft.projectId)),className:fe.btnPrimary,children:"+ New Task"})]});if(Ft.status==="failed")return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:`${fe.statusText} ${fe.statusFailed}`,children:"Task failed"})})}if(q){const be=re=>{re.preventDefault(),!(!Ae.trim()||!we)&&(n(we,Ae,void 0,P,De),j("Session started","success"),Q(""),Ye(""))};return h.jsxs("form",{onSubmit:be,className:fe.bar,children:[h.jsx("span",{className:fe.badge,children:"new chat"}),h.jsx("input",{type:"text",value:Ae,onChange:re=>Q(re.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:fe.input}),h.jsx(l0,{value:P,onChange:I,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:De,onChange:re=>vt(re.target.value),className:fe.select,children:[h.jsx("option",{value:"",children:"No persona"}),d.map(re=>h.jsx("option",{value:re.id,children:re.name},re.id))]}),h.jsx("button",{type:"submit",disabled:!Ae.trim()||!we,className:fe.btnPrimary,children:"Go"})]})}if(te){const be=(Yt==null?void 0:Yt.status)==="running",re=(Yt==null?void 0:Yt.status)==="idle",ie=Yt!==void 0&&["completed","failed","interrupted"].includes(Yt.status);if(be)return h.jsxs("div",{className:fe.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input}),h.jsx("button",{onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]});if(re){const se=o0(Yt.environmentId,u),At=Rn=>{Rn.preventDefault(),!(!Ae.trim()||se)&&(a(te,Ae),Q(""))};return h.jsxs("form",{onSubmit:At,className:fe.bar,children:[se&&Yt.environmentId&&h.jsx(r0,{environmentId:Yt.environmentId,onReconnect:p}),h.jsx("input",{type:"text",value:Ae,onChange:Rn=>Q(Rn.target.value),placeholder:"Type a message...",autoFocus:!se,disabled:se,className:fe.input}),h.jsx("span",{title:se?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ae.trim()||se,className:fe.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]})}if(ie)return h.jsxs("div",{className:fe.bar,children:[h.jsxs("span",{className:`${fe.statusText} ${fe.hintText}`,children:["Session ",Yt.status]}),h.jsx("button",{onClick:()=>N(O0(Yt.environmentId,Yt.runtime)),className:fe.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Loading..."})})}const lk="_toast_da8ll_1",ok="_success_da8ll_18",rk="_icon_da8ll_22",ck="_error_da8ll_25",uk="_warning_da8ll_32",dk="_info_da8ll_38",fk="_message_da8ll_53",hk="_close_da8ll_60",$l={toast:lk,success:ok,icon:rk,error:ck,warning:uk,info:dk,message:fk,close:hk},mk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function pk({toast:n,onDismiss:a}){return S.useEffect(()=>{const l=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(l)},[n.id,n.duration,a]),h.jsxs(Yn.div,{className:`${$l.toast} ${$l[n.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[h.jsx("span",{className:$l.icon,"aria-hidden":"true",children:mk[n.variant]}),h.jsx("span",{className:$l.message,children:n.message}),h.jsx("button",{type:"button",className:$l.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const gk="_container_qqse2_1",vk={container:gk};function yk(){const{toasts:n,dismissToast:a}=mo();return h.jsx("div",{className:vk.container,"data-testid":"toast-container",children:h.jsx(gs,{children:n.map(l=>h.jsx(pk,{toast:l,onDismiss:a},l.id))})})}function bk(n,a){const l=S.useRef(null);S.useEffect(()=>{const o=l.current;if(l.current=n,o===null)return;const r=new Map;for(const d of o)r.set(d.id,d);const u=new Set;for(const d of n){u.add(d.id);const m=r.get(d.id);m&&m.status!==d.status&&(d.status==="connecting"||d.status==="sleeping"||(d.status==="connected"?a("Environment connected","success"):d.status==="error"?a("Environment provision failed","error"):d.status==="disconnected"&&(m.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))))}for(const d of o)u.has(d.id)||a("Environment removed","info")},[n,a])}const Sk="_panelContainer_2zqh5_1",_k="_emptyState_2zqh5_8",xk="_fadeIn_2zqh5_1",Tk="_projectSummary_2zqh5_17",Ek="_projectSummaryTitle_2zqh5_28",Ak="_projectSummarySubtitle_2zqh5_32",Ck="_header_2zqh5_36",jk="_headerInfo_2zqh5_69",Nk="_killButton_2zqh5_75",wk="_headerTitle_2zqh5_104",Dk="_headerActions_2zqh5_119",kk="_taskStatusBadge_2zqh5_126",Mk="_taskBranch_2zqh5_135",Rk="_taskBlockedBadge_2zqh5_141",Bk="_btnPrimary_2zqh5_149",Ok="_btnDanger_2zqh5_180",Lk="_btnGhost_2zqh5_219",zk="_rejectInput_2zqh5_245",Uk="_tabBar_2zqh5_275",Vk="_tab_2zqh5_275",Ik="_active_2zqh5_301",Hk="_eventScroll_2zqh5_306",qk="_tabContent_2zqh5_312",Gk="_noContext_2zqh5_317",Pk="_overviewContent_2zqh5_323",$k="_overviewDashboard_2zqh5_332",Yk="_overviewHero_2zqh5_338",Fk="_statusBadge_2zqh5_345",Kk="_statusPending_2zqh5_357",Zk="_statusAssigned_2zqh5_362",Xk="_statusInProgress_2zqh5_367",Qk="_statusReview_2zqh5_372",Jk="_statusDone_2zqh5_377",Wk="_statusFailed_2zqh5_382",eM="_statusWaitingInput_2zqh5_387",tM="_overviewBranchPill_2zqh5_392",nM="_branchLink_2zqh5_407",aM="_overviewSection_2zqh5_418",sM="_overviewLabel_2zqh5_424",iM="_overviewValue_2zqh5_431",lM="_overviewMuted_2zqh5_436",oM="_overviewMarkdown_2zqh5_442",rM="_envRow_2zqh5_511",cM="_envDot_2zqh5_517",uM="_envDotGreen_2zqh5_524",dM="_envDotYellow_2zqh5_528",fM="_envDotRed_2zqh5_532",hM="_envDotGray_2zqh5_536",mM="_depList_2zqh5_540",pM="_depItem_2zqh5_546",gM="_depBlocked_2zqh5_553",vM="_depDone_2zqh5_557",yM="_timeline_2zqh5_561",bM="_timelineRow_2zqh5_567",SM="_timelineKey_2zqh5_574",_M="_timelineValue_2zqh5_580",xM="_timelineDelta_2zqh5_584",TM="_reviewNotes_2zqh5_595",EM="_overviewDescription_2zqh5_606",AM="_waitingMessage_2zqh5_612",CM="_errorMessage_2zqh5_616",jM="_eventOverflowWarning_2zqh5_620",NM="_attemptSelector_2zqh5_634",wM="_attemptLabel_2zqh5_650",DM="_attemptButton_2zqh5_654",kM="_attemptActive_2zqh5_671",MM="_attemptStatus_2zqh5_677",RM="_emptyCta_2zqh5_683",BM="_ctaTitle_2zqh5_695",OM="_ctaDescription_2zqh5_701",LM="_ctaButton_2zqh5_708",zM="_ctaLink_2zqh5_743",UM="_projectHeader_2zqh5_757",VM="_projectName_2zqh5_782",IM="_projectMeta_2zqh5_795",HM="_metaRow_2zqh5_803",qM="_metaLabel_2zqh5_816",GM="_metaValue_2zqh5_831",PM="_metaPlaceholder_2zqh5_841",$M="_editButton_2zqh5_846",YM="_editInput_2zqh5_862",FM="_editTextarea_2zqh5_894",KM="_editSelect_2zqh5_930",ZM="_archiveButton_2zqh5_963",XM="_repoLink_2zqh5_993",QM="_metaValueClickable_2zqh5_1003",JM="_editHint_2zqh5_1022",WM="_editError_2zqh5_1031",eR="_editInputInvalid_2zqh5_1038",tR="_unsavedDot_2zqh5_1043",nR="_metaToggle_2zqh5_1051",aR="_metaToggleArrow_2zqh5_1072",sR="_metaToggleArrowOpen_2zqh5_1077",iR="_progressBarContainer_2zqh5_1081",lR="_progressBar_2zqh5_1081",oR="_progressFill_2zqh5_1097",rR="_progressLabel_2zqh5_1104",cR="_metaTimestamps_2zqh5_1111",uR="_metaTimestamp_2zqh5_1111",dR="_editFieldWrapper_2zqh5_1133",D={panelContainer:Sk,emptyState:_k,fadeIn:xk,projectSummary:Tk,projectSummaryTitle:Ek,projectSummarySubtitle:Ak,header:Ck,headerInfo:jk,killButton:Nk,headerTitle:wk,headerActions:Dk,taskStatusBadge:kk,taskBranch:Mk,taskBlockedBadge:Rk,btnPrimary:Bk,btnDanger:Ok,btnGhost:Lk,rejectInput:zk,tabBar:Uk,tab:Vk,active:Ik,eventScroll:Hk,tabContent:qk,noContext:Gk,overviewContent:Pk,overviewDashboard:$k,overviewHero:Yk,statusBadge:Fk,statusPending:Kk,statusAssigned:Zk,statusInProgress:Xk,statusReview:Qk,statusDone:Jk,statusFailed:Wk,statusWaitingInput:eM,overviewBranchPill:tM,branchLink:nM,overviewSection:aM,overviewLabel:sM,overviewValue:iM,overviewMuted:lM,overviewMarkdown:oM,envRow:rM,envDot:cM,envDotGreen:uM,envDotYellow:dM,envDotRed:fM,envDotGray:hM,depList:mM,depItem:pM,depBlocked:gM,depDone:vM,timeline:yM,timelineRow:bM,timelineKey:SM,timelineValue:_M,timelineDelta:xM,reviewNotes:TM,overviewDescription:EM,waitingMessage:AM,errorMessage:CM,eventOverflowWarning:jM,attemptSelector:NM,attemptLabel:wM,attemptButton:DM,attemptActive:kM,attemptStatus:MM,emptyCta:RM,ctaTitle:BM,ctaDescription:OM,ctaButton:LM,ctaLink:zM,projectHeader:UM,projectName:VM,projectMeta:IM,metaRow:HM,metaLabel:qM,metaValue:GM,metaPlaceholder:PM,editButton:$M,editInput:YM,editTextarea:FM,editSelect:KM,archiveButton:ZM,repoLink:XM,metaValueClickable:QM,editHint:JM,editError:WM,editInputInvalid:eR,unsavedDot:tR,metaToggle:nR,metaToggleArrow:aR,metaToggleArrowOpen:sR,progressBarContainer:iR,progressBar:lR,progressFill:oR,progressLabel:rR,metaTimestamps:cR,metaTimestamp:uR,editFieldWrapper:dR};function fR(){const{projects:n,createProject:a}=nn();return n.length===0?h.jsxs("div",{className:D.emptyCta,children:[h.jsx("div",{className:D.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:D.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:D.ctaButton,onClick:()=>{const l=window.prompt("Project name:");l!=null&&l.trim()&&a(l.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:D.emptyState,children:"Select a project or task to get started"})}function hR(n,a){const l=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const u=a.get(o);l.unshift(u),o=u.parentTaskId||void 0}return l}const $s={label:"Home",url:"/"};function mR(n){return n?[$s,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[$s,{label:"Settings",url:void 0}]}function pR(){return[$s,{label:"New Environment",url:void 0}]}function gR(){return[$s,{label:"New Chat",url:void 0}]}function vR(n){return[$s,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function yR(n,a){const l=a.find(o=>o.id===n);return[$s,{label:(l==null?void 0:l.name)??"Project",url:void 0}]}function bR(n,a,l){const o=hR(n,l),r=l.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,m=[$s];d&&m.push({label:d.name,url:io(d.id)});for(let g=0;g<o.length-1;g++)m.push({label:o[g].title,url:fs(o[g].id)});const p=o[o.length-1];return m.push({label:(p==null?void 0:p.title)??n,url:void 0}),m}function SR(){const n=gR();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Zi,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Enter a prompt below to start a new session"})]})}function O1(n){const a=[];for(const l of n){const o=a[a.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+l.content}:a.push(l)}return a}function L1(n){const a=new Map;for(const u of n)if(u.raw)try{a.set(u,JSON.parse(u.raw))}catch{}const l=new Map;for(const u of n){if(u.eventType!=="tool_use")continue;const d=a.get(u);if(!(!d||typeof d.id!="string"))try{const m=JSON.parse(u.content);l.set(d.id,{tool:m.tool,args:m.args})}catch{}}const o=new Set;return n.map(u=>{if(u.eventType!=="tool_result")return u;const d=a.get(u);if(!d||typeof d.tool_use_id!="string")return u;const m=l.get(d.tool_use_id);return m?(o.add(d.tool_use_id),{...u,toolUseCtx:m}):u}).filter(u=>{if(u.eventType!=="tool_use")return!0;const d=a.get(u);return d&&typeof d.id=="string"?!o.has(d.id):!0})}function _R({sessionId:n,session:a,isActive:l,onKill:o}){return h.jsxs("div",{className:D.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:D.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),l&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:D.killButton,children:"×"})]})]})}function xR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function TR({sessionEvents:n,session:a,eventsDropped:l,scrollRef:o}){const r=a&&["completed","failed","interrupted"].includes(a.status),u=r?`Session ${a.status} with no events recorded.`:"Waiting for events...";return h.jsxs("div",{ref:o,className:D.eventScroll,children:[n.length===0&&h.jsx("div",{className:r?D.errorMessage:D.waitingMessage,children:u}),h.jsx(xR,{eventsDropped:l}),n.map((d,m)=>h.jsx(j1,{event:d,toolUseCtx:d.toolUseCtx},`${d.sessionId}-${d.timestamp}-${m}`))]})}function ER(){const{sessionId:n}=cc(),{events:a,eventsDropped:l,sessions:o,kill:r,loadSessionEvents:u}=nn(),d=S.useRef(null),m=S.useRef(void 0),p=vR(n),g=o.find(x=>x.id===n)??void 0,v=S.useMemo(()=>{const x=n?a.filter(T=>T.sessionId===n):[];return L1(O1(x))},[a,n]);if(S.useEffect(()=>{n&&n!==m.current&&(m.current=n,u(n))},[n,u]),S.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[v.length]),!n)return h.jsx("div",{className:D.emptyState,children:"No session selected"});const b=(g==null?void 0:g.status)==="running"||(g==null?void 0:g.status)==="idle";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Zi,{segments:p}),h.jsx(_R,{sessionId:n,session:g,isActive:b,onKill:r}),h.jsx(TR,{sessionEvents:v,session:g,eventsDropped:l,scrollRef:d})]})}const c0=220,u0=70,AR=40,CR=60,jR="hierarchy",NR="dependency";function wR(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new dv.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:AR,ranksep:CR});const l=new Map(n.map(d=>[d.id,d])),o=new Map;for(const d of n)if(d.parentTaskId&&l.has(d.parentTaskId)){const m=o.get(d.parentTaskId)||[];m.push(d),o.set(d.parentTaskId,m)}for(const d of n)a.setNode(d.id,{width:c0,height:u0});const r=[];for(const d of n){if(d.parentTaskId&&l.has(d.parentTaskId)){const m=`hierarchy-${d.parentTaskId}-${d.id}`;a.setEdge(d.parentTaskId,d.id,{},m),r.push({id:m,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:jR},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of d.dependsOn)if(l.has(m)){const p=`dependency-${m}-${d.id}`;a.setEdge(m,d.id,{},p),r.push({id:p,source:m,target:d.id,type:"smoothstep",data:{edgeType:NR},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return dv.layout(a),{nodes:n.map(d=>{const m=a.node(d.id),p=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:m.x-c0/2,y:m.y-u0/2},data:{task:d,childCount:p.length,doneChildCount:p.filter(g=>g.status==="complete").length,hasDependencies:d.dependsOn.length>0}}}),edges:r}},[n])}const DR="_dagContainer_js4w6_1",kR="_taskNode_js4w6_26",MR="_taskNodeBorder_js4w6_54",RR="_taskNodeContent_js4w6_60",BR="_taskNodeHeader_js4w6_70",OR="_taskNodeIcon_js4w6_77",LR="_taskNodeTitle_js4w6_82",zR="_taskNodeBadges_js4w6_90",UR="_childBadge_js4w6_95",VR="_depBadge_js4w6_107",IR="_handle_js4w6_119",HR="_emptyCta_js4w6_126",qR="_ctaDescription_js4w6_137",GR="_ctaButton_js4w6_144",fn={dagContainer:DR,taskNode:kR,taskNodeBorder:MR,taskNodeContent:RR,taskNodeHeader:BR,taskNodeIcon:OR,taskNodeTitle:LR,taskNodeBadges:zR,childBadge:UR,depBadge:VR,handle:IR,emptyCta:HR,ctaDescription:qR,ctaButton:GR};function PR({data:n}){const{task:a,childCount:l,doneChildCount:o,hasDependencies:r}=n,u=ps(a.status);return h.jsxs("div",{className:fn.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(fv,{type:"target",position:hv.Top,className:fn.handle}),h.jsx("div",{className:fn.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:fn.taskNodeContent,children:[h.jsxs("div",{className:fn.taskNodeHeader,children:[h.jsx("span",{className:fn.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:fn.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:fn.taskNodeBadges,children:[l>0&&h.jsxs("span",{className:fn.childBadge,children:[o,"/",l]}),r&&h.jsx("span",{className:fn.depBadge,children:"dep"})]})]}),h.jsx(fv,{type:"source",position:hv.Bottom,className:fn.handle})]})}const $R=Gw,YR={task:PR};function FR({projectId:n}){const{tasks:a}=nn(),l=na(),{resolvedThemeId:o}=q0(),r=S.useMemo(()=>a.filter(v=>v.projectId===n),[a,n]),{nodes:u,edges:d}=wR(r),m=S.useMemo(()=>{const v=getComputedStyle(document.documentElement),b={};for(const[x,T]of Object.entries($R))b[x]=v.getPropertyValue(T).trim()||"#6b7a8d";return b},[o]),p=S.useCallback((v,b)=>{l(fs(b.id))},[l]),g=S.useCallback(v=>{const b=v.data;return m[b.task.status]||m.pending},[m]);return r.length===0?h.jsxs("div",{className:fn.emptyCta,children:[h.jsx("button",{className:fn.ctaButton,onClick:()=>l(Ps(n)),children:"Create Task"}),h.jsx("div",{className:fn.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:fn.dagContainer,children:h.jsxs(W_,{nodes:u,edges:d,nodeTypes:YR,onNodeClick:p,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(ex,{variant:tx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(nx,{showInteractive:!1}),h.jsx(ax,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function KR({tasks:n,taskStatusById:a,sessionStatusByTaskId:l}){const o=new Map;for(const u of n)if(u.parentTaskId){const d=o.get(u.parentTaskId);d?d.push(u):o.set(u.parentTaskId,[u])}const r=new Map(a0.map(u=>[u,[]]));for(const u of n){const d=_h(u.status),m=u.dependsOn.length>0&&u.dependsOn.some(C=>a.get(C)!=="complete"),p=o.get(u.id)??[],g=p.length,v=p.filter(C=>C.status==="complete").length;let b;if(d==="paused"&&l){const C=l.get(u.id);C==="idle"?b="Needs input":C==="completed"&&(b="Ready to complete")}const x={task:u,isBlocked:m,childCount:g,doneChildCount:v,pausedSubBadge:b},T=r.get(d);T?T.push(x):r.get("not_started").push(x)}for(const u of r.values())u.sort((d,m)=>d.task.sortOrder-m.task.sortOrder);return a0.map(u=>{const d=ps(u);return{status:u,label:d.label,style:d,tasks:r.get(u)??[]}})}const ZR="_boardContainer_1c4y1_1",XR="_column_1c4y1_17",QR="_columnHeader_1c4y1_34",JR="_columnIcon_1c4y1_47",WR="_columnLabel_1c4y1_52",e3="_columnCount_1c4y1_57",t3="_cardList_1c4y1_67",n3="_emptyPlaceholder_1c4y1_76",a3="_card_1c4y1_67",s3="_cardHeader_1c4y1_107",i3="_cardStatusIcon_1c4y1_113",l3="_cardTitle_1c4y1_119",o3="_cardBadges_1c4y1_127",r3="_badge_1c4y1_134",c3="_blockedBadge_1c4y1_146",u3="_childBadge_1c4y1_151",d3="_depBadge_1c4y1_155",f3="_parentBadge_1c4y1_159",h3="_pausedSubBadge_1c4y1_166",m3="_personaBadge_1c4y1_170",p3="_envBadge_1c4y1_174",g3="_emptyCta_1c4y1_178",v3="_ctaButton_1c4y1_188",y3="_ctaDescription_1c4y1_204",Je={boardContainer:ZR,column:XR,columnHeader:QR,columnIcon:JR,columnLabel:WR,columnCount:e3,cardList:t3,emptyPlaceholder:n3,card:a3,cardHeader:s3,cardStatusIcon:i3,cardTitle:l3,cardBadges:o3,badge:r3,blockedBadge:c3,childBadge:u3,depBadge:d3,parentBadge:f3,pausedSubBadge:h3,personaBadge:m3,envBadge:p3,emptyCta:g3,ctaButton:v3,ctaDescription:y3};function b3({projectId:n}){const{tasks:a,sessions:l,personas:o,environments:r}=nn(),u=na(),d=S.useMemo(()=>a.filter(b=>b.projectId===n),[a,n]),m=S.useMemo(()=>new Map(a.map(b=>[b.id,b.status])),[a]),p=S.useMemo(()=>new Map(d.map(b=>[b.id,b])),[d]),g=S.useMemo(()=>{const b=new Map(l.map(A=>[A.id,A])),x=new Map(o.map(A=>[A.id,A])),T=new Map(r.map(A=>[A.id,A])),C=new Map,j=new Map,N=new Map;for(const A of d)if(A.latestSessionId){const O=b.get(A.latestSessionId);if(O){if(C.set(A.id,O.status),O.personaId){const M=x.get(O.personaId);M&&j.set(A.id,M.name)}if(O.environmentId){const M=T.get(O.environmentId);M&&N.set(A.id,M.displayName)}}}return{sessionStatusByTaskId:C,personaNameByTaskId:j,environmentNameByTaskId:N}},[d,l,o,r]),v=S.useMemo(()=>KR({tasks:d,taskStatusById:m,sessionStatusByTaskId:g.sessionStatusByTaskId}),[d,m,g]);return d.length===0?h.jsxs("div",{className:Je.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Je.ctaButton,onClick:()=>u(Ps(n)),children:"Create Task"}),h.jsx("div",{className:Je.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Je.boardContainer,"data-testid":"board-container",children:v.map(b=>h.jsxs("section",{className:Je.column,"data-testid":`board-column-${b.status}`,"aria-label":`${b.label}, ${b.tasks.length} ${b.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Je.columnHeader,children:[h.jsx("span",{className:Je.columnIcon,style:{color:b.style.color},children:b.style.icon}),h.jsx("span",{className:Je.columnLabel,children:b.label}),h.jsx("span",{className:Je.columnCount,"data-testid":`board-count-${b.status}`,children:b.tasks.length})]}),h.jsx("div",{className:Je.cardList,children:b.tasks.length===0?h.jsx("div",{className:Je.emptyPlaceholder,children:"No tasks"}):h.jsx(gs,{mode:"popLayout",children:b.tasks.map(x=>h.jsx(Yn.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(S3,{boardTask:x,tasksById:p,personaName:g.personaNameByTaskId.get(x.task.id),envName:g.environmentNameByTaskId.get(x.task.id),onClick:()=>u(fs(x.task.id))})},x.task.id))})})]},b.status))})}function S3({boardTask:n,tasksById:a,personaName:l,envName:o,onClick:r}){const{task:u,isBlocked:d,childCount:m,doneChildCount:p,pausedSubBadge:g}=n,v=ps(u.status),b=u.parentTaskId?a.get(u.parentTaskId):void 0;return h.jsxs("div",{className:Je.card,tabIndex:0,role:"button","data-testid":`board-card-${u.id}`,onClick:r,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),r())},children:[h.jsxs("div",{className:Je.cardHeader,children:[h.jsx("span",{className:Je.cardStatusIcon,style:{color:v.color},children:v.icon}),h.jsx("span",{className:Je.cardTitle,children:u.title})]}),h.jsxs("div",{className:Je.cardBadges,children:[b&&h.jsx("span",{className:`${Je.badge} ${Je.parentBadge}`,title:b.title,children:b.title}),m>0&&h.jsxs("span",{className:`${Je.badge} ${Je.childBadge}`,children:[p,"/",m]}),d&&h.jsx("span",{className:`${Je.badge} ${Je.blockedBadge}`,children:"blocked"}),u.dependsOn.length>0&&!d&&h.jsx("span",{className:`${Je.badge} ${Je.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Je.badge} ${Je.pausedSubBadge}`,children:g}),l&&h.jsx("span",{className:`${Je.badge} ${Je.personaBadge}`,children:l}),o&&h.jsx("span",{className:`${Je.badge} ${Je.envBadge}`,children:o})]})]})}function _3(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function d0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const u=Math.floor(r/60);if(u<24)return`${u}h ago`;const d=Math.floor(u/24);return d<30?`${d}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function x3(){const{projectId:n}=cc(),a=na(),{tasks:l,environments:o,projects:r,archiveProject:u,updateProject:d}=nn(),[m,p]=S.useState("tasks"),[g,v]=S.useState(!1),[b,x]=S.useState(null),[T,C]=S.useState(""),[j,N]=S.useState(""),[A,O]=S.useState(!1),M=S.useRef(void 0),X=S.useRef(null),H=S.useRef(null),J=S.useRef(null),W=S.useRef(null),$=S.useRef(null),ne=S.useRef(null),ge=yR(n,r);S.useEffect(()=>{const Q=M.current;M.current=n,!(Q===void 0||Q===n)&&(b!==null||T!=="")&&(x(null),C(""))},[n,b,T]),S.useEffect(()=>{if(b===null)return;const Q=b==="name"?H.current:b==="description"?J.current:b==="repoUrl"?W.current:b==="worktreeBasePath"?ne.current:$.current;if(!Q)return;const P=window.setTimeout(()=>{Q.focus()},0);return()=>{window.clearTimeout(P)}},[b]);const U=r.find(Q=>Q.id===n),pe=l.filter(Q=>Q.projectId===n),te=pe.filter(Q=>Q.status==="complete").length,ye=pe.length,q=ye>0?Math.round(te/ye*100):0,z=100,F=(Q,P)=>{X.current=Q,x(Q),C(P),N("")},ee=()=>{X.current=null,x(null),C(""),N("")},ke=(Q,P)=>{if(Q==="name"){const I=P.trim();if(!I)return"Name is required";if(I.length>z)return`Max ${z} characters`}if(Q==="repoUrl"){const I=P.trim();if(I&&!/^https?:\/\/.+/.test(I))return"Must be a valid http(s) URL"}return""},je=Q=>{if(!U)return;const P=T.trim(),I=ke(Q,T);if(I){N(I);return}if(Q==="name"){if(P===U.name){ee();return}d(U.id,{name:P})}else if(Q==="description"){const De=T;if(De===U.description){ee();return}d(U.id,{description:De})}else if(Q==="repoUrl"){if(P===U.repoUrl){ee();return}d(U.id,{repoUrl:P})}else if(Q==="defaultEnvironmentId"){if(T===U.defaultEnvironmentId){ee();return}d(U.id,{defaultEnvironmentId:T})}else{if(P===U.worktreeBasePath){ee();return}d(U.id,{worktreeBasePath:P})}ee()},Pe=(Q,P)=>{Q.key==="Escape"?ee():Q.key==="Enter"&&P!=="description"&&je(P)},we=Q=>U?Q==="name"?T.trim()!==U.name:Q==="description"?T!==U.description:Q==="repoUrl"?T.trim()!==U.repoUrl:Q==="defaultEnvironmentId"?T!==U.defaultEnvironmentId:T.trim()!==U.worktreeBasePath:!1,_e=o.find(Q=>Q.id===(U==null?void 0:U.defaultEnvironmentId)),Ae=b==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Zi,{segments:ge}),h.jsxs("div",{className:D.projectHeader,children:[h.jsx("span",{className:D.projectName,"data-testid":"project-name",children:b==="name"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:H,className:`${D.editInput} ${j?D.editInputInvalid:""}`,value:T,onChange:Q=>{C(Q.target.value),N("")},onBlur:Q=>{if(X.current==="name"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="name"||je("name")},onKeyDown:Q=>Pe(Q,"name"),maxLength:z,"aria-label":"Project name","data-testid":"edit-name-input"}),we("name")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),j&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:j}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>F("name",(U==null?void 0:U.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(U==null?void 0:U.name)||n}`,"data-testid":"edit-name-button",children:[(U==null?void 0:U.name)||n,h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:D.archiveButton,onClick:()=>v(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:D.metaToggle,onClick:()=>O(!A),"aria-expanded":!A,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${D.metaToggleArrow} ${A?"":D.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!A&&h.jsxs("div",{className:D.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Description"}),h.jsx("div",{className:D.metaValue,children:b==="description"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("textarea",{ref:J,className:D.editTextarea,value:T,onChange:Q=>{C(Q.target.value),N("")},onBlur:Q=>{if(X.current==="description"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="description"||je("description")},onKeyDown:Q=>Pe(Q,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),we("description")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>F("description",(U==null?void 0:U.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[U!=null&&U.description?h.jsx("span",{className:D.overviewMarkdown,children:h.jsx(wf,{remarkPlugins:[Df],children:U.description})}):h.jsx("span",{className:D.metaPlaceholder,children:"No description"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Repository"}),h.jsx("div",{className:D.metaValue,children:b==="repoUrl"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:W,className:`${D.editInput} ${j?D.editInputInvalid:""}`,value:T,onChange:Q=>{C(Q.target.value),N("")},onBlur:Q=>{if(X.current==="repoUrl"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="repoUrl"||je("repoUrl")},onKeyDown:Q=>Pe(Q,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),we("repoUrl")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),j&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:j}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:Q=>{Q.preventDefault(),F("repoUrl",(U==null?void 0:U.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[U!=null&&U.repoUrl&&/^https?:\/\//i.test(U.repoUrl)?h.jsx("a",{className:D.repoLink,href:U.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:Q=>Q.stopPropagation(),children:U.repoUrl}):U!=null&&U.repoUrl?h.jsx("span",{children:U.repoUrl}):h.jsx("span",{className:D.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Environment"}),h.jsx("div",{className:D.metaValue,children:b==="defaultEnvironmentId"?h.jsxs("select",{ref:$,className:D.editSelect,value:T,onChange:Q=>{X.current=null,C(Q.target.value);const P=Q.target.value;U&&P!==U.defaultEnvironmentId&&d(U.id,{defaultEnvironmentId:P}),ee()},onBlur:Q=>{if(X.current==="defaultEnvironmentId"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="defaultEnvironmentId"||ee()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(Q=>h.jsx("option",{value:Q.id,children:Q.displayName},Q.id))]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>F("defaultEnvironmentId",(U==null?void 0:U.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[_e?h.jsxs("span",{className:D.envRow,children:[h.jsx("span",{className:`${D.envDot} ${_3(_e.status)}`}),_e.displayName]}):h.jsx("span",{className:D.metaPlaceholder,children:(U==null?void 0:U.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Worktree Base"}),h.jsx("div",{className:D.metaValue,children:b==="worktreeBasePath"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:ne,className:`${D.editInput} ${j?D.editInputInvalid:""}`,value:T,onChange:Q=>{C(Q.target.value),N("")},onBlur:Q=>{if(X.current==="worktreeBasePath"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="worktreeBasePath"||je("worktreeBasePath")},onKeyDown:Q=>Pe(Q,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Worktree base path","data-testid":"edit-worktree-base-path-input"}),we("worktreeBasePath")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),j&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:j}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>F("worktreeBasePath",(U==null?void 0:U.worktreeBasePath)||""),title:"Click to edit worktree base path","aria-label":"Edit worktree base path","data-testid":"edit-worktree-base-path-button",children:[U!=null&&U.worktreeBasePath?h.jsx("span",{children:U.worktreeBasePath}):h.jsx("span",{className:D.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),U&&h.jsxs("div",{className:D.metaTimestamps,children:[h.jsxs("span",{className:D.metaTimestamp,children:["Created ",d0(U.createdAt)]}),U.updatedAt&&U.updatedAt!==U.createdAt&&h.jsxs("span",{className:D.metaTimestamp,children:["· Updated ",d0(U.updatedAt)]})]})]}),ye>0&&h.jsxs("div",{className:D.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:D.progressBar,children:h.jsx("div",{className:D.progressFill,style:{width:`${q}%`}})}),h.jsxs("span",{className:D.progressLabel,children:[te,"/",ye]})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${D.tab} ${m==="graph"?D.active:""}`,onClick:()=>p("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="board",className:`${D.tab} ${m==="board"?D.active:""}`,onClick:()=>p("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${D.tab} ${m==="tasks"?D.active:""}`,onClick:()=>p("tasks"),children:"Tasks"})]}),m==="tasks"&&ye>0&&h.jsxs("div",{className:D.projectSummary,children:[h.jsx("span",{className:D.projectSummaryTitle,children:`${te}/${ye} tasks complete`}),h.jsx("span",{className:D.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&ye===0&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>a(Ps(n)),children:"Create Task"}),h.jsx("div",{className:D.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="board"&&h.jsx(b3,{projectId:n}),m==="graph"&&h.jsx(FR,{projectId:n}),h.jsx(yc,{isOpen:g,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{U&&(u(U.id),a("/",{replace:!0})),v(!1)},onCancel:()=>v(!1)})]})}const T3="_container_cddyd_1",E3="_header_cddyd_8",A3="_headerTitle_cddyd_35",C3="_badge_cddyd_44",j3="_headerActions_cddyd_54",N3="_body_cddyd_61",w3="_formContent_cddyd_73",D3="_section_cddyd_85",k3="_label_cddyd_91",M3="_titleInput_cddyd_98",R3="_descriptionTextarea_cddyd_131",B3="_parentContext_cddyd_167",O3="_parentLabel_cddyd_175",L3="_parentName_cddyd_182",z3="_depList_cddyd_220",U3="_depItem_cddyd_226",V3="_depItemSelected_cddyd_248",I3="_noDeps_cddyd_252",H3="_btnPrimary_cddyd_258",q3="_btnGhost_cddyd_289",gt={container:T3,header:E3,headerTitle:A3,badge:C3,headerActions:j3,body:N3,formContent:w3,section:D3,label:k3,titleInput:M3,descriptionTextarea:R3,parentContext:B3,parentLabel:O3,parentName:L3,depList:z3,depItem:U3,depItemSelected:V3,noDeps:I3,btnPrimary:H3,btnGhost:q3};function z1({mode:n,taskId:a,projectId:l,parentTaskId:o}){const{tasks:r,createTask:u,updateTask:d}=nn(),{showToast:m}=mo(),p=na(),g=n==="edit",v=g&&a?r.find(U=>U.id===a):void 0,b=g?(v==null?void 0:v.projectId)??"":l??"",x=g?(v==null?void 0:v.parentTaskId)??"":o??"",T=x?r.find(U=>U.id===x):void 0,[C,j]=S.useState((v==null?void 0:v.title)??""),[N,A]=S.useState((v==null?void 0:v.description)??""),[O,M]=S.useState((v==null?void 0:v.dependsOn)??[]),X=S.useRef(!1);S.useEffect(()=>{g&&v&&!X.current&&(X.current=!0,j(v.title),A(v.description),M(v.dependsOn))},[g,v]);const H=r.filter(U=>U.projectId===b&&(!g||U.id!==a)&&U.id!==x),J=C.trim().length>0&&(!g||v!==void 0)&&(g||b.length>0),W=U=>{M(pe=>pe.includes(U)?pe.filter(te=>te!==U):[...pe,U])},$=()=>{J&&(g&&v===void 0||(g&&a?(d(a,C.trim(),N,O),m("Task updated","success"),p(fs(a),{replace:!0})):(u(b,C.trim(),N,O.length>0?O:void 0,x||void 0),m("Task created","success"),p(io(b),{replace:!0}))))},ne=()=>{p(g&&a?fs(a):io(b))},ge=g?"edit task":x?"child task":"new task";return h.jsxs("div",{className:gt.container,children:[h.jsxs("div",{className:gt.header,children:[h.jsxs("div",{className:gt.headerTitle,children:[h.jsx("span",{className:gt.badge,children:ge}),T&&h.jsxs("span",{className:gt.parentContext,children:[h.jsx("span",{className:gt.parentLabel,children:"Child of"}),h.jsx("span",{className:gt.parentName,children:T.title})]})]}),h.jsxs("div",{className:gt.headerActions,children:[h.jsx("button",{onClick:$,disabled:!J,className:gt.btnPrimary,"data-testid":"task-edit-save",children:g?"Save Changes":"Create"}),h.jsx("button",{onClick:ne,className:gt.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:gt.body,children:h.jsxs("div",{className:gt.formContent,children:[h.jsxs("div",{className:gt.section,children:[h.jsx("label",{className:gt.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:C,onChange:U=>j(U.target.value),placeholder:"Task title...",autoFocus:!0,className:gt.titleInput,"data-testid":"task-edit-title",onKeyDown:U=>{U.key==="Enter"&&J&&$()}})]}),h.jsxs("div",{className:gt.section,children:[h.jsx("label",{className:gt.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:N,onChange:U=>A(U.target.value),placeholder:"Describe the task... (markdown supported)",className:gt.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:gt.section,children:[h.jsx("div",{className:gt.label,children:"Dependencies"}),H.length===0?h.jsx("div",{className:gt.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:gt.depList,children:H.map(U=>{const pe=O.includes(U.id);return h.jsxs("label",{className:`${gt.depItem} ${pe?gt.depItemSelected:""}`,"data-testid":`dep-option-${U.id}`,children:[h.jsx("input",{type:"checkbox",checked:pe,onChange:()=>W(U.id)}),U.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",U.status,")"]})]},U.id)})})]})]})})]})}function G3(){const[n]=Uf(),a=n.get("project")??"",l=n.get("parent")??void 0;return a?h.jsx(z1,{mode:"new",projectId:a,parentTaskId:l}):h.jsx(qr,{to:"/",replace:!0})}function P3(){const{taskId:n}=cc();return h.jsx(z1,{mode:"edit",taskId:n})}const $3="_container_1pqxm_1",Y3="_emptyState_1pqxm_8",F3="_card_1pqxm_14",K3="_cardHeader_1pqxm_34",Z3="_categoryBadge_1pqxm_46",X3="_findingTitle_1pqxm_54",Q3="_findingDate_1pqxm_60",J3="_findingContent_1pqxm_72",W3="_tags_1pqxm_78",e5="_tag_1pqxm_78",ra={container:$3,emptyState:Y3,card:F3,cardHeader:K3,categoryBadge:Z3,findingTitle:X3,findingDate:Q3,findingContent:J3,tags:W3,tag:e5};function t5(n){const a=new Date(n),l=new Date,o=l.getTime()-a.getTime(),r=Math.floor(o/1e3),u=Math.floor(r/60),d=Math.floor(u/60),m=Math.floor(d/24);if(r<60)return"just now";if(u<60)return`${u}m ago`;if(d<24)return`${d}h ago`;if(m===1)return"yesterday";if(m<7)return`${m} days ago`;const p=a.getFullYear()===l.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),v=a.getDate();return p?`${g} ${v}`:`${g} ${v} ${a.getFullYear()}`}const f0={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function n5({projectId:n}){const{findings:a}=nn(),l=a.filter(o=>o.projectId===n);return l.length===0?h.jsx("div",{className:ra.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:ra.container,children:l.map((o,r)=>{const u=f0[o.category]||f0.general;return h.jsxs(Yn.div,{className:ra.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:ra.cardHeader,children:[h.jsx("span",{className:ra.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:ra.findingTitle,children:o.title}),h.jsx("span",{className:ra.findingDate,title:o.createdAt,children:t5(o.createdAt)})]}),h.jsx("div",{className:ra.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:ra.tags,children:o.tags.map(d=>h.jsx("span",{className:ra.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function Ir(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Zd(n,a){if(!n||!a)return;const l=new Date(a).getTime()-new Date(n).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),r=Math.floor(l%6e4/1e3);if(o===0)return`${r}s`;const u=Math.floor(o/60),d=o%60;return u===0?`${o}m ${r}s`:`${u}h ${d}m`}function a5(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function s5({status:n}){const a=ps(n),l=Iw(n);return h.jsx("span",{className:`${D.statusBadge} ${D[l]??D.statusPending}`,children:a.label})}function i5({task:n,tasksById:a,environments:l,projects:o,taskSessions:r}){const u=r.length>0?r[r.length-1]:void 0,d=(u==null?void 0:u.environmentId)??"",m=d?l.find(v=>v.id===d):void 0,p=o.find(v=>v.id===n.projectId),g=n.branch&&(p!=null&&p.repoUrl)?`${p.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:D.overviewDashboard,children:[h.jsxs("div",{className:D.overviewHero,children:[h.jsx(s5,{status:n.status}),n.branch&&h.jsx("span",{className:D.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:D.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Description"}),h.jsx("div",{className:D.overviewMarkdown,children:h.jsx(wf,{remarkPlugins:[Df],children:n.description})})]}),d&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Environment"}),h.jsxs("div",{className:D.envRow,children:[m&&h.jsx("span",{className:`${D.envDot} ${a5(m.status)}`,title:m.status,"aria-label":`Status: ${m.status}`,role:"img"}),h.jsx("span",{className:D.overviewValue,children:(m==null?void 0:m.displayName)??d})]})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:D.overviewMuted,children:"None"}):h.jsx("div",{className:D.depList,children:n.dependsOn.map(v=>{const b=a.get(v),x=(b==null?void 0:b.status)==="complete";return h.jsxs("div",{className:`${D.depItem} ${x?D.depDone:D.depBlocked}`,children:[h.jsx("span",{children:x?"✓":"○"}),h.jsx("span",{children:(b==null?void 0:b.title)??v})]},v)})})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:D.timeline,children:[n.createdAt&&h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Created"}),h.jsx("span",{className:D.timelineValue,children:Ir(n.createdAt)})]}),n.assignedAt&&(()=>{const v=Zd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Assigned"}),h.jsx("span",{className:D.timelineValue,children:Ir(n.assignedAt)}),v!==void 0&&h.jsx("span",{className:D.timelineDelta,children:v})]})})(),n.startedAt&&(()=>{const v=Zd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Started"}),h.jsx("span",{className:D.timelineValue,children:Ir(n.startedAt)}),v!==void 0&&h.jsx("span",{className:D.timelineDelta,children:v})]})})(),n.completedAt&&(()=>{const v=Zd(n.startedAt,n.completedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Completed"}),h.jsx("span",{className:D.timelineValue,children:Ir(n.completedAt)}),v!==void 0&&h.jsx("span",{className:D.timelineDelta,children:v})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:D.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:D.reviewNotes,children:n.reviewNotes})]})]})}function l5({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown."]})}function o5({task:n,sessionId:a,isBlocked:l,onStart:o,onResume:r,onStop:u,onComplete:d,onDelete:m,onEdit:p}){if(n.status==="not_started")return l?h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:p,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Start"}),h.jsx("button",{onClick:p,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:u,disabled:!a,className:D.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:d,className:D.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:D.btnGhost,children:"Resume"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]})}function r5({taskSessions:n,selectedSessionId:a,onSelect:l}){if(!(n.length<2))return h.jsxs("div",{className:D.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:D.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const u=o.id===a,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${D.attemptButton} ${u?D.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":u,"data-testid":`attempt-${r+1}`,children:["#",r+1,d&&h.jsx("span",{className:D.attemptStatus,children:d})]},o.id)})]})}function Xd(){const{taskId:n}=cc(),a=hn(),l=na(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:m,loadFindings:p,kill:g,startTask:v,resumeTask:b,completeTask:x,deleteTask:T,projects:C,taskSessions:j,loadTaskSessions:N}=nn(),A=S.useRef(null),O=S.useRef(void 0),M=S.useRef(void 0),X=S.useRef(void 0),H=S.useRef(void 0),J=S.useRef(void 0),W=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[$,ne]=S.useState(W),[ge,U]=S.useState(!1),[pe,te]=S.useState(void 0),ye=S.useRef(W);W!==ye.current&&(ye.current=W,W!==$&&ne(W));const q=u.find(P=>P.id===n),z=(q==null?void 0:q.projectId)||void 0,F=q?j[q.id]??[]:[];let ee;pe&&F.some(P=>P.id===pe)?ee=pe:ee=(q==null?void 0:q.latestSessionId)||void 0;const ke=()=>{U(!0)},je=()=>{q&&(T(q.id),U(!1),l(io(q.projectId),{replace:!0}))};if((q==null?void 0:q.id)!==M.current&&(M.current=q==null?void 0:q.id,pe!==void 0&&te(void 0)),S.useEffect(()=>{if(!(q!=null&&q.id))return;const P=q.id!==H.current,I=q.latestSessionId!==J.current;(P||I)&&(H.current=q.id,J.current=q.latestSessionId,N(q.id))},[q==null?void 0:q.id,q==null?void 0:q.latestSessionId,N]),(q==null?void 0:q.status)!==X.current){X.current=q==null?void 0:q.status;const P=(q==null?void 0:q.status)==="not_started"?"overview":(q==null?void 0:q.status)==="working"||(q==null?void 0:q.status)==="paused"?"stream":(q==null?void 0:q.status)==="complete"?"findings":void 0;P&&P!==$&&ne(P)}const Pe=S.useMemo(()=>new Map(u.map(P=>[P.id,P])),[u]),we=S.useMemo(()=>{const P=ee?o.filter(I=>I.sessionId===ee):[];return L1(O1(P))},[o,ee]),_e=q?q.dependsOn.some(P=>{const I=Pe.get(P);return I!==void 0&&I.status!=="complete"}):!1,Ae=S.useMemo(()=>bR(n,C,Pe),[n,C,Pe]);S.useEffect(()=>{ee&&ee!==O.current&&(O.current=ee,m(ee))},[ee,m]),S.useEffect(()=>{$==="findings"&&z&&p(z)},[$,z,p]),S.useEffect(()=>{A.current&&$==="stream"&&(A.current.scrollTop=A.current.scrollHeight)},[we.length,$]);const Q=P=>{ne(P),l(fs(n,P==="overview"?void 0:P))};return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Zi,{segments:Ae}),h.jsxs("div",{className:D.header,children:[h.jsxs("span",{className:D.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(q==null?void 0:q.title)||n}),q&&h.jsx("span",{className:D.taskStatusBadge,"data-testid":"task-status",children:q.status}),(q==null?void 0:q.branch)&&h.jsx("span",{className:D.taskBranch,children:q.branch}),_e&&h.jsx("span",{className:D.taskBlockedBadge,children:"blocked"})]}),q&&h.jsx(o5,{task:q,sessionId:ee,isBlocked:_e,onStart:()=>v(q.id),onResume:()=>b(q.id),onStop:()=>ee&&g(ee),onComplete:()=>x(q.id),onDelete:ke,onEdit:()=>l(HT(q.id))})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":$==="overview",className:`${D.tab} ${$==="overview"?D.active:""}`,onClick:()=>Q("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":$==="stream",className:`${D.tab} ${$==="stream"?D.active:""}`,onClick:()=>Q("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":$==="findings",className:`${D.tab} ${$==="findings"?D.active:""}`,onClick:()=>Q("findings"),children:"Findings"})]}),h.jsxs(gs,{mode:"wait",children:[$==="overview"&&h.jsx(Yn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.overviewContent,children:q?h.jsx(i5,{task:q,tasksById:Pe,environments:d,projects:C,taskSessions:F}):h.jsx("div",{className:D.waitingMessage,children:"No additional details"})},"overview"),$==="stream"&&h.jsxs(Yn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[h.jsx(r5,{taskSessions:F,selectedSessionId:ee,onSelect:P=>te(P)}),h.jsxs("div",{ref:A,className:D.eventScroll,children:[!ee&&q&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>v(q.id),children:"Start Task"}),h.jsx("div",{className:D.ctaDescription,children:"Click to begin agent execution"})]}),ee&&we.length===0&&h.jsx("div",{className:D.waitingMessage,children:"Waiting for events..."}),h.jsx(l5,{eventsDropped:r}),we.map((P,I)=>h.jsx(j1,{event:P,toolUseCtx:P.toolUseCtx},`${P.sessionId}-${P.timestamp}-${I}`))]})]},"stream"),$==="findings"&&h.jsx(Yn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.tabContent,children:z?h.jsx(n5,{projectId:z}):h.jsx("div",{className:D.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),q&&h.jsx(yc,{isOpen:ge,title:"Delete Task?",description:`"${q.title}" will be permanently removed.`,onConfirm:je,onCancel:()=>U(!1)})]})}function c5(){const n=pR();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Zi,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Configure the new environment below"})]})}const u5="_layout_1sbe4_1",d5="_content_1sbe4_8",h0={layout:u5,content:d5},f5={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function h5(){const a=hn().pathname.replace(/^\/settings\/?/,"").split("/")[0],l=f5[a],o=mR(l);return h.jsxs("div",{className:h0.layout,children:[h.jsx(Zi,{segments:o}),h.jsx("div",{className:h0.content,children:h.jsx(w0,{})})]})}const m5="_nav_13n0b_1",p5="_tab_13n0b_44",g5="_tabIcon_13n0b_82",v5="_tabActive_13n0b_88",Hr={nav:m5,tab:p5,tabIcon:g5,tabActive:v5},Ra=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function y5(){var d;const n=hn(),a=na(),l=S.useRef(null),o=((d=Ra.find(m=>n.pathname===`${Ii}/${m.path}`))==null?void 0:d.path)??Ra[0].path,r=S.useCallback(m=>{a(`${Ii}/${m}`)},[a]),u=S.useCallback(m=>{var T,C;const p=(T=l.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!p)return;const g=Array.from(p).findIndex(j=>j===document.activeElement),v=g>=0?g:Ra.findIndex(j=>j.path===o);let b=v;if(m.key==="ArrowDown")m.preventDefault(),b=(v+1)%Ra.length;else if(m.key==="ArrowUp")m.preventDefault(),b=(v-1+Ra.length)%Ra.length;else if(m.key==="Home")m.preventDefault(),b=0;else if(m.key==="End")m.preventDefault(),b=Ra.length-1;else return;const x=Ra[b].path;a(`${Ii}/${x}`),(C=p[b])==null||C.focus()},[o,a]);return h.jsx("nav",{className:Hr.nav,ref:l,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:Ra.map(m=>{const p=m.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":p,tabIndex:p?0:-1,className:`${Hr.tab} ${p?Hr.tabActive:""}`,onClick:()=>r(m.path),children:[h.jsx("span",{className:Hr.tabIcon,"aria-hidden":"true",children:m.icon}),m.label]},m.path)})})}const b5="_container_1nk8c_1",S5="_header_1nk8c_5",_5="_headerLabel_1nk8c_12",x5="_addButton_1nk8c_20",T5="_envRow_1nk8c_55",E5="_targeted_1nk8c_69",A5="_expanded_1nk8c_72",C5="_statusDot_1nk8c_76",j5="_pulse_1nk8c_79",N5="_envName_1nk8c_83",w5="_envActions_1nk8c_87",D5="_idleLabel_1nk8c_94",k5="_newChatButton_1nk8c_99",M5="_envActionsRow_1nk8c_126",R5="_connectButton_1nk8c_134",B5="_stopButton_1nk8c_160",O5="_deleteButton_1nk8c_186",L5="_provisionMessage_1nk8c_213",z5="_errorMessage_1nk8c_220",U5="_sessionRow_1nk8c_227",V5="_selected_1nk8c_243",I5="_sessionDot_1nk8c_248",H5="_sessionSummaryRow_1nk8c_252",q5="_sessionExpandArrow_1nk8c_272",G5="_sessionSummaryText_1nk8c_283",P5="_sessionCountBadge_1nk8c_290",$5="_emptyCta_1nk8c_313",Y5="_ctaDescription_1nk8c_326",F5="_ctaButton_1nk8c_332",Qe={container:b5,header:S5,headerLabel:_5,addButton:x5,envRow:T5,targeted:E5,expanded:A5,statusDot:C5,pulse:j5,envName:N5,envActions:w5,idleLabel:D5,newChatButton:k5,envActionsRow:M5,connectButton:R5,stopButton:B5,deleteButton:O5,provisionMessage:L5,errorMessage:z5,sessionRow:U5,selected:V5,sessionDot:I5,sessionSummaryRow:H5,sessionExpandArrow:q5,sessionSummaryText:G5,sessionCountBadge:P5,emptyCta:$5,ctaDescription:Y5,ctaButton:F5},K5={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},Z5={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},m0=["running","idle","failed","interrupted","completed"],X5=.2;function Q5(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const l=m0.filter(u=>a[u]>0).map(u=>`${a[u]} ${Z5[u]||u}`),o=new Set(m0),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...l,...r].join(", ")}function J5({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:Qe.sessionDot,style:{color:a},children:"●"})}function W5({env:n,envSessions:a,selectedSessionId:l,isNewChatTarget:o,expanded:r,onToggleExpand:u,sessionsExpanded:d,onToggleSessionsExpand:m,provisionProgress:p,onProvision:g,onStop:v,onRemove:b,navigate:x}){const[T,C]=S.useState(!1),j=K5[n.status]||"var(--text-tertiary)",N=n.status==="connected",A=n.status==="connecting",O=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(yc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{b(n.id),C(!1)},onCancel:()=>C(!1)}),h.jsxs("div",{className:`${Qe.envRow} ${o?Qe.targeted:""} ${r?Qe.expanded:""}`,"data-testid":"env-row",onClick:u,children:[h.jsx("span",{className:`${Qe.statusDot} ${N?Qe.pulse:""}`,style:{color:j},children:"●"}),h.jsx("span",{className:Qe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Qe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:Qe.idleLabel,children:"(idle)"}),N&&h.jsx("button",{onClick:M=>{M.stopPropagation(),x(O0(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Qe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:Qe.envActionsRow,children:[A&&p&&h.jsx("span",{className:Qe.provisionMessage,children:p.message}),n.status==="error"&&(p==null?void 0:p.stage)==="error"&&h.jsx("span",{className:Qe.errorMessage,children:p.message}),O&&h.jsx("button",{onClick:M=>{M.stopPropagation(),g(n.id)},className:Qe.connectButton,children:n.status==="error"?"Retry":"Connect"}),N&&h.jsx("button",{onClick:M=>{M.stopPropagation(),v(n.id)},className:Qe.stopButton,children:"Stop"}),!A&&h.jsx("button",{onClick:M=>{M.stopPropagation(),C(!0)},className:Qe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Qe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:m,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),m())},children:[h.jsx("span",{className:`${Qe.sessionExpandArrow} ${d?Qe.expanded:""}`,children:"▸"}),h.jsx("span",{className:Qe.sessionSummaryText,children:Q5(a)}),h.jsx("span",{className:Qe.sessionCountBadge,children:a.length})]}),h.jsx(gs,{children:d&&h.jsx(Yn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:X5,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(M=>h.jsxs("div",{onClick:X=>{X.stopPropagation(),x(B0(M.id))},className:`${Qe.sessionRow} ${l===M.id?Qe.selected:""}`,title:M.prompt,"data-testid":"session-row",children:[h.jsx(J5,{status:M.status})," ",M.prompt.length>24?M.prompt.slice(0,24)+"...":M.prompt]},M.id))})})]})]})}function eB(){const{environments:n,sessions:a,provisionStatus:l,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=nn(),d=na(),[m,p]=S.useState(null),[g,v]=S.useState(new Set),b=dn("/sessions/:sessionId"),x=dn("/sessions/new"),T=(b==null?void 0:b.params.sessionId)!=="new"?b==null?void 0:b.params.sessionId:void 0,[C]=Uf(),j=x?C.get("env")??void 0:void 0;return h.jsxs("div",{className:Qe.container,children:[h.jsxs("div",{className:Qe.header,children:[h.jsx("span",{className:Qe.headerLabel,children:"Environments"}),h.jsx("button",{className:Qe.addButton,onClick:()=>d(Av),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Qe.emptyCta,children:[h.jsx("button",{className:Qe.ctaButton,onClick:()=>d(Av),children:"Add Environment"}),h.jsx("div",{className:Qe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(N=>{const A=a.filter(O=>O.environmentId===N.id);return h.jsx(W5,{env:N,envSessions:A,selectedSessionId:T,isNewChatTarget:j===N.id,expanded:m===N.id,onToggleExpand:()=>p(m===N.id?null:N.id),sessionsExpanded:g.has(N.id),onToggleSessionsExpand:()=>{v(O=>{const M=new Set(O);return M.has(N.id)?M.delete(N.id):M.add(N.id),M})},provisionProgress:l[N.id],onProvision:o,onStop:r,onRemove:u,navigate:d},N.id)})]})}function tB(){return h.jsx(eB,{})}const nB="_section_1ingb_14",aB="_sectionTitle_1ingb_26",sB="_sectionDescription_1ingb_35",iB="_tokenList_1ingb_48",lB="_tokenRow_1ingb_55",oB="_tokenBadge_1ingb_68",rB="_tokenName_1ingb_83",cB="_tokenTarget_1ingb_90",uB="_deleteButton_1ingb_99",dB="_addForm_1ingb_113",fB="_formRow_1ingb_119",hB="_input_1ingb_125",mB="_select_1ingb_155",pB="_addButton_1ingb_187",gB="_emptyStateInfo_1ingb_221",vB="_themeOptions_1ingb_229",yB="_themeOption_1ingb_229",bB="_themeOptionSelected_1ingb_254",SB="_themeOptionHeader_1ingb_259",_B="_themeOptionLabel_1ingb_266",xB="_themeOptionDesc_1ingb_273",TB="_variantToggle_1ingb_279",EB="_variantButton_1ingb_286",AB="_variantActive_1ingb_305",CB="_themeSwatches_1ingb_311",jB="_themeSwatch_1ingb_311",NB="_systemToggle_1ingb_325",wB="_systemToggleHint_1ingb_341",DB="_themeActive_1ingb_348",kB="_aboutGrid_1ingb_354",MB="_aboutItem_1ingb_360",RB="_aboutLabel_1ingb_373",BB="_aboutValue_1ingb_379",OB="_aboutDot_1ingb_387",LB="_aboutDotConnected_1ingb_394",zB="_aboutDotDisconnected_1ingb_398",he={section:nB,sectionTitle:aB,sectionDescription:sB,tokenList:iB,tokenRow:lB,tokenBadge:oB,tokenName:rB,tokenTarget:cB,deleteButton:uB,addForm:dB,formRow:fB,input:hB,select:mB,addButton:pB,emptyStateInfo:gB,themeOptions:vB,themeOption:yB,themeOptionSelected:bB,themeOptionHeader:SB,themeOptionLabel:_B,themeOptionDesc:xB,variantToggle:TB,variantButton:EB,variantActive:AB,themeSwatches:CB,themeSwatch:jB,systemToggle:NB,systemToggleHint:wB,themeActive:DB,aboutGrid:kB,aboutItem:MB,aboutLabel:RB,aboutValue:BB,aboutDot:OB,aboutDotConnected:LB,aboutDotDisconnected:zB},UB=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function VB(){const{credentialProviders:n,updateCredentialProviders:a}=nn(),l=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:he.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:he.tokenList,children:UB.map(o=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenName,children:o.label}),h.jsx("span",{className:he.tokenTarget,children:o.description}),h.jsx("select",{className:he.select,value:n[o.key],onChange:r=>l(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const IB=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function HB(){const{tokens:n,setToken:a,deleteToken:l}=nn(),{showToast:o}=mo(),[r,u]=S.useState(""),[d,m]=S.useState(""),[p,g]=S.useState("env_var"),[v,b]=S.useState(""),[x,T]=S.useState(null),C=A=>{if(A.preventDefault(),!r||!d)return;const O=p==="env_var"?v||r.toUpperCase()+"_TOKEN":"";a(r,d,p,O,p==="file"?v:""),o("Token saved successfully","success"),u(""),m(""),b("")},j=A=>{T(A)},N=()=>{x&&(l(x),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(yc,{isOpen:x!==null,title:"Delete Token?",description:x?`"${x}" will be permanently removed.`:void 0,onConfirm:N,onCancel:()=>T(null)}),h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Tokens"}),h.jsx("p",{className:he.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:he.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:he.tokenList,children:n.map(A=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenBadge,children:A.tokenType}),h.jsx("span",{className:he.tokenName,children:A.name}),h.jsx("span",{className:he.tokenTarget,children:A.tokenType==="env_var"?A.envVar:A.filePath}),h.jsx("button",{className:he.deleteButton,onClick:()=>j(A.name),title:`Delete ${A.name}`,children:"×"})]},A.name))}),h.jsxs("form",{className:he.addForm,onSubmit:C,children:[h.jsxs("div",{className:he.formRow,children:[h.jsx("input",{className:he.input,type:"text",placeholder:"Token name",value:r,onChange:A=>u(A.target.value)}),h.jsx("input",{className:he.input,type:"password",placeholder:"Value",value:d,onChange:A=>m(A.target.value)})]}),h.jsxs("div",{className:he.formRow,children:[h.jsx("select",{className:he.select,value:p,onChange:A=>g(A.target.value),children:IB.map(A=>h.jsx("option",{value:A.value,children:A.label},A.value))}),h.jsx("input",{className:he.input,type:"text",placeholder:p==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:v,onChange:A=>b(A.target.value)}),h.jsx("button",{className:he.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function qB(){return h.jsxs(h.Fragment,{children:[h.jsx(VB,{}),h.jsx(HB,{})]})}const GB="_container_1xcp7_1",PB="_header_1xcp7_7",$B="_form_1xcp7_19",YB="_formActions_1xcp7_87",FB="_list_1xcp7_93",KB="_card_1xcp7_99",ZB="_active_1xcp7_109",XB="_cardHeader_1xcp7_113",QB="_cardActions_1xcp7_123",JB="_description_1xcp7_128",WB="_meta_1xcp7_134",eO="_promptDetails_1xcp7_151",tO="_promptText_1xcp7_163",nO="_empty_1xcp7_180",aO="_btnPrimary_1xcp7_186",sO="_btnSecondary_1xcp7_220",iO="_btnSmall_1xcp7_247",lO="_btnDanger_1xcp7_273",Rt={container:GB,header:PB,form:$B,formActions:YB,list:FB,card:KB,active:ZB,cardHeader:XB,cardActions:QB,description:JB,meta:WB,promptDetails:eO,promptText:tO,empty:nO,btnPrimary:aO,btnSecondary:sO,btnSmall:iO,btnDanger:lO};function oO(){const{personas:n,createPersona:a,updatePersona:l,deletePersona:o}=nn(),[r,u]=S.useState(null),[d,m]=S.useState(!1),[p,g]=S.useState(null),[v,b]=S.useState(""),[x,T]=S.useState(""),[C,j]=S.useState(""),[N,A]=S.useState(""),[O,M]=S.useState(""),[X,H]=S.useState(0),J=()=>{b(""),T(""),j(""),A(""),M(""),H(0)},W=()=>{J(),u(null),m(!0)},$=te=>{b(te.name),T(te.description),j(te.systemPrompt),A(te.runtime),M(te.model),H(te.maxTurns),u(te),m(!1)},ne=te=>{te.preventDefault(),!(!v.trim()||!C.trim())&&(r?(l(r.id,v,x,C,N,O,X),u(null)):(a(v,x,C,N,O,X),m(!1)),J())},ge=te=>{o(te),g(null),(r==null?void 0:r.id)===te&&(u(null),J())},U=()=>{u(null),m(!1),J()},pe=()=>h.jsxs("form",{onSubmit:ne,className:Rt.form,children:[h.jsx("h3",{children:r?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:v,onChange:te=>b(te.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:x,onChange:te=>T(te.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:N,onChange:te=>A(te.target.value),children:[h.jsx("option",{value:"",children:"Default"}),h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:O,onChange:te=>M(te.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:X,onChange:te=>H(parseInt(te.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:C,onChange:te=>j(te.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:Rt.formActions,children:[h.jsx("button",{type:"submit",className:Rt.btnPrimary,children:r?"Save":"Create"}),h.jsx("button",{type:"button",onClick:U,className:Rt.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Rt.container,children:[h.jsxs("div",{className:Rt.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:W,className:Rt.btnPrimary,children:"+ New Persona"})]}),(d||r)&&pe(),n.length===0&&!d?h.jsx("p",{className:Rt.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Rt.list,children:n.map(te=>h.jsxs("div",{className:`${Rt.card} ${(r==null?void 0:r.id)===te.id?Rt.active:""}`,children:[h.jsxs("div",{className:Rt.cardHeader,children:[h.jsx("strong",{children:te.name}),h.jsxs("div",{className:Rt.cardActions,children:[h.jsx("button",{onClick:()=>$(te),className:Rt.btnSmall,children:"Edit"}),p===te.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ge(te.id),className:Rt.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>g(null),className:Rt.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>g(te.id),className:Rt.btnSmall,children:"Delete"})]})]}),te.description&&h.jsx("p",{className:Rt.description,children:te.description}),h.jsxs("div",{className:Rt.meta,children:[te.runtime&&h.jsxs("span",{children:["Runtime: ",te.runtime]}),te.model&&h.jsxs("span",{children:["Model: ",te.model]}),te.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",te.maxTurns]})]}),h.jsxs("details",{className:Rt.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Rt.promptText,children:te.systemPrompt})]})]},te.id))})]})}function rO(){return h.jsx(oO,{})}function cO(){const{themeId:n,resolvedThemeId:a,setTheme:l,preferSystem:o,setPreferSystem:r}=q0();return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Appearance"}),h.jsx("p",{className:he.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:he.themeOptions,children:dc.filter(u=>!u.hidden).map(u=>{const d=!!(u.variantLightId&&u.variantDarkId),m=d?n===u.id||n===u.variantLightId||n===u.variantDarkId:n===u.id,p=d&&a===u.variantLightId;return h.jsxs("button",{type:"button",className:`${he.themeOption} ${m?he.themeOptionSelected:""}`,"aria-pressed":m,onClick:()=>l(u.id),children:[h.jsxs("span",{className:he.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:he.themeOptionLabel,children:u.label}),h.jsx("span",{className:he.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:he.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&p?he.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),l(u.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),l(u.variantLightId))},"aria-label":"Light variant","aria-pressed":m&&p,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&!p?he.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),l(u.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),l(u.variantDarkId))},"aria-label":"Dark variant","aria-pressed":m&&!p,children:"☾"})]})]}),u.swatches&&h.jsx("span",{className:he.themeSwatches,children:u.swatches.map((g,v)=>h.jsx("span",{className:he.themeSwatch,style:{background:g}},v))})]},u.id)})}),h.jsxs("label",{className:he.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:u=>r(u.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:he.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:he.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function uO(){return h.jsx(cO,{})}function dO(){const{connected:n,environments:a,sessions:l}=nn(),o=a.filter(d=>d.status==="connected").length,r=a.length,u=l.filter(d=>["running","idle"].includes(d.status)).length;return h.jsxs("section",{className:he.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:he.sectionTitle,children:"About"}),h.jsx("p",{className:he.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:he.aboutGrid,children:[h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Connection"}),h.jsxs("span",{className:he.aboutValue,children:[h.jsx("span",{className:`${he.aboutDot} ${n?he.aboutDotConnected:he.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Environments"}),h.jsxs("span",{className:he.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:he.aboutValue,children:u})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Version"}),h.jsx("span",{className:he.aboutValue,children:"0.31.1"})]})]})]})}function fO(){return h.jsx(dO,{})}const hO="_root_h353j_1",mO="_body_h353j_7",pO="_main_h353j_19",gO="_sidebarWrapper_h353j_26",vO="_overlay_h353j_56",Yl={root:hO,body:mO,main:pO,sidebarWrapper:gO,overlay:vO},yO=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function bO(){const{lastSpawnedId:n,environments:a}=nn(),{showToast:l}=mo();bk(a,l);const o=na(),r=hn(),u=r.pathname.startsWith(Ii),[d,m]=S.useState(!1),p=S.useCallback(()=>m(g=>!g),[]);return S.useEffect(()=>{m(!1)},[r.pathname]),S.useEffect(()=>{if(!d)return;const g=v=>{v.key==="Escape"&&m(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[d]),S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(B0(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Yl.root,children:[h.jsx(wE,{onToggleSidebar:u?void 0:p,sidebarOpen:d}),h.jsxs("div",{className:Yl.body,children:[h.jsx("div",{className:Yl.sidebarWrapper,"data-sidebar-open":d,"data-settings":u,children:u?h.jsx(y5,{}):h.jsx(ID,{})}),d&&!u&&h.jsx("div",{className:Yl.overlay,"data-testid":"drawer-overlay",onClick:()=>m(!1)}),h.jsxs("div",{className:Yl.main,children:[h.jsx(w0,{}),h.jsx(ik,{})]})]}),h.jsx(yk,{})]})}function SO(){return h.jsx(lT,{children:h.jsxs(Bt,{element:h.jsx(bO,{}),children:[h.jsx(Bt,{index:!0,element:h.jsx(fR,{})}),h.jsx(Bt,{path:"sessions/new",element:h.jsx(SR,{})}),h.jsx(Bt,{path:"sessions/:sessionId",element:h.jsx(ER,{})}),h.jsx(Bt,{path:"projects/:projectId",element:h.jsx(x3,{})}),h.jsx(Bt,{path:"tasks/new",element:h.jsx(G3,{})}),h.jsx(Bt,{path:"tasks/:taskId",element:h.jsx(Xd,{})}),h.jsx(Bt,{path:"tasks/:taskId/stream",element:h.jsx(Xd,{})}),h.jsx(Bt,{path:"tasks/:taskId/findings",element:h.jsx(Xd,{})}),h.jsx(Bt,{path:"tasks/:taskId/edit",element:h.jsx(P3,{})}),h.jsx(Bt,{path:"environments/new",element:h.jsx(c5,{})}),h.jsxs(Bt,{path:"settings",element:h.jsx(h5,{}),children:[h.jsx(Bt,{index:!0,element:h.jsx(qr,{to:"environments",replace:!0})}),h.jsx(Bt,{path:"environments",element:h.jsx(tB,{})}),h.jsx(Bt,{path:"credentials",element:h.jsx(qB,{})}),h.jsx(Bt,{path:"tokens",element:h.jsx(qr,{to:"../credentials",replace:!0})}),h.jsx(Bt,{path:"personas",element:h.jsx(rO,{})}),h.jsx(Bt,{path:"appearance",element:h.jsx(uO,{})}),h.jsx(Bt,{path:"about",element:h.jsx(fO,{})})]}),h.jsx(Bt,{path:"*",element:h.jsx(qr,{to:"/",replace:!0})})]})})}function _O(){const n=yO?hE:sE;return h.jsx(bE,{children:h.jsx(pE,{children:h.jsx(n,{children:h.jsx(kT,{children:h.jsx(SO,{})})})})})}rx.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(_O,{})}));
|