@grackle-ai/web 0.26.0 → 0.27.0

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 lx,a as S,j as h,v as ox,b as rx,t as Tr,i as cx,f as ux,M as rf,c as cf}from"./markdown-gcy1Jmzi.js";import{r as dx,d as Gg,H as Pg,P as qg,i as fx,B as hx,a as mx,C as px,M as gx}from"./dagview-EHk2VaeR.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();var fd={exports:{}},Ol={},hd={exports:{}},md={};/**
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 Yg;function vx(){return Yg||(Yg=1,(function(n){function s(V,Q){var W=V.length;V.push(Q);e:for(;0<W;){var Ne=W-1>>>1,Te=V[Ne];if(0<c(Te,Q))V[Ne]=Q,V[W]=Te,W=Ne;else break e}}function l(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var Q=V[0],W=V.pop();if(W!==Q){V[0]=W;e:for(var Ne=0,Te=V.length,Ie=Te>>>1;Ne<Ie;){var Ce=2*(Ne+1)-1,xe=V[Ce],Ee=Ce+1,F=V[Ee];if(0>c(xe,W))Ee<Te&&0>c(F,xe)?(V[Ne]=F,V[Ee]=W,Ne=Ee):(V[Ne]=xe,V[Ce]=W,Ne=Ce);else if(Ee<Te&&0>c(F,W))V[Ne]=F,V[Ee]=W,Ne=Ee;else break e}}return Q}function c(V,Q){var W=V.sortIndex-Q.sortIndex;return W!==0?W:V.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var p=[],v=[],y=1,b=null,_=3,T=!1,N=!1,D=!1,w=!1,j=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function $(V){for(var Q=l(v);Q!==null;){if(Q.callback===null)o(v);else if(Q.startTime<=V)o(v),Q.sortIndex=Q.expirationTime,s(p,Q);else break;Q=l(v)}}function I(V){if(D=!1,$(V),!N)if(l(p)!==null)N=!0,J||(J=!0,pe());else{var Q=l(v);Q!==null&&q(I,Q.startTime-V)}}var J=!1,te=-1,Y=5,X=-1;function ue(){return w?!0:!(n.unstable_now()-X<Y)}function R(){if(w=!1,J){var V=n.unstable_now();X=V;var Q=!0;try{e:{N=!1,D&&(D=!1,H(te),te=-1),T=!0;var W=_;try{t:{for($(V),b=l(p);b!==null&&!(b.expirationTime>V&&ue());){var Ne=b.callback;if(typeof Ne=="function"){b.callback=null,_=b.priorityLevel;var Te=Ne(b.expirationTime<=V);if(V=n.unstable_now(),typeof Te=="function"){b.callback=Te,$(V),Q=!0;break t}b===l(p)&&o(p),$(V)}else o(p);b=l(p)}if(b!==null)Q=!0;else{var Ie=l(v);Ie!==null&&q(I,Ie.startTime-V),Q=!1}}break e}finally{b=null,_=W,T=!1}Q=void 0}}finally{Q?pe():J=!1}}}var pe;if(typeof M=="function")pe=function(){M(R)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ge=ee.port2;ee.port1.onmessage=R,pe=function(){ge.postMessage(null)}}else pe=function(){j(R,0)};function q(V,Q){te=j(function(){V(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(V){V.callback=null},n.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(V){switch(_){case 1:case 2:case 3:var Q=3;break;default:Q=_}var W=_;_=Q;try{return V()}finally{_=W}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(V,Q){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var W=_;_=V;try{return Q()}finally{_=W}},n.unstable_scheduleCallback=function(V,Q,W){var Ne=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?Ne+W:Ne):W=Ne,V){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=W+Te,V={id:y++,callback:Q,priorityLevel:V,startTime:W,expirationTime:Te,sortIndex:-1},W>Ne?(V.sortIndex=W,s(v,V),l(p)===null&&V===l(v)&&(D?(H(te),te=-1):D=!0,q(I,W-Ne))):(V.sortIndex=Te,s(p,V),N||T||(N=!0,J||(J=!0,pe()))),V},n.unstable_shouldYield=ue,n.unstable_wrapCallback=function(V){var Q=_;return function(){var W=_;_=Q;try{return V.apply(this,arguments)}finally{_=W}}}})(md)),md}var Kg;function yx(){return Kg||(Kg=1,hd.exports=vx()),hd.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 Zg;function bx(){if(Zg)return Ol;Zg=1;var n=yx(),s=lx(),l=dx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function 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(d(e)!==e)throw Error(o(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var r=a.return;if(r===null)break;var u=r.alternate;if(u===null){if(i=r.return,i!==null){a=i;continue}break}if(r.child===u.child){for(u=r.child;u;){if(u===a)return p(r),e;if(u===i)return p(r),t;u=u.sibling}throw Error(o(188))}if(a.return!==i.return)a=r,i=u;else{for(var g=!1,x=r.child;x;){if(x===a){g=!0,a=r,i=u;break}if(x===i){g=!0,i=r,a=u;break}x=x.sibling}if(!g){for(x=u.child;x;){if(x===a){g=!0,a=u,i=r;break}if(x===i){g=!0,i=u,a=r;break}x=x.sibling}if(!g)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),M=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=R&&e[R]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case j:return"Profiler";case w:return"StrictMode";case I:return"Suspense";case J:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case M:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var q=Array.isArray,V=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},Ne=[],Te=-1;function Ie(e){return{current:e}}function Ce(e){0>Te||(e.current=Ne[Te],Ne[Te]=null,Te--)}function xe(e,t){Te++,Ne[Te]=e.current,e.current=t}var Ee=Ie(null),F=Ie(null),U=Ie(null),qe=Ie(null);function $t(e,t){switch(xe(U,t),xe(F,e),xe(Ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dg(t),e=fg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ce(Ee),xe(Ee,e)}function sn(){Ce(Ee),Ce(F),Ce(U)}function Fn(e){e.memoizedState!==null&&xe(qe,e);var t=Ee.current,a=fg(t,e.type);t!==a&&(xe(F,e),xe(Ee,a))}function ln(e){F.current===e&&(Ce(Ee),Ce(F)),qe.current===e&&(Ce(qe),Dl._currentValue=W)}var jn,ft;function Qt(e){if(jn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);jn=t&&t[1]||"",ft=-1<a.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+jn+e+ft}var Pn=!1;function qn(e,t){if(!e||Pn)return"";Pn=!0;var a=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(z){var L=z}Reflect.construct(e,[],K)}else{try{K.call()}catch(z){L=z}e.call(K.prototype)}}else{try{throw Error()}catch(z){L=z}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(z){if(z&&L&&typeof z.stack=="string")return[z.stack,L.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=i.DetermineComponentFrameRoot(),g=u[0],x=u[1];if(g&&x){var E=g.split(`
20
+ `),B=x.split(`
21
+ `);for(r=i=0;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;for(;r<B.length&&!B[r].includes("DetermineComponentFrameRoot");)r++;if(i===E.length||r===B.length)for(i=E.length-1,r=B.length-1;1<=i&&0<=r&&E[i]!==B[r];)r--;for(;1<=i&&0<=r;i--,r--)if(E[i]!==B[r]){if(i!==1||r!==1)do if(i--,r--,0>r||E[i]!==B[r]){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<=r);break}}}finally{Pn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Qt(a):""}function Cn(e,t){switch(e.tag){case 26:case 27:case 5:return Qt(e.type);case 16:return Qt("Lazy");case 13:return e.child!==t&&t!==null?Qt("Suspense Fallback"):Qt("Suspense");case 19:return Qt("SuspenseList");case 0:case 15:return qn(e.type,!1);case 11:return qn(e.type.render,!1);case 1:return qn(e.type,!0);case 31:return Qt("Activity");default:return""}}function Z(e){try{var t="",a=null;do t+=Cn(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
23
+ Error generating stack: `+i.message+`
24
+ `+i.stack}}var ae=Object.prototype.hasOwnProperty,oe=n.unstable_scheduleCallback,he=n.unstable_cancelCallback,_e=n.unstable_shouldYield,Se=n.unstable_requestPaint,De=n.unstable_now,Ve=n.unstable_getCurrentPriorityLevel,at=n.unstable_ImmediatePriority,ht=n.unstable_UserBlockingPriority,tt=n.unstable_NormalPriority,Bt=n.unstable_LowPriority,gt=n.unstable_IdlePriority,Jn=n.log,Wn=n.unstable_setDisableYieldValue,An=null,Ct=null;function mn(e){if(typeof Jn=="function"&&Wn(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(An,e)}catch{}}var xt=Math.clz32?Math.clz32:we,zt=Math.log,ne=Math.LN2;function we(e){return e>>>=0,e===0?32:31-(zt(e)/ne|0)|0}var Le=256,Ye=262144,se=4194304;function ve(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 nt(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var r=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var x=i&134217727;return x!==0?(i=x&~u,i!==0?r=ve(i):(g&=x,g!==0?r=ve(g):a||(a=x&~e,a!==0&&(r=ve(a))))):(x=i&~u,x!==0?r=ve(x):g!==0?r=ve(g):a||(a=i&~e,a!==0&&(r=ve(a)))),r===0?0:t!==0&&t!==r&&(t&u)===0&&(u=r&-r,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:r}function le(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 Nn(){var e=se;return se<<=1,(se&62914560)===0&&(se=4194304),e}function zs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ba(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function co(e,t,a,i,r,u){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,E=e.expirationTimes,B=e.hiddenUpdates;for(a=g&~a;0<a;){var G=31-xt(a),K=1<<G;x[G]=0,E[G]=-1;var L=B[G];if(L!==null)for(B[G]=null,G=0;G<L.length;G++){var z=L[G];z!==null&&(z.lane&=-536870913)}a&=~K}i!==0&&Gi(e,i,0),u!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Gi(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-xt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Pi(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-xt(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function qi(e,t){var a=t&-t;return a=(a&42)!==0?1:Vs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Vs(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 Hs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yi(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Bg(e.type))}function Ki(e,t){var a=Q.p;try{return Q.p=e,t()}finally{Q.p=a}}var Yn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Yn,It="__reactProps$"+Yn,da="__reactContainer$"+Yn,ie="__reactEvents$"+Yn,He="__reactListeners$"+Yn,Me="__reactHandles$"+Yn,Ue="__reactResources$"+Yn,Ft="__reactMarker$"+Yn;function on(e){delete e[Nt],delete e[It],delete e[ie],delete e[He],delete e[Me]}function rt(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[da]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=bg(e);e!==null;){if(a=e[Nt])return a;e=bg(e)}return t}e=a,a=e.parentNode}return null}function ct(e){if(e=e[Nt]||e[da]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Kn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Is(e){var t=e[Ue];return t||(t=e[Ue]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Vt(e){e[Ft]=!0}var Wf=new Set,eh={};function ds(e,t){Gs(e,t),Gs(e+"Capture",t)}function Gs(e,t){for(eh[e]=t,e=0;e<t.length;e++)Wf.add(t[e])}var Fb=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]*$"),th={},nh={};function Jb(e){return ae.call(nh,e)?!0:ae.call(th,e)?!1:Fb.test(e)?nh[e]=!0:(th[e]=!0,!1)}function uo(e,t,a){if(Jb(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){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,""+a)}}function fo(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function fa(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function wn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ah(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Wb(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,u=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(g){a=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ic(e){if(!e._valueTracker){var t=ah(e)?"checked":"value";e._valueTracker=Wb(e,t,""+e[t])}}function sh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=ah(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function ho(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 eS=/[\n"\\]/g;function Dn(e){return e.replace(eS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function lc(e,t,a,i,r,u,g,x){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wn(t)):e.value!==""+wn(t)&&(e.value=""+wn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?oc(e,g,wn(t)):a!=null?oc(e,g,wn(a)):i!=null&&e.removeAttribute("value"),r==null&&u!=null&&(e.defaultChecked=!!u),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+wn(x):e.removeAttribute("name")}function ih(e,t,a,i,r,u,g,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){ic(e);return}a=a!=null?""+wn(a):"",t=t!=null?""+wn(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ic(e)}function oc(e,t,a){t==="number"&&ho(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ps(e,t,a,i){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&i&&(e[a].defaultSelected=!0)}else{for(a=""+wn(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function lh(e,t,a){if(t!=null&&(t=""+wn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+wn(a):""}function oh(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if(q(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=wn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),ic(e)}function qs(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var tS=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 rh(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||tS.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function ch(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&a[r]!==i&&rh(e,r,i)}else for(var u in t)t.hasOwnProperty(u)&&rh(e,u,t[u])}function rc(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 nS=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"]]),aS=/^[\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 mo(e){return aS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ha(){}var cc=null;function uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ys=null,Ks=null;function uh(e){var t=ct(e);if(t&&(e=t.stateNode)){var a=e[It]||null;e:switch(e=t.stateNode,t.type){case"input":if(lc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Dn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var r=i[It]||null;if(!r)throw Error(o(90));lc(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&sh(i)}break e;case"textarea":lh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Ps(e,!!a.multiple,t,!1)}}}var dc=!1;function dh(e,t,a){if(dc)return e(t,a);dc=!0;try{var i=e(t);return i}finally{if(dc=!1,(Ys!==null||Ks!==null)&&(tr(),Ys&&(t=Ys,e=Ks,Ks=Ys=null,uh(t),e)))for(t=0;t<e.length;t++)uh(e[t])}}function Zi(e,t){var a=e.stateNode;if(a===null)return null;var i=a[It]||null;if(i===null)return null;a=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(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=!1;if(ma)try{var Xi={};Object.defineProperty(Xi,"passive",{get:function(){fc=!0}}),window.addEventListener("test",Xi,Xi),window.removeEventListener("test",Xi,Xi)}catch{fc=!1}var La=null,hc=null,po=null;function fh(){if(po)return po;var e,t=hc,a=t.length,i,r="value"in La?La.value:La.textContent,u=r.length;for(e=0;e<a&&t[e]===r[e];e++);var g=a-e;for(i=1;i<=g&&t[a-i]===r[u-i];i++);return po=r.slice(e,1<i?1-i:void 0)}function go(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 vo(){return!0}function hh(){return!1}function rn(e){function t(a,i,r,u,g){this._reactName=a,this._targetInst=r,this.type=i,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?vo:hh,this.isPropagationStopped=hh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=vo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=vo)},persist:function(){},isPersistent:vo}),t}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yo=rn(fs),$i=b({},fs,{view:0,detail:0}),sS=rn($i),mc,pc,Qi,bo=b({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vc,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!==Qi&&(Qi&&e.type==="mousemove"?(mc=e.screenX-Qi.screenX,pc=e.screenY-Qi.screenY):pc=mc=0,Qi=e),mc)},movementY:function(e){return"movementY"in e?e.movementY:pc}}),mh=rn(bo),iS=b({},bo,{dataTransfer:0}),lS=rn(iS),oS=b({},$i,{relatedTarget:0}),gc=rn(oS),rS=b({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),cS=rn(rS),uS=b({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dS=rn(uS),fS=b({},fs,{data:0}),ph=rn(fS),hS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mS={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"},pS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pS[e])?!!t[e]:!1}function vc(){return gS}var vS=b({},$i,{key:function(e){if(e.key){var t=hS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=go(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vc,charCode:function(e){return e.type==="keypress"?go(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?go(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yS=rn(vS),bS=b({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gh=rn(bS),SS=b({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vc}),xS=rn(SS),_S=b({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),TS=rn(_S),ES=b({},bo,{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}),jS=rn(ES),CS=b({},fs,{newState:0,oldState:0}),AS=rn(CS),NS=[9,13,27,32],yc=ma&&"CompositionEvent"in window,Fi=null;ma&&"documentMode"in document&&(Fi=document.documentMode);var wS=ma&&"TextEvent"in window&&!Fi,vh=ma&&(!yc||Fi&&8<Fi&&11>=Fi),yh=" ",bh=!1;function Sh(e,t){switch(e){case"keyup":return NS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zs=!1;function DS(e,t){switch(e){case"compositionend":return xh(t);case"keypress":return t.which!==32?null:(bh=!0,yh);case"textInput":return e=t.data,e===yh&&bh?null:e;default:return null}}function kS(e,t){if(Zs)return e==="compositionend"||!yc&&Sh(e,t)?(e=fh(),po=hc=La=null,Zs=!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 vh&&t.locale!=="ko"?null:t.data;default:return null}}var RS={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"?!!RS[e.type]:t==="textarea"}function Th(e,t,a,i){Ys?Ks?Ks.push(i):Ks=[i]:Ys=i,t=rr(t,"onChange"),0<t.length&&(a=new yo("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Ji=null,Wi=null;function MS(e){ig(e,0)}function So(e){var t=Kn(e);if(sh(t))return e}function Eh(e,t){if(e==="change")return t}var jh=!1;if(ma){var bc;if(ma){var Sc="oninput"in document;if(!Sc){var Ch=document.createElement("div");Ch.setAttribute("oninput","return;"),Sc=typeof Ch.oninput=="function"}bc=Sc}else bc=!1;jh=bc&&(!document.documentMode||9<document.documentMode)}function Ah(){Ji&&(Ji.detachEvent("onpropertychange",Nh),Wi=Ji=null)}function Nh(e){if(e.propertyName==="value"&&So(Wi)){var t=[];Th(t,Wi,e,uc(e)),dh(MS,t)}}function OS(e,t,a){e==="focusin"?(Ah(),Ji=t,Wi=a,Ji.attachEvent("onpropertychange",Nh)):e==="focusout"&&Ah()}function BS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return So(Wi)}function LS(e,t){if(e==="click")return So(t)}function US(e,t){if(e==="input"||e==="change")return So(t)}function zS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:zS;function el(e,t){if(pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var r=a[i];if(!ae.call(t,r)||!pn(e[r],t[r]))return!1}return!0}function wh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dh(e,t){var a=wh(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=wh(a)}}function kh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ho(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ho(e.document)}return t}function xc(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 VS=ma&&"documentMode"in document&&11>=document.documentMode,Xs=null,_c=null,tl=null,Tc=!1;function Mh(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Tc||Xs==null||Xs!==ho(i)||(i=Xs,"selectionStart"in i&&xc(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}),tl&&el(tl,i)||(tl=i,i=rr(_c,"onSelect"),0<i.length&&(t=new yo("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Xs)))}function hs(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var $s={animationend:hs("Animation","AnimationEnd"),animationiteration:hs("Animation","AnimationIteration"),animationstart:hs("Animation","AnimationStart"),transitionrun:hs("Transition","TransitionRun"),transitionstart:hs("Transition","TransitionStart"),transitioncancel:hs("Transition","TransitionCancel"),transitionend:hs("Transition","TransitionEnd")},Ec={},Oh={};ma&&(Oh=document.createElement("div").style,"AnimationEvent"in window||(delete $s.animationend.animation,delete $s.animationiteration.animation,delete $s.animationstart.animation),"TransitionEvent"in window||delete $s.transitionend.transition);function ms(e){if(Ec[e])return Ec[e];if(!$s[e])return e;var t=$s[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Oh)return Ec[e]=t[a];return e}var Bh=ms("animationend"),Lh=ms("animationiteration"),Uh=ms("animationstart"),HS=ms("transitionrun"),IS=ms("transitionstart"),GS=ms("transitioncancel"),zh=ms("transitionend"),Vh=new Map,jc="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(" ");jc.push("scrollEnd");function Zn(e,t){Vh.set(e,t),ds(t,[e])}var xo=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)},kn=[],Qs=0,Cc=0;function _o(){for(var e=Qs,t=Cc=Qs=0;t<e;){var a=kn[t];kn[t++]=null;var i=kn[t];kn[t++]=null;var r=kn[t];kn[t++]=null;var u=kn[t];if(kn[t++]=null,i!==null&&r!==null){var g=i.pending;g===null?r.next=r:(r.next=g.next,g.next=r),i.pending=r}u!==0&&Hh(a,r,u)}}function To(e,t,a,i){kn[Qs++]=e,kn[Qs++]=t,kn[Qs++]=a,kn[Qs++]=i,Cc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Ac(e,t,a,i){return To(e,t,a,i),Eo(e)}function ps(e,t){return To(e,null,null,t),Eo(e)}function Hh(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var r=!1,u=e.return;u!==null;)u.childLanes|=a,i=u.alternate,i!==null&&(i.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(r=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,r&&t!==null&&(r=31-xt(a),e=u.hiddenUpdates,i=e[r],i===null?e[r]=[t]:i.push(t),t.lane=a|536870912),u):null}function Eo(e){if(50<Tl)throw Tl=0,Lu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fs={};function PS(e,t,a,i){this.tag=e,this.key=a,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 gn(e,t,a,i){return new PS(e,t,a,i)}function Nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pa(e,t){var a=e.alternate;return a===null?(a=gn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ih(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function jo(e,t,a,i,r,u){var g=0;if(i=e,typeof e=="function")Nc(e)&&(g=1);else if(typeof e=="string")g=X1(e,a,Ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=gn(31,a,t,r),e.elementType=X,e.lanes=u,e;case D:return gs(a.children,r,u,t);case w:g=8,r|=24;break;case j:return e=gn(12,a,t,r|2),e.elementType=j,e.lanes=u,e;case I:return e=gn(13,a,t,r),e.elementType=I,e.lanes=u,e;case J:return e=gn(19,a,t,r),e.elementType=J,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:g=10;break e;case H:g=9;break e;case $:g=11;break e;case te:g=14;break e;case Y:g=16,i=null;break e}g=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=gn(g,a,t,r),t.elementType=e,t.type=i,t.lanes=u,t}function gs(e,t,a,i){return e=gn(7,e,i,t),e.lanes=a,e}function wc(e,t,a){return e=gn(6,e,null,t),e.lanes=a,e}function Gh(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function Dc(e,t,a){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ph=new WeakMap;function Rn(e,t){if(typeof e=="object"&&e!==null){var a=Ph.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Z(t)},Ph.set(e,t),t)}return{value:e,source:t,stack:Z(t)}}var Js=[],Ws=0,Co=null,nl=0,Mn=[],On=0,Ua=null,ea=1,ta="";function ga(e,t){Js[Ws++]=nl,Js[Ws++]=Co,Co=e,nl=t}function qh(e,t,a){Mn[On++]=ea,Mn[On++]=ta,Mn[On++]=Ua,Ua=e;var i=ea;e=ta;var r=32-xt(i)-1;i&=~(1<<r),a+=1;var u=32-xt(t)+r;if(30<u){var g=r-r%5;u=(i&(1<<g)-1).toString(32),i>>=g,r-=g,ea=1<<32-xt(t)+r|a<<r|i,ta=u+e}else ea=1<<u|a<<r|i,ta=e}function kc(e){e.return!==null&&(ga(e,1),qh(e,1,0))}function Rc(e){for(;e===Co;)Co=Js[--Ws],Js[Ws]=null,nl=Js[--Ws],Js[Ws]=null;for(;e===Ua;)Ua=Mn[--On],Mn[On]=null,ta=Mn[--On],Mn[On]=null,ea=Mn[--On],Mn[On]=null}function Yh(e,t){Mn[On++]=ea,Mn[On++]=ta,Mn[On++]=Ua,ea=t.id,ta=t.overflow,Ua=e}var Gt=null,st=null,ze=!1,za=null,Bn=!1,Mc=Error(o(519));function Va(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw al(Rn(t,e)),Mc}function Kh(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Nt]=e,t[It]=i,a){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(a=0;a<jl.length;a++)Re(jl[a],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),ih(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),oh(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||cg(t.textContent,a)?(i.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),i.onScroll!=null&&Re("scroll",t),i.onScrollEnd!=null&&Re("scrollend",t),i.onClick!=null&&(t.onclick=ha),t=!0):t=!1,t||Va(e,!0)}function Zh(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Bn=!1;return;case 27:case 3:Bn=!0;return;default:Gt=Gt.return}}function ei(e){if(e!==Gt)return!1;if(!ze)return Zh(e),ze=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Fu(e.type,e.memoizedProps)),a=!a),a&&st&&Va(e),Zh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));st=yg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));st=yg(e)}else t===27?(t=st,Wa(e.type)?(e=nd,nd=null,st=e):st=t):st=Gt?Un(e.stateNode.nextSibling):null;return!0}function vs(){st=Gt=null,ze=!1}function Oc(){var e=za;return e!==null&&(fn===null?fn=e:fn.push.apply(fn,e),za=null),e}function al(e){za===null?za=[e]:za.push(e)}var Bc=Ie(null),ys=null,va=null;function Ha(e,t,a){xe(Bc,t._currentValue),t._currentValue=a}function ya(e){e._currentValue=Bc.current,Ce(Bc)}function Lc(e,t,a){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===a)break;e=e.return}}function Uc(e,t,a,i){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var u=r.dependencies;if(u!==null){var g=r.child;u=u.firstContext;e:for(;u!==null;){var x=u;u=r;for(var E=0;E<t.length;E++)if(x.context===t[E]){u.lanes|=a,x=u.alternate,x!==null&&(x.lanes|=a),Lc(u.return,a,e),i||(g=null);break e}u=x.next}}else if(r.tag===18){if(g=r.return,g===null)throw Error(o(341));g.lanes|=a,u=g.alternate,u!==null&&(u.lanes|=a),Lc(g,a,e),g=null}else g=r.child;if(g!==null)g.return=r;else for(g=r;g!==null;){if(g===e){g=null;break}if(r=g.sibling,r!==null){r.return=g.return,g=r;break}g=g.return}r=g}}function ti(e,t,a,i){e=null;for(var r=t,u=!1;r!==null;){if(!u){if((r.flags&524288)!==0)u=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var g=r.alternate;if(g===null)throw Error(o(387));if(g=g.memoizedProps,g!==null){var x=r.type;pn(r.pendingProps.value,g.value)||(e!==null?e.push(x):e=[x])}}else if(r===qe.current){if(g=r.alternate,g===null)throw Error(o(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Dl):e=[Dl])}r=r.return}e!==null&&Uc(t,e,a,i),t.flags|=262144}function Ao(e){for(e=e.firstContext;e!==null;){if(!pn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bs(e){ys=e,va=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pt(e){return Xh(ys,e)}function No(e,t){return ys===null&&bs(e),Xh(e,t)}function Xh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},va===null){if(e===null)throw Error(o(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return a}var qS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},YS=n.unstable_scheduleCallback,KS=n.unstable_NormalPriority,wt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zc(){return{controller:new qS,data:new Map,refCount:0}}function sl(e){e.refCount--,e.refCount===0&&YS(KS,function(){e.controller.abort()})}var il=null,Vc=0,ni=0,ai=null;function ZS(e,t){if(il===null){var a=il=[];Vc=0,ni=Gu(),ai={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Vc++,t.then($h,$h),t}function $h(){if(--Vc===0&&il!==null){ai!==null&&(ai.status="fulfilled");var e=il;il=null,ni=0,ai=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function XS(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(i.status="rejected",i.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),i}var Qh=V.S;V.S=function(e,t){Mp=De(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ZS(e,t),Qh!==null&&Qh(e,t)};var Ss=Ie(null);function Hc(){var e=Ss.current;return e!==null?e:et.pooledCache}function wo(e,t){t===null?xe(Ss,Ss.current):xe(Ss,t.pool)}function Fh(){var e=Hc();return e===null?null:{parent:wt._currentValue,pool:e}}var si=Error(o(460)),Ic=Error(o(474)),Do=Error(o(542)),ko={then:function(){}};function Jh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ha,ha),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tm(e),e;default:if(typeof t.status=="string")t.then(ha,ha);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=i}},function(i){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tm(e),e}throw _s=t,si}}function xs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_s=a,si):a}}var _s=null;function em(){if(_s===null)throw Error(o(459));var e=_s;return _s=null,e}function tm(e){if(e===si||e===Do)throw Error(o(483))}var ii=null,ll=0;function Ro(e){var t=ll;return ll+=1,ii===null&&(ii=[]),Wh(ii,e,t)}function ol(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Mo(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function nm(e){function t(k,C){if(e){var O=k.deletions;O===null?(k.deletions=[C],k.flags|=16):O.push(C)}}function a(k,C){if(!e)return null;for(;C!==null;)t(k,C),C=C.sibling;return null}function i(k){for(var C=new Map;k!==null;)k.key!==null?C.set(k.key,k):C.set(k.index,k),k=k.sibling;return C}function r(k,C){return k=pa(k,C),k.index=0,k.sibling=null,k}function u(k,C,O){return k.index=O,e?(O=k.alternate,O!==null?(O=O.index,O<C?(k.flags|=67108866,C):O):(k.flags|=67108866,C)):(k.flags|=1048576,C)}function g(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function x(k,C,O,P){return C===null||C.tag!==6?(C=wc(O,k.mode,P),C.return=k,C):(C=r(C,O),C.return=k,C)}function E(k,C,O,P){var me=O.type;return me===D?G(k,C,O.props.children,P,O.key):C!==null&&(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Y&&xs(me)===C.type)?(C=r(C,O.props),ol(C,O),C.return=k,C):(C=jo(O.type,O.key,O.props,null,k.mode,P),ol(C,O),C.return=k,C)}function B(k,C,O,P){return C===null||C.tag!==4||C.stateNode.containerInfo!==O.containerInfo||C.stateNode.implementation!==O.implementation?(C=Dc(O,k.mode,P),C.return=k,C):(C=r(C,O.children||[]),C.return=k,C)}function G(k,C,O,P,me){return C===null||C.tag!==7?(C=gs(O,k.mode,P,me),C.return=k,C):(C=r(C,O),C.return=k,C)}function K(k,C,O){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=wc(""+C,k.mode,O),C.return=k,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case T:return O=jo(C.type,C.key,C.props,null,k.mode,O),ol(O,C),O.return=k,O;case N:return C=Dc(C,k.mode,O),C.return=k,C;case Y:return C=xs(C),K(k,C,O)}if(q(C)||pe(C))return C=gs(C,k.mode,O,null),C.return=k,C;if(typeof C.then=="function")return K(k,Ro(C),O);if(C.$$typeof===M)return K(k,No(k,C),O);Mo(k,C)}return null}function L(k,C,O,P){var me=C!==null?C.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return me!==null?null:x(k,C,""+O,P);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return O.key===me?E(k,C,O,P):null;case N:return O.key===me?B(k,C,O,P):null;case Y:return O=xs(O),L(k,C,O,P)}if(q(O)||pe(O))return me!==null?null:G(k,C,O,P,null);if(typeof O.then=="function")return L(k,C,Ro(O),P);if(O.$$typeof===M)return L(k,C,No(k,O),P);Mo(k,O)}return null}function z(k,C,O,P,me){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return k=k.get(O)||null,x(C,k,""+P,me);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case T:return k=k.get(P.key===null?O:P.key)||null,E(C,k,P,me);case N:return k=k.get(P.key===null?O:P.key)||null,B(C,k,P,me);case Y:return P=xs(P),z(k,C,O,P,me)}if(q(P)||pe(P))return k=k.get(O)||null,G(C,k,P,me,null);if(typeof P.then=="function")return z(k,C,O,Ro(P),me);if(P.$$typeof===M)return z(k,C,O,No(C,P),me);Mo(C,P)}return null}function re(k,C,O,P){for(var me=null,Ge=null,de=C,Ae=C=0,Be=null;de!==null&&Ae<O.length;Ae++){de.index>Ae?(Be=de,de=null):Be=de.sibling;var Pe=L(k,de,O[Ae],P);if(Pe===null){de===null&&(de=Be);break}e&&de&&Pe.alternate===null&&t(k,de),C=u(Pe,C,Ae),Ge===null?me=Pe:Ge.sibling=Pe,Ge=Pe,de=Be}if(Ae===O.length)return a(k,de),ze&&ga(k,Ae),me;if(de===null){for(;Ae<O.length;Ae++)de=K(k,O[Ae],P),de!==null&&(C=u(de,C,Ae),Ge===null?me=de:Ge.sibling=de,Ge=de);return ze&&ga(k,Ae),me}for(de=i(de);Ae<O.length;Ae++)Be=z(de,k,Ae,O[Ae],P),Be!==null&&(e&&Be.alternate!==null&&de.delete(Be.key===null?Ae:Be.key),C=u(Be,C,Ae),Ge===null?me=Be:Ge.sibling=Be,Ge=Be);return e&&de.forEach(function(ss){return t(k,ss)}),ze&&ga(k,Ae),me}function ye(k,C,O,P){if(O==null)throw Error(o(151));for(var me=null,Ge=null,de=C,Ae=C=0,Be=null,Pe=O.next();de!==null&&!Pe.done;Ae++,Pe=O.next()){de.index>Ae?(Be=de,de=null):Be=de.sibling;var ss=L(k,de,Pe.value,P);if(ss===null){de===null&&(de=Be);break}e&&de&&ss.alternate===null&&t(k,de),C=u(ss,C,Ae),Ge===null?me=ss:Ge.sibling=ss,Ge=ss,de=Be}if(Pe.done)return a(k,de),ze&&ga(k,Ae),me;if(de===null){for(;!Pe.done;Ae++,Pe=O.next())Pe=K(k,Pe.value,P),Pe!==null&&(C=u(Pe,C,Ae),Ge===null?me=Pe:Ge.sibling=Pe,Ge=Pe);return ze&&ga(k,Ae),me}for(de=i(de);!Pe.done;Ae++,Pe=O.next())Pe=z(de,k,Ae,Pe.value,P),Pe!==null&&(e&&Pe.alternate!==null&&de.delete(Pe.key===null?Ae:Pe.key),C=u(Pe,C,Ae),Ge===null?me=Pe:Ge.sibling=Pe,Ge=Pe);return e&&de.forEach(function(ix){return t(k,ix)}),ze&&ga(k,Ae),me}function We(k,C,O,P){if(typeof O=="object"&&O!==null&&O.type===D&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case T:e:{for(var me=O.key;C!==null;){if(C.key===me){if(me=O.type,me===D){if(C.tag===7){a(k,C.sibling),P=r(C,O.props.children),P.return=k,k=P;break e}}else if(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Y&&xs(me)===C.type){a(k,C.sibling),P=r(C,O.props),ol(P,O),P.return=k,k=P;break e}a(k,C);break}else t(k,C);C=C.sibling}O.type===D?(P=gs(O.props.children,k.mode,P,O.key),P.return=k,k=P):(P=jo(O.type,O.key,O.props,null,k.mode,P),ol(P,O),P.return=k,k=P)}return g(k);case N:e:{for(me=O.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===O.containerInfo&&C.stateNode.implementation===O.implementation){a(k,C.sibling),P=r(C,O.children||[]),P.return=k,k=P;break e}else{a(k,C);break}else t(k,C);C=C.sibling}P=Dc(O,k.mode,P),P.return=k,k=P}return g(k);case Y:return O=xs(O),We(k,C,O,P)}if(q(O))return re(k,C,O,P);if(pe(O)){if(me=pe(O),typeof me!="function")throw Error(o(150));return O=me.call(O),ye(k,C,O,P)}if(typeof O.then=="function")return We(k,C,Ro(O),P);if(O.$$typeof===M)return We(k,C,No(k,O),P);Mo(k,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,C!==null&&C.tag===6?(a(k,C.sibling),P=r(C,O),P.return=k,k=P):(a(k,C),P=wc(O,k.mode,P),P.return=k,k=P),g(k)):a(k,C)}return function(k,C,O,P){try{ll=0;var me=We(k,C,O,P);return ii=null,me}catch(de){if(de===si||de===Do)throw de;var Ge=gn(29,de,null,k.mode);return Ge.lanes=P,Ge.return=k,Ge}finally{}}}var Ts=nm(!0),am=nm(!1),Ia=!1;function Gc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pc(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ke&2)!==0){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Eo(e),Hh(e,null,a),t}return To(e,i,t,a),Eo(e)}function rl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Pi(e,a)}}function qc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var r=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?r=u=g:u=u.next=g,a=a.next}while(a!==null);u===null?r=u=t:u=u.next=t}else r=u=t;a={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:u,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Yc=!1;function cl(){if(Yc){var e=ai;if(e!==null)throw e}}function ul(e,t,a,i){Yc=!1;var r=e.updateQueue;Ia=!1;var u=r.firstBaseUpdate,g=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var E=x,B=E.next;E.next=null,g===null?u=B:g.next=B,g=E;var G=e.alternate;G!==null&&(G=G.updateQueue,x=G.lastBaseUpdate,x!==g&&(x===null?G.firstBaseUpdate=B:x.next=B,G.lastBaseUpdate=E))}if(u!==null){var K=r.baseState;g=0,G=B=E=null,x=u;do{var L=x.lane&-536870913,z=L!==x.lane;if(z?(Oe&L)===L:(i&L)===L){L!==0&&L===ni&&(Yc=!0),G!==null&&(G=G.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var re=e,ye=x;L=t;var We=a;switch(ye.tag){case 1:if(re=ye.payload,typeof re=="function"){K=re.call(We,K,L);break e}K=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ye.payload,L=typeof re=="function"?re.call(We,K,L):re,L==null)break e;K=b({},K,L);break e;case 2:Ia=!0}}L=x.callback,L!==null&&(e.flags|=64,z&&(e.flags|=8192),z=r.callbacks,z===null?r.callbacks=[L]:z.push(L))}else z={lane:L,tag:x.tag,payload:x.payload,callback:x.callback,next:null},G===null?(B=G=z,E=K):G=G.next=z,g|=L;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;z=x,x=z.next,z.next=null,r.lastBaseUpdate=z,r.shared.pending=null}}while(!0);G===null&&(E=K),r.baseState=E,r.firstBaseUpdate=B,r.lastBaseUpdate=G,u===null&&(r.shared.lanes=0),Xa|=g,e.lanes=g,e.memoizedState=K}}function sm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function im(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)sm(a[e],t)}var li=Ie(null),Oo=Ie(0);function lm(e,t){e=Aa,xe(Oo,e),xe(li,t),Aa=e|t.baseLanes}function Kc(){xe(Oo,Aa),xe(li,li.current)}function Zc(){Aa=Oo.current,Ce(li),Ce(Oo)}var vn=Ie(null),Ln=null;function qa(e){var t=e.alternate;xe(_t,_t.current&1),xe(vn,e),Ln===null&&(t===null||li.current!==null||t.memoizedState!==null)&&(Ln=e)}function Xc(e){xe(_t,_t.current),xe(vn,e),Ln===null&&(Ln=e)}function om(e){e.tag===22?(xe(_t,_t.current),xe(vn,e),Ln===null&&(Ln=e)):Ya()}function Ya(){xe(_t,_t.current),xe(vn,vn.current)}function yn(e){Ce(vn),Ln===e&&(Ln=null),Ce(_t)}var _t=Ie(0);function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ed(a)||td(a)))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 ba=0,je=null,Fe=null,Dt=null,Lo=!1,oi=!1,Es=!1,Uo=0,dl=0,ri=null,$S=0;function vt(){throw Error(o(321))}function $c(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!pn(e[a],t[a]))return!1;return!0}function Qc(e,t,a,i,r,u){return ba=u,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?qm:du,Es=!1,u=a(i,r),Es=!1,oi&&(u=cm(t,a,i,r)),rm(e),u}function rm(e){V.H=ml;var t=Fe!==null&&Fe.next!==null;if(ba=0,Dt=Fe=je=null,Lo=!1,dl=0,ri=null,t)throw Error(o(300));e===null||kt||(e=e.dependencies,e!==null&&Ao(e)&&(kt=!0))}function cm(e,t,a,i){je=e;var r=0;do{if(oi&&(ri=null),dl=0,oi=!1,25<=r)throw Error(o(301));if(r+=1,Dt=Fe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}V.H=Ym,u=t(a,i)}while(oi);return u}function QS(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?fl(t):t,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(je.flags|=1024),t}function Fc(){var e=Uo!==0;return Uo=0,e}function Jc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Wc(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}ba=0,Dt=Fe=je=null,oi=!1,dl=Uo=0,ri=null}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?je.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Tt(){if(Fe===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Dt===null?je.memoizedState:Dt.next;if(t!==null)Dt=t,Fe=e;else{if(e===null)throw je.alternate===null?Error(o(467)):Error(o(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Dt===null?je.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fl(e){var t=dl;return dl+=1,ri===null&&(ri=[]),e=Wh(ri,e,t),t=je,(Dt===null?t.memoizedState:Dt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?qm:du),e}function Vo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return fl(e);if(e.$$typeof===M)return Pt(e)}throw Error(o(438,String(e)))}function eu(e){var t=null,a=je.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=je.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=zo(),je.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=ue;return t.index++,a}function Sa(e,t){return typeof t=="function"?t(e):t}function Ho(e){var t=Tt();return tu(t,Fe,e)}function tu(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var r=e.baseQueue,u=i.pending;if(u!==null){if(r!==null){var g=r.next;r.next=u.next,u.next=g}t.baseQueue=r=u,i.pending=null}if(u=e.baseState,r===null)e.memoizedState=u;else{t=r.next;var x=g=null,E=null,B=t,G=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Oe&K)===K:(ba&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===ni&&(G=!0);else if((ba&L)===L){B=B.next,L===ni&&(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?(x=E=K,g=u):E=E.next=K,je.lanes|=L,Xa|=L;K=B.action,Es&&a(u,K),u=B.hasEagerState?B.eagerState:a(u,K)}else L={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},E===null?(x=E=L,g=u):E=E.next=L,je.lanes|=K,Xa|=K;B=B.next}while(B!==null&&B!==t);if(E===null?g=u:E.next=x,!pn(u,e.memoizedState)&&(kt=!0,G&&(a=ai,a!==null)))throw a;e.memoizedState=u,e.baseState=g,e.baseQueue=E,i.lastRenderedState=u}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function nu(e){var t=Tt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,r=a.pending,u=t.memoizedState;if(r!==null){a.pending=null;var g=r=r.next;do u=e(u,g.action),g=g.next;while(g!==r);pn(u,t.memoizedState)||(kt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,i]}function um(e,t,a){var i=je,r=Tt(),u=ze;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var g=!pn((Fe||r).memoizedState,a);if(g&&(r.memoizedState=a,kt=!0),r=r.queue,iu(hm.bind(null,i,r,e),[e]),r.getSnapshot!==t||g||Dt!==null&&Dt.memoizedState.tag&1){if(i.flags|=2048,ci(9,{destroy:void 0},fm.bind(null,i,r,a,t),null),et===null)throw Error(o(349));u||(ba&127)!==0||dm(i,t,a)}return a}function dm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=je.updateQueue,t===null?(t=zo(),je.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function fm(e,t,a,i){t.value=a,t.getSnapshot=i,mm(t)&&pm(e)}function hm(e,t,a){return a(function(){mm(t)&&pm(e)})}function mm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!pn(e,a)}catch{return!0}}function pm(e){var t=ps(e,2);t!==null&&hn(t,e,2)}function au(e){var t=Jt();if(typeof e=="function"){var a=e;if(e=a(),Es){mn(!0);try{a()}finally{mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:e},t}function gm(e,t,a,i){return e.baseState=a,tu(e,Fe,typeof i=="function"?i:Sa)}function FS(e,t,a,i,r){if(Po(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};V.T!==null?a(!0):u.isTransition=!1,i(u),a=t.pending,a===null?(u.next=t.pending=u,vm(t,u)):(u.next=a.next,t.pending=a.next=u)}}function vm(e,t){var a=t.action,i=t.payload,r=e.state;if(t.isTransition){var u=V.T,g={};V.T=g;try{var x=a(r,i),E=V.S;E!==null&&E(g,x),ym(e,t,x)}catch(B){su(e,t,B)}finally{u!==null&&g.types!==null&&(u.types=g.types),V.T=u}}else try{u=a(r,i),ym(e,t,u)}catch(B){su(e,t,B)}}function ym(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){bm(e,t,i)},function(i){return su(e,t,i)}):bm(e,t,a)}function bm(e,t,a){t.status="fulfilled",t.value=a,Sm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,vm(e,a)))}function su(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Sm(t),t=t.next;while(t!==i)}e.action=null}function Sm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xm(e,t){return t}function _m(e,t){if(ze){var a=et.formState;if(a!==null){e:{var i=je;if(ze){if(st){t:{for(var r=st,u=Bn;r.nodeType!==8;){if(!u){r=null;break t}if(r=Un(r.nextSibling),r===null){r=null;break t}}u=r.data,r=u==="F!"||u==="F"?r:null}if(r){st=Un(r.nextSibling),i=r.data==="F!";break e}}Va(i)}i=!1}i&&(t=a[0])}}return a=Jt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xm,lastRenderedState:t},a.queue=i,a=Im.bind(null,je,i),i.dispatch=a,i=au(!1),u=uu.bind(null,je,!1,i.queue),i=Jt(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=FS.bind(null,je,r,u,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function Tm(e){var t=Tt();return Em(t,Fe,e)}function Em(e,t,a){if(t=tu(e,t,xm)[0],e=Ho(Sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=fl(t)}catch(g){throw g===si?Do:g}else i=t;t=Tt();var r=t.queue,u=r.dispatch;return a!==t.memoizedState&&(je.flags|=2048,ci(9,{destroy:void 0},JS.bind(null,r,a),null)),[i,u,e]}function JS(e,t){e.action=t}function jm(e){var t=Tt(),a=Fe;if(a!==null)return Em(t,a,e);Tt(),t=t.memoizedState,a=Tt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function ci(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=je.updateQueue,t===null&&(t=zo(),je.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Cm(){return Tt().memoizedState}function Io(e,t,a,i){var r=Jt();je.flags|=e,r.memoizedState=ci(1|t,{destroy:void 0},a,i===void 0?null:i)}function Go(e,t,a,i){var r=Tt();i=i===void 0?null:i;var u=r.memoizedState.inst;Fe!==null&&i!==null&&$c(i,Fe.memoizedState.deps)?r.memoizedState=ci(t,u,a,i):(je.flags|=e,r.memoizedState=ci(1|t,u,a,i))}function Am(e,t){Io(8390656,8,e,t)}function iu(e,t){Go(2048,8,e,t)}function WS(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=zo(),je.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Nm(e){var t=Tt().memoizedState;return WS({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function wm(e,t){return Go(4,2,e,t)}function Dm(e,t){return Go(4,4,e,t)}function km(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Rm(e,t,a){a=a!=null?a.concat([e]):null,Go(4,4,km.bind(null,t,e),a)}function lu(){}function Mm(e,t){var a=Tt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&$c(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Om(e,t){var a=Tt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&$c(t,i[1]))return i[0];if(i=e(),Es){mn(!0);try{e()}finally{mn(!1)}}return a.memoizedState=[i,t],i}function ou(e,t,a){return a===void 0||(ba&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Bp(),je.lanes|=e,Xa|=e,a)}function Bm(e,t,a,i){return pn(a,t)?a:li.current!==null?(e=ou(e,a,i),pn(e,t)||(kt=!0),e):(ba&42)===0||(ba&1073741824)!==0&&(Oe&261930)===0?(kt=!0,e.memoizedState=a):(e=Bp(),je.lanes|=e,Xa|=e,t)}function Lm(e,t,a,i,r){var u=Q.p;Q.p=u!==0&&8>u?u:8;var g=V.T,x={};V.T=x,uu(e,!1,t,a);try{var E=r(),B=V.S;if(B!==null&&B(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var G=XS(E,i);hl(e,t,G,xn(e))}else hl(e,t,i,xn(e))}catch(K){hl(e,t,{then:function(){},status:"rejected",reason:K},xn())}finally{Q.p=u,g!==null&&x.types!==null&&(g.types=x.types),V.T=g}}function e1(){}function ru(e,t,a,i){if(e.tag!==5)throw Error(o(476));var r=Um(e).queue;Lm(e,r,t,W,a===null?e1:function(){return zm(e),a(i)})}function Um(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:W},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function zm(e){var t=Um(e);t.next===null&&(t=e.alternate.memoizedState),hl(e,t.next.queue,{},xn())}function cu(){return Pt(Dl)}function Vm(){return Tt().memoizedState}function Hm(){return Tt().memoizedState}function t1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=xn();e=Ga(a);var i=Pa(t,e,a);i!==null&&(hn(i,t,a),rl(i,t,a)),t={cache:zc()},e.payload=t;return}t=t.return}}function n1(e,t,a){var i=xn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Po(e)?Gm(t,a):(a=Ac(e,t,a,i),a!==null&&(hn(a,e,i),Pm(a,t,i)))}function Im(e,t,a){var i=xn();hl(e,t,a,i)}function hl(e,t,a,i){var r={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Po(e))Gm(t,r);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,x=u(g,a);if(r.hasEagerState=!0,r.eagerState=x,pn(x,g))return To(e,t,r,0),et===null&&_o(),!1}catch{}finally{}if(a=Ac(e,t,r,i),a!==null)return hn(a,e,i),Pm(a,t,i),!0}return!1}function uu(e,t,a,i){if(i={lane:2,revertLane:Gu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Po(e)){if(t)throw Error(o(479))}else t=Ac(e,a,i,2),t!==null&&hn(t,e,2)}function Po(e){var t=e.alternate;return e===je||t!==null&&t===je}function Gm(e,t){oi=Lo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Pm(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Pi(e,a)}}var ml={readContext:Pt,use:Vo,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};ml.useEffectEvent=vt;var qm={readContext:Pt,use:Vo,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:Am,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Io(4194308,4,km.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Io(4194308,4,e,t)},useInsertionEffect:function(e,t){Io(4,2,e,t)},useMemo:function(e,t){var a=Jt();t=t===void 0?null:t;var i=e();if(Es){mn(!0);try{e()}finally{mn(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Jt();if(a!==void 0){var r=a(t);if(Es){mn(!0);try{a(t)}finally{mn(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=n1.bind(null,je,e),[i.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:function(e){e=au(e);var t=e.queue,a=Im.bind(null,je,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:lu,useDeferredValue:function(e,t){var a=Jt();return ou(a,e,t)},useTransition:function(){var e=au(!1);return e=Lm.bind(null,je,e.queue,!0,!1),Jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=je,r=Jt();if(ze){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),et===null)throw Error(o(349));(Oe&127)!==0||dm(i,t,a)}r.memoizedState=a;var u={value:a,getSnapshot:t};return r.queue=u,Am(hm.bind(null,i,u,e),[e]),i.flags|=2048,ci(9,{destroy:void 0},fm.bind(null,i,u,a,t),null),a},useId:function(){var e=Jt(),t=et.identifierPrefix;if(ze){var a=ta,i=ea;a=(i&~(1<<32-xt(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Uo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=$S++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cu,useFormState:_m,useActionState:_m,useOptimistic:function(e){var t=Jt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=uu.bind(null,je,!0,a),a.dispatch=t,[e,t]},useMemoCache:eu,useCacheRefresh:function(){return Jt().memoizedState=t1.bind(null,je)},useEffectEvent:function(e){var t=Jt(),a={impl:e};return t.memoizedState=a,function(){if((Ke&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},du={readContext:Pt,use:Vo,useCallback:Mm,useContext:Pt,useEffect:iu,useImperativeHandle:Rm,useInsertionEffect:wm,useLayoutEffect:Dm,useMemo:Om,useReducer:Ho,useRef:Cm,useState:function(){return Ho(Sa)},useDebugValue:lu,useDeferredValue:function(e,t){var a=Tt();return Bm(a,Fe.memoizedState,e,t)},useTransition:function(){var e=Ho(Sa)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:fl(e),t]},useSyncExternalStore:um,useId:Vm,useHostTransitionStatus:cu,useFormState:Tm,useActionState:Tm,useOptimistic:function(e,t){var a=Tt();return gm(a,Fe,e,t)},useMemoCache:eu,useCacheRefresh:Hm};du.useEffectEvent=Nm;var Ym={readContext:Pt,use:Vo,useCallback:Mm,useContext:Pt,useEffect:iu,useImperativeHandle:Rm,useInsertionEffect:wm,useLayoutEffect:Dm,useMemo:Om,useReducer:nu,useRef:Cm,useState:function(){return nu(Sa)},useDebugValue:lu,useDeferredValue:function(e,t){var a=Tt();return Fe===null?ou(a,e,t):Bm(a,Fe.memoizedState,e,t)},useTransition:function(){var e=nu(Sa)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:fl(e),t]},useSyncExternalStore:um,useId:Vm,useHostTransitionStatus:cu,useFormState:jm,useActionState:jm,useOptimistic:function(e,t){var a=Tt();return Fe!==null?gm(a,Fe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:eu,useCacheRefresh:Hm};Ym.useEffectEvent=Nm;function fu(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var hu={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=xn(),r=Ga(i);r.payload=t,a!=null&&(r.callback=a),t=Pa(e,r,i),t!==null&&(hn(t,e,i),rl(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=xn(),r=Ga(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Pa(e,r,i),t!==null&&(hn(t,e,i),rl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=xn(),i=Ga(a);i.tag=2,t!=null&&(i.callback=t),t=Pa(e,i,a),t!==null&&(hn(t,e,a),rl(t,e,a))}};function Km(e,t,a,i,r,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,g):t.prototype&&t.prototype.isPureReactComponent?!el(a,i)||!el(r,u):!0}function Zm(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&hu.enqueueReplaceState(t,t.state,null)}function js(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function Xm(e){xo(e)}function $m(e){console.error(e)}function Qm(e){xo(e)}function qo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Fm(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function mu(e,t,a){return a=Ga(a),a.tag=3,a.payload={element:null},a.callback=function(){qo(e,t)},a}function Jm(e){return e=Ga(e),e.tag=3,e}function Wm(e,t,a,i){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var u=i.value;e.payload=function(){return r(u)},e.callback=function(){Fm(t,a,i)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Fm(t,a,i),typeof r!="function"&&($a===null?$a=new Set([this]):$a.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})})}function a1(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&ti(t,a,r,!0),a=vn.current,a!==null){switch(a.tag){case 31:case 13:return Ln===null?nr():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,i===ko?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Vu(e,i,r)),!1;case 22:return a.flags|=65536,i===ko?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Vu(e,i,r)),!1}throw Error(o(435,a.tag))}return Vu(e,i,r),nr(),!1}if(ze)return t=vn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==Mc&&(e=Error(o(422),{cause:i}),al(Rn(e,a)))):(i!==Mc&&(t=Error(o(423),{cause:i}),al(Rn(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=Rn(i,a),r=mu(e.stateNode,i,r),qc(e,r),yt!==4&&(yt=2)),!1;var u=Error(o(520),{cause:i});if(u=Rn(u,a),_l===null?_l=[u]:_l.push(u),yt!==4&&(yt=2),t===null)return!0;i=Rn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=mu(a.stateNode,i,e),qc(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&($a===null||!$a.has(u))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Jm(r),Wm(r,e,a,i),qc(a,r),!1}a=a.return}while(a!==null);return!1}var pu=Error(o(461)),kt=!1;function qt(e,t,a,i){t.child=e===null?am(t,null,a,i):Ts(t,e.child,a,i)}function ep(e,t,a,i,r){a=a.render;var u=t.ref;if("ref"in i){var g={};for(var x in i)x!=="ref"&&(g[x]=i[x])}else g=i;return bs(t),i=Qc(e,t,a,g,u,r),x=Fc(),e!==null&&!kt?(Jc(e,t,r),xa(e,t,r)):(ze&&x&&kc(t),t.flags|=1,qt(e,t,i,r),t.child)}function tp(e,t,a,i,r){if(e===null){var u=a.type;return typeof u=="function"&&!Nc(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,np(e,t,u,i,r)):(e=jo(a.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Tu(e,r)){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:el,a(g,i)&&e.ref===t.ref)return xa(e,t,r)}return t.flags|=1,e=pa(u,i),e.ref=t.ref,e.return=t,t.child=e}function np(e,t,a,i,r){if(e!==null){var u=e.memoizedProps;if(el(u,i)&&e.ref===t.ref)if(kt=!1,t.pendingProps=i=u,Tu(e,r))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,xa(e,t,r)}return gu(e,t,a,i,r)}function ap(e,t,a,i){var r=i.children,u=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(u=u!==null?u.baseLanes|a:a,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~u}else i=0,t.child=null;return sp(e,t,u,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wo(t,u!==null?u.cachePool:null),u!==null?lm(t,u):Kc(),om(t);else return i=t.lanes=536870912,sp(e,t,u!==null?u.baseLanes|a:a,a,i)}else u!==null?(wo(t,u.cachePool),lm(t,u),Ya(),t.memoizedState=null):(e!==null&&wo(t,null),Kc(),Ya());return qt(e,t,r,a),t.child}function pl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sp(e,t,a,i,r){var u=Hc();return u=u===null?null:{parent:wt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&wo(t,null),Kc(),om(t),e!==null&&ti(e,t,i,!0),t.childLanes=r,null}function Yo(e,t){return t=Zo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ip(e,t,a){return Ts(t,e.child,null,a),e=Yo(t,t.pendingProps),e.flags|=2,yn(t),t.memoizedState=null,e}function s1(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(i.mode==="hidden")return e=Yo(t,i),t.lanes=536870912,pl(null,e);if(Xc(t),(e=st)?(e=vg(e,Bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},a=Gh(e),a.return=t,t.child=a,Gt=t,st=null)):e=null,e===null)throw Va(t);return t.lanes=536870912,null}return Yo(t,i)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(Xc(t),r)if(t.flags&256)t.flags&=-257,t=ip(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(kt||ti(e,t,a,!1),r=(a&e.childLanes)!==0,kt||r){if(i=et,i!==null&&(g=qi(i,a),g!==0&&g!==u.retryLane))throw u.retryLane=g,ps(e,g),hn(i,e,g),pu;nr(),t=ip(e,t,a)}else e=u.treeContext,st=Un(g.nextSibling),Gt=t,ze=!0,za=null,Bn=!1,e!==null&&Yh(t,e),t=Yo(t,i),t.flags|=4096;return t}return e=pa(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ko(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function gu(e,t,a,i,r){return bs(t),a=Qc(e,t,a,i,void 0,r),i=Fc(),e!==null&&!kt?(Jc(e,t,r),xa(e,t,r)):(ze&&i&&kc(t),t.flags|=1,qt(e,t,a,r),t.child)}function lp(e,t,a,i,r,u){return bs(t),t.updateQueue=null,a=cm(t,i,a,r),rm(e),i=Fc(),e!==null&&!kt?(Jc(e,t,u),xa(e,t,u)):(ze&&i&&kc(t),t.flags|=1,qt(e,t,a,u),t.child)}function op(e,t,a,i,r){if(bs(t),t.stateNode===null){var u=Fs,g=a.contextType;typeof g=="object"&&g!==null&&(u=Pt(g)),u=new a(i,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=hu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=i,u.state=t.memoizedState,u.refs={},Gc(t),g=a.contextType,u.context=typeof g=="object"&&g!==null?Pt(g):Fs,u.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(fu(t,a,g,i),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&hu.enqueueReplaceState(u,u.state,null),ul(t,i,u,r),cl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){u=t.stateNode;var x=t.memoizedProps,E=js(a,x);u.props=E;var B=u.context,G=a.contextType;g=Fs,typeof G=="object"&&G!==null&&(g=Pt(G));var K=a.getDerivedStateFromProps;G=typeof K=="function"||typeof u.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x||B!==g)&&Zm(t,u,i,g),Ia=!1;var L=t.memoizedState;u.state=L,ul(t,i,u,r),cl(),B=t.memoizedState,x||L!==B||Ia?(typeof K=="function"&&(fu(t,a,K,i),B=t.memoizedState),(E=Ia||Km(t,a,E,i,L,B,g))?(G||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=B),u.props=i,u.state=B,u.context=g,i=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,Pc(e,t),g=t.memoizedProps,G=js(a,g),u.props=G,K=t.pendingProps,L=u.context,B=a.contextType,E=Fs,typeof B=="object"&&B!==null&&(E=Pt(B)),x=a.getDerivedStateFromProps,(B=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==K||L!==E)&&Zm(t,u,i,E),Ia=!1,L=t.memoizedState,u.state=L,ul(t,i,u,r),cl();var z=t.memoizedState;g!==K||L!==z||Ia||e!==null&&e.dependencies!==null&&Ao(e.dependencies)?(typeof x=="function"&&(fu(t,a,x,i),z=t.memoizedState),(G=Ia||Km(t,a,G,i,L,z,E)||e!==null&&e.dependencies!==null&&Ao(e.dependencies))?(B||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,z,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,z,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=z),u.props=i,u.state=z,u.context=E,i=G):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),i=!1)}return u=i,Ko(e,t),i=(t.flags&128)!==0,u||i?(u=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&i?(t.child=Ts(t,e.child,null,r),t.child=Ts(t,null,a,r)):qt(e,t,a,r),t.memoizedState=u.state,e=t.child):e=xa(e,t,r),e}function rp(e,t,a,i){return vs(),t.flags|=256,qt(e,t,a,i),t.child}var vu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yu(e){return{baseLanes:e,cachePool:Fh()}}function bu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Sn),e}function cp(e,t,a){var i=t.pendingProps,r=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(r?qa(t):Ya(),(e=st)?(e=vg(e,Bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},a=Gh(e),a.return=t,t.child=a,Gt=t,st=null)):e=null,e===null)throw Va(t);return td(e)?t.lanes=32:t.lanes=536870912,null}var x=i.children;return i=i.fallback,r?(Ya(),r=t.mode,x=Zo({mode:"hidden",children:x},r),i=gs(i,r,a,null),x.return=t,i.return=t,x.sibling=i,t.child=x,i=t.child,i.memoizedState=yu(a),i.childLanes=bu(e,g,a),t.memoizedState=vu,pl(null,i)):(qa(t),Su(t,x))}var E=e.memoizedState;if(E!==null&&(x=E.dehydrated,x!==null)){if(u)t.flags&256?(qa(t),t.flags&=-257,t=xu(e,t,a)):t.memoizedState!==null?(Ya(),t.child=e.child,t.flags|=128,t=null):(Ya(),x=i.fallback,r=t.mode,i=Zo({mode:"visible",children:i.children},r),x=gs(x,r,a,null),x.flags|=2,i.return=t,x.return=t,i.sibling=x,t.child=i,Ts(t,e.child,null,a),i=t.child,i.memoizedState=yu(a),i.childLanes=bu(e,g,a),t.memoizedState=vu,t=pl(null,i));else if(qa(t),td(x)){if(g=x.nextSibling&&x.nextSibling.dataset,g)var B=g.dgst;g=B,i=Error(o(419)),i.stack="",i.digest=g,al({value:i,source:null,stack:null}),t=xu(e,t,a)}else if(kt||ti(e,t,a,!1),g=(a&e.childLanes)!==0,kt||g){if(g=et,g!==null&&(i=qi(g,a),i!==0&&i!==E.retryLane))throw E.retryLane=i,ps(e,i),hn(g,e,i),pu;ed(x)||nr(),t=xu(e,t,a)}else ed(x)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,st=Un(x.nextSibling),Gt=t,ze=!0,za=null,Bn=!1,e!==null&&Yh(t,e),t=Su(t,i.children),t.flags|=4096);return t}return r?(Ya(),x=i.fallback,r=t.mode,E=e.child,B=E.sibling,i=pa(E,{mode:"hidden",children:i.children}),i.subtreeFlags=E.subtreeFlags&65011712,B!==null?x=pa(B,x):(x=gs(x,r,a,null),x.flags|=2),x.return=t,i.return=t,i.sibling=x,t.child=i,pl(null,i),i=t.child,x=e.child.memoizedState,x===null?x=yu(a):(r=x.cachePool,r!==null?(E=wt._currentValue,r=r.parent!==E?{parent:E,pool:E}:r):r=Fh(),x={baseLanes:x.baseLanes|a,cachePool:r}),i.memoizedState=x,i.childLanes=bu(e,g,a),t.memoizedState=vu,pl(e.child,i)):(qa(t),a=e.child,e=a.sibling,a=pa(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function Su(e,t){return t=Zo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zo(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function xu(e,t,a){return Ts(t,e.child,null,a),e=Su(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function up(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Lc(e.return,t,a)}function _u(e,t,a,i,r,u){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:r,treeForkCount:u}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=i,g.tail=a,g.tailMode=r,g.treeForkCount=u)}function dp(e,t,a){var i=t.pendingProps,r=i.revealOrder,u=i.tail;i=i.children;var g=_t.current,x=(g&2)!==0;if(x?(g=g&1|2,t.flags|=128):g&=1,xe(_t,g),qt(e,t,i,a),i=ze?nl:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&up(e,a,t);else if(e.tag===19)up(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Bo(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),_u(t,!1,r,a,u,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Bo(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}_u(t,!0,a,null,u,i);break;case"together":_u(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function xa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ti(e,t,a,!1),(a&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,a=pa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=pa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Tu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ao(e)))}function i1(e,t,a){switch(t.tag){case 3:$t(t,t.stateNode.containerInfo),Ha(t,wt,e.memoizedState.cache),vs();break;case 27:case 5:Fn(t);break;case 4:$t(t,t.stateNode.containerInfo);break;case 10:Ha(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(qa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?cp(e,t,a):(qa(t),e=xa(e,t,a),e!==null?e.sibling:null);qa(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(ti(e,t,a,!1),i=(a&t.childLanes)!==0),r){if(i)return dp(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),xe(_t,_t.current),i)break;return null;case 22:return t.lanes=0,ap(e,t,a,t.pendingProps);case 24:Ha(t,wt,e.memoizedState.cache)}return xa(e,t,a)}function fp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!Tu(e,a)&&(t.flags&128)===0)return kt=!1,i1(e,t,a);kt=(e.flags&131072)!==0}else kt=!1,ze&&(t.flags&1048576)!==0&&qh(t,nl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=xs(t.elementType),t.type=e,typeof e=="function")Nc(e)?(i=js(e,i),t.tag=1,t=op(null,t,e,i,a)):(t.tag=0,t=gu(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===$){t.tag=11,t=ep(null,t,e,i,a);break e}else if(r===te){t.tag=14,t=tp(null,t,e,i,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return gu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=js(i,t.pendingProps),op(e,t,i,r,a);case 3:e:{if($t(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var u=t.memoizedState;r=u.element,Pc(e,t),ul(t,i,null,a);var g=t.memoizedState;if(i=g.cache,Ha(t,wt,i),i!==u.cache&&Uc(t,[wt],a,!0),cl(),i=g.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=rp(e,t,i,a);break e}else if(i!==r){r=Rn(Error(o(424)),t),al(r),t=rp(e,t,i,a);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(st=Un(e.firstChild),Gt=t,ze=!0,za=null,Bn=!0,a=am(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(vs(),i===r){t=xa(e,t,a);break e}qt(e,t,i,a)}t=t.child}return t;case 26:return Ko(e,t),e===null?(a=Tg(t.type,null,t.pendingProps,null))?t.memoizedState=a:ze||(a=t.type,e=t.pendingProps,i=cr(U.current).createElement(a),i[Nt]=t,i[It]=e,Yt(i,a,e),Vt(i),t.stateNode=i):t.memoizedState=Tg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Fn(t),e===null&&ze&&(i=t.stateNode=Sg(t.type,t.pendingProps,U.current),Gt=t,Bn=!0,r=st,Wa(t.type)?(nd=r,st=Un(i.firstChild)):st=r),qt(e,t,t.pendingProps.children,a),Ko(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((r=i=st)&&(i=B1(i,t.type,t.pendingProps,Bn),i!==null?(t.stateNode=i,Gt=t,st=Un(i.firstChild),Bn=!1,r=!0):r=!1),r||Va(t)),Fn(t),r=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,i=u.children,Fu(r,u)?i=null:g!==null&&Fu(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=Qc(e,t,QS,null,null,a),Dl._currentValue=r),Ko(e,t),qt(e,t,i,a),t.child;case 6:return e===null&&ze&&((e=a=st)&&(a=L1(a,t.pendingProps,Bn),a!==null?(t.stateNode=a,Gt=t,st=null,e=!0):e=!1),e||Va(t)),null;case 13:return cp(e,t,a);case 4:return $t(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ts(t,null,i,a):qt(e,t,i,a),t.child;case 11:return ep(e,t,t.type,t.pendingProps,a);case 7:return qt(e,t,t.pendingProps,a),t.child;case 8:return qt(e,t,t.pendingProps.children,a),t.child;case 12:return qt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Ha(t,t.type,i.value),qt(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,bs(t),r=Pt(r),i=i(r),t.flags|=1,qt(e,t,i,a),t.child;case 14:return tp(e,t,t.type,t.pendingProps,a);case 15:return np(e,t,t.type,t.pendingProps,a);case 19:return dp(e,t,a);case 31:return s1(e,t,a);case 22:return ap(e,t,a,t.pendingProps);case 24:return bs(t),i=Pt(wt),e===null?(r=Hc(),r===null&&(r=et,u=zc(),r.pooledCache=u,u.refCount++,u!==null&&(r.pooledCacheLanes|=a),r=u),t.memoizedState={parent:i,cache:r},Gc(t),Ha(t,wt,r)):((e.lanes&a)!==0&&(Pc(e,t),ul(t,null,null,a),cl()),r=e.memoizedState,u=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Ha(t,wt,i)):(i=u.cache,Ha(t,wt,i),i!==r.cache&&Uc(t,[wt],a,!0))),qt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function _a(e){e.flags|=4}function Eu(e,t,a,i,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Vp())e.flags|=8192;else throw _s=ko,Ic}else e.flags&=-16777217}function hp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ng(t))if(Vp())e.flags|=8192;else throw _s=ko,Ic}function Xo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Nn():536870912,e.lanes|=t,hi|=t)}function gl(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags&65011712,i|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function l1(e,t,a){var i=t.pendingProps;switch(Rc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ya(wt),sn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ei(t)?_a(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Oc())),it(t),null;case 26:var r=t.type,u=t.memoizedState;return e===null?(_a(t),u!==null?(it(t),hp(t,u)):(it(t),Eu(t,r,null,i,a))):u?u!==e.memoizedState?(_a(t),it(t),hp(t,u)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&_a(t),it(t),Eu(t,r,e,i,a)),null;case 27:if(ln(t),a=U.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return it(t),null}e=Ee.current,ei(t)?Kh(t):(e=Sg(r,i,a),t.stateNode=e,_a(t))}return it(t),null;case 5:if(ln(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return it(t),null}if(u=Ee.current,ei(t))Kh(t);else{var g=cr(U.current);switch(u){case 1:u=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:u=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":u=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":u=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":u=g.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?u.multiple=!0:i.size&&(u.size=i.size);break;default:u=typeof i.is=="string"?g.createElement(r,{is:i.is}):g.createElement(r)}}u[Nt]=t,u[It]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)u.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=u;e:switch(Yt(u,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&_a(t)}}return it(t),Eu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=U.current,ei(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=Gt,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||cg(e.nodeValue,a)),e||Va(t,!0)}else e=cr(e).createTextNode(i),e[Nt]=t,t.stateNode=e}return it(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=ei(t),a!==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[Nt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else a=Oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(yn(t),t):(yn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return it(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ei(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Nt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),r=!1}else r=Oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(yn(t),t):(yn(t),null)}return yn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==r&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Xo(t,t.updateQueue),it(t),null);case 4:return sn(),e===null&&Ku(t.stateNode.containerInfo),it(t),null;case 10:return ya(t.type),it(t),null;case 19:if(Ce(_t),i=t.memoizedState,i===null)return it(t),null;if(r=(t.flags&128)!==0,u=i.rendering,u===null)if(r)gl(i,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Bo(e),u!==null){for(t.flags|=128,gl(i,!1),e=u.updateQueue,t.updateQueue=e,Xo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ih(a,e),a=a.sibling;return xe(_t,_t.current&1|2),ze&&ga(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&De()>Wo&&(t.flags|=128,r=!0,gl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Bo(u),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Xo(t,e),gl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!ze)return it(t),null}else 2*De()-i.renderingStartTime>Wo&&a!==536870912&&(t.flags|=128,r=!0,gl(i,!1),t.lanes=4194304);i.isBackwards?(u.sibling=t.child,t.child=u):(e=i.last,e!==null?e.sibling=u:t.child=u,i.last=u)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=De(),e.sibling=null,a=_t.current,xe(_t,r?a&1|2:a&1),ze&&ga(t,i.treeForkCount),e):(it(t),null);case 22:case 23:return yn(t),Zc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),a=t.updateQueue,a!==null&&Xo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&Ce(Ss),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ya(wt),it(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function o1(e,t){switch(Rc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(wt),sn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ln(t),null;case 31:if(t.memoizedState!==null){if(yn(t),t.alternate===null)throw Error(o(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(_t),null;case 4:return sn(),null;case 10:return ya(t.type),null;case 22:case 23:return yn(t),Zc(),e!==null&&Ce(Ss),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(wt),null;case 25:return null;default:return null}}function mp(e,t){switch(Rc(t),t.tag){case 3:ya(wt),sn();break;case 26:case 27:case 5:ln(t);break;case 4:sn();break;case 31:t.memoizedState!==null&&yn(t);break;case 13:yn(t);break;case 19:Ce(_t);break;case 10:ya(t.type);break;case 22:case 23:yn(t),Zc(),e!==null&&Ce(Ss);break;case 24:ya(wt)}}function vl(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){i=void 0;var u=a.create,g=a.inst;i=u(),g.destroy=i}a=a.next}while(a!==r)}}catch(x){Qe(t,t.return,x)}}function Ka(e,t,a){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var u=r.next;i=u;do{if((i.tag&e)===e){var g=i.inst,x=g.destroy;if(x!==void 0){g.destroy=void 0,r=t;var E=a,B=x;try{B()}catch(G){Qe(r,E,G)}}}i=i.next}while(i!==u)}}catch(G){Qe(t,t.return,G)}}function pp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{im(t,a)}catch(i){Qe(e,e.return,i)}}}function gp(e,t,a){a.props=js(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Qe(e,t,i)}}function yl(e,t){try{var a=e.ref;if(a!==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 a=="function"?e.refCleanup=a(i):a.current=i}}catch(r){Qe(e,t,r)}}function na(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(r){Qe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Qe(e,t,r)}else a.current=null}function vp(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(r){Qe(e,e.return,r)}}function ju(e,t,a){try{var i=e.stateNode;w1(i,e.type,a,t),i[It]=t}catch(r){Qe(e,e.return,r)}}function yp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wa(e.type)||e.tag===4}function Cu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yp(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&&Wa(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 Au(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ha));else if(i!==4&&(i===27&&Wa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Au(e,t,a),e=e.sibling;e!==null;)Au(e,t,a),e=e.sibling}function $o(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Wa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for($o(e,t,a),e=e.sibling;e!==null;)$o(e,t,a),e=e.sibling}function bp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Yt(t,i,a),t[Nt]=e,t[It]=a}catch(u){Qe(e,e.return,u)}}var Ta=!1,Rt=!1,Nu=!1,Sp=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function r1(e,t){if(e=e.containerInfo,$u=gr,e=Rh(e),xc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var r=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var g=0,x=-1,E=-1,B=0,G=0,K=e,L=null;t:for(;;){for(var z;K!==a||r!==0&&K.nodeType!==3||(x=g+r),K!==u||i!==0&&K.nodeType!==3||(E=g+i),K.nodeType===3&&(g+=K.nodeValue.length),(z=K.firstChild)!==null;)L=K,K=z;for(;;){if(K===e)break t;if(L===a&&++B===r&&(x=g),L===u&&++G===i&&(E=g),(z=K.nextSibling)!==null)break;K=L,L=K.parentNode}K=z}a=x===-1||E===-1?null:{start:x,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(Qu={focusedElem:e,selectionRange:a},gr=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,u=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(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,r=u.memoizedProps,u=u.memoizedState,i=a.stateNode;try{var re=js(a.type,r);e=i.getSnapshotBeforeUpdate(re,u),i.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Qe(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Wu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wu(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,Ht=e;break}Ht=t.return}}function xp(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:ja(e,a),i&4&&vl(5,a);break;case 1:if(ja(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Qe(a,a.return,g)}else{var r=js(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Qe(a,a.return,g)}}i&64&&pp(a),i&512&&yl(a,a.return);break;case 3:if(ja(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{im(e,t)}catch(g){Qe(a,a.return,g)}}break;case 27:t===null&&i&4&&bp(a);case 26:case 5:ja(e,a),t===null&&i&4&&vp(a),i&512&&yl(a,a.return);break;case 12:ja(e,a);break;case 31:ja(e,a),i&4&&Ep(e,a);break;case 13:ja(e,a),i&4&&jp(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=v1.bind(null,a),U1(e,a))));break;case 22:if(i=a.memoizedState!==null||Ta,!i){t=t!==null&&t.memoizedState!==null||Rt,r=Ta;var u=Rt;Ta=i,(Rt=t)&&!u?Ca(e,a,(a.subtreeFlags&8772)!==0):ja(e,a),Ta=r,Rt=u}break;case 30:break;default:ja(e,a)}}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&&on(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 ut=null,cn=!1;function Ea(e,t,a){for(a=a.child;a!==null;)Tp(e,t,a),a=a.sibling}function Tp(e,t,a){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(An,a)}catch{}switch(a.tag){case 26:Rt||na(a,t),Ea(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Rt||na(a,t);var i=ut,r=cn;Wa(a.type)&&(ut=a.stateNode,cn=!1),Ea(e,t,a),Al(a.stateNode),ut=i,cn=r;break;case 5:Rt||na(a,t);case 6:if(i=ut,r=cn,ut=null,Ea(e,t,a),ut=i,cn=r,ut!==null)if(cn)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(a.stateNode)}catch(u){Qe(a,t,u)}else try{ut.removeChild(a.stateNode)}catch(u){Qe(a,t,u)}break;case 18:ut!==null&&(cn?(e=ut,pg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),xi(e)):pg(ut,a.stateNode));break;case 4:i=ut,r=cn,ut=a.stateNode.containerInfo,cn=!0,Ea(e,t,a),ut=i,cn=r;break;case 0:case 11:case 14:case 15:Ka(2,a,t),Rt||Ka(4,a,t),Ea(e,t,a);break;case 1:Rt||(na(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&gp(a,t,i)),Ea(e,t,a);break;case 21:Ea(e,t,a);break;case 22:Rt=(i=Rt)||a.memoizedState!==null,Ea(e,t,a),Rt=i;break;default:Ea(e,t,a)}}function Ep(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{xi(e)}catch(a){Qe(t,t.return,a)}}}function jp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{xi(e)}catch(a){Qe(t,t.return,a)}}function c1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Sp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Sp),t;default:throw Error(o(435,e.tag))}}function Qo(e,t){var a=c1(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=y1.bind(null,e,i);i.then(r,r)}})}function un(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var r=a[i],u=e,g=t,x=g;e:for(;x!==null;){switch(x.tag){case 27:if(Wa(x.type)){ut=x.stateNode,cn=!1;break e}break;case 5:ut=x.stateNode,cn=!1;break e;case 3:case 4:ut=x.stateNode.containerInfo,cn=!0;break e}x=x.return}if(ut===null)throw Error(o(160));Tp(u,g,r),ut=null,cn=!1,u=r.alternate,u!==null&&(u.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cp(t,e),t=t.sibling}var Xn=null;function Cp(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:un(t,e),dn(e),i&4&&(Ka(3,e,e.return),vl(3,e),Ka(5,e,e.return));break;case 1:un(t,e),dn(e),i&512&&(Rt||a===null||na(a,a.return)),i&64&&Ta&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var r=Xn;if(un(t,e),dn(e),i&512&&(Rt||a===null||na(a,a.return)),i&4){var u=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":u=r.getElementsByTagName("title")[0],(!u||u[Ft]||u[Nt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=r.createElement(i),r.head.insertBefore(u,r.querySelector("head > title"))),Yt(u,i,a),u[Nt]=e,Vt(u),i=u;break e;case"link":var g=Cg("link","href",r).get(i+(a.href||""));if(g){for(var x=0;x<g.length;x++)if(u=g[x],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(x,1);break t}}u=r.createElement(i),Yt(u,i,a),r.head.appendChild(u);break;case"meta":if(g=Cg("meta","content",r).get(i+(a.content||""))){for(x=0;x<g.length;x++)if(u=g[x],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(x,1);break t}}u=r.createElement(i),Yt(u,i,a),r.head.appendChild(u);break;default:throw Error(o(468,i))}u[Nt]=e,Vt(u),i=u}e.stateNode=i}else Ag(r,e.type,e.stateNode);else e.stateNode=jg(r,i,e.memoizedProps);else u!==i?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,i===null?Ag(r,e.type,e.stateNode):jg(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&ju(e,e.memoizedProps,a.memoizedProps)}break;case 27:un(t,e),dn(e),i&512&&(Rt||a===null||na(a,a.return)),a!==null&&i&4&&ju(e,e.memoizedProps,a.memoizedProps);break;case 5:if(un(t,e),dn(e),i&512&&(Rt||a===null||na(a,a.return)),e.flags&32){r=e.stateNode;try{qs(r,"")}catch(re){Qe(e,e.return,re)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,ju(e,r,a!==null?a.memoizedProps:r)),i&1024&&(Nu=!0);break;case 6:if(un(t,e),dn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(re){Qe(e,e.return,re)}}break;case 3:if(fr=null,r=Xn,Xn=ur(t.containerInfo),un(t,e),Xn=r,dn(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{xi(t.containerInfo)}catch(re){Qe(e,e.return,re)}Nu&&(Nu=!1,Ap(e));break;case 4:i=Xn,Xn=ur(e.stateNode.containerInfo),un(t,e),dn(e),Xn=i;break;case 12:un(t,e),dn(e);break;case 31:un(t,e),dn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Qo(e,i)));break;case 13:un(t,e),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Jo=De()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Qo(e,i)));break;case 22:r=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,B=Ta,G=Rt;if(Ta=B||r,Rt=G||E,un(t,e),Rt=G,Ta=B,dn(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||E||Ta||Rt||Cs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(u=E.stateNode,r)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{x=E.stateNode;var K=E.memoizedProps.style,L=K!=null&&K.hasOwnProperty("display")?K.display:null;x.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(re){Qe(E,E.return,re)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=r?"":E.memoizedProps}catch(re){Qe(E,E.return,re)}}}else if(t.tag===18){if(a===null){E=t;try{var z=E.stateNode;r?gg(z,!0):gg(E.stateNode,!1)}catch(re){Qe(E,E.return,re)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,Qo(e,a))));break;case 19:un(t,e),dn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Qo(e,i)));break;case 30:break;case 21:break;default:un(t,e),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(yp(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var r=a.stateNode,u=Cu(e);$o(e,u,r);break;case 5:var g=a.stateNode;a.flags&32&&(qs(g,""),a.flags&=-33);var x=Cu(e);$o(e,x,g);break;case 3:case 4:var E=a.stateNode.containerInfo,B=Cu(e);Au(e,B,E);break;default:throw Error(o(161))}}catch(G){Qe(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ap(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ap(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;)xp(e,t.alternate,t),t=t.sibling}function Cs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ka(4,t,t.return),Cs(t);break;case 1:na(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&gp(t,t.return,a),Cs(t);break;case 27:Al(t.stateNode);case 26:case 5:na(t,t.return),Cs(t);break;case 22:t.memoizedState===null&&Cs(t);break;case 30:Cs(t);break;default:Cs(t)}e=e.sibling}}function Ca(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,r=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:Ca(r,u,a),vl(4,u);break;case 1:if(Ca(r,u,a),i=u,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(B){Qe(i,i.return,B)}if(i=u,r=i.updateQueue,r!==null){var x=i.stateNode;try{var E=r.shared.hiddenCallbacks;if(E!==null)for(r.shared.hiddenCallbacks=null,r=0;r<E.length;r++)sm(E[r],x)}catch(B){Qe(i,i.return,B)}}a&&g&64&&pp(u),yl(u,u.return);break;case 27:bp(u);case 26:case 5:Ca(r,u,a),a&&i===null&&g&4&&vp(u),yl(u,u.return);break;case 12:Ca(r,u,a);break;case 31:Ca(r,u,a),a&&g&4&&Ep(r,u);break;case 13:Ca(r,u,a),a&&g&4&&jp(r,u);break;case 22:u.memoizedState===null&&Ca(r,u,a),yl(u,u.return);break;case 30:break;default:Ca(r,u,a)}t=t.sibling}}function wu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&sl(a))}function Du(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sl(e))}function $n(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Np(e,t,a,i),t=t.sibling}function Np(e,t,a,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:$n(e,t,a,i),r&2048&&vl(9,t);break;case 1:$n(e,t,a,i);break;case 3:$n(e,t,a,i),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sl(e)));break;case 12:if(r&2048){$n(e,t,a,i),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,x=u.onPostCommit;typeof x=="function"&&x(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Qe(t,t.return,E)}}else $n(e,t,a,i);break;case 31:$n(e,t,a,i);break;case 13:$n(e,t,a,i);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?$n(e,t,a,i):bl(e,t):u._visibility&2?$n(e,t,a,i):(u._visibility|=2,ui(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&wu(g,t);break;case 24:$n(e,t,a,i),r&2048&&Du(t.alternate,t);break;default:$n(e,t,a,i)}}function ui(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,x=a,E=i,B=g.flags;switch(g.tag){case 0:case 11:case 15:ui(u,g,x,E,r),vl(8,g);break;case 23:break;case 22:var G=g.stateNode;g.memoizedState!==null?G._visibility&2?ui(u,g,x,E,r):bl(u,g):(G._visibility|=2,ui(u,g,x,E,r)),r&&B&2048&&wu(g.alternate,g);break;case 24:ui(u,g,x,E,r),r&&B&2048&&Du(g.alternate,g);break;default:ui(u,g,x,E,r)}t=t.sibling}}function bl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,r=i.flags;switch(i.tag){case 22:bl(a,i),r&2048&&wu(i.alternate,i);break;case 24:bl(a,i),r&2048&&Du(i.alternate,i);break;default:bl(a,i)}t=t.sibling}}var Sl=8192;function di(e,t,a){if(e.subtreeFlags&Sl)for(e=e.child;e!==null;)wp(e,t,a),e=e.sibling}function wp(e,t,a){switch(e.tag){case 26:di(e,t,a),e.flags&Sl&&e.memoizedState!==null&&$1(a,Xn,e.memoizedState,e.memoizedProps);break;case 5:di(e,t,a);break;case 3:case 4:var i=Xn;Xn=ur(e.stateNode.containerInfo),di(e,t,a),Xn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Sl,Sl=16777216,di(e,t,a),Sl=i):di(e,t,a));break;default:di(e,t,a)}}function Dp(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 xl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];Ht=i,Rp(i,e)}Dp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kp(e),e=e.sibling}function kp(e){switch(e.tag){case 0:case 11:case 15:xl(e),e.flags&2048&&Ka(9,e,e.return);break;case 3:xl(e);break;case 12:xl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fo(e)):xl(e);break;default:xl(e)}}function Fo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];Ht=i,Rp(i,e)}Dp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ka(8,t,t.return),Fo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Fo(t));break;default:Fo(t)}e=e.sibling}}function Rp(e,t){for(;Ht!==null;){var a=Ht;switch(a.tag){case 0:case 11:case 15:Ka(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:sl(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,Ht=i;else e:for(a=e;Ht!==null;){i=Ht;var r=i.sibling,u=i.return;if(_p(i),i===a){Ht=null;break e}if(r!==null){r.return=u,Ht=r;break e}Ht=u}}}var u1={getCacheForType:function(e){var t=Pt(wt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pt(wt).controller.signal}},d1=typeof WeakMap=="function"?WeakMap:Map,Ke=0,et=null,ke=null,Oe=0,$e=0,bn=null,Za=!1,fi=!1,ku=!1,Aa=0,yt=0,Xa=0,As=0,Ru=0,Sn=0,hi=0,_l=null,fn=null,Mu=!1,Jo=0,Mp=0,Wo=1/0,er=null,$a=null,Lt=0,Qa=null,mi=null,Na=0,Ou=0,Bu=null,Op=null,Tl=0,Lu=null;function xn(){return(Ke&2)!==0&&Oe!==0?Oe&-Oe:V.T!==null?Gu():Yi()}function Bp(){if(Sn===0)if((Oe&536870912)===0||ze){var e=Ye;Ye<<=1,(Ye&3932160)===0&&(Ye=262144),Sn=e}else Sn=536870912;return e=vn.current,e!==null&&(e.flags|=32),Sn}function hn(e,t,a){(e===et&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(pi(e,0),Fa(e,Oe,Sn,!1)),Ba(e,a),((Ke&2)===0||e!==et)&&(e===et&&((Ke&2)===0&&(As|=a),yt===4&&Fa(e,Oe,Sn,!1)),aa(e))}function Lp(e,t,a){if((Ke&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||le(e,t),r=i?m1(e,t):zu(e,t,!0),u=i;do{if(r===0){fi&&!i&&Fa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!f1(a)){r=zu(e,t,!1),u=!1;continue}if(r===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var x=e;r=_l;var E=x.current.memoizedState.isDehydrated;if(E&&(pi(x,g).flags|=256),g=zu(x,g,!1),g!==2){if(ku&&!E){x.errorRecoveryDisabledLanes|=u,As|=u,r=4;break e}u=fn,fn=r,u!==null&&(fn===null?fn=u:fn.push.apply(fn,u))}r=g}if(u=!1,r!==2)continue}}if(r===1){pi(e,0),Fa(e,t,0,!0);break}e:{switch(i=e,u=r,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Fa(i,t,Sn,!Za);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=Jo+300-De(),10<r)){if(Fa(i,t,Sn,!Za),nt(i,0,!0)!==0)break e;Na=t,i.timeoutHandle=hg(Up.bind(null,i,a,fn,er,Mu,t,Sn,As,hi,Za,u,"Throttled",-0,0),r);break e}Up(i,a,fn,er,Mu,t,Sn,As,hi,Za,u,null,-0,0)}}break}while(!0);aa(e)}function Up(e,t,a,i,r,u,g,x,E,B,G,K,L,z){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:ha},wp(t,u,K);var re=(u&62914560)===u?Jo-De():(u&4194048)===u?Mp-De():0;if(re=Q1(K,re),re!==null){Na=u,e.cancelPendingCommit=re(Yp.bind(null,e,t,u,a,i,r,g,x,E,G,K,null,L,z)),Fa(e,u,g,!B);return}}Yp(e,t,u,a,i,r,g,x,E)}function f1(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var r=a[i],u=r.getSnapshot;r=r.value;try{if(!pn(u(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Fa(e,t,a,i){t&=~Ru,t&=~As,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var u=31-xt(r),g=1<<u;i[u]=-1,r&=~g}a!==0&&Gi(e,a,t)}function tr(){return(Ke&6)===0?(El(0),!1):!0}function Uu(){if(ke!==null){if($e===0)var e=ke.return;else e=ke,va=ys=null,Wc(e),ii=null,ll=0,e=ke;for(;e!==null;)mp(e.alternate,e),e=e.return;ke=null}}function pi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,R1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Na=0,Uu(),et=e,ke=a=pa(e.current,null),Oe=t,$e=0,bn=null,Za=!1,fi=le(e,t),ku=!1,hi=Sn=Ru=As=Xa=yt=0,fn=_l=null,Mu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var r=31-xt(i),u=1<<r;t|=e[r],i&=~u}return Aa=t,_o(),a}function zp(e,t){je=null,V.H=ml,t===si||t===Do?(t=em(),$e=3):t===Ic?(t=em(),$e=4):$e=t===pu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bn=t,ke===null&&(yt=1,qo(e,Rn(t,e.current)))}function Vp(){var e=vn.current;return e===null?!0:(Oe&4194048)===Oe?Ln===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===Ln:!1}function Hp(){var e=V.H;return V.H=ml,e===null?ml:e}function Ip(){var e=V.A;return V.A=u1,e}function nr(){yt=4,Za||(Oe&4194048)!==Oe&&vn.current!==null||(fi=!0),(Xa&134217727)===0&&(As&134217727)===0||et===null||Fa(et,Oe,Sn,!1)}function zu(e,t,a){var i=Ke;Ke|=2;var r=Hp(),u=Ip();(et!==e||Oe!==t)&&(er=null,pi(e,t)),t=!1;var g=yt;e:do try{if($e!==0&&ke!==null){var x=ke,E=bn;switch($e){case 8:Uu(),g=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(t=!0);var B=$e;if($e=0,bn=null,gi(e,x,E,B),a&&fi){g=0;break e}break;default:B=$e,$e=0,bn=null,gi(e,x,E,B)}}h1(),g=yt;break}catch(G){zp(e,G)}while(!0);return t&&e.shellSuspendCounter++,va=ys=null,Ke=i,V.H=r,V.A=u,ke===null&&(et=null,Oe=0,_o()),g}function h1(){for(;ke!==null;)Gp(ke)}function m1(e,t){var a=Ke;Ke|=2;var i=Hp(),r=Ip();et!==e||Oe!==t?(er=null,Wo=De()+500,pi(e,t)):fi=le(e,t);e:do try{if($e!==0&&ke!==null){t=ke;var u=bn;t:switch($e){case 1:$e=0,bn=null,gi(e,t,u,1);break;case 2:case 9:if(Jh(u)){$e=0,bn=null,Pp(t);break}t=function(){$e!==2&&$e!==9||et!==e||($e=7),aa(e)},u.then(t,t);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Jh(u)?($e=0,bn=null,Pp(t)):($e=0,bn=null,gi(e,t,u,7));break;case 5:var g=null;switch(ke.tag){case 26:g=ke.memoizedState;case 5:case 27:var x=ke;if(g?Ng(g):x.stateNode.complete){$e=0,bn=null;var E=x.sibling;if(E!==null)ke=E;else{var B=x.return;B!==null?(ke=B,ar(B)):ke=null}break t}}$e=0,bn=null,gi(e,t,u,5);break;case 6:$e=0,bn=null,gi(e,t,u,6);break;case 8:Uu(),yt=6;break e;default:throw Error(o(462))}}p1();break}catch(G){zp(e,G)}while(!0);return va=ys=null,V.H=i,V.A=r,Ke=a,ke!==null?0:(et=null,Oe=0,_o(),yt)}function p1(){for(;ke!==null&&!_e();)Gp(ke)}function Gp(e){var t=fp(e.alternate,e,Aa);e.memoizedProps=e.pendingProps,t===null?ar(e):ke=t}function Pp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=lp(a,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=lp(a,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:Wc(t);default:mp(a,t),t=ke=Ih(t,Aa),t=fp(a,t,Aa)}e.memoizedProps=e.pendingProps,t===null?ar(e):ke=t}function gi(e,t,a,i){va=ys=null,Wc(t),ii=null,ll=0;var r=t.return;try{if(a1(e,r,t,a,Oe)){yt=1,qo(e,Rn(a,e.current)),ke=null;return}}catch(u){if(r!==null)throw ke=r,u;yt=1,qo(e,Rn(a,e.current)),ke=null;return}t.flags&32768?(ze||i===1?e=!0:fi||(Oe&536870912)!==0?e=!1:(Za=e=!0,(i===2||i===9||i===3||i===6)&&(i=vn.current,i!==null&&i.tag===13&&(i.flags|=16384))),qp(t,e)):ar(t)}function ar(e){var t=e;do{if((t.flags&32768)!==0){qp(t,Za);return}e=t.return;var a=l1(t.alternate,t,Aa);if(a!==null){ke=a;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);yt===0&&(yt=5)}function qp(e,t){do{var a=o1(e.alternate,e);if(a!==null){a.flags&=32767,ke=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=a}while(e!==null);yt=6,ke=null}function Yp(e,t,a,i,r,u,g,x,E){e.cancelPendingCommit=null;do sr();while(Lt!==0);if((Ke&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=Cc,co(e,a,u,g,x,E),e===et&&(ke=et=null,Oe=0),mi=t,Qa=e,Na=a,Ou=u,Bu=r,Op=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,b1(tt,function(){return Qp(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null,r=Q.p,Q.p=2,g=Ke,Ke|=4;try{r1(e,t,a)}finally{Ke=g,Q.p=r,V.T=i}}Lt=1,Kp(),Zp(),Xp()}}function Kp(){if(Lt===1){Lt=0;var e=Qa,t=mi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=V.T,V.T=null;var i=Q.p;Q.p=2;var r=Ke;Ke|=4;try{Cp(t,e);var u=Qu,g=Rh(e.containerInfo),x=u.focusedElem,E=u.selectionRange;if(g!==x&&x&&x.ownerDocument&&kh(x.ownerDocument.documentElement,x)){if(E!==null&&xc(x)){var B=E.start,G=E.end;if(G===void 0&&(G=B),"selectionStart"in x)x.selectionStart=B,x.selectionEnd=Math.min(G,x.value.length);else{var K=x.ownerDocument||document,L=K&&K.defaultView||window;if(L.getSelection){var z=L.getSelection(),re=x.textContent.length,ye=Math.min(E.start,re),We=E.end===void 0?ye:Math.min(E.end,re);!z.extend&&ye>We&&(g=We,We=ye,ye=g);var k=Dh(x,ye),C=Dh(x,We);if(k&&C&&(z.rangeCount!==1||z.anchorNode!==k.node||z.anchorOffset!==k.offset||z.focusNode!==C.node||z.focusOffset!==C.offset)){var O=K.createRange();O.setStart(k.node,k.offset),z.removeAllRanges(),ye>We?(z.addRange(O),z.extend(C.node,C.offset)):(O.setEnd(C.node,C.offset),z.addRange(O))}}}}for(K=[],z=x;z=z.parentNode;)z.nodeType===1&&K.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<K.length;x++){var P=K[x];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}gr=!!$u,Qu=$u=null}finally{Ke=r,Q.p=i,V.T=a}}e.current=t,Lt=2}}function Zp(){if(Lt===2){Lt=0;var e=Qa,t=mi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=V.T,V.T=null;var i=Q.p;Q.p=2;var r=Ke;Ke|=4;try{xp(e,t.alternate,t)}finally{Ke=r,Q.p=i,V.T=a}}Lt=3}}function Xp(){if(Lt===4||Lt===3){Lt=0,Se();var e=Qa,t=mi,a=Na,i=Op;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,mi=Qa=null,$p(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&($a=null),Hs(a),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(An,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=V.T,r=Q.p,Q.p=2,V.T=null;try{for(var u=e.onRecoverableError,g=0;g<i.length;g++){var x=i[g];u(x.value,{componentStack:x.stack})}}finally{V.T=t,Q.p=r}}(Na&3)!==0&&sr(),aa(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===Lu?Tl++:(Tl=0,Lu=e):Tl=0,El(0)}}function $p(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sl(t)))}function sr(){return Kp(),Zp(),Xp(),Qp()}function Qp(){if(Lt!==5)return!1;var e=Qa,t=Ou;Ou=0;var a=Hs(Na),i=V.T,r=Q.p;try{Q.p=32>a?32:a,V.T=null,a=Bu,Bu=null;var u=Qa,g=Na;if(Lt=0,mi=Qa=null,Na=0,(Ke&6)!==0)throw Error(o(331));var x=Ke;if(Ke|=4,kp(u.current),Np(u,u.current,g,a),Ke=x,El(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(An,u)}catch{}return!0}finally{Q.p=r,V.T=i,$p(e,t)}}function Fp(e,t,a){t=Rn(a,t),t=mu(e.stateNode,t,2),e=Pa(e,t,2),e!==null&&(Ba(e,2),aa(e))}function Qe(e,t,a){if(e.tag===3)Fp(e,e,a);else for(;t!==null;){if(t.tag===3){Fp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&($a===null||!$a.has(i))){e=Rn(a,e),a=Jm(2),i=Pa(t,a,2),i!==null&&(Wm(a,i,t,e),Ba(i,2),aa(i));break}}t=t.return}}function Vu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new d1;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(a)||(ku=!0,r.add(a),e=g1.bind(null,e,t,a),t.then(e,e))}function g1(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,et===e&&(Oe&a)===a&&(yt===4||yt===3&&(Oe&62914560)===Oe&&300>De()-Jo?(Ke&2)===0&&pi(e,0):Ru|=a,hi===Oe&&(hi=0)),aa(e)}function Jp(e,t){t===0&&(t=Nn()),e=ps(e,t),e!==null&&(Ba(e,t),aa(e))}function v1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Jp(e,a)}function y1(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(a=r.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),Jp(e,a)}function b1(e,t){return oe(e,t)}var ir=null,vi=null,Hu=!1,lr=!1,Iu=!1,Ja=0;function aa(e){e!==vi&&e.next===null&&(vi===null?ir=vi=e:vi=vi.next=e),lr=!0,Hu||(Hu=!0,x1())}function El(e,t){if(!Iu&&lr){Iu=!0;do for(var a=!1,i=ir;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var u=0;else{var g=i.suspendedLanes,x=i.pingedLanes;u=(1<<31-xt(42|e)+1)-1,u&=r&~(g&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,ng(i,u))}else u=Oe,u=nt(i,i===et?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||le(i,u)||(a=!0,ng(i,u));i=i.next}while(a);Iu=!1}}function S1(){Wp()}function Wp(){lr=Hu=!1;var e=0;Ja!==0&&k1()&&(e=Ja);for(var t=De(),a=null,i=ir;i!==null;){var r=i.next,u=eg(i,t);u===0?(i.next=null,a===null?ir=r:a.next=r,r===null&&(vi=a)):(a=i,(e!==0||(u&3)!==0)&&(lr=!0)),i=r}Lt!==0&&Lt!==5||El(e),Ja!==0&&(Ja=0)}function eg(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-xt(u),x=1<<g,E=r[g];E===-1?((x&a)===0||(x&i)!==0)&&(r[g]=At(x,t)):E<=t&&(e.expiredLanes|=x),u&=~x}if(t=et,a=Oe,a=nt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&($e===2||$e===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&he(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||le(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&he(i),Hs(a)){case 2:case 8:a=ht;break;case 32:a=tt;break;case 268435456:a=gt;break;default:a=tt}return i=tg.bind(null,e),a=oe(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&he(i),e.callbackPriority=2,e.callbackNode=null,2}function tg(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(sr()&&e.callbackNode!==a)return null;var i=Oe;return i=nt(e,e===et?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Lp(e,i,t),eg(e,De()),e.callbackNode!=null&&e.callbackNode===a?tg.bind(null,e):null)}function ng(e,t){if(sr())return null;Lp(e,t,!0)}function x1(){M1(function(){(Ke&6)!==0?oe(at,S1):Wp()})}function Gu(){if(Ja===0){var e=ni;e===0&&(e=Le,Le<<=1,(Le&261888)===0&&(Le=256)),Ja=e}return Ja}function ag(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mo(""+e)}function sg(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function _1(e,t,a,i,r){if(t==="submit"&&a&&a.stateNode===r){var u=ag((r[It]||null).action),g=i.submitter;g&&(t=(t=g[It]||null)?ag(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var x=new yo("action","action",null,i,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Ja!==0){var E=g?sg(r,g):new FormData(r);ru(a,{pending:!0,data:E,method:r.method,action:u},null,E)}}else typeof u=="function"&&(x.preventDefault(),E=g?sg(r,g):new FormData(r),ru(a,{pending:!0,data:E,method:r.method,action:u},u,E))},currentTarget:r}]})}}for(var Pu=0;Pu<jc.length;Pu++){var qu=jc[Pu],T1=qu.toLowerCase(),E1=qu[0].toUpperCase()+qu.slice(1);Zn(T1,"on"+E1)}Zn(Bh,"onAnimationEnd"),Zn(Lh,"onAnimationIteration"),Zn(Uh,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(HS,"onTransitionRun"),Zn(IS,"onTransitionStart"),Zn(GS,"onTransitionCancel"),Zn(zh,"onTransitionEnd"),Gs("onMouseEnter",["mouseout","mouseover"]),Gs("onMouseLeave",["mouseout","mouseover"]),Gs("onPointerEnter",["pointerout","pointerover"]),Gs("onPointerLeave",["pointerout","pointerover"]),ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jl="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(" "),j1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jl));function ig(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],r=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var g=i.length-1;0<=g;g--){var x=i[g],E=x.instance,B=x.currentTarget;if(x=x.listener,E!==u&&r.isPropagationStopped())break e;u=x,r.currentTarget=B;try{u(r)}catch(G){xo(G)}r.currentTarget=null,u=E}else for(g=0;g<i.length;g++){if(x=i[g],E=x.instance,B=x.currentTarget,x=x.listener,E!==u&&r.isPropagationStopped())break e;u=x,r.currentTarget=B;try{u(r)}catch(G){xo(G)}r.currentTarget=null,u=E}}}}function Re(e,t){var a=t[ie];a===void 0&&(a=t[ie]=new Set);var i=e+"__bubble";a.has(i)||(lg(t,e,2,!1),a.add(i))}function Yu(e,t,a){var i=0;t&&(i|=4),lg(a,e,i,t)}var or="_reactListening"+Math.random().toString(36).slice(2);function Ku(e){if(!e[or]){e[or]=!0,Wf.forEach(function(a){a!=="selectionchange"&&(j1.has(a)||Yu(a,!1,e),Yu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[or]||(t[or]=!0,Yu("selectionchange",!1,t))}}function lg(e,t,a,i){switch(Bg(t)){case 2:var r=W1;break;case 8:r=ex;break;default:r=od}a=r.bind(null,t,a,e),r=void 0,!fc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function Zu(e,t,a,i,r){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var g=i.tag;if(g===3||g===4){var x=i.stateNode.containerInfo;if(x===r)break;if(g===4)for(g=i.return;g!==null;){var E=g.tag;if((E===3||E===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;x!==null;){if(g=rt(x),g===null)return;if(E=g.tag,E===5||E===6||E===26||E===27){i=u=g;continue e}x=x.parentNode}}i=i.return}dh(function(){var B=u,G=uc(a),K=[];e:{var L=Vh.get(e);if(L!==void 0){var z=yo,re=e;switch(e){case"keypress":if(go(a)===0)break e;case"keydown":case"keyup":z=yS;break;case"focusin":re="focus",z=gc;break;case"focusout":re="blur",z=gc;break;case"beforeblur":case"afterblur":z=gc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=mh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=lS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=xS;break;case Bh:case Lh:case Uh:z=cS;break;case zh:z=TS;break;case"scroll":case"scrollend":z=sS;break;case"wheel":z=jS;break;case"copy":case"cut":case"paste":z=dS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=gh;break;case"toggle":case"beforetoggle":z=AS}var ye=(t&4)!==0,We=!ye&&(e==="scroll"||e==="scrollend"),k=ye?L!==null?L+"Capture":null:L;ye=[];for(var C=B,O;C!==null;){var P=C;if(O=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||O===null||k===null||(P=Zi(C,k),P!=null&&ye.push(Cl(C,P,O))),We)break;C=C.return}0<ye.length&&(L=new z(L,re,null,a,G),K.push({event:L,listeners:ye}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",L&&a!==cc&&(re=a.relatedTarget||a.fromElement)&&(rt(re)||re[da]))break e;if((z||L)&&(L=G.window===G?G:(L=G.ownerDocument)?L.defaultView||L.parentWindow:window,z?(re=a.relatedTarget||a.toElement,z=B,re=re?rt(re):null,re!==null&&(We=d(re),ye=re.tag,re!==We||ye!==5&&ye!==27&&ye!==6)&&(re=null)):(z=null,re=B),z!==re)){if(ye=mh,P="onMouseLeave",k="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ye=gh,P="onPointerLeave",k="onPointerEnter",C="pointer"),We=z==null?L:Kn(z),O=re==null?L:Kn(re),L=new ye(P,C+"leave",z,a,G),L.target=We,L.relatedTarget=O,P=null,rt(G)===B&&(ye=new ye(k,C+"enter",re,a,G),ye.target=O,ye.relatedTarget=We,P=ye),We=P,z&&re)t:{for(ye=C1,k=z,C=re,O=0,P=k;P;P=ye(P))O++;P=0;for(var me=C;me;me=ye(me))P++;for(;0<O-P;)k=ye(k),O--;for(;0<P-O;)C=ye(C),P--;for(;O--;){if(k===C||C!==null&&k===C.alternate){ye=k;break t}k=ye(k),C=ye(C)}ye=null}else ye=null;z!==null&&og(K,L,z,ye,!1),re!==null&&We!==null&&og(K,We,re,ye,!0)}}e:{if(L=B?Kn(B):window,z=L.nodeName&&L.nodeName.toLowerCase(),z==="select"||z==="input"&&L.type==="file")var Ge=Eh;else if(_h(L))if(jh)Ge=US;else{Ge=BS;var de=OS}else z=L.nodeName,!z||z.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?B&&rc(B.elementType)&&(Ge=Eh):Ge=LS;if(Ge&&(Ge=Ge(e,B))){Th(K,Ge,a,G);break e}de&&de(e,L,B),e==="focusout"&&B&&L.type==="number"&&B.memoizedProps.value!=null&&oc(L,"number",L.value)}switch(de=B?Kn(B):window,e){case"focusin":(_h(de)||de.contentEditable==="true")&&(Xs=de,_c=B,tl=null);break;case"focusout":tl=_c=Xs=null;break;case"mousedown":Tc=!0;break;case"contextmenu":case"mouseup":case"dragend":Tc=!1,Mh(K,a,G);break;case"selectionchange":if(VS)break;case"keydown":case"keyup":Mh(K,a,G)}var Ae;if(yc)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Zs?Sh(e,a)&&(Be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Be="onCompositionStart");Be&&(vh&&a.locale!=="ko"&&(Zs||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Zs&&(Ae=fh()):(La=G,hc="value"in La?La.value:La.textContent,Zs=!0)),de=rr(B,Be),0<de.length&&(Be=new ph(Be,e,null,a,G),K.push({event:Be,listeners:de}),Ae?Be.data=Ae:(Ae=xh(a),Ae!==null&&(Be.data=Ae)))),(Ae=wS?DS(e,a):kS(e,a))&&(Be=rr(B,"onBeforeInput"),0<Be.length&&(de=new ph("onBeforeInput","beforeinput",null,a,G),K.push({event:de,listeners:Be}),de.data=Ae)),_1(K,e,B,a,G)}ig(K,t)})}function Cl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function rr(e,t){for(var a=t+"Capture",i=[];e!==null;){var r=e,u=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||u===null||(r=Zi(e,a),r!=null&&i.unshift(Cl(e,r,u)),r=Zi(e,t),r!=null&&i.push(Cl(e,r,u))),e.tag===3)return i;e=e.return}return[]}function C1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function og(e,t,a,i,r){for(var u=t._reactName,g=[];a!==null&&a!==i;){var x=a,E=x.alternate,B=x.stateNode;if(x=x.tag,E!==null&&E===i)break;x!==5&&x!==26&&x!==27||B===null||(E=B,r?(B=Zi(a,u),B!=null&&g.unshift(Cl(a,B,E))):r||(B=Zi(a,u),B!=null&&g.push(Cl(a,B,E)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var A1=/\r\n?/g,N1=/\u0000|\uFFFD/g;function rg(e){return(typeof e=="string"?e:""+e).replace(A1,`
25
+ `).replace(N1,"")}function cg(e,t){return t=rg(t),rg(e)===t}function Je(e,t,a,i,r,u){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||qs(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&qs(e,""+i);break;case"className":fo(e,"class",i);break;case"tabIndex":fo(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":fo(e,a,i);break;case"style":ch(e,i,u);break;case"data":if(t!=="object"){fo(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=mo(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"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 u=="function"&&(a==="formAction"?(t!=="input"&&Je(e,t,"name",r.name,r,null),Je(e,t,"formEncType",r.formEncType,r,null),Je(e,t,"formMethod",r.formMethod,r,null),Je(e,t,"formTarget",r.formTarget,r,null)):(Je(e,t,"encType",r.encType,r,null),Je(e,t,"method",r.method,r,null),Je(e,t,"target",r.target,r,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=mo(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=ha);break;case"onScroll":i!=null&&Re("scroll",e);break;case"onScrollEnd":i!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}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}a=mo(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);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(a,""+i):e.removeAttribute(a);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(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Re("beforetoggle",e),Re("toggle",e),uo(e,"popover",i);break;case"xlinkActuate":fa(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":fa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":fa(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":fa(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":fa(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":fa(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":fa(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":fa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":fa(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":uo(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=nS.get(a)||a,uo(e,a,i))}}function Xu(e,t,a,i,r,u){switch(a){case"style":ch(e,i,u);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?qs(e,i):(typeof i=="number"||typeof i=="bigint")&&qs(e,""+i);break;case"onScroll":i!=null&&Re("scroll",e);break;case"onScrollEnd":i!=null&&Re("scrollend",e);break;case"onClick":i!=null&&(e.onclick=ha);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!eh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),u=e[It]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,r),typeof i=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,r);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):uo(e,a,i)}}}function Yt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var i=!1,r=!1,u;for(u in a)if(a.hasOwnProperty(u)){var g=a[u];if(g!=null)switch(u){case"src":i=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Je(e,t,u,g,a,null)}}r&&Je(e,t,"srcSet",a.srcSet,a,null),i&&Je(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var x=u=g=r=null,E=null,B=null;for(i in a)if(a.hasOwnProperty(i)){var G=a[i];if(G!=null)switch(i){case"name":r=G;break;case"type":g=G;break;case"checked":E=G;break;case"defaultChecked":B=G;break;case"value":u=G;break;case"defaultValue":x=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,t));break;default:Je(e,t,i,G,a,null)}}ih(e,u,x,E,B,g,r,!1);return;case"select":Re("invalid",e),i=g=u=null;for(r in a)if(a.hasOwnProperty(r)&&(x=a[r],x!=null))switch(r){case"value":u=x;break;case"defaultValue":g=x;break;case"multiple":i=x;default:Je(e,t,r,x,a,null)}t=u,a=g,e.multiple=!!i,t!=null?Ps(e,!!i,t,!1):a!=null&&Ps(e,!!i,a,!0);return;case"textarea":Re("invalid",e),u=r=i=null;for(g in a)if(a.hasOwnProperty(g)&&(x=a[g],x!=null))switch(g){case"value":i=x;break;case"defaultValue":r=x;break;case"children":u=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:Je(e,t,g,x,a,null)}oh(e,i,r,u);return;case"option":for(E in a)if(a.hasOwnProperty(E)&&(i=a[E],i!=null))switch(E){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Je(e,t,E,i,a,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(i=0;i<jl.length;i++)Re(jl[i],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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 a)if(a.hasOwnProperty(B)&&(i=a[B],i!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Je(e,t,B,i,a,null)}return;default:if(rc(t)){for(G in a)a.hasOwnProperty(G)&&(i=a[G],i!==void 0&&Xu(e,t,G,i,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(i=a[x],i!=null&&Je(e,t,x,i,a,null))}function w1(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,u=null,g=null,x=null,E=null,B=null,G=null;for(z in a){var K=a[z];if(a.hasOwnProperty(z)&&K!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":E=K;default:i.hasOwnProperty(z)||Je(e,t,z,null,i,K)}}for(var L in i){var z=i[L];if(K=a[L],i.hasOwnProperty(L)&&(z!=null||K!=null))switch(L){case"type":u=z;break;case"name":r=z;break;case"checked":B=z;break;case"defaultChecked":G=z;break;case"value":g=z;break;case"defaultValue":x=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:z!==K&&Je(e,t,L,z,i,K)}}lc(e,g,x,E,B,G,u,r);return;case"select":z=g=x=L=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":z=E;default:i.hasOwnProperty(u)||Je(e,t,u,null,i,E)}for(r in i)if(u=i[r],E=a[r],i.hasOwnProperty(r)&&(u!=null||E!=null))switch(r){case"value":L=u;break;case"defaultValue":x=u;break;case"multiple":g=u;default:u!==E&&Je(e,t,r,u,i,E)}t=x,a=g,i=z,L!=null?Ps(e,!!a,L,!1):!!i!=!!a&&(t!=null?Ps(e,!!a,t,!0):Ps(e,!!a,a?[]:"",!1));return;case"textarea":z=L=null;for(x in a)if(r=a[x],a.hasOwnProperty(x)&&r!=null&&!i.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Je(e,t,x,null,i,r)}for(g in i)if(r=i[g],u=a[g],i.hasOwnProperty(g)&&(r!=null||u!=null))switch(g){case"value":L=r;break;case"defaultValue":z=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==u&&Je(e,t,g,r,i,u)}lh(e,L,z);return;case"option":for(var re in a)if(L=a[re],a.hasOwnProperty(re)&&L!=null&&!i.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:Je(e,t,re,null,i,L)}for(E in i)if(L=i[E],z=a[E],i.hasOwnProperty(E)&&L!==z&&(L!=null||z!=null))switch(E){case"selected":e.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:Je(e,t,E,L,i,z)}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 ye in a)L=a[ye],a.hasOwnProperty(ye)&&L!=null&&!i.hasOwnProperty(ye)&&Je(e,t,ye,null,i,L);for(B in i)if(L=i[B],z=a[B],i.hasOwnProperty(B)&&L!==z&&(L!=null||z!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:Je(e,t,B,L,i,z)}return;default:if(rc(t)){for(var We in a)L=a[We],a.hasOwnProperty(We)&&L!==void 0&&!i.hasOwnProperty(We)&&Xu(e,t,We,void 0,i,L);for(G in i)L=i[G],z=a[G],!i.hasOwnProperty(G)||L===z||L===void 0&&z===void 0||Xu(e,t,G,L,i,z);return}}for(var k in a)L=a[k],a.hasOwnProperty(k)&&L!=null&&!i.hasOwnProperty(k)&&Je(e,t,k,null,i,L);for(K in i)L=i[K],z=a[K],!i.hasOwnProperty(K)||L===z||L==null&&z==null||Je(e,t,K,L,i,z)}function ug(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function D1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var r=a[i],u=r.transferSize,g=r.initiatorType,x=r.duration;if(u&&x&&ug(g)){for(g=0,x=r.responseEnd,i+=1;i<a.length;i++){var E=a[i],B=E.startTime;if(B>x)break;var G=E.transferSize,K=E.initiatorType;G&&ug(K)&&(E=E.responseEnd,g+=G*(E<x?1:(x-B)/(E-B)))}if(--i,t+=8*(u+g)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var $u=null,Qu=null;function cr(e){return e.nodeType===9?e:e.ownerDocument}function dg(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 fg(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 Fu(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 Ju=null;function k1(){var e=window.event;return e&&e.type==="popstate"?e===Ju?!1:(Ju=e,!0):(Ju=null,!1)}var hg=typeof setTimeout=="function"?setTimeout:void 0,R1=typeof clearTimeout=="function"?clearTimeout:void 0,mg=typeof Promise=="function"?Promise:void 0,M1=typeof queueMicrotask=="function"?queueMicrotask:typeof mg<"u"?function(e){return mg.resolve(null).then(e).catch(O1)}:hg;function O1(e){setTimeout(function(){throw e})}function Wa(e){return e==="head"}function pg(e,t){var a=t,i=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(r),xi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Al(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Al(a);for(var u=a.firstChild;u;){var g=u.nextSibling,x=u.nodeName;u[Ft]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=g}}else a==="body"&&Al(e.ownerDocument.body);a=r}while(a);xi(t)}function gg(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function Wu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Wu(a),on(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function B1(e,t,a,i){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Ft])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Un(e.nextSibling),e===null)break}return null}function L1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Un(e.nextSibling),e===null))return null;return e}function vg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Un(e.nextSibling),e===null))return null;return e}function ed(e){return e.data==="$?"||e.data==="$~"}function td(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function U1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Un(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 nd=null;function yg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Un(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function bg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Sg(e,t,a){switch(t=cr(a),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 Al(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);on(e)}var zn=new Map,xg=new Set;function ur(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wa=Q.d;Q.d={f:z1,r:V1,D:H1,C:I1,L:G1,m:P1,X:Y1,S:q1,M:K1};function z1(){var e=wa.f(),t=tr();return e||t}function V1(e){var t=ct(e);t!==null&&t.tag===5&&t.type==="form"?zm(t):wa.r(e)}var yi=typeof document>"u"?null:document;function _g(e,t,a){var i=yi;if(i&&typeof t=="string"&&t){var r=Dn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),xg.has(r)||(xg.add(r),e={rel:e,crossOrigin:a,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),Yt(t,"link",e),Vt(t),i.head.appendChild(t)))}}function H1(e){wa.D(e),_g("dns-prefetch",e,null)}function I1(e,t){wa.C(e,t),_g("preconnect",e,t)}function G1(e,t,a){wa.L(e,t,a);var i=yi;if(i&&e&&t){var r='link[rel="preload"][as="'+Dn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+Dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+Dn(a.imageSizes)+'"]')):r+='[href="'+Dn(e)+'"]';var u=r;switch(t){case"style":u=bi(e);break;case"script":u=Si(e)}zn.has(u)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),zn.set(u,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(Nl(u))||t==="script"&&i.querySelector(wl(u))||(t=i.createElement("link"),Yt(t,"link",e),Vt(t),i.head.appendChild(t)))}}function P1(e,t){wa.m(e,t);var a=yi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Dn(i)+'"][href="'+Dn(e)+'"]',u=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Si(e)}if(!zn.has(u)&&(e=b({rel:"modulepreload",href:e},t),zn.set(u,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(wl(u)))return}i=a.createElement("link"),Yt(i,"link",e),Vt(i),a.head.appendChild(i)}}}function q1(e,t,a){wa.S(e,t,a);var i=yi;if(i&&e){var r=Is(i).hoistableStyles,u=bi(e);t=t||"default";var g=r.get(u);if(!g){var x={loading:0,preload:null};if(g=i.querySelector(Nl(u)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=zn.get(u))&&ad(e,a);var E=g=i.createElement("link");Vt(E),Yt(E,"link",e),E._p=new Promise(function(B,G){E.onload=B,E.onerror=G}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,dr(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:x},r.set(u,g)}}}function Y1(e,t){wa.X(e,t);var a=yi;if(a&&e){var i=Is(a).hoistableScripts,r=Si(e),u=i.get(r);u||(u=a.querySelector(wl(r)),u||(e=b({src:e,async:!0},t),(t=zn.get(r))&&sd(e,t),u=a.createElement("script"),Vt(u),Yt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(r,u))}}function K1(e,t){wa.M(e,t);var a=yi;if(a&&e){var i=Is(a).hoistableScripts,r=Si(e),u=i.get(r);u||(u=a.querySelector(wl(r)),u||(e=b({src:e,async:!0,type:"module"},t),(t=zn.get(r))&&sd(e,t),u=a.createElement("script"),Vt(u),Yt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(r,u))}}function Tg(e,t,a,i){var r=(r=U.current)?ur(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=bi(a.href),a=Is(r).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=bi(a.href);var u=Is(r).hoistableStyles,g=u.get(e);if(g||(r=r.ownerDocument||r,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=r.querySelector(Nl(e)))&&!u._p&&(g.instance=u,g.state.loading=5),zn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},zn.set(e,a),u||Z1(r,e,a,g.state))),t&&i===null)throw Error(o(528,""));return g}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Si(a),a=Is(r).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function bi(e){return'href="'+Dn(e)+'"'}function Nl(e){return'link[rel="stylesheet"]['+e+"]"}function Eg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Z1(e,t,a,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}),Yt(t,"link",a),Vt(t),e.head.appendChild(t))}function Si(e){return'[src="'+Dn(e)+'"]'}function wl(e){return"script[async]"+e}function jg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Dn(a.href)+'"]');if(i)return t.instance=i,Vt(i),i;var r=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Vt(i),Yt(i,"style",r),dr(i,a.precedence,e),t.instance=i;case"stylesheet":r=bi(a.href);var u=e.querySelector(Nl(r));if(u)return t.state.loading|=4,t.instance=u,Vt(u),u;i=Eg(a),(r=zn.get(r))&&ad(i,r),u=(e.ownerDocument||e).createElement("link"),Vt(u);var g=u;return g._p=new Promise(function(x,E){g.onload=x,g.onerror=E}),Yt(u,"link",i),t.state.loading|=4,dr(u,a.precedence,e),t.instance=u;case"script":return u=Si(a.src),(r=e.querySelector(wl(u)))?(t.instance=r,Vt(r),r):(i=a,(r=zn.get(u))&&(i=b({},a),sd(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),Vt(r),Yt(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,dr(i,a.precedence,e));return t.instance}function dr(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,u=r,g=0;g<i.length;g++){var x=i[g];if(x.dataset.precedence===t)u=x;else if(u!==r)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ad(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function sd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fr=null;function Cg(e,t,a){if(fr===null){var i=new Map,r=fr=new Map;r.set(a,i)}else r=fr,i=r.get(a),i||(i=new Map,r.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var u=a[r];if(!(u[Ft]||u[Nt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var x=i.get(g);x?x.push(u):i.set(g,[u])}}return i}function Ag(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function X1(e,t,a){if(a===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 Ng(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $1(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=bi(i.href),u=t.querySelector(Nl(r));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Vt(u);return}u=t.ownerDocument||t,i=Eg(i),(r=zn.get(r))&&ad(i,r),u=u.createElement("link"),Vt(u);var g=u;g._p=new Promise(function(x,E){g.onload=x,g.onerror=E}),Yt(u,"link",i),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=hr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var id=0;function Q1(e,t){return e.stylesheets&&e.count===0&&pr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&pr(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&id===0&&(id=62500*D1());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pr(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>id?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function hr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mr=null;function pr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mr=new Map,t.forEach(F1,e),mr=null,hr.call(e))}function F1(e,t){if(!(t.state.loading&4)){var a=mr.get(e);if(a)var i=a.get(null);else{a=new Map,mr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<r.length;u++){var g=r[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),i=g)}i&&a.set(null,i)}r=t.instance,g=r.getAttribute("data-precedence"),u=a.get(g)||i,u===i&&a.set(null,r),a.set(g,r),this.count++,i=hr.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),u?u.parentNode.insertBefore(r,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Dl={$$typeof:M,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function J1(e,t,a,i,r,u,g,x,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=zs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zs(0),this.hiddenUpdates=zs(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function wg(e,t,a,i,r,u,g,x,E,B,G,K){return e=new J1(e,t,a,g,E,B,G,K,x),t=1,u===!0&&(t|=24),u=gn(3,null,null,t),e.current=u,u.stateNode=e,t=zc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:i,isDehydrated:a,cache:t},Gc(u),e}function Dg(e){return e?(e=Fs,e):Fs}function kg(e,t,a,i,r,u){r=Dg(r),i.context===null?i.context=r:i.pendingContext=r,i=Ga(t),i.payload={element:a},u=u===void 0?null:u,u!==null&&(i.callback=u),a=Pa(e,i,t),a!==null&&(hn(a,e,t),rl(a,e,t))}function Rg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ld(e,t){Rg(e,t),(e=e.alternate)&&Rg(e,t)}function Mg(e){if(e.tag===13||e.tag===31){var t=ps(e,67108864);t!==null&&hn(t,e,67108864),ld(e,67108864)}}function Og(e){if(e.tag===13||e.tag===31){var t=xn();t=Vs(t);var a=ps(e,t);a!==null&&hn(a,e,t),ld(e,t)}}var gr=!0;function W1(e,t,a,i){var r=V.T;V.T=null;var u=Q.p;try{Q.p=2,od(e,t,a,i)}finally{Q.p=u,V.T=r}}function ex(e,t,a,i){var r=V.T;V.T=null;var u=Q.p;try{Q.p=8,od(e,t,a,i)}finally{Q.p=u,V.T=r}}function od(e,t,a,i){if(gr){var r=rd(i);if(r===null)Zu(e,t,i,vr,a),Lg(e,i);else if(nx(r,e,t,a,i))i.stopPropagation();else if(Lg(e,i),t&4&&-1<tx.indexOf(e)){for(;r!==null;){var u=ct(r);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=ve(u.pendingLanes);if(g!==0){var x=u;for(x.pendingLanes|=2,x.entangledLanes|=2;g;){var E=1<<31-xt(g);x.entanglements[1]|=E,g&=~E}aa(u),(Ke&6)===0&&(Wo=De()+500,El(0))}}break;case 31:case 13:x=ps(u,2),x!==null&&hn(x,u,2),tr(),ld(u,2)}if(u=rd(i),u===null&&Zu(e,t,i,vr,a),u===r)break;r=u}r!==null&&i.stopPropagation()}else Zu(e,t,i,null,a)}}function rd(e){return e=uc(e),cd(e)}var vr=null;function cd(e){if(vr=null,e=rt(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=f(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vr=e,null}function Bg(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(Ve()){case at:return 2;case ht:return 8;case tt:case Bt:return 32;case gt:return 268435456;default:return 32}default:return 32}}var ud=!1,es=null,ts=null,ns=null,kl=new Map,Rl=new Map,as=[],tx="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 Lg(e,t){switch(e){case"focusin":case"focusout":es=null;break;case"dragenter":case"dragleave":ts=null;break;case"mouseover":case"mouseout":ns=null;break;case"pointerover":case"pointerout":kl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rl.delete(t.pointerId)}}function Ml(e,t,a,i,r,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:u,targetContainers:[r]},t!==null&&(t=ct(t),t!==null&&Mg(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function nx(e,t,a,i,r){switch(t){case"focusin":return es=Ml(es,e,t,a,i,r),!0;case"dragenter":return ts=Ml(ts,e,t,a,i,r),!0;case"mouseover":return ns=Ml(ns,e,t,a,i,r),!0;case"pointerover":var u=r.pointerId;return kl.set(u,Ml(kl.get(u)||null,e,t,a,i,r)),!0;case"gotpointercapture":return u=r.pointerId,Rl.set(u,Ml(Rl.get(u)||null,e,t,a,i,r)),!0}return!1}function Ug(e){var t=rt(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=f(a),t!==null){e.blockedOn=t,Ki(e.priority,function(){Og(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,Ki(e.priority,function(){Og(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=rd(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);cc=i,a.target.dispatchEvent(i),cc=null}else return t=ct(a),t!==null&&Mg(t),e.blockedOn=a,!1;t.shift()}return!0}function zg(e,t,a){yr(e)&&a.delete(t)}function ax(){ud=!1,es!==null&&yr(es)&&(es=null),ts!==null&&yr(ts)&&(ts=null),ns!==null&&yr(ns)&&(ns=null),kl.forEach(zg),Rl.forEach(zg)}function br(e,t){e.blockedOn===t&&(e.blockedOn=null,ud||(ud=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ax)))}var Sr=null;function Vg(e){Sr!==e&&(Sr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Sr===e&&(Sr=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],r=e[t+2];if(typeof i!="function"){if(cd(i||a)===null)continue;break}var u=ct(a);u!==null&&(e.splice(t,3),t-=3,ru(u,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function xi(e){function t(E){return br(E,e)}es!==null&&br(es,e),ts!==null&&br(ts,e),ns!==null&&br(ns,e),kl.forEach(t),Rl.forEach(t);for(var a=0;a<as.length;a++){var i=as[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<as.length&&(a=as[0],a.blockedOn===null);)Ug(a),a.blockedOn===null&&as.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var r=a[i],u=a[i+1],g=r[It]||null;if(typeof u=="function")g||Vg(a);else if(g){var x=null;if(u&&u.hasAttribute("formAction")){if(r=u,g=u[It]||null)x=g.formAction;else if(cd(r)!==null)continue}else x=g.action;typeof x=="function"?a[i+1]=x:(a.splice(i,3),i-=3),Vg(a)}}}function Hg(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return r=g})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function dd(e){this._internalRoot=e}xr.prototype.render=dd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=xn();kg(a,i,e,t,null,null)},xr.prototype.unmount=dd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kg(e.current,2,null,e,null,null),tr(),t[da]=null}};function xr(e){this._internalRoot=e}xr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<as.length&&t!==0&&t<as[a].priority;a++);as.splice(a,0,e),a===0&&Ug(e)}};var Ig=s.version;if(Ig!=="19.2.4")throw Error(o(527,Ig,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=v(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var sx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_r.isDisabled&&_r.supportsFiber)try{An=_r.inject(sx),Ct=_r}catch{}}return Ol.createRoot=function(e,t){if(!c(e))throw Error(o(299));var a=!1,i="",r=Xm,u=$m,g=Qm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=wg(e,1,!1,null,null,a,i,null,r,u,g,Hg),e[da]=t.current,Ku(e),new dd(t)},Ol.hydrateRoot=function(e,t,a){if(!c(e))throw Error(o(299));var i=!1,r="",u=Xm,g=$m,x=Qm,E=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=wg(e,1,!0,t,a??null,i,r,E,u,g,x,Hg),t.context=Dg(null),a=t.current,i=xn(),i=Vs(i),r=Ga(i),r.callback=null,Pa(a,r,i),a=i,t.current.lanes=a,Ba(t,a),aa(t),e[da]=t.current,Ku(e),new xr(t)},Ol.version="19.2.4",Ol}var Xg;function Sx(){if(Xg)return fd.exports;Xg=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(s){console.error(s)}}return n(),fd.exports=bx(),fd.exports}var xx=Sx();function tn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Gl(n,s){return console.warn(`[ws] Malformed "${n}" message: ${s}`),!1}function _x(n){return tn(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 $g(n){return tn(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 Qg(n){return tn(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 Tx(n){return tn(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 Ex(n){return tn(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 jx(n){return tn(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 Cx(n){return tn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}function Ax(n){return tn(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function Nx(n){return tn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function wx(n){return tn(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 sa(n,s,l,o){return Array.isArray(n)?n.filter((c,d)=>s(c)?!0:(Gl(l,`item at index ${d} in "${o}" has unexpected shape`),!1)):(Gl(l,`expected "${o}" to be an array, got ${typeof n}`),[])}function Dx(n){let s;try{s=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!tn(s)||typeof s.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",s);return}return{type:s.type,payload:tn(s.payload)?s.payload:void 0}}function kx(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const Rx=3e3,_i=5e3;function Mx(n){const s=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(s)}`:"ws://localhost:3000",o=S.useRef(void 0),[c,d]=S.useState(!1),[f,m]=S.useState([]),[p,v]=S.useState([]),[y,b]=S.useState([]),[_,T]=S.useState(0),[N,D]=S.useState(void 0),[w,j]=S.useState([]),[H,M]=S.useState([]),[$,I]=S.useState([]),[J,te]=S.useState([]),[Y,X]=S.useState({}),[ue,R]=S.useState([]),[pe,ee]=S.useState(""),[ge,q]=S.useState(""),[V,Q]=S.useState(!1),[W,Ne]=S.useState([]),[Te,Ie]=S.useState({}),[Ce,xe]=S.useState(!1),[Ee,F]=S.useState(void 0),U=S.useCallback(ne=>{var we;((we=o.current)==null?void 0:we.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(ne))},[]);S.useEffect(()=>{let ne,we;function Le(){ne=new WebSocket(l),o.current=ne,ne.onopen=()=>{d(!0),U({type:"list_environments"}),U({type:"list_sessions"}),U({type:"list_projects"}),U({type:"list_tokens"}),U({type:"list_personas"}),U({type:"subscribe_all"})},ne.onmessage=Ye=>{var ve,nt,le,At,Nn,zs,Ba,co,Gi,Pi,qi,Vs,Hs,Yi,Ki,Yn,Nt,It,da;if(typeof Ye.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const se=Dx(Ye.data);if(se)switch(se.type){case"environments":m(sa((ve=se.payload)==null?void 0:ve.environments,_x,"environments","environments"));break;case"sessions":v(ie=>{var on;const He=sa((on=se.payload)==null?void 0:on.sessions,$g,"sessions","sessions"),Me=new Map(ie.map(rt=>[rt.id,rt.status])),Ue=new Set(["pending","running","idle"]),Ft=new Set(["completed","failed","interrupted"]);return He.map(rt=>{const ct=Me.get(rt.id);if(!ct||ct===rt.status)return rt;if(Ft.has(ct)&&Ue.has(rt.status))return{...rt,status:ct};if(Ue.has(ct)&&Ue.has(rt.status)){const Kn=["pending","running","idle"];if(Kn.indexOf(ct)>Kn.indexOf(rt.status))return{...rt,status:ct}}return rt})});break;case"session_event":{if(!Qg(se.payload)){Gl("session_event","payload is not a valid SessionEvent");break}const ie=se.payload;let He=0;if(b(Me=>{const Ue=[...Me,ie];return Ue.length>_i?(He=Ue.length-_i,Ue.slice(-_i)):Ue}),He>0&&T(Me=>Me+He),ie.eventType==="status"){const Me=kx(ie.content);v(Ue=>Ue.some(on=>on.id===ie.sessionId)?Ue.map(on=>on.id===ie.sessionId?{...on,status:Me}:on):[...Ue,{id:ie.sessionId,environmentId:"",runtime:"",status:Me,prompt:"",startedAt:ie.timestamp}])}break}case"session_events":{const ie=sa((nt=se.payload)==null?void 0:nt.events,Qg,"session_events","events"),He=(le=se.payload)==null?void 0:le.sessionId;if(typeof He!="string"){Gl("session_events","missing or non-string sessionId");break}if(ie.length>0){let Me=0;b(Ue=>{const Ft=new Set;for(const ct of Ue)ct.sessionId===He&&Ft.add(`${ct.timestamp}|${ct.eventType}`);const on=ie.filter(ct=>!Ft.has(`${ct.timestamp}|${ct.eventType}`)),rt=[...Ue,...on].sort((ct,Kn)=>ct.sessionId!==Kn.sessionId?0:ct.timestamp.localeCompare(Kn.timestamp));return rt.length>_i?(Me=rt.length-_i,rt.slice(-_i)):rt}),Me>0&&T(Ue=>Ue+Me)}break}case"spawned":{const ie=(At=se.payload)==null?void 0:At.sessionId;typeof ie=="string"&&ie&&D(ie),U({type:"list_sessions"});break}case"projects":j(sa((Nn=se.payload)==null?void 0:Nn.projects,Tx,"projects","projects"));break;case"project_created":xe(!1),U({type:"list_projects"});break;case"project_archived":U({type:"list_projects"});break;case"project_updated":U({type:"list_projects"});break;case"tasks":{const ie=sa((zs=se.payload)==null?void 0:zs.tasks,Ex,"tasks","tasks"),He=(typeof((Ba=se.payload)==null?void 0:Ba.projectId)=="string"?se.payload.projectId:"")||(ie.length>0?ie[0].projectId:"");if(!He){M(ie);break}M(Me=>[...Me.filter(Ue=>Ue.projectId!==He),...ie]);break}case"task_created":{const ie=(co=se.payload)==null?void 0:co.task;if(tn(ie)){const He=typeof ie.project_id=="string"?ie.project_id:typeof ie.projectId=="string"?ie.projectId:"";He&&U({type:"list_tasks",payload:{projectId:He}})}break}case"task_started":{const ie=se.payload;if(!tn(ie))break;F(Me=>ie.taskId&&Me===ie.taskId?void 0:Me),ie.sessionId&&(U({type:"list_sessions"}),typeof ie.taskId=="string"&&typeof ie.sessionId=="string"&&M(Me=>Me.map(Ue=>Ue.id===ie.taskId?{...Ue,latestSessionId:ie.sessionId}:Ue)));const He=typeof ie.projectId=="string"?ie.projectId:void 0;He?U({type:"list_tasks",payload:{projectId:He}}):ie.taskId&&M(Me=>{const Ue=Me.find(Ft=>Ft.id===ie.taskId);return Ue&&U({type:"list_tasks",payload:{projectId:Ue.projectId}}),Me});break}case"task_completed":case"task_deleted":case"task_updated":{const ie=se.payload;if(!tn(ie))break;const He=typeof ie.projectId=="string"?ie.projectId:void 0;He?U({type:"list_tasks",payload:{projectId:He}}):ie.taskId&&M(Me=>{const Ue=Me.find(Ft=>Ft.id===ie.taskId);return Ue&&U({type:"list_tasks",payload:{projectId:Ue.projectId}}),Me});break}case"findings":I(sa((Gi=se.payload)==null?void 0:Gi.findings,jx,"findings","findings"));break;case"finding_posted":typeof((Pi=se.payload)==null?void 0:Pi.projectId)=="string"&&U({type:"list_findings",payload:{projectId:se.payload.projectId}});break;case"tokens":te(sa((qi=se.payload)==null?void 0:qi.tokens,Cx,"tokens","tokens"));break;case"token_changed":U({type:"list_tokens"});break;case"provision_progress":{if(!Ax(se.payload)){Gl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const ie=se.payload;X(He=>({...He,[ie.environmentId]:{stage:ie.stage,message:ie.message,progress:ie.progress}})),ie.stage==="ready"&&setTimeout(()=>{X(Me=>{const Ue={...Me};return delete Ue[ie.environmentId],Ue})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((Vs=se.payload)==null?void 0:Vs.environmentId)=="string"){const ie=se.payload.environmentId;m(He=>He.filter(Me=>Me.id!==ie)),X(He=>{const Me={...He};return delete Me[ie],Me})}U({type:"list_sessions"});break;case"codespaces_list":{const ie=sa((Hs=se.payload)==null?void 0:Hs.codespaces,Nx,"codespaces_list","codespaces"),He=typeof((Yi=se.payload)==null?void 0:Yi.error)=="string"?se.payload.error:"";R(ie),q(He);break}case"codespace_created":{Q(!1),U({type:"list_codespaces"});break}case"codespace_create_error":{Q(!1);const ie=typeof((Ki=se.payload)==null?void 0:Ki.message)=="string"?se.payload.message:"Failed to create codespace";ee(ie);break}case"personas":{const ie=sa((Yn=se.payload)==null?void 0:Yn.personas,wx,"personas","personas");Ne(ie);break}case"persona_created":case"persona_updated":case"persona_deleted":U({type:"list_personas"});break;case"task_sessions":{const ie=(Nt=se.payload)==null?void 0:Nt.taskId;if(typeof ie!="string"||!ie)break;const He=sa((It=se.payload)==null?void 0:It.sessions,$g,"task_sessions","sessions");Ie(Me=>({...Me,[ie]:He}));break}case"error":console.error("[ws]",(da=se.payload)==null?void 0:da.message);break}},ne.onclose=()=>{d(!1),o.current=void 0,xe(!1),F(void 0),clearTimeout(we),we=setTimeout(Le,Rx)},ne.onerror=()=>{ne.close()}}return Le(),()=>{clearTimeout(we),ne==null||ne.close()}},[l,U]);const qe=S.useCallback((ne,we,Le,Ye,se,ve)=>{U({type:"spawn",payload:{environmentId:ne,prompt:we,model:Le||"",runtime:Ye||"",personaId:se||"",worktreeBasePath:ve||""}})},[U]),$t=S.useCallback((ne,we)=>{U({type:"send_input",payload:{sessionId:ne,text:we}})},[U]),sn=S.useCallback(ne=>{U({type:"kill",payload:{sessionId:ne}})},[U]),Fn=S.useCallback(()=>{U({type:"list_environments"}),U({type:"list_sessions"}),U({type:"list_projects"}),U({type:"list_tokens"})},[U]),ln=S.useCallback(ne=>{U({type:"get_session_events",payload:{sessionId:ne}})},[U]),jn=S.useCallback(()=>{b([]),T(0)},[]),ft=S.useCallback((ne,we,Le,Ye)=>{xe(!0),U({type:"create_project",payload:{name:ne,description:we||"",repoUrl:Le||"",defaultEnvironmentId:Ye||""}})},[U]),Qt=S.useCallback(ne=>{U({type:"archive_project",payload:{projectId:ne}})},[U]),Pn=S.useCallback((ne,we)=>{U({type:"update_project",payload:{projectId:ne,...we}})},[U]),qn=S.useCallback(ne=>{U({type:"list_tasks",payload:{projectId:ne}})},[U]),Cn=S.useCallback((ne,we,Le,Ye,se)=>{U({type:"create_task",payload:{projectId:ne,title:we,description:Le||"",dependsOn:Ye||[],parentTaskId:se||""}})},[U]),Z=S.useCallback((ne,we,Le,Ye,se,ve)=>{F(ne),U({type:"start_task",payload:{taskId:ne,runtime:we||"",model:Le||"",personaId:Ye||"",environmentId:se||"",notes:ve||""}})},[U]),ae=S.useCallback(ne=>{U({type:"complete_task",payload:{taskId:ne}})},[U]),oe=S.useCallback(ne=>{U({type:"resume_task",payload:{taskId:ne}})},[U]),he=S.useCallback((ne,we,Le,Ye)=>{U({type:"update_task",payload:{taskId:ne,title:we,description:Le,dependsOn:Ye}})},[U]),_e=S.useCallback(ne=>{U({type:"delete_task",payload:{taskId:ne}})},[U]),Se=S.useCallback(ne=>{U({type:"list_findings",payload:{projectId:ne}})},[U]),De=S.useCallback((ne,we,Le,Ye,se)=>{U({type:"post_finding",payload:{projectId:ne,title:we,content:Le,category:Ye||"general",tags:se||[]}})},[U]),Ve=S.useCallback(()=>{U({type:"list_tokens"})},[U]),at=S.useCallback((ne,we,Le,Ye,se)=>{U({type:"set_token",payload:{name:ne,value:we,tokenType:Le,envVar:Ye,filePath:se}})},[U]),ht=S.useCallback(ne=>{U({type:"delete_token",payload:{name:ne}})},[U]),tt=S.useCallback((ne,we,Le,Ye)=>{const se={displayName:ne,adapterType:we,adapterConfig:Le||{}};Ye&&(se.defaultRuntime=Ye),U({type:"add_environment",payload:se})},[U]),Bt=S.useCallback(ne=>{U({type:"provision_environment",payload:{environmentId:ne}})},[U]),gt=S.useCallback(ne=>{U({type:"stop_environment",payload:{environmentId:ne}})},[U]),Jn=S.useCallback(ne=>{U({type:"remove_environment",payload:{environmentId:ne}})},[U]),Wn=S.useCallback(()=>{U({type:"list_codespaces"})},[U]),An=S.useCallback((ne,we)=>{if(!c){ee("Not connected to server. Please try again once the connection is restored.");return}Q(!0),ee("");const Le={repo:ne};we&&(Le.machine=we),U({type:"create_codespace",payload:Le})},[U,c]),Ct=S.useCallback((ne,we,Le,Ye,se,ve)=>{U({type:"create_persona",payload:{name:ne,description:we,systemPrompt:Le,runtime:Ye||"",model:se||"",maxTurns:ve||0}})},[U]),mn=S.useCallback((ne,we,Le,Ye,se,ve,nt)=>{U({type:"update_persona",payload:{personaId:ne,name:we||"",description:Le||"",systemPrompt:Ye||"",runtime:se||"",model:ve||"",maxTurns:nt||0}})},[U]),xt=S.useCallback(ne=>{U({type:"delete_persona",payload:{personaId:ne}})},[U]),zt=S.useCallback(ne=>{U({type:"get_task_sessions",payload:{taskId:ne}})},[U]);return{connected:c,environments:f,sessions:p,events:y,eventsDropped:_,lastSpawnedId:N,projects:w,tasks:H,findings:$,tokens:J,spawn:qe,sendInput:$t,kill:sn,refresh:Fn,loadSessionEvents:ln,clearEvents:jn,createProject:ft,archiveProject:Qt,updateProject:Pn,loadTasks:qn,createTask:Cn,startTask:Z,completeTask:ae,resumeTask:oe,updateTask:he,deleteTask:_e,loadFindings:Se,postFinding:De,addEnvironment:tt,loadTokens:Ve,setToken:at,deleteToken:ht,provisionStatus:Y,provisionEnvironment:Bt,stopEnvironment:gt,removeEnvironment:Jn,codespaces:ue,codespaceError:pe,codespaceListError:ge,codespaceCreating:V,listCodespaces:Wn,createCodespace:An,projectCreating:Ce,taskStartingId:Ee,personas:W,createPersona:Ct,updatePersona:mn,deletePersona:xt,taskSessions:Te,loadTaskSessions:zt}}const uf=S.createContext(void 0);function Ox({children:n}){const s=Mx();return h.jsx(uf.Provider,{value:s,children:n})}function nn(){const n=S.useContext(uf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const Bx=[{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}],Lx=[{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"}],Ux=[{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:
26
+ - src/middleware/auth.ts
27
+ - src/routes/login.ts
28
+ - 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:
29
+ \`\`\`typescript
30
+ import jwt from "jsonwebtoken";
31
+ import type { Request, Response, NextFunction } from "express";
32
+
33
+ const JWT_SECRET = process.env.JWT_SECRET || "change-me";
34
+
35
+ export function verifyToken(req: Request, res: Response, next: NextFunction): void {
36
+ const header = req.headers.authorization;
37
+ if (!header?.startsWith("Bearer ")) {
38
+ res.status(401).json({ error: "Missing token" });
39
+ return;
40
+ }
41
+ try {
42
+ const decoded = jwt.verify(header.slice(7), JWT_SECRET);
43
+ req.user = decoded;
44
+ next();
45
+ } catch {
46
+ res.status(403).json({ error: "Invalid token" });
47
+ }
48
+ }
49
+ \`\`\``},{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"}],zx=[{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"}],Vx=[{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}],Fg=[{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"}],Hx=[{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:""}],Ix=[{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"}],Gx={"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 Ut(n){return new Date(Date.now()+n).toISOString()}const Jg=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ut(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Ut(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Ut(1600),content:`Found 5 endpoints that need refactoring:
50
+ - GET /api/users
51
+ - POST /api/users
52
+ - GET /api/users/:id
53
+ - PUT /api/users/:id
54
+ - DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Ut(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:Ut(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Ut(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ut(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Ut(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Ut(1400),content:`Found tables to modify:
55
+ - users (add column: last_login_at)
56
+ - sessions (add index on expires_at)
57
+ - audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Ut(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
58
+ The table has 50,000+ rows — this may lock the table briefly.
59
+
60
+ Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Ut(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Ut(1e3),content:`Migration 001_add_last_login.sql applied successfully.
61
+ Migration 002_sessions_index.sql applied successfully.
62
+ Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Ut(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Ut(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ut(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Ut(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Ut(1800),content:`Writing test cases:
63
+ - should calculate monthly total
64
+ - should apply discount codes
65
+ - should handle currency conversion
66
+ - should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Ut(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
67
+ The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Ut(3500),content:"failed"}}]}],Wg=400;function Px({children:n}){const[s,l]=S.useState(Lx),[o,c]=S.useState(Ux),[d,f]=S.useState(void 0),[m,p]=S.useState(zx),[v,y]=S.useState(Vx),[b,_]=S.useState(Fg),[T,N]=S.useState(Hx),[D,w]=S.useState(Ix),[j]=S.useState(Gx),H=S.useRef(0),M=S.useRef(0),$=S.useRef(new Set),I=S.useRef(new Map),J=S.useRef(v);J.current=v;const te=S.useRef(new Map),Y=S.useRef(new Map),X=S.useCallback(Z=>(H.current+=1,`mock-${Z}-${String(H.current).padStart(3,"0")}`),[]),ue=S.useCallback(()=>{const Z=Jg[M.current%Jg.length];return M.current+=1,Z},[]),R=S.useCallback((Z,ae,oe)=>{const he=setTimeout(()=>{var _e;$.current.delete(he),oe&&((_e=I.current.get(oe))==null||_e.delete(he)),Z()},ae);$.current.add(he),oe&&(I.current.has(oe)||I.current.set(oe,new Set),I.current.get(oe).add(he))},[]),pe=S.useCallback(Z=>{const ae=I.current.get(Z);ae&&(ae.forEach(oe=>{clearTimeout(oe),$.current.delete(oe)}),I.current.delete(Z))},[]),ee=S.useCallback((Z,ae)=>{l(oe=>oe.map(he=>he.id===Z?{...he,status:ae}:he))},[]),ge=S.useCallback(Z=>{c(ae=>[...ae,Z])},[]),q=S.useCallback((Z,ae,oe)=>{ae.forEach((he,_e)=>{R(()=>{const Se={sessionId:Z,...he.event,timestamp:new Date().toISOString()};ge(Se),he.event.eventType==="status"&&ee(Z,he.event.content),_e===ae.length-1&&oe&&oe()},he.delayMs,Z)})},[R,ge,ee]),V=S.useCallback((Z,ae,oe,he)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:ae,runtime:he});const _e=X("sess"),Se={id:_e,environmentId:Z,runtime:he||"claude-code",status:"running",prompt:ae,startedAt:new Date().toISOString()};l(Ve=>[...Ve,Se]),f(_e);const De=ue();if(console.log(`[MockGrackle] Playing scenario: ${De.label}`),De.pauseForInput){const Ve=De.pauseAfterStep??De.steps.length-1,at=De.steps.slice(0,Ve+1),ht=at.length>0?at[at.length-1].delayMs:0;q(_e,at),R(()=>{ee(_e,"idle"),ge({sessionId:_e,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},ht+Wg,_e),De.resumeSteps&&te.current.set(_e,De.resumeSteps)}else q(_e,De.steps)},[X,ue,q,R,ee,ge]),Q=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),pe(Z),te.current.delete(Z),ee(Z,"interrupted"),ge({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(ae=>ae.map(oe=>oe.latestSessionId===Z&&oe.status==="working"?{...oe,status:"not_started"}:oe))},[pe,ee,ge]),W=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Ne=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),Te=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),c([])},[]),Ie=S.useCallback((Z,ae,oe,he)=>{console.log("[MockGrackle] createProject",{name:Z,description:ae});const _e={id:X("proj"),name:Z,description:ae||"",repoUrl:oe||"",defaultEnvironmentId:he||"",status:"active",worktreeBasePath:"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(Se=>[...Se,_e])},[X]),Ce=S.useCallback(Z=>{console.log("[MockGrackle] archiveProject",Z),p(ae=>ae.map(oe=>oe.id===Z?{...oe,status:"archived"}:oe))},[]),xe=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),Ee=S.useCallback((Z,ae,oe,he,_e)=>{console.log("[MockGrackle] createTask",{projectId:Z,title:ae,parentTaskId:_e}),y(Se=>{const Ve=Se.filter(Bt=>Bt.projectId===Z).reduce((Bt,gt)=>Math.max(Bt,gt.sortOrder),0),at=_e?Se.find(Bt=>Bt.id===_e):void 0;if(_e&&!at)return console.warn("[MockGrackle] Parent task not found:",_e),Se;if(at&&!at.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",_e),Se;const ht=at?at.depth+1:0,tt={id:X("task"),projectId:Z,title:ae,description:oe||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:he||[],reviewNotes:void 0,sortOrder:Ve+1,createdAt:new Date().toISOString(),parentTaskId:_e||"",depth:ht,childTaskIds:[],canDecompose:!_e};return[...Se,tt]})},[X]),F=S.useCallback((Z,ae,oe)=>{var at;console.log("[MockGrackle] startTask",{taskId:Z,runtime:ae});const he=J.current.find(ht=>ht.id===Z),_e=(he==null?void 0:he.title)??"",Se=X("sess"),De={id:Se,environmentId:"env-local-01",runtime:ae||"claude-code",status:"running",prompt:_e||Z,startedAt:new Date().toISOString()};l(ht=>[...ht,De]),y(ht=>ht.map(tt=>tt.id===Z?{...tt,status:"working",latestSessionId:Se,branch:`mock/${Z.slice(0,8)}`}:tt));const Ve=ue();if(console.log(`[MockGrackle] Playing task scenario: ${Ve.label}`),Ve.pauseForInput){const ht=Ve.pauseAfterStep??Ve.steps.length-1,tt=Ve.steps.slice(0,ht+1),Bt=tt.length>0?tt[tt.length-1].delayMs:0;if(q(Se,tt),R(()=>{ee(Se,"idle"),ge({sessionId:Se,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Bt+Wg,Se),Ve.resumeSteps){const gt=[...Ve.resumeSteps];te.current.set(Se,gt);const Jn=gt.reduce((Wn,An)=>Math.max(Wn,An.delayMs),0);Y.current.set(Se,{taskId:Z,delayAfterResume:Jn+200})}}else{const ht=Ve.steps.length>0?Ve.steps[Ve.steps.length-1].delayMs:0;q(Se,Ve.steps);const tt=(at=Ve.steps[Ve.steps.length-1])==null?void 0:at.event.content;R(()=>{tt==="completed"?y(Bt=>Bt.map(gt=>gt.id===Z&&gt.status==="working"?{...gt,status:"paused"}:gt)):tt==="failed"&&y(Bt=>Bt.map(gt=>gt.id===Z&&gt.status==="working"?{...gt,status:"failed"}:gt))},ht+100,Se)}},[X,ue,q,R,ee,ge]),U=S.useCallback((Z,ae)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:ae}),ge({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${ae}`}),ee(Z,"running"),ge({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const oe=te.current.get(Z);if(oe)te.current.delete(Z),q(Z,oe);else{const _e=[{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"}}];q(Z,_e)}const he=Y.current.get(Z);he&&(Y.current.delete(Z),R(()=>{y(_e=>_e.map(Se=>Se.id===he.taskId&&Se.status==="working"?{...Se,status:"paused"}:Se))},he.delayAfterResume,Z))},[ge,ee,q,R]),qe=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),y(ae=>ae.map(oe=>oe.id===Z?{...oe,status:"complete"}:oe))},[]),$t=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),sn=S.useCallback((Z,ae,oe,he)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:ae}),y(_e=>_e.map(Se=>Se.id===Z?{...Se,title:ae.trim()||Se.title,description:oe,dependsOn:he}:Se))},[]),Fn=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),y(ae=>ae.filter(oe=>oe.id!==Z))},[]),ln=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),_(Fg.filter(ae=>ae.projectId===Z))},[]),jn=S.useCallback((Z,ae,oe,he,_e)=>{console.log("[MockGrackle] postFinding",{projectId:Z,title:ae});const Se={id:X("find"),projectId:Z,taskId:"",sessionId:"",category:he||"general",title:ae,content:oe,tags:_e||[],createdAt:new Date().toISOString()};_(De=>[...De,Se])},[X]),ft=S.useCallback((Z,ae,oe,he)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:ae,adapterConfig:oe,defaultRuntime:he})},[]),Qt=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Pn=S.useCallback((Z,ae,oe,he,_e)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:oe}),N(Se=>[...Se.filter(Ve=>Ve.name!==Z),{name:Z,tokenType:oe,envVar:he,filePath:_e,expiresAt:""}])},[]),qn=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),N(ae=>ae.filter(oe=>oe.name!==Z))},[]);S.useEffect(()=>()=>{$.current.forEach(clearTimeout),$.current.clear()},[]);const Cn=S.useMemo(()=>({connected:!0,environments:Bx,sessions:s,events:o,eventsDropped:0,lastSpawnedId:d,projects:m,tasks:v,findings:b,tokens:T,spawn:V,sendInput:U,kill:Q,refresh:W,loadSessionEvents:Ne,clearEvents:Te,createProject:Ie,archiveProject:Ce,updateProject:(Z,ae)=>{console.log("[MockGrackle] updateProject",{projectId:Z,...ae}),p(oe=>oe.map(he=>he.id!==Z?he:{...he,...ae.name!==void 0?{name:ae.name}:{},...ae.description!==void 0?{description:ae.description}:{},...ae.repoUrl!==void 0?{repoUrl:ae.repoUrl}:{},...ae.defaultEnvironmentId!==void 0?{defaultEnvironmentId:ae.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:xe,createTask:Ee,startTask:F,completeTask:qe,resumeTask:$t,updateTask:sn,deleteTask:Fn,loadFindings:ln,postFinding:jn,addEnvironment:ft,loadTokens:Qt,setToken:Pn,deleteToken:qn,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:D,createPersona:(Z,ae,oe,he,_e,Se)=>{console.log("[MockGrackle] createPersona",{name:Z});const De={id:`mock-persona-${Date.now()}`,name:Z,description:ae,systemPrompt:oe,toolConfig:"{}",runtime:he??"claude-code",model:_e||"",maxTurns:Se||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};w(Ve=>[...Ve,De])},updatePersona:(Z,ae,oe,he,_e,Se,De)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:ae}),w(Ve=>Ve.map(at=>at.id!==Z?at:{...at,...ae!==void 0?{name:ae}:{},...oe!==void 0?{description:oe}:{},...he!==void 0?{systemPrompt:he}:{},..._e!==void 0?{runtime:_e}:{},...Se!==void 0?{model:Se}:{},...De!==void 0?{maxTurns:De}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),w(ae=>ae.filter(oe=>oe.id!==Z))},taskSessions:j,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)}}),[s,o,d,m,v,b,T,D,j,V,U,Q,W,Ne,Te,Ie,Ce,xe,Ee,F,qe,$t,sn,Fn,ln,jn,ft,Qt,Pn,qn]);return h.jsx(uf.Provider,{value:Cn,children:n})}const Hy=S.createContext(void 0),qx=4e3;function Yx({children:n}){const[s,l]=S.useState([]),o=S.useRef(0),c=S.useCallback(f=>{l(m=>m.filter(p=>p.id!==f))},[]),d=S.useCallback((f,m="info",p=qx)=>{const v=`toast-${++o.current}`;l(y=>[...y,{id:v,message:f,variant:m,duration:p}])},[]);return h.jsx(Hy.Provider,{value:{toasts:s,showToast:d,dismissToast:c},children:n})}function no(){const n=S.useContext(Hy);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const Kr=[{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"]}],Iy=new Set(Kr.map(n=>n.id)),ev="grackle";function Ld(n){return Kr.find(s=>s.id===n)}const Ud="grackle-theme",Gy="grackle-prefer-system",Py="(prefers-color-scheme: dark)";let zl=[],kr;function pd(){kr=void 0;for(const n of zl)n()}function zd(){return typeof window>"u"?!1:window.matchMedia(Py).matches}function Pl(){if(typeof localStorage>"u")return ev;try{const n=localStorage.getItem(Ud);if(n!==null&&Iy.has(n))return n}catch{}return ev}function Ur(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(Gy)==="true"}catch{return!1}}function Vd(n){return Kr.find(s=>s.variantLightId===n||s.variantDarkId===n)}function qy(n,s){const l=Ld(n);if(l!=null&&l.variantDarkId)return s&&l.variantLightId?zd()?l.variantDarkId:l.variantLightId:l.variantDarkId;if(l!=null&&l.hidden&&s){const o=Vd(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return zd()?o.variantDarkId:o.variantLightId}return n}function Ei(n,s,l=!1){l&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=qy(n,s),l&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ei(Pl(),Ur());function Kx(){return kr===void 0&&(kr={themeId:Pl(),systemDark:zd(),preferSystem:Ur()}),kr}function Zx(n){return zl=[...zl,n],()=>{zl=zl.filter(s=>s!==n)}}function Xx(){const n=S.useSyncExternalStore(Zx,Kx),{themeId:s,preferSystem:l}=n,o=qy(s,l),c=S.useCallback(f=>{if(Iy.has(f)){try{localStorage.setItem(Ud,f)}catch{}Ei(f,Ur(),!0),pd()}},[]),d=S.useCallback(f=>{try{localStorage.setItem(Gy,f?"true":"false")}catch{}if(f){const m=Pl(),p=Ld(m);if(p!=null&&p.hidden){const v=Vd(m);if(v)try{localStorage.setItem(Ud,v.id)}catch{}}}Ei(Pl(),f,!0),pd()},[]);return S.useEffect(()=>{Ei(s,l)},[s,l]),S.useEffect(()=>{if(typeof window>"u")return;const f=window.matchMedia(Py),m=()=>{const p=Pl(),v=Ur();if(v){const y=Ld(p);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ei(p,v),y!=null&&y.hidden){const b=Vd(p);b!=null&&b.variantDarkId&&b.variantLightId&&Ei(p,v)}}pd()};return f.addEventListener("change",m),()=>{f.removeEventListener("change",m)}},[]),{themeId:s,setTheme:c,resolvedThemeId:o,preferSystem:l,setPreferSystem:d}}const Yy=S.createContext(void 0);function $x({children:n}){const s=Xx();return h.jsx(Yy.Provider,{value:s,children:n})}function Ky(){const n=S.useContext(Yy);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}/**
68
+ * react-router v7.13.1
69
+ *
70
+ * Copyright (c) Remix Software Inc.
71
+ *
72
+ * This source code is licensed under the MIT license found in the
73
+ * LICENSE.md file in the root directory of this source tree.
74
+ *
75
+ * @license MIT
76
+ */var tv="popstate";function nv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Qx(n={}){function s(o,c){var v;let d=(v=c.state)==null?void 0:v.masked,{pathname:f,search:m,hash:p}=d||o.location;return Hd("",{pathname:f,search:m,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function l(o,c){return typeof c=="string"?c:Xl(c)}return Jx(s,l,null,n)}function lt(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function In(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function Fx(){return Math.random().toString(36).substring(2,10)}function av(n,s){return{usr:n.state,key:n.key,idx:s,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Hd(n,s,l=null,o,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof s=="string"?Li(s):s,state:l,key:s&&s.key||o||Fx(),unstable_mask:c}}function Xl({pathname:n="/",search:s="",hash:l=""}){return s&&s!=="?"&&(n+=s.charAt(0)==="?"?s:"?"+s),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Li(n){let s={};if(n){let l=n.indexOf("#");l>=0&&(s.hash=n.substring(l),n=n.substring(0,l));let o=n.indexOf("?");o>=0&&(s.search=n.substring(o),n=n.substring(0,o)),n&&(s.pathname=n)}return s}function Jx(n,s,l,o={}){let{window:c=document.defaultView,v5Compat:d=!1}=o,f=c.history,m="POP",p=null,v=y();v==null&&(v=0,f.replaceState({...f.state,idx:v},""));function y(){return(f.state||{idx:null}).idx}function b(){m="POP";let w=y(),j=w==null?null:w-v;v=w,p&&p({action:m,location:D.location,delta:j})}function _(w,j){m="PUSH";let H=nv(w)?w:Hd(D.location,w,j);v=y()+1;let M=av(H,v),$=D.createHref(H.unstable_mask||H);try{f.pushState(M,"",$)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;c.location.assign($)}d&&p&&p({action:m,location:D.location,delta:1})}function T(w,j){m="REPLACE";let H=nv(w)?w:Hd(D.location,w,j);v=y();let M=av(H,v),$=D.createHref(H.unstable_mask||H);f.replaceState(M,"",$),d&&p&&p({action:m,location:D.location,delta:0})}function N(w){return Wx(w)}let D={get action(){return m},get location(){return n(c,f)},listen(w){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(tv,b),p=w,()=>{c.removeEventListener(tv,b),p=null}},createHref(w){return s(c,w)},createURL:N,encodeLocation(w){let j=N(w);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:_,replace:T,go(w){return f.go(w)}};return D}function Wx(n,s=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),lt(l,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Xl(n);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function Zy(n,s,l="/"){return e_(n,s,l,!1)}function e_(n,s,l,o){let c=typeof s=="string"?Li(s):s,d=Ma(c.pathname||"/",l);if(d==null)return null;let f=Xy(n);t_(f);let m=null;for(let p=0;m==null&&p<f.length;++p){let v=Qy(d);m=u_(f[p],v,o)}return m}function Xy(n,s=[],l=[],o="",c=!1){let d=(f,m,p=c,v)=>{let y={relativePath:v===void 0?f.path||"":v,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;lt(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let b=la([o,y.relativePath]),_=l.concat(y);f.children&&f.children.length>0&&(lt(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),Xy(f.children,s,_,b,p)),!(f.path==null&&!f.index)&&s.push({path:b,score:r_(b,f.index),routesMeta:_})};return n.forEach((f,m)=>{var p;if(f.path===""||!((p=f.path)!=null&&p.includes("?")))d(f,m);else for(let v of $y(f.path))d(f,m,!0,v)}),s}function $y(n){let s=n.split("/");if(s.length===0)return[];let[l,...o]=s,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(o.length===0)return c?[d,""]:[d];let f=$y(o.join("/")),m=[];return m.push(...f.map(p=>p===""?d:[d,p].join("/"))),c&&m.push(...f),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function t_(n){n.sort((s,l)=>s.score!==l.score?l.score-s.score:c_(s.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var n_=/^:[\w-]+$/,a_=3,s_=2,i_=1,l_=10,o_=-2,sv=n=>n==="*";function r_(n,s){let l=n.split("/"),o=l.length;return l.some(sv)&&(o+=o_),s&&(o+=s_),l.filter(c=>!sv(c)).reduce((c,d)=>c+(n_.test(d)?a_:d===""?i_:l_),o)}function c_(n,s){return n.length===s.length&&n.slice(0,-1).every((o,c)=>o===s[c])?n[n.length-1]-s[s.length-1]:0}function u_(n,s,l=!1){let{routesMeta:o}=n,c={},d="/",f=[];for(let m=0;m<o.length;++m){let p=o[m],v=m===o.length-1,y=d==="/"?s:s.slice(d.length)||"/",b=$l({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},y),_=p.route;if(!b&&v&&l&&!o[o.length-1].route.index&&(b=$l({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(c,b.params),f.push({params:c,pathname:la([d,b.pathname]),pathnameBase:p_(la([d,b.pathnameBase])),route:_}),b.pathnameBase!=="/"&&(d=la([d,b.pathnameBase]))}return f}function $l(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=d_(n.path,n.caseSensitive,n.end),c=s.match(l);if(!c)return null;let d=c[0],f=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:o.reduce((v,{paramName:y,isOptional:b},_)=>{if(y==="*"){let N=m[_]||"";f=d.slice(0,d.length-N.length).replace(/(.)\/+$/,"$1")}const T=m[_];return b&&!T?v[y]=void 0:v[y]=(T||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:f,pattern:n}}function d_(n,s=!1,l=!0){In(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=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,p,v,y)=>{if(o.push({paramName:m,isOptional:p!=null}),p){let b=y.charAt(v+f.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),o]}function Qy(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return In(!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 (${s}).`),n}}function Ma(n,s){if(s==="/")return n;if(!n.toLowerCase().startsWith(s.toLowerCase()))return null;let l=s.endsWith("/")?s.length-1:s.length,o=n.charAt(l);return o&&o!=="/"?null:n.slice(l)||"/"}var f_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function h_(n,s="/"){let{pathname:l,search:o="",hash:c=""}=typeof n=="string"?Li(n):n,d;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?d=iv(l.substring(1),"/"):d=iv(l,s)):d=s,{pathname:d,search:g_(o),hash:v_(c)}}function iv(n,s){let l=s.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function gd(n,s,l,o){return`Cannot include a '${n}' character in a manually specified \`to.${s}\` 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 m_(n){return n.filter((s,l)=>l===0||s.route.path&&s.route.path.length>0)}function df(n){let s=m_(n);return s.map((l,o)=>o===s.length-1?l.pathname:l.pathnameBase)}function Zr(n,s,l,o=!1){let c;typeof n=="string"?c=Li(n):(c={...n},lt(!c.pathname||!c.pathname.includes("?"),gd("?","pathname","search",c)),lt(!c.pathname||!c.pathname.includes("#"),gd("#","pathname","hash",c)),lt(!c.search||!c.search.includes("#"),gd("#","search","hash",c)));let d=n===""||c.pathname==="",f=d?"/":c.pathname,m;if(f==null)m=l;else{let b=s.length-1;if(!o&&f.startsWith("..")){let _=f.split("/");for(;_[0]==="..";)_.shift(),b-=1;c.pathname=_.join("/")}m=b>=0?s[b]:"/"}let p=h_(c,m),v=f&&f!=="/"&&f.endsWith("/"),y=(d||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(v||y)&&(p.pathname+="/"),p}var la=n=>n.join("/").replace(/\/\/+/g,"/"),p_=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),g_=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,v_=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,y_=class{constructor(n,s,l,o=!1){this.status=n,this.statusText=s||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function b_(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function S_(n){return n.map(s=>s.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Fy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Jy(n,s){let l=n;if(typeof l!="string"||!f_.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,c=!1;if(Fy)try{let d=new URL(window.location.href),f=l.startsWith("//")?new URL(d.protocol+l):new URL(l),m=Ma(f.pathname,s);f.origin===d.origin&&m!=null?l=m+f.search+f.hash:c=!0}catch{In(!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:c,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Wy=["POST","PUT","PATCH","DELETE"];new Set(Wy);var x_=["GET",...Wy];new Set(x_);var Ui=S.createContext(null);Ui.displayName="DataRouter";var Xr=S.createContext(null);Xr.displayName="DataRouterState";var __=S.createContext(!1),e0=S.createContext({isTransitioning:!1});e0.displayName="ViewTransition";var T_=S.createContext(new Map);T_.displayName="Fetchers";var E_=S.createContext(null);E_.displayName="Await";var En=S.createContext(null);En.displayName="Navigation";var ao=S.createContext(null);ao.displayName="Location";var Gn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Gn.displayName="Route";var ff=S.createContext(null);ff.displayName="RouteError";var t0="REACT_ROUTER_ERROR",j_="REDIRECT",C_="ROUTE_ERROR_RESPONSE";function A_(n){if(n.startsWith(`${t0}:${j_}:{`))try{let s=JSON.parse(n.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function N_(n){if(n.startsWith(`${t0}:${C_}:{`))try{let s=JSON.parse(n.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new y_(s.status,s.statusText,s.data)}catch{}}function w_(n,{relative:s}={}){lt(Ls(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=S.useContext(En),{hash:c,pathname:d,search:f}=so(n,{relative:s}),m=d;return l!=="/"&&(m=d==="/"?l:la([l,d])),o.createHref({pathname:m,search:f,hash:c})}function Ls(){return S.useContext(ao)!=null}function an(){return lt(Ls(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(ao).location}function Wt(n){lt(Ls(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:s}=an();return S.useMemo(()=>$l(n,Qy(s)),[s,n])}var n0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function a0(n){S.useContext(En).static||S.useLayoutEffect(n)}function $r(){let{isDataRoute:n}=S.useContext(Gn);return n?q_():D_()}function D_(){lt(Ls(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Ui),{basename:s,navigator:l}=S.useContext(En),{matches:o}=S.useContext(Gn),{pathname:c}=an(),d=JSON.stringify(df(o)),f=S.useRef(!1);return a0(()=>{f.current=!0}),S.useCallback((p,v={})=>{if(In(f.current,n0),!f.current)return;if(typeof p=="number"){l.go(p);return}let y=Zr(p,JSON.parse(d),c,v.relative==="path");n==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:la([s,y.pathname])),(v.replace?l.replace:l.push)(y,v.state,v)},[s,l,d,c,n])}var k_=S.createContext(null);function R_(n){let s=S.useContext(Gn).outlet;return S.useMemo(()=>s&&S.createElement(k_.Provider,{value:n},s),[s,n])}function Qr(){let{matches:n}=S.useContext(Gn),s=n[n.length-1];return s?s.params:{}}function so(n,{relative:s}={}){let{matches:l}=S.useContext(Gn),{pathname:o}=an(),c=JSON.stringify(df(l));return S.useMemo(()=>Zr(n,JSON.parse(c),o,s==="path"),[n,c,o,s])}function M_(n,s){return s0(n,s)}function s0(n,s,l){var w;lt(Ls(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(En),{matches:c}=S.useContext(Gn),d=c[c.length-1],f=d?d.params:{},m=d?d.pathname:"/",p=d?d.pathnameBase:"/",v=d&&d.route;{let j=v&&v.path||"";l0(m,!v||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${j}">) 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.
77
+
78
+ Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let y=an(),b;if(s){let j=typeof s=="string"?Li(s):s;lt(p==="/"||((w=j.pathname)==null?void 0:w.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 "${j.pathname}" was given in the \`location\` prop.`),b=j}else b=y;let _=b.pathname||"/",T=_;if(p!=="/"){let j=p.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(j.length).join("/")}let N=Zy(n,{pathname:T});In(v||N!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),In(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.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 D=z_(N&&N.map(j=>Object.assign({},j,{params:Object.assign({},f,j.params),pathname:la([p,o.encodeLocation?o.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?p:la([p,o.encodeLocation?o.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),c,l);return s&&D?S.createElement(ao.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},D):D}function O_(){let n=P_(),s=b_(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)",c={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=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:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},s),l?S.createElement("pre",{style:c},l):null,f)}var B_=S.createElement(O_,null),i0=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,s){return s.location!==n.location||s.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:s.error,location:s.location,revalidation:n.revalidation||s.revalidation}}componentDidCatch(n,s){this.props.onError?this.props.onError(n,s):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=N_(n.digest);l&&(n=l)}let s=n!==void 0?S.createElement(Gn.Provider,{value:this.props.routeContext},S.createElement(ff.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(L_,{error:n},s):s}};i0.contextType=__;var vd=new WeakMap;function L_({children:n,error:s}){let{basename:l}=S.useContext(En);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let o=A_(s.digest);if(o){let c=vd.get(s);if(c)throw c;let d=Jy(o.location,l);if(Fy&&!vd.get(s))if(d.isExternal||o.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw vd.set(s,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function U_({routeContext:n,match:s,children:l}){let o=S.useContext(Ui);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(Gn.Provider,{value:n},l)}function z_(n,s=[],l){let o=l==null?void 0:l.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(s.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let c=n,d=o==null?void 0:o.errors;if(d!=null){let y=c.findIndex(b=>b.route.id&&(d==null?void 0:d[b.route.id])!==void 0);lt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,y+1))}let f=!1,m=-1;if(l&&o){f=o.renderFallback;for(let y=0;y<c.length;y++){let b=c[y];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=y),b.route.id){let{loaderData:_,errors:T}=o,N=b.route.loader&&!_.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||N){l.isStatic&&(f=!0),m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}}let p=l==null?void 0:l.onError,v=o&&p?(y,b)=>{var _,T;p(y,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:S_(o.matches),errorInfo:b})}:void 0;return c.reduceRight((y,b,_)=>{let T,N=!1,D=null,w=null;o&&(T=d&&b.route.id?d[b.route.id]:void 0,D=b.route.errorElement||B_,f&&(m<0&&_===0?(l0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,w=null):m===_&&(N=!0,w=b.route.hydrateFallbackElement||null)));let j=s.concat(c.slice(0,_+1)),H=()=>{let M;return T?M=D:N?M=w:b.route.Component?M=S.createElement(b.route.Component,null):b.route.element?M=b.route.element:M=y,S.createElement(U_,{match:b,routeContext:{outlet:y,matches:j,isDataRoute:o!=null},children:M})};return o&&(b.route.ErrorBoundary||b.route.errorElement||_===0)?S.createElement(i0,{location:o.location,revalidation:o.revalidation,component:D,error:T,children:H(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:v}):H()},null)}function hf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function V_(n){let s=S.useContext(Ui);return lt(s,hf(n)),s}function H_(n){let s=S.useContext(Xr);return lt(s,hf(n)),s}function I_(n){let s=S.useContext(Gn);return lt(s,hf(n)),s}function mf(n){let s=I_(n),l=s.matches[s.matches.length-1];return lt(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function G_(){return mf("useRouteId")}function P_(){var o;let n=S.useContext(ff),s=H_("useRouteError"),l=mf("useRouteError");return n!==void 0?n:(o=s.errors)==null?void 0:o[l]}function q_(){let{router:n}=V_("useNavigate"),s=mf("useNavigate"),l=S.useRef(!1);return a0(()=>{l.current=!0}),S.useCallback(async(c,d={})=>{In(l.current,n0),l.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:s,...d}))},[n,s])}var lv={};function l0(n,s,l){!s&&!lv[n]&&(lv[n]=!0,In(!1,l))}S.memo(Y_);function Y_({routes:n,future:s,state:l,isStatic:o,onError:c}){return s0(n,void 0,{state:l,isStatic:o,onError:c})}function Id({to:n,replace:s,state:l,relative:o}){lt(Ls(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=S.useContext(En);In(!c,"<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:d}=S.useContext(Gn),{pathname:f}=an(),m=$r(),p=Zr(n,df(d),f,o==="path"),v=JSON.stringify(p);return S.useEffect(()=>{m(JSON.parse(v),{replace:s,state:l,relative:o})},[m,v,o,s,l]),null}function o0(n){return R_(n.context)}function Mt(n){lt(!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 K_({basename:n="/",children:s=null,location:l,navigationType:o="POP",navigator:c,static:d=!1,unstable_useTransitions:f}){lt(!Ls(),"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:c,static:d,unstable_useTransitions:f,future:{}}),[m,c,d,f]);typeof l=="string"&&(l=Li(l));let{pathname:v="/",search:y="",hash:b="",state:_=null,key:T="default",unstable_mask:N}=l,D=S.useMemo(()=>{let w=Ma(v,m);return w==null?null:{location:{pathname:w,search:y,hash:b,state:_,key:T,unstable_mask:N},navigationType:o}},[m,v,y,b,_,T,o,N]);return In(D!=null,`<Router basename="${m}"> is not able to match the URL "${v}${y}${b}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:S.createElement(En.Provider,{value:p},S.createElement(ao.Provider,{children:s,value:D}))}function Z_({children:n,location:s}){return M_(Gd(n),s)}function Gd(n,s=[]){let l=[];return S.Children.forEach(n,(o,c)=>{if(!S.isValidElement(o))return;let d=[...s,c];if(o.type===S.Fragment){l.push.apply(l,Gd(o.props.children,d));return}lt(o.type===Mt,`[${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>`),lt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let f={id:o.props.id||d.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&&(f.children=Gd(o.props.children,d)),l.push(f)}),l}var Rr="get",Mr="application/x-www-form-urlencoded";function Fr(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function X_(n){return Fr(n)&&n.tagName.toLowerCase()==="button"}function $_(n){return Fr(n)&&n.tagName.toLowerCase()==="form"}function Q_(n){return Fr(n)&&n.tagName.toLowerCase()==="input"}function F_(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function J_(n,s){return n.button===0&&(!s||s==="_self")&&!F_(n)}function Pd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((s,l)=>{let o=n[l];return s.concat(Array.isArray(o)?o.map(c=>[l,c]):[[l,o]])},[]))}function W_(n,s){let l=Pd(n);return s&&s.forEach((o,c)=>{l.has(c)||s.getAll(c).forEach(d=>{l.append(c,d)})}),l}var Er=null;function eT(){if(Er===null)try{new FormData(document.createElement("form"),0),Er=!1}catch{Er=!0}return Er}var tT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yd(n){return n!=null&&!tT.has(n)?(In(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mr}"`),null):n}function nT(n,s){let l,o,c,d,f;if($_(n)){let m=n.getAttribute("action");o=m?Ma(m,s):null,l=n.getAttribute("method")||Rr,c=yd(n.getAttribute("enctype"))||Mr,d=new FormData(n)}else if(X_(n)||Q_(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?Ma(p,s):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||Rr,c=yd(n.getAttribute("formenctype"))||yd(m.getAttribute("enctype"))||Mr,d=new FormData(m,n),!eT()){let{name:v,type:y,value:b}=n;if(y==="image"){let _=v?`${v}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else v&&d.append(v,b)}}else{if(Fr(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Rr,o=null,c=Mr,f=n}return d&&c==="text/plain"&&(f=d,d=void 0),{action:o,method:l.toLowerCase(),encType:c,formData:d,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pf(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function aT(n,s,l,o){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${o}`:c.pathname=`${c.pathname}.${o}`:c.pathname==="/"?c.pathname=`_root.${o}`:s&&Ma(c.pathname,s)==="/"?c.pathname=`${s.replace(/\/$/,"")}/_root.${o}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${o}`,c}async function sT(n,s){if(n.id in s)return s[n.id];try{let l=await import(n.module);return s[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 iT(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 lT(n,s,l){let o=await Promise.all(n.map(async c=>{let d=s.routes[c.route.id];if(d){let f=await sT(d,l);return f.links?f.links():[]}return[]}));return uT(o.flat(1).filter(iT).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function ov(n,s,l,o,c,d){let f=(p,v)=>l[v]?p.route.id!==l[v].route.id:!0,m=(p,v)=>{var y;return l[v].pathname!==p.pathname||((y=l[v].route.path)==null?void 0:y.endsWith("*"))&&l[v].params["*"]!==p.params["*"]};return d==="assets"?s.filter((p,v)=>f(p,v)||m(p,v)):d==="data"?s.filter((p,v)=>{var b;let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(f(p,v)||m(p,v))return!0;if(p.route.shouldRevalidate){let _=p.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.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 _=="boolean")return _}return!0}):[]}function oT(n,s,{includeHydrateFallback:l}={}){return rT(n.map(o=>{let c=s.routes[o.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),l&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function rT(n){return[...new Set(n)]}function cT(n){let s={},l=Object.keys(n).sort();for(let o of l)s[o]=n[o];return s}function uT(n,s){let l=new Set;return new Set(s),n.reduce((o,c)=>{let d=JSON.stringify(cT(c));return l.has(d)||(l.add(d),o.push({key:d,link:c})),o},[])}function r0(){let n=S.useContext(Ui);return pf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function dT(){let n=S.useContext(Xr);return pf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var gf=S.createContext(void 0);gf.displayName="FrameworkContext";function c0(){let n=S.useContext(gf);return pf(n,"You must render this element inside a <HydratedRouter> element"),n}function fT(n,s){let l=S.useContext(gf),[o,c]=S.useState(!1),[d,f]=S.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:v,onMouseLeave:y,onTouchStart:b}=s,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let D=j=>{j.forEach(H=>{f(H.isIntersecting)})},w=new IntersectionObserver(D,{threshold:.5});return _.current&&w.observe(_.current),()=>{w.disconnect()}}},[n]),S.useEffect(()=>{if(o){let D=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(D)}}},[o]);let T=()=>{c(!0)},N=()=>{c(!1),f(!1)};return l?n!=="intent"?[d,_,{}]:[d,_,{onFocus:Bl(m,T),onBlur:Bl(p,N),onMouseEnter:Bl(v,T),onMouseLeave:Bl(y,N),onTouchStart:Bl(b,T)}]:[!1,_,{}]}function Bl(n,s){return l=>{n&&n(l),l.defaultPrevented||s(l)}}function hT({page:n,...s}){let{router:l}=r0(),o=S.useMemo(()=>Zy(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?S.createElement(pT,{page:n,matches:o,...s}):null}function mT(n){let{manifest:s,routeModules:l}=c0(),[o,c]=S.useState([]);return S.useEffect(()=>{let d=!1;return lT(n,s,l).then(f=>{d||c(f)}),()=>{d=!0}},[n,s,l]),o}function pT({page:n,matches:s,...l}){let o=an(),{future:c,manifest:d,routeModules:f}=c0(),{basename:m}=r0(),{loaderData:p,matches:v}=dT(),y=S.useMemo(()=>ov(n,s,v,d,o,"data"),[n,s,v,d,o]),b=S.useMemo(()=>ov(n,s,v,d,o,"assets"),[n,s,v,d,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let D=new Set,w=!1;if(s.forEach(H=>{var $;let M=d.routes[H.route.id];!M||!M.hasLoader||(!y.some(I=>I.route.id===H.route.id)&&H.route.id in p&&(($=f[H.route.id])!=null&&$.shouldRevalidate)||M.hasClientLoader?w=!0:D.add(H.route.id))}),D.size===0)return[];let j=aT(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return w&&D.size>0&&j.searchParams.set("_routes",s.filter(H=>D.has(H.route.id)).map(H=>H.route.id).join(",")),[j.pathname+j.search]},[m,c.unstable_trailingSlashAwareDataRequests,p,o,d,y,s,n,f]),T=S.useMemo(()=>oT(b,d),[b,d]),N=mT(b);return S.createElement(S.Fragment,null,_.map(D=>S.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...l})),T.map(D=>S.createElement("link",{key:D,rel:"modulepreload",href:D,...l})),N.map(({key:D,link:w})=>S.createElement("link",{key:D,nonce:l.nonce,...w,crossOrigin:w.crossOrigin??l.crossOrigin})))}function gT(...n){return s=>{n.forEach(l=>{typeof l=="function"?l(s):l!=null&&(l.current=s)})}}var vT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vT&&(window.__reactRouterVersion="7.13.1")}catch{}function yT({basename:n,children:s,unstable_useTransitions:l,window:o}){let c=S.useRef();c.current==null&&(c.current=Qx({window:o,v5Compat:!0}));let d=c.current,[f,m]=S.useState({action:d.action,location:d.location}),p=S.useCallback(v=>{l===!1?m(v):S.startTransition(()=>m(v))},[l]);return S.useLayoutEffect(()=>d.listen(p),[d,p]),S.createElement(K_,{basename:n,children:s,location:f.location,navigationType:f.action,navigator:d,unstable_useTransitions:l})}var u0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vf=S.forwardRef(function({onClick:s,discover:l="render",prefetch:o="none",relative:c,reloadDocument:d,replace:f,unstable_mask:m,state:p,target:v,to:y,preventScrollReset:b,viewTransition:_,unstable_defaultShouldRevalidate:T,...N},D){let{basename:w,navigator:j,unstable_useTransitions:H}=S.useContext(En),M=typeof y=="string"&&u0.test(y),$=Jy(y,w);y=$.to;let I=w_(y,{relative:c}),J=an(),te=null;if(m){let q=Zr(m,[],J.unstable_mask?J.unstable_mask.pathname:"/",!0);w!=="/"&&(q.pathname=q.pathname==="/"?w:la([w,q.pathname])),te=j.createHref(q)}let[Y,X,ue]=fT(o,N),R=_T(y,{replace:f,unstable_mask:m,state:p,target:v,preventScrollReset:b,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:H});function pe(q){s&&s(q),q.defaultPrevented||R(q)}let ee=!($.isExternal||d),ge=S.createElement("a",{...N,...ue,href:(ee?te:void 0)||$.absoluteURL||I,onClick:ee?pe:s,ref:gT(D,X),target:v,"data-discover":!M&&l==="render"?"true":void 0});return Y&&!M?S.createElement(S.Fragment,null,ge,S.createElement(hT,{page:I})):ge});vf.displayName="Link";var bT=S.forwardRef(function({"aria-current":s="page",caseSensitive:l=!1,className:o="",end:c=!1,style:d,to:f,viewTransition:m,children:p,...v},y){let b=so(f,{relative:v.relative}),_=an(),T=S.useContext(Xr),{navigator:N,basename:D}=S.useContext(En),w=T!=null&&AT(b)&&m===!0,j=N.encodeLocation?N.encodeLocation(b).pathname:b.pathname,H=_.pathname,M=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;l||(H=H.toLowerCase(),M=M?M.toLowerCase():null,j=j.toLowerCase()),M&&D&&(M=Ma(M,D)||M);const $=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let I=H===j||!c&&H.startsWith(j)&&H.charAt($)==="/",J=M!=null&&(M===j||!c&&M.startsWith(j)&&M.charAt(j.length)==="/"),te={isActive:I,isPending:J,isTransitioning:w},Y=I?s:void 0,X;typeof o=="function"?X=o(te):X=[o,I?"active":null,J?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let ue=typeof d=="function"?d(te):d;return S.createElement(vf,{...v,"aria-current":Y,className:X,ref:y,style:ue,to:f,viewTransition:m},typeof p=="function"?p(te):p)});bT.displayName="NavLink";var ST=S.forwardRef(({discover:n="render",fetcherKey:s,navigate:l,reloadDocument:o,replace:c,state:d,method:f=Rr,action:m,onSubmit:p,relative:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_,...T},N)=>{let{unstable_useTransitions:D}=S.useContext(En),w=jT(),j=CT(m,{relative:v}),H=f.toLowerCase()==="get"?"get":"post",M=typeof m=="string"&&u0.test(m),$=I=>{if(p&&p(I),I.defaultPrevented)return;I.preventDefault();let J=I.nativeEvent.submitter,te=(J==null?void 0:J.getAttribute("formmethod"))||f,Y=()=>w(J||I.currentTarget,{fetcherKey:s,method:te,navigate:l,replace:c,state:d,relative:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_});D&&l!==!1?S.startTransition(()=>Y()):Y()};return S.createElement("form",{ref:N,method:H,action:j,onSubmit:o?p:$,...T,"data-discover":!M&&n==="render"?"true":void 0})});ST.displayName="Form";function xT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function d0(n){let s=S.useContext(Ui);return lt(s,xT(n)),s}function _T(n,{target:s,replace:l,unstable_mask:o,state:c,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:v}={}){let y=$r(),b=an(),_=so(n,{relative:f});return S.useCallback(T=>{if(J_(T,s)){T.preventDefault();let N=l!==void 0?l:Xl(b)===Xl(_),D=()=>y(n,{replace:N,unstable_mask:o,state:c,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:p});v?S.startTransition(()=>D()):D()}},[b,y,_,l,o,c,s,n,d,f,m,p,v])}function yf(n){In(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 s=S.useRef(Pd(n)),l=S.useRef(!1),o=an(),c=S.useMemo(()=>W_(o.search,l.current?null:s.current),[o.search]),d=$r(),f=S.useCallback((m,p)=>{const v=Pd(typeof m=="function"?m(new URLSearchParams(c)):m);l.current=!0,d("?"+v,p)},[d,c]);return[c,f]}var TT=0,ET=()=>`__${String(++TT)}__`;function jT(){let{router:n}=d0("useSubmit"),{basename:s}=S.useContext(En),l=G_(),o=n.fetch,c=n.navigate;return S.useCallback(async(d,f={})=>{let{action:m,method:p,encType:v,formData:y,body:b}=nT(d,s);if(f.navigate===!1){let _=f.fetcherKey||ET();await o(_,l,f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||p,formEncType:f.encType||v,flushSync:f.flushSync})}else await c(f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||p,formEncType:f.encType||v,replace:f.replace,state:f.state,fromRouteId:l,flushSync:f.flushSync,viewTransition:f.viewTransition})},[o,c,s,l])}function CT(n,{relative:s}={}){let{basename:l}=S.useContext(En),o=S.useContext(Gn);lt(o,"useFormAction must be used inside a RouteContext");let[c]=o.matches.slice(-1),d={...so(n||".",{relative:s})},f=an();if(n==null){d.search=f.search;let m=new URLSearchParams(d.search),p=m.getAll("index");if(p.some(y=>y==="")){m.delete("index"),p.filter(b=>b).forEach(b=>m.append("index",b));let y=m.toString();d.search=y?`?${y}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(d.pathname=d.pathname==="/"?l:la([l,d.pathname])),Xl(d)}function AT(n,{relative:s}={}){let l=S.useContext(e0);lt(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=d0("useViewTransitionState"),c=so(n,{relative:s});if(!l.isTransitioning)return!1;let d=Ma(l.currentLocation.pathname,o)||l.currentLocation.pathname,f=Ma(l.nextLocation.pathname,o)||l.nextLocation.pathname;return $l(c.pathname,f)!=null||$l(c.pathname,d)!=null}function ua(){const n=$r();return S.useCallback((s,l)=>{typeof s=="number"?n(s):n(s,l)},[n])}function f0(n){return`/sessions/${encodeURIComponent(n)}`}function Ql(n){return`/projects/${encodeURIComponent(n)}`}function ki(n,s){const l=`/tasks/${encodeURIComponent(n)}`;return s?`${l}/${s}`:l}function NT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Ri(n,s){const l=new URLSearchParams({project:n});return s&&l.set("parent",s),`/tasks/new?${l.toString()}`}function h0(n,s){return`/sessions/new?${new URLSearchParams({env:n,runtime:s}).toString()}`}const rv="/environments/new",Di="/settings",wT="_container_1he30_1",DT="_brand_1he30_27",kT="_info_1he30_43",RT="_connectionDot_1he30_51",MT="_connected_1he30_54",OT="_disconnected_1he30_58",BT="_settingsButton_1he30_62",Ns={container:wT,brand:DT,info:kT,connectionDot:RT,connected:MT,disconnected:OT,settingsButton:BT};function LT(){const{connected:n,environments:s,sessions:l}=nn(),o=ua(),c=s.length,d=s.filter(m=>m.status==="connected").length,f=l.filter(m=>["running","idle"].includes(m.status)).length;return h.jsxs("div",{className:Ns.container,children:[h.jsx("button",{type:"button",className:Ns.brand,onClick:()=>o("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Ns.info,children:[h.jsxs("span",{children:[h.jsx("span",{className:`${Ns.connectionDot} ${n?Ns.connected:Ns.disconnected}`,children:"●"})," ",n?"Connected":"Disconnected"]}),h.jsxs("span",{children:[d,"/",c," env",c!==1?"s":""]}),h.jsxs("span",{children:[f," active"]}),h.jsx("button",{className:Ns.settingsButton,onClick:()=>o(Di),title:"Settings",children:"⚙"})]})]})}const bf=S.createContext({});function Sf(n){const s=S.useRef(null);return s.current===null&&(s.current=n()),s.current}const Jr=S.createContext(null),xf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class UT extends S.Component{getSnapshotBeforeUpdate(s){const l=this.props.childRef.current;if(l&&s.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 zT({children:n,isPresent:s}){const l=S.useId(),o=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0}),{nonce:d}=S.useContext(xf);return S.useInsertionEffect(()=>{const{width:f,height:m,top:p,left:v}=c.current;if(s||!o.current||!f||!m)return;o.current.dataset.motionPopId=l;const y=document.createElement("style");return d&&(y.nonce=d),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
79
+ [data-motion-pop-id="${l}"] {
80
+ position: absolute !important;
81
+ width: ${f}px !important;
82
+ height: ${m}px !important;
83
+ top: ${p}px !important;
84
+ left: ${v}px !important;
85
+ }
86
+ `),()=>{document.head.removeChild(y)}},[s]),h.jsx(UT,{isPresent:s,childRef:o,sizeRef:c,children:S.cloneElement(n,{ref:o})})}const VT=({children:n,initial:s,isPresent:l,onExitComplete:o,custom:c,presenceAffectsLayout:d,mode:f})=>{const m=Sf(HT),p=S.useId(),v=S.useCallback(b=>{m.set(b,!0);for(const _ of m.values())if(!_)return;o&&o()},[m,o]),y=S.useMemo(()=>({id:p,initial:s,isPresent:l,custom:c,onExitComplete:v,register:b=>(m.set(b,!1),()=>m.delete(b))}),d?[Math.random(),v]:[l,v]);return S.useMemo(()=>{m.forEach((b,_)=>m.set(_,!1))},[l]),S.useEffect(()=>{!l&&!m.size&&o&&o()},[l]),f==="popLayout"&&(n=h.jsx(zT,{isPresent:l,children:n})),h.jsx(Jr.Provider,{value:y,children:n})};function HT(){return new Map}function m0(n=!0){const s=S.useContext(Jr);if(s===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:c}=s,d=S.useId();S.useEffect(()=>{n&&c(d)},[n]);const f=S.useCallback(()=>n&&o&&o(d),[d,o,n]);return!l&&o?[!1,f]:[!0]}const jr=n=>n.key||"";function cv(n){const s=[];return S.Children.forEach(n,l=>{S.isValidElement(l)&&s.push(l)}),s}const _f=typeof window<"u",p0=_f?S.useLayoutEffect:S.useEffect,zi=({children:n,custom:s,initial:l=!0,onExitComplete:o,presenceAffectsLayout:c=!0,mode:d="sync",propagate:f=!1})=>{const[m,p]=m0(f),v=S.useMemo(()=>cv(n),[n]),y=f&&!m?[]:v.map(jr),b=S.useRef(!0),_=S.useRef(v),T=Sf(()=>new Map),[N,D]=S.useState(v),[w,j]=S.useState(v);p0(()=>{b.current=!1,_.current=v;for(let $=0;$<w.length;$++){const I=jr(w[$]);y.includes(I)?T.delete(I):T.get(I)!==!0&&T.set(I,!1)}},[w,y.length,y.join("-")]);const H=[];if(v!==N){let $=[...v];for(let I=0;I<w.length;I++){const J=w[I],te=jr(J);y.includes(te)||($.splice(I,0,J),H.push(J))}d==="wait"&&H.length&&($=H),j(cv($)),D(v);return}const{forceRender:M}=S.useContext(bf);return h.jsx(h.Fragment,{children:w.map($=>{const I=jr($),J=f&&!m?!1:v===w||y.includes(I),te=()=>{if(T.has(I))T.set(I,!0);else return;let Y=!0;T.forEach(X=>{X||(Y=!1)}),Y&&(M==null||M(),j(_.current),f&&(p==null||p()),o&&o())};return h.jsx(VT,{isPresent:J,initial:!b.current||l?void 0:!1,custom:J?void 0:s,presenceAffectsLayout:c,mode:d,onExitComplete:J?void 0:te,children:$},I)})})},_n=n=>n;let g0=_n;const IT={useManualTiming:!1};function GT(n){let s=new Set,l=new Set,o=!1,c=!1;const d=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function m(v){d.has(v)&&(p.schedule(v),n()),v(f)}const p={schedule:(v,y=!1,b=!1)=>{const T=b&&o?s:l;return y&&d.add(v),T.has(v)||T.add(v),v},cancel:v=>{l.delete(v),d.delete(v)},process:v=>{if(f=v,o){c=!0;return}o=!0,[s,l]=[l,s],s.forEach(m),s.clear(),o=!1,c&&(c=!1,p.process(v))}};return p}const Cr=["read","resolveKeyframes","update","preRender","render","postRender"],PT=40;function v0(n,s){let l=!1,o=!0;const c={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=Cr.reduce((j,H)=>(j[H]=GT(d),j),{}),{read:m,resolveKeyframes:p,update:v,preRender:y,render:b,postRender:_}=f,T=()=>{const j=performance.now();l=!1,c.delta=o?1e3/60:Math.max(Math.min(j-c.timestamp,PT),1),c.timestamp=j,c.isProcessing=!0,m.process(c),p.process(c),v.process(c),y.process(c),b.process(c),_.process(c),c.isProcessing=!1,l&&s&&(o=!1,n(T))},N=()=>{l=!0,o=!0,c.isProcessing||n(T)};return{schedule:Cr.reduce((j,H)=>{const M=f[H];return j[H]=($,I=!1,J=!1)=>(l||N(),M.schedule($,I,J)),j},{}),cancel:j=>{for(let H=0;H<Cr.length;H++)f[Cr[H]].cancel(j)},state:c,steps:f}}const{schedule:ot,cancel:rs,state:Kt,steps:bd}=v0(typeof requestAnimationFrame<"u"?requestAnimationFrame:_n,!0),y0=S.createContext({strict:!1}),uv={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"]},Mi={};for(const n in uv)Mi[n]={isEnabled:s=>uv[n].some(l=>!!s[l])};function qT(n){for(const s in n)Mi[s]={...Mi[s],...n[s]}}const YT=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 zr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||YT.has(n)}let b0=n=>!zr(n);function KT(n){n&&(b0=s=>s.startsWith("on")?!zr(s):n(s))}try{KT(require("@emotion/is-prop-valid").default)}catch{}function ZT(n,s,l){const o={};for(const c in n)c==="values"&&typeof n.values=="object"||(b0(c)||l===!0&&zr(c)||!s&&!zr(c)||n.draggable&&c.startsWith("onDrag"))&&(o[c]=n[c]);return o}function XT(n){if(typeof Proxy>"u")return n;const s=new Map,l=(...o)=>n(...o);return new Proxy(l,{get:(o,c)=>c==="create"?n:(s.has(c)||s.set(c,n(c)),s.get(c))})}const Wr=S.createContext({});function Fl(n){return typeof n=="string"||Array.isArray(n)}function ec(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Tf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ef=["initial",...Tf];function tc(n){return ec(n.animate)||Ef.some(s=>Fl(n[s]))}function S0(n){return!!(tc(n)||n.variants)}function $T(n,s){if(tc(n)){const{initial:l,animate:o}=n;return{initial:l===!1||Fl(l)?l:void 0,animate:Fl(o)?o:void 0}}return n.inherit!==!1?s:{}}function QT(n){const{initial:s,animate:l}=$T(n,S.useContext(Wr));return S.useMemo(()=>({initial:s,animate:l}),[dv(s),dv(l)])}function dv(n){return Array.isArray(n)?n.join(" "):n}const FT=Symbol.for("motionComponentSymbol");function ji(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function JT(n,s,l){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),s&&(o?s.mount(o):s.unmount()),l&&(typeof l=="function"?l(o):ji(l)&&(l.current=o))},[s])}const jf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),WT="framerAppearId",x0="data-"+jf(WT),{schedule:Cf}=v0(queueMicrotask,!1),_0=S.createContext({});function e2(n,s,l,o,c){var d,f;const{visualElement:m}=S.useContext(Wr),p=S.useContext(y0),v=S.useContext(Jr),y=S.useContext(xf).reducedMotion,b=S.useRef(null);o=o||p.renderer,!b.current&&o&&(b.current=o(n,{visualState:s,parent:m,props:l,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:y}));const _=b.current,T=S.useContext(_0);_&&!_.projection&&c&&(_.type==="html"||_.type==="svg")&&t2(b.current,l,c,T);const N=S.useRef(!1);S.useInsertionEffect(()=>{_&&N.current&&_.update(l,v)});const D=l[x0],w=S.useRef(!!D&&!(!((d=window.MotionHandoffIsComplete)===null||d===void 0)&&d.call(window,D))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,D)));return p0(()=>{_&&(N.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Cf.render(_.render),w.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!w.current&&_.animationState&&_.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)===null||j===void 0||j.call(window,D)}),w.current=!1))}),_}function t2(n,s,l,o){const{layoutId:c,layout:d,drag:f,dragConstraints:m,layoutScroll:p,layoutRoot:v}=s;n.projection=new l(n.latestValues,s["data-framer-portal-id"]?void 0:T0(n.parent)),n.projection.setOptions({layoutId:c,layout:d,alwaysMeasureLayout:!!f||m&&ji(m),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:v})}function T0(n){if(n)return n.options.allowProjection!==!1?n.projection:T0(n.parent)}function n2({preloadedFeatures:n,createVisualElement:s,useRender:l,useVisualState:o,Component:c}){var d,f;n&&qT(n);function m(v,y){let b;const _={...S.useContext(xf),...v,layoutId:a2(v)},{isStatic:T}=_,N=QT(v),D=o(v,T);if(!T&&_f){s2();const w=i2(_);b=w.MeasureLayout,N.visualElement=e2(c,D,_,s,w.ProjectionNode)}return h.jsxs(Wr.Provider,{value:N,children:[b&&N.visualElement?h.jsx(b,{visualElement:N.visualElement,..._}):null,l(c,v,JT(D,N.visualElement,y),D,T,N.visualElement)]})}m.displayName=`motion.${typeof c=="string"?c:`create(${(f=(d=c.displayName)!==null&&d!==void 0?d:c.name)!==null&&f!==void 0?f:""})`}`;const p=S.forwardRef(m);return p[FT]=c,p}function a2({layoutId:n}){const s=S.useContext(bf).id;return s&&n!==void 0?s+"-"+n:n}function s2(n,s){S.useContext(y0).strict}function i2(n){const{drag:s,layout:l}=Mi;if(!s&&!l)return{};const o={...s,...l};return{MeasureLayout:s!=null&&s.isEnabled(n)||l!=null&&l.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const l2=["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 Af(n){return typeof n!="string"||n.includes("-")?!1:!!(l2.indexOf(n)>-1||/[A-Z]/u.test(n))}function fv(n){const s=[{},{}];return n==null||n.values.forEach((l,o)=>{s[0][o]=l.get(),s[1][o]=l.getVelocity()}),s}function Nf(n,s,l,o){if(typeof s=="function"){const[c,d]=fv(o);s=s(l!==void 0?l:n.custom,c,d)}if(typeof s=="string"&&(s=n.variants&&n.variants[s]),typeof s=="function"){const[c,d]=fv(o);s=s(l!==void 0?l:n.custom,c,d)}return s}const qd=n=>Array.isArray(n),o2=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),r2=n=>qd(n)?n[n.length-1]||0:n,Xt=n=>!!(n&&n.getVelocity);function Or(n){const s=Xt(n)?n.get():n;return o2(s)?s.toValue():s}function c2({scrapeMotionValuesFromProps:n,createRenderState:s,onUpdate:l},o,c,d){const f={latestValues:u2(o,c,d,n),renderState:s()};return l&&(f.onMount=m=>l({props:o,current:m,...f}),f.onUpdate=m=>l(m)),f}const E0=n=>(s,l)=>{const o=S.useContext(Wr),c=S.useContext(Jr),d=()=>c2(n,s,o,c);return l?d():Sf(d)};function u2(n,s,l,o){const c={},d=o(n,{});for(const _ in d)c[_]=Or(d[_]);let{initial:f,animate:m}=n;const p=tc(n),v=S0(n);s&&v&&!p&&n.inherit!==!1&&(f===void 0&&(f=s.initial),m===void 0&&(m=s.animate));let y=l?l.initial===!1:!1;y=y||f===!1;const b=y?m:f;if(b&&typeof b!="boolean"&&!ec(b)){const _=Array.isArray(b)?b:[b];for(let T=0;T<_.length;T++){const N=Nf(n,_[T]);if(N){const{transitionEnd:D,transition:w,...j}=N;for(const H in j){let M=j[H];if(Array.isArray(M)){const $=y?M.length-1:0;M=M[$]}M!==null&&(c[H]=M)}for(const H in D)c[H]=D[H]}}}return c}const Vi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Us=new Set(Vi),j0=n=>s=>typeof s=="string"&&s.startsWith(n),C0=j0("--"),d2=j0("var(--"),wf=n=>d2(n)?f2.test(n.split("/*")[0].trim()):!1,f2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,A0=(n,s)=>s&&typeof n=="number"?s.transform(n):n,Oa=(n,s,l)=>l>s?s:l<n?n:l,Hi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Jl={...Hi,transform:n=>Oa(0,1,n)},Ar={...Hi,default:1},io=n=>({test:s=>typeof s=="string"&&s.endsWith(n)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${n}`}),is=io("deg"),oa=io("%"),be=io("px"),h2=io("vh"),m2=io("vw"),hv={...oa,parse:n=>oa.parse(n)/100,transform:n=>oa.transform(n*100)},p2={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,backgroundPositionX:be,backgroundPositionY:be},g2={rotate:is,rotateX:is,rotateY:is,rotateZ:is,scale:Ar,scaleX:Ar,scaleY:Ar,scaleZ:Ar,skew:is,skewX:is,skewY:is,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:Jl,originX:hv,originY:hv,originZ:be},mv={...Hi,transform:Math.round},Df={...p2,...g2,zIndex:mv,size:be,fillOpacity:Jl,strokeOpacity:Jl,numOctaves:mv},v2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y2=Vi.length;function b2(n,s,l){let o="",c=!0;for(let d=0;d<y2;d++){const f=Vi[d],m=n[f];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(f.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||l){const v=A0(m,Df[f]);if(!p){c=!1;const y=v2[f]||f;o+=`${y}(${v}) `}l&&(s[f]=v)}}return o=o.trim(),l?o=l(s,c?"":o):c&&(o="none"),o}function kf(n,s,l){const{style:o,vars:c,transformOrigin:d}=n;let f=!1,m=!1;for(const p in s){const v=s[p];if(Us.has(p)){f=!0;continue}else if(C0(p)){c[p]=v;continue}else{const y=A0(v,Df[p]);p.startsWith("origin")?(m=!0,d[p]=y):o[p]=y}}if(s.transform||(f||l?o.transform=b2(s,n.transform,l):o.transform&&(o.transform="none")),m){const{originX:p="50%",originY:v="50%",originZ:y=0}=d;o.transformOrigin=`${p} ${v} ${y}`}}const S2={offset:"stroke-dashoffset",array:"stroke-dasharray"},x2={offset:"strokeDashoffset",array:"strokeDasharray"};function _2(n,s,l=1,o=0,c=!0){n.pathLength=1;const d=c?S2:x2;n[d.offset]=be.transform(-o);const f=be.transform(s),m=be.transform(l);n[d.array]=`${f} ${m}`}function pv(n,s,l){return typeof n=="string"?n:be.transform(s+l*n)}function T2(n,s,l){const o=pv(s,n.x,n.width),c=pv(l,n.y,n.height);return`${o} ${c}`}function Rf(n,{attrX:s,attrY:l,attrScale:o,originX:c,originY:d,pathLength:f,pathSpacing:m=1,pathOffset:p=0,...v},y,b){if(kf(n,v,b),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:N}=n;_.transform&&(N&&(T.transform=_.transform),delete _.transform),N&&(c!==void 0||d!==void 0||T.transform)&&(T.transformOrigin=T2(N,c!==void 0?c:.5,d!==void 0?d:.5)),s!==void 0&&(_.x=s),l!==void 0&&(_.y=l),o!==void 0&&(_.scale=o),f!==void 0&&_2(_,f,m,p,!1)}const Mf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),N0=()=>({...Mf(),attrs:{}}),Of=n=>typeof n=="string"&&n.toLowerCase()==="svg";function w0(n,{style:s,vars:l},o,c){Object.assign(n.style,s,c&&c.getProjectionStyles(o));for(const d in l)n.style.setProperty(d,l[d])}const D0=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 k0(n,s,l,o){w0(n,s,void 0,o);for(const c in s.attrs)n.setAttribute(D0.has(c)?c:jf(c),s.attrs[c])}const Vr={};function E2(n){Object.assign(Vr,n)}function R0(n,{layout:s,layoutId:l}){return Us.has(n)||n.startsWith("origin")||(s||l!==void 0)&&(!!Vr[n]||n==="opacity")}function Bf(n,s,l){var o;const{style:c}=n,d={};for(const f in c)(Xt(c[f])||s.style&&Xt(s.style[f])||R0(f,n)||((o=l==null?void 0:l.getValue(f))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(d[f]=c[f]);return d}function M0(n,s,l){const o=Bf(n,s,l);for(const c in n)if(Xt(n[c])||Xt(s[c])){const d=Vi.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;o[d]=n[c]}return o}function j2(n,s){try{s.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}const gv=["x","y","width","height","cx","cy","r"],C2={useVisualState:E0({scrapeMotionValuesFromProps:M0,createRenderState:N0,onUpdate:({props:n,prevProps:s,current:l,renderState:o,latestValues:c})=>{if(!l)return;let d=!!n.drag;if(!d){for(const m in c)if(Us.has(m)){d=!0;break}}if(!d)return;let f=!s;if(s)for(let m=0;m<gv.length;m++){const p=gv[m];n[p]!==s[p]&&(f=!0)}f&&ot.read(()=>{j2(l,o),ot.render(()=>{Rf(o,c,Of(l.tagName),n.transformTemplate),k0(l,o)})})}})},A2={useVisualState:E0({scrapeMotionValuesFromProps:Bf,createRenderState:Mf})};function O0(n,s,l){for(const o in s)!Xt(s[o])&&!R0(o,l)&&(n[o]=s[o])}function N2({transformTemplate:n},s){return S.useMemo(()=>{const l=Mf();return kf(l,s,n),Object.assign({},l.vars,l.style)},[s])}function w2(n,s){const l=n.style||{},o={};return O0(o,l,n),Object.assign(o,N2(n,s)),o}function D2(n,s){const l={},o=w2(n,s);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 k2(n,s,l,o){const c=S.useMemo(()=>{const d=N0();return Rf(d,s,Of(o),n.transformTemplate),{...d.attrs,style:{...d.style}}},[s]);if(n.style){const d={};O0(d,n.style,n),c.style={...d,...c.style}}return c}function R2(n=!1){return(l,o,c,{latestValues:d},f)=>{const p=(Af(l)?k2:D2)(o,d,f,l),v=ZT(o,typeof l=="string",n),y=l!==S.Fragment?{...v,...p,ref:c}:{},{children:b}=o,_=S.useMemo(()=>Xt(b)?b.get():b,[b]);return S.createElement(l,{...y,children:_})}}function M2(n,s){return function(o,{forwardMotionProps:c}={forwardMotionProps:!1}){const f={...Af(o)?C2:A2,preloadedFeatures:n,useRender:R2(c),createVisualElement:s,Component:o};return n2(f)}}function B0(n,s){if(!Array.isArray(s))return!1;const l=s.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(s[o]!==n[o])return!1;return!0}function nc(n,s,l){const o=n.getProps();return Nf(o,s,l!==void 0?l:o.custom,n)}function Lf(n,s){return n?n[s]||n.default||n:void 0}const L0=new Set(["width","height","top","left","right","bottom",...Vi]);let Br;function O2(){Br=void 0}const ra={now:()=>(Br===void 0&&ra.set(Kt.isProcessing||IT.useManualTiming?Kt.timestamp:performance.now()),Br),set:n=>{Br=n,queueMicrotask(O2)}};function Uf(n,s){n.indexOf(s)===-1&&n.push(s)}function zf(n,s){const l=n.indexOf(s);l>-1&&n.splice(l,1)}class Vf{constructor(){this.subscriptions=[]}add(s){return Uf(this.subscriptions,s),()=>zf(this.subscriptions,s)}notify(s,l,o){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,l,o);else for(let d=0;d<c;d++){const f=this.subscriptions[d];f&&f(s,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function U0(n,s){return s?n*(1e3/s):0}const vv=30,B2=n=>!isNaN(parseFloat(n));class L2{constructor(s,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,c=!0)=>{const d=ra.now();this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=l.owner}setCurrent(s){this.current=s,this.updatedAt=ra.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=B2(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,l){this.events[s]||(this.events[s]=new Vf);const o=this.events[s].add(l);return s==="change"?()=>{o(),ot.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,l){this.passiveEffect=s,this.stopPassiveEffect=l}set(s,l=!0){!l||!this.passiveEffect?this.updateAndNotify(s,l):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-o}jump(s,l=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=ra.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>vv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,vv);return U0(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(s){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=s(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 Wl(n,s){return new L2(n,s)}function U2(n,s,l){n.hasValue(s)?n.getValue(s).set(l):n.addValue(s,Wl(l))}function z2(n,s){const l=nc(n,s);let{transitionEnd:o={},transition:c={},...d}=l||{};d={...d,...o};for(const f in d){const m=r2(d[f]);U2(n,f,m)}}function V2(n){return!!(Xt(n)&&n.add)}function Yd(n,s){const l=n.getValue("willChange");if(V2(l))return l.add(s)}function z0(n){return n.props[x0]}function Hf(n){let s;return()=>(s===void 0&&(s=n()),s)}const H2=Hf(()=>window.ScrollTimeline!==void 0);class I2{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}get finished(){return Promise.all(this.animations.map(s=>"finished"in s?s.finished:s))}getAll(s){return this.animations[0][s]}setAll(s,l){for(let o=0;o<this.animations.length;o++)this.animations[o][s]=l}attachTimeline(s,l){const o=this.animations.map(c=>{if(H2()&&c.attachTimeline)return c.attachTimeline(s);if(typeof l=="function")return l(c)});return()=>{o.forEach((c,d)=>{c&&c(),this.animations[d].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get startTime(){return this.getAll("startTime")}get duration(){let s=0;for(let l=0;l<this.animations.length;l++)s=Math.max(s,this.animations[l].duration);return s}runAll(s){this.animations.forEach(l=>l[s]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class G2 extends I2{then(s,l){return Promise.all(this.animations).then(s).catch(l)}}const ka=n=>n*1e3,Ra=n=>n/1e3;function If(n){return typeof n=="function"}function yv(n,s){n.timeline=s,n.onfinish=null}const Gf=n=>Array.isArray(n)&&typeof n[0]=="number",P2={linearEasing:void 0};function q2(n,s){const l=Hf(n);return()=>{var o;return(o=P2[s])!==null&&o!==void 0?o:l()}}const Hr=q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Oi=(n,s,l)=>{const o=s-n;return o===0?1:(l-n)/o},V0=(n,s,l=10)=>{let o="";const c=Math.max(Math.round(s/l),2);for(let d=0;d<c;d++)o+=n(Oi(0,c-1,d))+", ";return`linear(${o.substring(0,o.length-2)})`};function H0(n){return!!(typeof n=="function"&&Hr()||!n||typeof n=="string"&&(n in Kd||Hr())||Gf(n)||Array.isArray(n)&&n.every(H0))}const Vl=([n,s,l,o])=>`cubic-bezier(${n}, ${s}, ${l}, ${o})`,Kd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vl([0,.65,.55,1]),circOut:Vl([.55,0,1,.45]),backIn:Vl([.31,.01,.66,-.59]),backOut:Vl([.33,1.53,.69,.99])};function I0(n,s){if(n)return typeof n=="function"&&Hr()?V0(n,s):Gf(n)?Vl(n):Array.isArray(n)?n.map(l=>I0(l,s)||Kd.easeOut):Kd[n]}const G0=(n,s,l)=>(((1-3*l+3*s)*n+(3*l-6*s))*n+3*s)*n,Y2=1e-7,K2=12;function Z2(n,s,l,o,c){let d,f,m=0;do f=s+(l-s)/2,d=G0(f,o,c)-n,d>0?l=f:s=f;while(Math.abs(d)>Y2&&++m<K2);return f}function lo(n,s,l,o){if(n===s&&l===o)return _n;const c=d=>Z2(d,0,1,n,l);return d=>d===0||d===1?d:G0(c(d),s,o)}const P0=n=>s=>s<=.5?n(2*s)/2:(2-n(2*(1-s)))/2,q0=n=>s=>1-n(1-s),Y0=lo(.33,1.53,.69,.99),Pf=q0(Y0),K0=P0(Pf),Z0=n=>(n*=2)<1?.5*Pf(n):.5*(2-Math.pow(2,-10*(n-1))),qf=n=>1-Math.sin(Math.acos(n)),X0=q0(qf),$0=P0(qf),Q0=n=>/^0[^.\s]+$/u.test(n);function X2(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Q0(n):!0}const ql=n=>Math.round(n*1e5)/1e5,Yf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $2(n){return n==null}const Q2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kf=(n,s)=>l=>!!(typeof l=="string"&&Q2.test(l)&&l.startsWith(n)||s&&!$2(l)&&Object.prototype.hasOwnProperty.call(l,s)),F0=(n,s,l)=>o=>{if(typeof o!="string")return o;const[c,d,f,m]=o.match(Yf);return{[n]:parseFloat(c),[s]:parseFloat(d),[l]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},F2=n=>Oa(0,255,n),Sd={...Hi,transform:n=>Math.round(F2(n))},Ms={test:Kf("rgb","red"),parse:F0("red","green","blue"),transform:({red:n,green:s,blue:l,alpha:o=1})=>"rgba("+Sd.transform(n)+", "+Sd.transform(s)+", "+Sd.transform(l)+", "+ql(Jl.transform(o))+")"};function J2(n){let s="",l="",o="",c="";return n.length>5?(s=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),c=n.substring(7,9)):(s=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),c=n.substring(4,5),s+=s,l+=l,o+=o,c+=c),{red:parseInt(s,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:c?parseInt(c,16)/255:1}}const Zd={test:Kf("#"),parse:J2,transform:Ms.transform},Ci={test:Kf("hsl","hue"),parse:F0("hue","saturation","lightness"),transform:({hue:n,saturation:s,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+oa.transform(ql(s))+", "+oa.transform(ql(l))+", "+ql(Jl.transform(o))+")"},Zt={test:n=>Ms.test(n)||Zd.test(n)||Ci.test(n),parse:n=>Ms.test(n)?Ms.parse(n):Ci.test(n)?Ci.parse(n):Zd.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ms.transform(n):Ci.transform(n)},W2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function eE(n){var s,l;return isNaN(n)&&typeof n=="string"&&(((s=n.match(Yf))===null||s===void 0?void 0:s.length)||0)+(((l=n.match(W2))===null||l===void 0?void 0:l.length)||0)>0}const J0="number",W0="color",tE="var",nE="var(",bv="${}",aE=/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 eo(n){const s=n.toString(),l=[],o={color:[],number:[],var:[]},c=[];let d=0;const m=s.replace(aE,p=>(Zt.test(p)?(o.color.push(d),c.push(W0),l.push(Zt.parse(p))):p.startsWith(nE)?(o.var.push(d),c.push(tE),l.push(p)):(o.number.push(d),c.push(J0),l.push(parseFloat(p))),++d,bv)).split(bv);return{values:l,split:m,indexes:o,types:c}}function eb(n){return eo(n).values}function tb(n){const{split:s,types:l}=eo(n),o=s.length;return c=>{let d="";for(let f=0;f<o;f++)if(d+=s[f],c[f]!==void 0){const m=l[f];m===J0?d+=ql(c[f]):m===W0?d+=Zt.transform(c[f]):d+=c[f]}return d}}const sE=n=>typeof n=="number"?0:n;function iE(n){const s=eb(n);return tb(n)(s.map(sE))}const cs={test:eE,parse:eb,createTransformer:tb,getAnimatableNone:iE},lE=new Set(["brightness","contrast","saturate","opacity"]);function oE(n){const[s,l]=n.slice(0,-1).split("(");if(s==="drop-shadow")return n;const[o]=l.match(Yf)||[];if(!o)return n;const c=l.replace(o,"");let d=lE.has(s)?1:0;return o!==l&&(d*=100),s+"("+d+c+")"}const rE=/\b([a-z-]*)\(.*?\)/gu,Xd={...cs,getAnimatableNone:n=>{const s=n.match(rE);return s?s.map(oE).join(" "):n}},cE={...Df,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:Xd,WebkitFilter:Xd},Zf=n=>cE[n];function nb(n,s){let l=Zf(n);return l!==Xd&&(l=cs),l.getAnimatableNone?l.getAnimatableNone(s):void 0}const uE=new Set(["auto","none","0"]);function dE(n,s,l){let o=0,c;for(;o<n.length&&!c;){const d=n[o];typeof d=="string"&&!uE.has(d)&&eo(d).values.length&&(c=n[o]),o++}if(c&&l)for(const d of s)n[d]=nb(l,c)}const Sv=n=>n===Hi||n===be,xv=(n,s)=>parseFloat(n.split(", ")[s]),_v=(n,s)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const c=o.match(/^matrix3d\((.+)\)$/u);if(c)return xv(c[1],s);{const d=o.match(/^matrix\((.+)\)$/u);return d?xv(d[1],n):0}},fE=new Set(["x","y","z"]),hE=Vi.filter(n=>!fE.has(n));function mE(n){const s=[];return hE.forEach(l=>{const o=n.getValue(l);o!==void 0&&(s.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),s}const Bi={width:({x:n},{paddingLeft:s="0",paddingRight:l="0"})=>n.max-n.min-parseFloat(s)-parseFloat(l),height:({y:n},{paddingTop:s="0",paddingBottom:l="0"})=>n.max-n.min-parseFloat(s)-parseFloat(l),top:(n,{top:s})=>parseFloat(s),left:(n,{left:s})=>parseFloat(s),bottom:({y:n},{top:s})=>parseFloat(s)+(n.max-n.min),right:({x:n},{left:s})=>parseFloat(s)+(n.max-n.min),x:_v(4,13),y:_v(5,14)};Bi.translateX=Bi.x;Bi.translateY=Bi.y;const Os=new Set;let $d=!1,Qd=!1;function ab(){if(Qd){const n=Array.from(Os).filter(o=>o.needsMeasurement),s=new Set(n.map(o=>o.element)),l=new Map;s.forEach(o=>{const c=mE(o);c.length&&(l.set(o,c),o.render())}),n.forEach(o=>o.measureInitialState()),s.forEach(o=>{o.render();const c=l.get(o);c&&c.forEach(([d,f])=>{var m;(m=o.getValue(d))===null||m===void 0||m.set(f)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Qd=!1,$d=!1,Os.forEach(n=>n.complete()),Os.clear()}function sb(){Os.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Qd=!0)})}function pE(){sb(),ab()}class Xf{constructor(s,l,o,c,d,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=l,this.name=o,this.motionValue=c,this.element=d,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Os.add(this),$d||($d=!0,ot.read(sb),ot.resolveKeyframes(ab))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:l,element:o,motionValue:c}=this;for(let d=0;d<s.length;d++)if(s[d]===null)if(d===0){const f=c==null?void 0:c.get(),m=s[s.length-1];if(f!==void 0)s[0]=f;else if(o&&l){const p=o.readValue(l,m);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=m),c&&f===void 0&&c.set(s[0])}else s[d]=s[d-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Os.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Os.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ib=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),gE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vE(n){const s=gE.exec(n);if(!s)return[,];const[,l,o,c]=s;return[`--${l??o}`,c]}function lb(n,s,l=1){const[o,c]=vE(n);if(!o)return;const d=window.getComputedStyle(s).getPropertyValue(o);if(d){const f=d.trim();return ib(f)?parseFloat(f):f}return wf(c)?lb(c,s,l+1):c}const ob=n=>s=>s.test(n),yE={test:n=>n==="auto",parse:n=>n},rb=[Hi,be,oa,is,m2,h2,yE],Tv=n=>rb.find(ob(n));class cb extends Xf{constructor(s,l,o,c,d){super(s,l,o,c,d,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let p=0;p<s.length;p++){let v=s[p];if(typeof v=="string"&&(v=v.trim(),wf(v))){const y=lb(v,l.current);y!==void 0&&(s[p]=y),p===s.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!L0.has(o)||s.length!==2)return;const[c,d]=s,f=Tv(c),m=Tv(d);if(f!==m)if(Sv(f)&&Sv(m))for(let p=0;p<s.length;p++){const v=s[p];typeof v=="string"&&(s[p]=parseFloat(v))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:l}=this,o=[];for(let c=0;c<s.length;c++)X2(s[c])&&o.push(c);o.length&&dE(s,o,l)}measureInitialState(){const{element:s,unresolvedKeyframes:l,name:o}=this;if(!s||!s.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Bi[o](s.measureViewportBox(),window.getComputedStyle(s.current)),l[0]=this.measuredOrigin;const c=l[l.length-1];c!==void 0&&s.getValue(o,c).jump(c,!1)}measureEndState(){var s;const{element:l,name:o,unresolvedKeyframes:c}=this;if(!l||!l.current)return;const d=l.getValue(o);d&&d.jump(this.measuredOrigin,!1);const f=c.length-1,m=c[f];c[f]=Bi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((s=this.removedTransforms)===null||s===void 0)&&s.length&&this.removedTransforms.forEach(([p,v])=>{l.getValue(p).set(v)}),this.resolveNoneKeyframes()}}const Ev=(n,s)=>s==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(cs.test(n)||n==="0")&&!n.startsWith("url("));function bE(n){const s=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==s)return!0}function SE(n,s,l,o){const c=n[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const d=n[n.length-1],f=Ev(c,s),m=Ev(d,s);return!f||!m?!1:bE(n)||(l==="spring"||If(l))&&o}const xE=n=>n!==null;function ac(n,{repeat:s,repeatType:l="loop"},o){const c=n.filter(xE),d=s&&l!=="loop"&&s%2===1?0:c.length-1;return!d||o===void 0?c[d]:o}const _E=40;class ub{constructor({autoplay:s=!0,delay:l=0,type:o="keyframes",repeat:c=0,repeatDelay:d=0,repeatType:f="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ra.now(),this.options={autoplay:s,delay:l,type:o,repeat:c,repeatDelay:d,repeatType:f,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>_E?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&pE(),this._resolved}onKeyframesResolved(s,l){this.resolvedAt=ra.now(),this.hasAttemptedResolve=!0;const{name:o,type:c,velocity:d,delay:f,onComplete:m,onUpdate:p,isGenerator:v}=this.options;if(!v&&!SE(s,o,c,d))if(f)this.options.duration=0;else{p&&p(ac(s,this.options,l)),m&&m(),this.resolveFinishedPromise();return}const y=this.initPlayback(s,l);y!==!1&&(this._resolved={keyframes:s,finalKeyframe:l,...y},this.onPostResolved())}onPostResolved(){}then(s,l){return this.currentFinishedPromise.then(s,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(s=>{this.resolveFinishedPromise=s})}}const Fd=2e4;function db(n){let s=0;const l=50;let o=n.next(s);for(;!o.done&&s<Fd;)s+=l,o=n.next(s);return s>=Fd?1/0:s}const pt=(n,s,l)=>n+(s-n)*l;function xd(n,s,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(s-n)*6*l:l<1/2?s:l<2/3?n+(s-n)*(2/3-l)*6:n}function TE({hue:n,saturation:s,lightness:l,alpha:o}){n/=360,s/=100,l/=100;let c=0,d=0,f=0;if(!s)c=d=f=l;else{const m=l<.5?l*(1+s):l+s-l*s,p=2*l-m;c=xd(p,m,n+1/3),d=xd(p,m,n),f=xd(p,m,n-1/3)}return{red:Math.round(c*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:o}}function Ir(n,s){return l=>l>0?s:n}const _d=(n,s,l)=>{const o=n*n,c=l*(s*s-o)+o;return c<0?0:Math.sqrt(c)},EE=[Zd,Ms,Ci],jE=n=>EE.find(s=>s.test(n));function jv(n){const s=jE(n);if(!s)return!1;let l=s.parse(n);return s===Ci&&(l=TE(l)),l}const Cv=(n,s)=>{const l=jv(n),o=jv(s);if(!l||!o)return Ir(n,s);const c={...l};return d=>(c.red=_d(l.red,o.red,d),c.green=_d(l.green,o.green,d),c.blue=_d(l.blue,o.blue,d),c.alpha=pt(l.alpha,o.alpha,d),Ms.transform(c))},CE=(n,s)=>l=>s(n(l)),oo=(...n)=>n.reduce(CE),Jd=new Set(["none","hidden"]);function AE(n,s){return Jd.has(n)?l=>l<=0?n:s:l=>l>=1?s:n}function NE(n,s){return l=>pt(n,s,l)}function $f(n){return typeof n=="number"?NE:typeof n=="string"?wf(n)?Ir:Zt.test(n)?Cv:kE:Array.isArray(n)?fb:typeof n=="object"?Zt.test(n)?Cv:wE:Ir}function fb(n,s){const l=[...n],o=l.length,c=n.map((d,f)=>$f(d)(d,s[f]));return d=>{for(let f=0;f<o;f++)l[f]=c[f](d);return l}}function wE(n,s){const l={...n,...s},o={};for(const c in l)n[c]!==void 0&&s[c]!==void 0&&(o[c]=$f(n[c])(n[c],s[c]));return c=>{for(const d in o)l[d]=o[d](c);return l}}function DE(n,s){var l;const o=[],c={color:0,var:0,number:0};for(let d=0;d<s.values.length;d++){const f=s.types[d],m=n.indexes[f][c[f]],p=(l=n.values[m])!==null&&l!==void 0?l:0;o[d]=p,c[f]++}return o}const kE=(n,s)=>{const l=cs.createTransformer(s),o=eo(n),c=eo(s);return o.indexes.var.length===c.indexes.var.length&&o.indexes.color.length===c.indexes.color.length&&o.indexes.number.length>=c.indexes.number.length?Jd.has(n)&&!c.values.length||Jd.has(s)&&!o.values.length?AE(n,s):oo(fb(DE(o,c),c.values),l):Ir(n,s)};function hb(n,s,l){return typeof n=="number"&&typeof s=="number"&&typeof l=="number"?pt(n,s,l):$f(n)(n,s)}const RE=5;function mb(n,s,l){const o=Math.max(s-RE,0);return U0(l-n(o),s-o)}const bt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Td=.001;function ME({duration:n=bt.duration,bounce:s=bt.bounce,velocity:l=bt.velocity,mass:o=bt.mass}){let c,d,f=1-s;f=Oa(bt.minDamping,bt.maxDamping,f),n=Oa(bt.minDuration,bt.maxDuration,Ra(n)),f<1?(c=v=>{const y=v*f,b=y*n,_=y-l,T=Wd(v,f),N=Math.exp(-b);return Td-_/T*N},d=v=>{const b=v*f*n,_=b*l+l,T=Math.pow(f,2)*Math.pow(v,2)*n,N=Math.exp(-b),D=Wd(Math.pow(v,2),f);return(-c(v)+Td>0?-1:1)*((_-T)*N)/D}):(c=v=>{const y=Math.exp(-v*n),b=(v-l)*n+1;return-Td+y*b},d=v=>{const y=Math.exp(-v*n),b=(l-v)*(n*n);return y*b});const m=5/n,p=BE(c,d,m);if(n=ka(n),isNaN(p))return{stiffness:bt.stiffness,damping:bt.damping,duration:n};{const v=Math.pow(p,2)*o;return{stiffness:v,damping:f*2*Math.sqrt(o*v),duration:n}}}const OE=12;function BE(n,s,l){let o=l;for(let c=1;c<OE;c++)o=o-n(o)/s(o);return o}function Wd(n,s){return n*Math.sqrt(1-s*s)}const LE=["duration","bounce"],UE=["stiffness","damping","mass"];function Av(n,s){return s.some(l=>n[l]!==void 0)}function zE(n){let s={velocity:bt.velocity,stiffness:bt.stiffness,damping:bt.damping,mass:bt.mass,isResolvedFromDuration:!1,...n};if(!Av(n,UE)&&Av(n,LE))if(n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),c=o*o,d=2*Oa(.05,1,1-(n.bounce||0))*Math.sqrt(c);s={...s,mass:bt.mass,stiffness:c,damping:d}}else{const l=ME(n);s={...s,...l,mass:bt.mass},s.isResolvedFromDuration=!0}return s}function pb(n=bt.visualDuration,s=bt.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:s}:n;let{restSpeed:o,restDelta:c}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],m={done:!1,value:d},{stiffness:p,damping:v,mass:y,duration:b,velocity:_,isResolvedFromDuration:T}=zE({...l,velocity:-Ra(l.velocity||0)}),N=_||0,D=v/(2*Math.sqrt(p*y)),w=f-d,j=Ra(Math.sqrt(p/y)),H=Math.abs(w)<5;o||(o=H?bt.restSpeed.granular:bt.restSpeed.default),c||(c=H?bt.restDelta.granular:bt.restDelta.default);let M;if(D<1){const I=Wd(j,D);M=J=>{const te=Math.exp(-D*j*J);return f-te*((N+D*j*w)/I*Math.sin(I*J)+w*Math.cos(I*J))}}else if(D===1)M=I=>f-Math.exp(-j*I)*(w+(N+j*w)*I);else{const I=j*Math.sqrt(D*D-1);M=J=>{const te=Math.exp(-D*j*J),Y=Math.min(I*J,300);return f-te*((N+D*j*w)*Math.sinh(Y)+I*w*Math.cosh(Y))/I}}const $={calculatedDuration:T&&b||null,next:I=>{const J=M(I);if(T)m.done=I>=b;else{let te=0;D<1&&(te=I===0?ka(N):mb(M,I,J));const Y=Math.abs(te)<=o,X=Math.abs(f-J)<=c;m.done=Y&&X}return m.value=m.done?f:J,m},toString:()=>{const I=Math.min(db($),Fd),J=V0(te=>$.next(I*te).value,I,30);return I+"ms "+J}};return $}function Nv({keyframes:n,velocity:s=0,power:l=.8,timeConstant:o=325,bounceDamping:c=10,bounceStiffness:d=500,modifyTarget:f,min:m,max:p,restDelta:v=.5,restSpeed:y}){const b=n[0],_={done:!1,value:b},T=Y=>m!==void 0&&Y<m||p!==void 0&&Y>p,N=Y=>m===void 0?p:p===void 0||Math.abs(m-Y)<Math.abs(p-Y)?m:p;let D=l*s;const w=b+D,j=f===void 0?w:f(w);j!==w&&(D=j-b);const H=Y=>-D*Math.exp(-Y/o),M=Y=>j+H(Y),$=Y=>{const X=H(Y),ue=M(Y);_.done=Math.abs(X)<=v,_.value=_.done?j:ue};let I,J;const te=Y=>{T(_.value)&&(I=Y,J=pb({keyframes:[_.value,N(_.value)],velocity:mb(M,Y,_.value),damping:c,stiffness:d,restDelta:v,restSpeed:y}))};return te(0),{calculatedDuration:null,next:Y=>{let X=!1;return!J&&I===void 0&&(X=!0,$(Y),te(Y)),I!==void 0&&Y>=I?J.next(Y-I):(!X&&$(Y),_)}}}const VE=lo(.42,0,1,1),HE=lo(0,0,.58,1),gb=lo(.42,0,.58,1),IE=n=>Array.isArray(n)&&typeof n[0]!="number",GE={linear:_n,easeIn:VE,easeInOut:gb,easeOut:HE,circIn:qf,circInOut:$0,circOut:X0,backIn:Pf,backInOut:K0,backOut:Y0,anticipate:Z0},wv=n=>{if(Gf(n)){g0(n.length===4);const[s,l,o,c]=n;return lo(s,l,o,c)}else if(typeof n=="string")return GE[n];return n};function PE(n,s,l){const o=[],c=l||hb,d=n.length-1;for(let f=0;f<d;f++){let m=c(n[f],n[f+1]);if(s){const p=Array.isArray(s)?s[f]||_n:s;m=oo(p,m)}o.push(m)}return o}function qE(n,s,{clamp:l=!0,ease:o,mixer:c}={}){const d=n.length;if(g0(d===s.length),d===1)return()=>s[0];if(d===2&&s[0]===s[1])return()=>s[1];const f=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),s=[...s].reverse());const m=PE(s,o,c),p=m.length,v=y=>{if(f&&y<n[0])return s[0];let b=0;if(p>1)for(;b<n.length-2&&!(y<n[b+1]);b++);const _=Oi(n[b],n[b+1],y);return m[b](_)};return l?y=>v(Oa(n[0],n[d-1],y)):v}function YE(n,s){const l=n[n.length-1];for(let o=1;o<=s;o++){const c=Oi(0,s,o);n.push(pt(l,1,c))}}function KE(n){const s=[0];return YE(s,n.length-1),s}function ZE(n,s){return n.map(l=>l*s)}function XE(n,s){return n.map(()=>s||gb).splice(0,n.length-1)}function Gr({duration:n=300,keyframes:s,times:l,ease:o="easeInOut"}){const c=IE(o)?o.map(wv):wv(o),d={done:!1,value:s[0]},f=ZE(l&&l.length===s.length?l:KE(s),n),m=qE(f,s,{ease:Array.isArray(c)?c:XE(s,c)});return{calculatedDuration:n,next:p=>(d.value=m(p),d.done=p>=n,d)}}const $E=n=>{const s=({timestamp:l})=>n(l);return{start:()=>ot.update(s,!0),stop:()=>rs(s),now:()=>Kt.isProcessing?Kt.timestamp:ra.now()}},QE={decay:Nv,inertia:Nv,tween:Gr,keyframes:Gr,spring:pb},FE=n=>n/100;class Qf extends ub{constructor(s){super(s),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:c,keyframes:d}=this.options,f=(c==null?void 0:c.KeyframeResolver)||Xf,m=(p,v)=>this.onKeyframesResolved(p,v);this.resolver=new f(d,m,l,o,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(s){const{type:l="keyframes",repeat:o=0,repeatDelay:c=0,repeatType:d,velocity:f=0}=this.options,m=If(l)?l:QE[l]||Gr;let p,v;m!==Gr&&typeof s[0]!="number"&&(p=oo(FE,hb(s[0],s[1])),s=[0,100]);const y=m({...this.options,keyframes:s});d==="mirror"&&(v=m({...this.options,keyframes:[...s].reverse(),velocity:-f})),y.calculatedDuration===null&&(y.calculatedDuration=db(y));const{calculatedDuration:b}=y,_=b+c,T=_*(o+1)-c;return{generator:y,mirroredGenerator:v,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,l=!1){const{resolved:o}=this;if(!o){const{keyframes:Y}=this.options;return{done:!0,value:Y[Y.length-1]}}const{finalKeyframe:c,generator:d,mirroredGenerator:f,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:v,totalDuration:y,resolvedDuration:b}=o;if(this.startTime===null)return d.next(0);const{delay:_,repeat:T,repeatType:N,repeatDelay:D,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-y/this.speed,this.startTime)),l?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const j=this.currentTime-_*(this.speed>=0?1:-1),H=this.speed>=0?j<0:j>y;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let M=this.currentTime,$=d;if(T){const Y=Math.min(this.currentTime,y)/b;let X=Math.floor(Y),ue=Y%1;!ue&&Y>=1&&(ue=1),ue===1&&X--,X=Math.min(X,T+1),!!(X%2)&&(N==="reverse"?(ue=1-ue,D&&(ue-=D/b)):N==="mirror"&&($=f)),M=Oa(0,1,ue)*b}const I=H?{done:!1,value:p[0]}:$.next(M);m&&(I.value=m(I.value));let{done:J}=I;!H&&v!==null&&(J=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const te=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&J);return te&&c!==void 0&&(I.value=ac(p,this.options,c)),w&&w(I.value),te&&this.finish(),I}get duration(){const{resolved:s}=this;return s?Ra(s.calculatedDuration):0}get time(){return Ra(this.currentTime)}set time(s){s=ka(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const l=this.playbackSpeed!==s;this.playbackSpeed=s,l&&(this.time=Ra(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=$E,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=s(d=>this.tick(d))),l&&l();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):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 s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}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(s){return this.startTime=0,this.tick(s,!0)}}const JE=new Set(["opacity","clipPath","filter","transform"]);function WE(n,s,l,{delay:o=0,duration:c=300,repeat:d=0,repeatType:f="loop",ease:m="easeInOut",times:p}={}){const v={[s]:l};p&&(v.offset=p);const y=I0(m,c);return Array.isArray(y)&&(v.easing=y),n.animate(v,{delay:o,duration:c,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"})}const ej=Hf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Pr=10,tj=2e4;function nj(n){return If(n.type)||n.type==="spring"||!H0(n.ease)}function aj(n,s){const l=new Qf({...s,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const c=[];let d=0;for(;!o.done&&d<tj;)o=l.sample(d),c.push(o.value),d+=Pr;return{times:void 0,keyframes:c,duration:d-Pr,ease:"linear"}}const vb={anticipate:Z0,backInOut:K0,circInOut:$0};function sj(n){return n in vb}class Dv extends ub{constructor(s){super(s);const{name:l,motionValue:o,element:c,keyframes:d}=this.options;this.resolver=new cb(d,(f,m)=>this.onKeyframesResolved(f,m),l,o,c),this.resolver.scheduleResolve()}initPlayback(s,l){let{duration:o=300,times:c,ease:d,type:f,motionValue:m,name:p,startTime:v}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof d=="string"&&Hr()&&sj(d)&&(d=vb[d]),nj(this.options)){const{onComplete:b,onUpdate:_,motionValue:T,element:N,...D}=this.options,w=aj(s,D);s=w.keyframes,s.length===1&&(s[1]=s[0]),o=w.duration,c=w.times,d=w.ease,f="keyframes"}const y=WE(m.owner.current,p,s,{...this.options,duration:o,times:c,ease:d});return y.startTime=v??this.calcStartTime(),this.pendingTimeline?(yv(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:b}=this.options;m.set(ac(s,this.options,l)),b&&b(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:c,type:f,ease:d,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:l}=s;return Ra(l)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:l}=s;return Ra(l.currentTime||0)}set time(s){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=ka(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:l}=s;return l.playbackRate}set speed(s){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:l}=s;return l.playState}get startTime(){const{resolved:s}=this;if(!s)return null;const{animation:l}=s;return l.startTime}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:l}=this;if(!l)return _n;const{animation:o}=l;yv(o,s)}return _n}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:l}=s;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:l}=s;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:s}=this;if(!s)return;const{animation:l,keyframes:o,duration:c,type:d,ease:f,times:m}=s;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:v,onUpdate:y,onComplete:b,element:_,...T}=this.options,N=new Qf({...T,keyframes:o,duration:c,type:d,ease:f,times:m,isGenerator:!0}),D=ka(this.time);v.setWithVelocity(N.sample(D-Pr).value,N.sample(D).value,Pr)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:l,name:o,repeatDelay:c,repeatType:d,damping:f,type:m}=s;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:v}=l.owner.getProps();return ej()&&o&&JE.has(o)&&!p&&!v&&!c&&d!=="mirror"&&f!==0&&m!=="inertia"}}const ij={type:"spring",stiffness:500,damping:25,restSpeed:10},lj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),oj={type:"keyframes",duration:.8},rj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cj=(n,{keyframes:s})=>s.length>2?oj:Us.has(n)?n.startsWith("scale")?lj(s[1]):ij:rj;function uj({when:n,delay:s,delayChildren:l,staggerChildren:o,staggerDirection:c,repeat:d,repeatType:f,repeatDelay:m,from:p,elapsed:v,...y}){return!!Object.keys(y).length}const Ff=(n,s,l,o={},c,d)=>f=>{const m=Lf(o,n)||{},p=m.delay||o.delay||0;let{elapsed:v=0}=o;v=v-ka(p);let y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:s.getVelocity(),...m,delay:-v,onUpdate:_=>{s.set(_),m.onUpdate&&m.onUpdate(_)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:n,motionValue:s,element:d?void 0:c};uj(m)||(y={...y,...cj(n,y)}),y.duration&&(y.duration=ka(y.duration)),y.repeatDelay&&(y.repeatDelay=ka(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let b=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(y.duration=0,y.delay===0&&(b=!0)),b&&!d&&s.get()!==void 0){const _=ac(y.keyframes,m);if(_!==void 0)return ot.update(()=>{y.onUpdate(_),y.onComplete()}),new G2([])}return!d&&Dv.supports(y)?new Dv(y):new Qf(y)};function dj({protectedKeys:n,needsAnimating:s},l){const o=n.hasOwnProperty(l)&&s[l]!==!0;return s[l]=!1,o}function yb(n,s,{delay:l=0,transitionOverride:o,type:c}={}){var d;let{transition:f=n.getDefaultTransition(),transitionEnd:m,...p}=s;o&&(f=o);const v=[],y=c&&n.animationState&&n.animationState.getState()[c];for(const b in p){const _=n.getValue(b,(d=n.latestValues[b])!==null&&d!==void 0?d:null),T=p[b];if(T===void 0||y&&dj(y,b))continue;const N={delay:l,...Lf(f||{},b)};let D=!1;if(window.MotionHandoffAnimation){const j=z0(n);if(j){const H=window.MotionHandoffAnimation(j,b,ot);H!==null&&(N.startTime=H,D=!0)}}Yd(n,b),_.start(Ff(b,_,T,n.shouldReduceMotion&&L0.has(b)?{type:!1}:N,n,D));const w=_.animation;w&&v.push(w)}return m&&Promise.all(v).then(()=>{ot.update(()=>{m&&z2(n,m)})}),v}function ef(n,s,l={}){var o;const c=nc(n,s,l.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:d=n.getDefaultTransition()||{}}=c||{};l.transitionOverride&&(d=l.transitionOverride);const f=c?()=>Promise.all(yb(n,c,l)):()=>Promise.resolve(),m=n.variantChildren&&n.variantChildren.size?(v=0)=>{const{delayChildren:y=0,staggerChildren:b,staggerDirection:_}=d;return fj(n,s,y+v,b,_,l)}:()=>Promise.resolve(),{when:p}=d;if(p){const[v,y]=p==="beforeChildren"?[f,m]:[m,f];return v().then(()=>y())}else return Promise.all([f(),m(l.delay)])}function fj(n,s,l=0,o=0,c=1,d){const f=[],m=(n.variantChildren.size-1)*o,p=c===1?(v=0)=>v*o:(v=0)=>m-v*o;return Array.from(n.variantChildren).sort(hj).forEach((v,y)=>{v.notify("AnimationStart",s),f.push(ef(v,s,{...d,delay:l+p(y)}).then(()=>v.notify("AnimationComplete",s)))}),Promise.all(f)}function hj(n,s){return n.sortNodePosition(s)}function mj(n,s,l={}){n.notify("AnimationStart",s);let o;if(Array.isArray(s)){const c=s.map(d=>ef(n,d,l));o=Promise.all(c)}else if(typeof s=="string")o=ef(n,s,l);else{const c=typeof s=="function"?nc(n,s,l.custom):s;o=Promise.all(yb(n,c,l))}return o.then(()=>{n.notify("AnimationComplete",s)})}const pj=Ef.length;function bb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?bb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const s={};for(let l=0;l<pj;l++){const o=Ef[l],c=n.props[o];(Fl(c)||c===!1)&&(s[o]=c)}return s}const gj=[...Tf].reverse(),vj=Tf.length;function yj(n){return s=>Promise.all(s.map(({animation:l,options:o})=>mj(n,l,o)))}function bj(n){let s=yj(n),l=kv(),o=!0;const c=p=>(v,y)=>{var b;const _=nc(n,y,p==="exit"?(b=n.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(_){const{transition:T,transitionEnd:N,...D}=_;v={...v,...D,...N}}return v};function d(p){s=p(n)}function f(p){const{props:v}=n,y=bb(n.parent)||{},b=[],_=new Set;let T={},N=1/0;for(let w=0;w<vj;w++){const j=gj[w],H=l[j],M=v[j]!==void 0?v[j]:y[j],$=Fl(M),I=j===p?H.isActive:null;I===!1&&(N=w);let J=M===y[j]&&M!==v[j]&&$;if(J&&o&&n.manuallyAnimateOnMount&&(J=!1),H.protectedKeys={...T},!H.isActive&&I===null||!M&&!H.prevProp||ec(M)||typeof M=="boolean")continue;const te=Sj(H.prevProp,M);let Y=te||j===p&&H.isActive&&!J&&$||w>N&&$,X=!1;const ue=Array.isArray(M)?M:[M];let R=ue.reduce(c(j),{});I===!1&&(R={});const{prevResolvedValues:pe={}}=H,ee={...pe,...R},ge=Q=>{Y=!0,_.has(Q)&&(X=!0,_.delete(Q)),H.needsAnimating[Q]=!0;const W=n.getValue(Q);W&&(W.liveStyle=!1)};for(const Q in ee){const W=R[Q],Ne=pe[Q];if(T.hasOwnProperty(Q))continue;let Te=!1;qd(W)&&qd(Ne)?Te=!B0(W,Ne):Te=W!==Ne,Te?W!=null?ge(Q):_.add(Q):W!==void 0&&_.has(Q)?ge(Q):H.protectedKeys[Q]=!0}H.prevProp=M,H.prevResolvedValues=R,H.isActive&&(T={...T,...R}),o&&n.blockInitialAnimation&&(Y=!1),Y&&(!(J&&te)||X)&&b.push(...ue.map(Q=>({animation:Q,options:{type:j}})))}if(_.size){const w={};_.forEach(j=>{const H=n.getBaseTarget(j),M=n.getValue(j);M&&(M.liveStyle=!0),w[j]=H??null}),b.push({animation:w})}let D=!!b.length;return o&&(v.initial===!1||v.initial===v.animate)&&!n.manuallyAnimateOnMount&&(D=!1),o=!1,D?s(b):Promise.resolve()}function m(p,v){var y;if(l[p].isActive===v)return Promise.resolve();(y=n.variantChildren)===null||y===void 0||y.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(p,v)}),l[p].isActive=v;const b=f(p);for(const _ in l)l[_].protectedKeys={};return b}return{animateChanges:f,setActive:m,setAnimateFunction:d,getState:()=>l,reset:()=>{l=kv(),o=!0}}}function Sj(n,s){return typeof s=="string"?s!==n:Array.isArray(s)?!B0(s,n):!1}function ws(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kv(){return{animate:ws(!0),whileInView:ws(),whileHover:ws(),whileTap:ws(),whileDrag:ws(),whileFocus:ws(),exit:ws()}}class us{constructor(s){this.isMounted=!1,this.node=s}update(){}}class xj extends us{constructor(s){super(s),s.animationState||(s.animationState=bj(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();ec(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:l}=this.node.prevProps||{};s!==l&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let _j=0;class Tj extends us{constructor(){super(...arguments),this.id=_j++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===o)return;const c=this.node.animationState.setActive("exit",!s);l&&!s&&c.then(()=>l(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const Ej={animation:{Feature:xj},exit:{Feature:Tj}},Qn={x:!1,y:!1};function Sb(){return Qn.x||Qn.y}function jj(n){return n==="x"||n==="y"?Qn[n]?null:(Qn[n]=!0,()=>{Qn[n]=!1}):Qn.x||Qn.y?null:(Qn.x=Qn.y=!0,()=>{Qn.x=Qn.y=!1})}const Jf=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function to(n,s,l,o={passive:!0}){return n.addEventListener(s,l,o),()=>n.removeEventListener(s,l)}function ro(n){return{point:{x:n.pageX,y:n.pageY}}}const Cj=n=>s=>Jf(s)&&n(s,ro(s));function Yl(n,s,l,o){return to(n,s,Cj(l),o)}const Rv=(n,s)=>Math.abs(n-s);function Aj(n,s){const l=Rv(n.x,s.x),o=Rv(n.y,s.y);return Math.sqrt(l**2+o**2)}class xb{constructor(s,l,{transformPagePoint:o,contextWindow:c,dragSnapToOrigin:d=!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=jd(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=Aj(b.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:N}=b,{timestamp:D}=Kt;this.history.push({...N,timestamp:D});const{onStart:w,onMove:j}=this.handlers;_||(w&&w(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Ed(_,this.transformPagePoint),ot.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:T,onSessionEnd:N,resumeAnimation:D}=this.handlers;if(this.dragSnapToOrigin&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=jd(b.type==="pointercancel"?this.lastMoveEventInfo:Ed(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,w),N&&N(b,w)},!Jf(s))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=o,this.contextWindow=c||window;const f=ro(s),m=Ed(f,this.transformPagePoint),{point:p}=m,{timestamp:v}=Kt;this.history=[{...p,timestamp:v}];const{onSessionStart:y}=l;y&&y(s,jd(m,this.history)),this.removeListeners=oo(Yl(this.contextWindow,"pointermove",this.handlePointerMove),Yl(this.contextWindow,"pointerup",this.handlePointerUp),Yl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),rs(this.updatePoint)}}function Ed(n,s){return s?{point:s(n.point)}:n}function Mv(n,s){return{x:n.x-s.x,y:n.y-s.y}}function jd({point:n},s){return{point:n,delta:Mv(n,_b(s)),offset:Mv(n,Nj(s)),velocity:wj(s,.1)}}function Nj(n){return n[0]}function _b(n){return n[n.length-1]}function wj(n,s){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const c=_b(n);for(;l>=0&&(o=n[l],!(c.timestamp-o.timestamp>ka(s)));)l--;if(!o)return{x:0,y:0};const d=Ra(c.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const f={x:(c.x-o.x)/d,y:(c.y-o.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}const Tb=1e-4,Dj=1-Tb,kj=1+Tb,Eb=.01,Rj=0-Eb,Mj=0+Eb;function Tn(n){return n.max-n.min}function Oj(n,s,l){return Math.abs(n-s)<=l}function Ov(n,s,l,o=.5){n.origin=o,n.originPoint=pt(s.min,s.max,n.origin),n.scale=Tn(l)/Tn(s),n.translate=pt(l.min,l.max,n.origin)-n.originPoint,(n.scale>=Dj&&n.scale<=kj||isNaN(n.scale))&&(n.scale=1),(n.translate>=Rj&&n.translate<=Mj||isNaN(n.translate))&&(n.translate=0)}function Kl(n,s,l,o){Ov(n.x,s.x,l.x,o?o.originX:void 0),Ov(n.y,s.y,l.y,o?o.originY:void 0)}function Bv(n,s,l){n.min=l.min+s.min,n.max=n.min+Tn(s)}function Bj(n,s,l){Bv(n.x,s.x,l.x),Bv(n.y,s.y,l.y)}function Lv(n,s,l){n.min=s.min-l.min,n.max=n.min+Tn(s)}function Zl(n,s,l){Lv(n.x,s.x,l.x),Lv(n.y,s.y,l.y)}function Lj(n,{min:s,max:l},o){return s!==void 0&&n<s?n=o?pt(s,n,o.min):Math.max(n,s):l!==void 0&&n>l&&(n=o?pt(l,n,o.max):Math.min(n,l)),n}function Uv(n,s,l){return{min:s!==void 0?n.min+s:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function Uj(n,{top:s,left:l,bottom:o,right:c}){return{x:Uv(n.x,l,c),y:Uv(n.y,s,o)}}function zv(n,s){let l=s.min-n.min,o=s.max-n.max;return s.max-s.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function zj(n,s){return{x:zv(n.x,s.x),y:zv(n.y,s.y)}}function Vj(n,s){let l=.5;const o=Tn(n),c=Tn(s);return c>o?l=Oi(s.min,s.max-o,n.min):o>c&&(l=Oi(n.min,n.max-c,s.min)),Oa(0,1,l)}function Hj(n,s){const l={};return s.min!==void 0&&(l.min=s.min-n.min),s.max!==void 0&&(l.max=s.max-n.min),l}const tf=.35;function Ij(n=tf){return n===!1?n=0:n===!0&&(n=tf),{x:Vv(n,"left","right"),y:Vv(n,"top","bottom")}}function Vv(n,s,l){return{min:Hv(n,s),max:Hv(n,l)}}function Hv(n,s){return typeof n=="number"?n:n[s]||0}const Iv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ai=()=>({x:Iv(),y:Iv()}),Gv=()=>({min:0,max:0}),jt=()=>({x:Gv(),y:Gv()});function Hn(n){return[n("x"),n("y")]}function jb({top:n,left:s,right:l,bottom:o}){return{x:{min:s,max:l},y:{min:n,max:o}}}function Gj({x:n,y:s}){return{top:s.min,right:n.max,bottom:s.max,left:n.min}}function Pj(n,s){if(!s)return n;const l=s({x:n.left,y:n.top}),o=s({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Cd(n){return n===void 0||n===1}function nf({scale:n,scaleX:s,scaleY:l}){return!Cd(n)||!Cd(s)||!Cd(l)}function ks(n){return nf(n)||Cb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Cb(n){return Pv(n.x)||Pv(n.y)}function Pv(n){return n&&n!=="0%"}function qr(n,s,l){const o=n-l,c=s*o;return l+c}function qv(n,s,l,o,c){return c!==void 0&&(n=qr(n,c,o)),qr(n,l,o)+s}function af(n,s=0,l=1,o,c){n.min=qv(n.min,s,l,o,c),n.max=qv(n.max,s,l,o,c)}function Ab(n,{x:s,y:l}){af(n.x,s.translate,s.scale,s.originPoint),af(n.y,l.translate,l.scale,l.originPoint)}const Yv=.999999999999,Kv=1.0000000000001;function qj(n,s,l,o=!1){const c=l.length;if(!c)return;s.x=s.y=1;let d,f;for(let m=0;m<c;m++){d=l[m],f=d.projectionDelta;const{visualElement:p}=d.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&wi(n,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),f&&(s.x*=f.x.scale,s.y*=f.y.scale,Ab(n,f)),o&&ks(d.latestValues)&&wi(n,d.latestValues))}s.x<Kv&&s.x>Yv&&(s.x=1),s.y<Kv&&s.y>Yv&&(s.y=1)}function Ni(n,s){n.min=n.min+s,n.max=n.max+s}function Zv(n,s,l,o,c=.5){const d=pt(n.min,n.max,c);af(n,s,l,d,o)}function wi(n,s){Zv(n.x,s.x,s.scaleX,s.scale,s.originX),Zv(n.y,s.y,s.scaleY,s.scale,s.originY)}function Nb(n,s){return jb(Pj(n.getBoundingClientRect(),s))}function Yj(n,s,l){const o=Nb(n,l),{scroll:c}=s;return c&&(Ni(o.x,c.offset.x),Ni(o.y,c.offset.y)),o}const wb=({current:n})=>n?n.ownerDocument.defaultView:null,Kj=new WeakMap;class Zj{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=jt(),this.visualElement=s}start(s,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const c=y=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(ro(y).point)},d=(y,b)=>{const{drag:_,dragPropagation:T,onDragStart:N}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jj(_),!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),Hn(w=>{let j=this.getAxisMotionValue(w).get()||0;if(oa.test(j)){const{projection:H}=this.visualElement;if(H&&H.layout){const M=H.layout.layoutBox[w];M&&(j=Tn(M)*(parseFloat(j)/100))}}this.originPoint[w]=j}),N&&ot.postRender(()=>N(y,b)),Yd(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},f=(y,b)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:N,onDrag:D}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:w}=b;if(T&&this.currentDirection===null){this.currentDirection=Xj(w),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",b.point,w),this.updateAxis("y",b.point,w),this.visualElement.render(),D&&D(y,b)},m=(y,b)=>this.stop(y,b),p=()=>Hn(y=>{var b;return this.getAnimationState(y)==="paused"&&((b=this.getAxisMotionValue(y).animation)===null||b===void 0?void 0:b.play())}),{dragSnapToOrigin:v}=this.getProps();this.panSession=new xb(s,{onSessionStart:c,onStart:d,onMove:f,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,contextWindow:wb(this.visualElement)})}stop(s,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:c}=l;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&ot.postRender(()=>d(s,l))}cancel(){this.isDragging=!1;const{projection:s,animationState:l}=this.visualElement;s&&(s.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(s,l,o){const{drag:c}=this.getProps();if(!o||!Nr(s,c,this.currentDirection))return;const d=this.getAxisMotionValue(s);let f=this.originPoint[s]+o[s];this.constraints&&this.constraints[s]&&(f=Lj(f,this.constraints[s],this.elastic[s])),d.set(f)}resolveConstraints(){var s;const{dragConstraints:l,dragElastic:o}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,d=this.constraints;l&&ji(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&c?this.constraints=Uj(c.layoutBox,l):this.constraints=!1,this.elastic=Ij(o),d!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&Hn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=Hj(c.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:l}=this.getProps();if(!s||!ji(s))return!1;const o=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const d=Yj(o,c.root,this.visualElement.getTransformPagePoint());let f=zj(c.layout.layoutBox,d);if(l){const m=l(Gj(f));this.hasMutatedConstraints=!!m,m&&(f=jb(m))}return f}startAnimation(s){const{drag:l,dragMomentum:o,dragElastic:c,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},v=Hn(y=>{if(!Nr(y,l,this.currentDirection))return;let b=p&&p[y]||{};f&&(b={min:0,max:0});const _=c?200:1e6,T=c?40:1e7,N={type:"inertia",velocity:o?s[y]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...d,...b};return this.startAxisValueAnimation(y,N)});return Promise.all(v).then(m)}startAxisValueAnimation(s,l){const o=this.getAxisMotionValue(s);return Yd(this.visualElement,s),o.start(Ff(s,o,0,l,this.visualElement,!1))}stopAnimation(){Hn(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){Hn(s=>{var l;return(l=this.getAxisMotionValue(s).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(s){var l;return(l=this.getAxisMotionValue(s).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(s){const l=`_drag${s.toUpperCase()}`,o=this.visualElement.getProps(),c=o[l];return c||this.visualElement.getValue(s,(o.initial?o.initial[s]:void 0)||0)}snapToCursor(s){Hn(l=>{const{drag:o}=this.getProps();if(!Nr(l,o,this.currentDirection))return;const{projection:c}=this.visualElement,d=this.getAxisMotionValue(l);if(c&&c.layout){const{min:f,max:m}=c.layout.layoutBox[l];d.set(s[l]-pt(f,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!ji(l)||!o||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};Hn(f=>{const m=this.getAxisMotionValue(f);if(m&&this.constraints!==!1){const p=m.get();c[f]=Vj({min:p,max:p},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Hn(f=>{if(!Nr(f,s,null))return;const m=this.getAxisMotionValue(f),{min:p,max:v}=this.constraints[f];m.set(pt(p,v,c[f]))})}addListeners(){if(!this.visualElement.current)return;Kj.set(this.visualElement,this);const s=this.visualElement.current,l=Yl(s,"pointerdown",p=>{const{drag:v,dragListener:y=!0}=this.getProps();v&&y&&this.start(p)}),o=()=>{const{dragConstraints:p}=this.getProps();ji(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,d=c.addEventListener("measure",o);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),ot.read(o);const f=to(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:v})=>{this.isDragging&&v&&(Hn(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=p[y].translate,b.set(b.get()+p[y].translate))}),this.visualElement.render())}));return()=>{f(),l(),d(),m&&m()}}getProps(){const s=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:c=!1,dragConstraints:d=!1,dragElastic:f=tf,dragMomentum:m=!0}=s;return{...s,drag:l,dragDirectionLock:o,dragPropagation:c,dragConstraints:d,dragElastic:f,dragMomentum:m}}}function Nr(n,s,l){return(s===!0||s===n)&&(l===null||l===n)}function Xj(n,s=10){let l=null;return Math.abs(n.y)>s?l="y":Math.abs(n.x)>s&&(l="x"),l}class $j extends us{constructor(s){super(s),this.removeGroupControls=_n,this.removeListeners=_n,this.controls=new Zj(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_n}unmount(){this.removeGroupControls(),this.removeListeners()}}const Xv=n=>(s,l)=>{n&&ot.postRender(()=>n(s,l))};class Qj extends us{constructor(){super(...arguments),this.removePointerDownListener=_n}onPointerDown(s){this.session=new xb(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wb(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:l,onPan:o,onPanEnd:c}=this.node.getProps();return{onSessionStart:Xv(s),onStart:Xv(l),onMove:o,onEnd:(d,f)=>{delete this.session,c&&ot.postRender(()=>c(d,f))}}}mount(){this.removePointerDownListener=Yl(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $v(n,s){return s.max===s.min?0:n/(s.max-s.min)*100}const Ll={correct:(n,s)=>{if(!s.target)return n;if(typeof n=="string")if(be.test(n))n=parseFloat(n);else return n;const l=$v(n,s.target.x),o=$v(n,s.target.y);return`${l}% ${o}%`}},Fj={correct:(n,{treeScale:s,projectionDelta:l})=>{const o=n,c=cs.parse(n);if(c.length>5)return o;const d=cs.createTransformer(n),f=typeof c[0]!="number"?1:0,m=l.x.scale*s.x,p=l.y.scale*s.y;c[0+f]/=m,c[1+f]/=p;const v=pt(m,p,.5);return typeof c[2+f]=="number"&&(c[2+f]/=v),typeof c[3+f]=="number"&&(c[3+f]/=v),d(c)}};class Jj extends S.Component{componentDidMount(){const{visualElement:s,layoutGroup:l,switchLayoutGroup:o,layoutId:c}=this.props,{projection:d}=s;E2(Wj),d&&(l.group&&l.group.add(d),o&&o.register&&c&&o.register(d),d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,onExitComplete:()=>this.safeToRemove()})),Lr.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:l,visualElement:o,drag:c,isPresent:d}=this.props,f=o.projection;return f&&(f.isPresent=d,c||s.layoutDependency!==l||l===void 0?f.willUpdate():this.safeToRemove(),s.isPresent!==d&&(d?f.promote():f.relegate()||ot.postRender(()=>{const m=f.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),Cf.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:c}=s;c&&(c.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(c),o&&o.deregister&&o.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function Db(n){const[s,l]=m0(),o=S.useContext(bf);return h.jsx(Jj,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(_0),isPresent:s,safeToRemove:l})}const Wj={borderRadius:{...Ll,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ll,borderTopRightRadius:Ll,borderBottomLeftRadius:Ll,borderBottomRightRadius:Ll,boxShadow:Fj};function eC(n,s,l){const o=Xt(n)?n:Wl(n);return o.start(Ff("",o,s,l)),o.animation}function tC(n){return n instanceof SVGElement&&n.tagName!=="svg"}const nC=(n,s)=>n.depth-s.depth;class aC{constructor(){this.children=[],this.isDirty=!1}add(s){Uf(this.children,s),this.isDirty=!0}remove(s){zf(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(nC),this.isDirty=!1,this.children.forEach(s)}}function sC(n,s){const l=ra.now(),o=({timestamp:c})=>{const d=c-l;d>=s&&(rs(o),n(d-s))};return ot.read(o,!0),()=>rs(o)}const kb=["TopLeft","TopRight","BottomLeft","BottomRight"],iC=kb.length,Qv=n=>typeof n=="string"?parseFloat(n):n,Fv=n=>typeof n=="number"||be.test(n);function lC(n,s,l,o,c,d){c?(n.opacity=pt(0,l.opacity!==void 0?l.opacity:1,oC(o)),n.opacityExit=pt(s.opacity!==void 0?s.opacity:1,0,rC(o))):d&&(n.opacity=pt(s.opacity!==void 0?s.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let f=0;f<iC;f++){const m=`border${kb[f]}Radius`;let p=Jv(s,m),v=Jv(l,m);if(p===void 0&&v===void 0)continue;p||(p=0),v||(v=0),p===0||v===0||Fv(p)===Fv(v)?(n[m]=Math.max(pt(Qv(p),Qv(v),o),0),(oa.test(v)||oa.test(p))&&(n[m]+="%")):n[m]=v}(s.rotate||l.rotate)&&(n.rotate=pt(s.rotate||0,l.rotate||0,o))}function Jv(n,s){return n[s]!==void 0?n[s]:n.borderRadius}const oC=Rb(0,.5,X0),rC=Rb(.5,.95,_n);function Rb(n,s,l){return o=>o<n?0:o>s?1:l(Oi(n,s,o))}function Wv(n,s){n.min=s.min,n.max=s.max}function Vn(n,s){Wv(n.x,s.x),Wv(n.y,s.y)}function ey(n,s){n.translate=s.translate,n.scale=s.scale,n.originPoint=s.originPoint,n.origin=s.origin}function ty(n,s,l,o,c){return n-=s,n=qr(n,1/l,o),c!==void 0&&(n=qr(n,1/c,o)),n}function cC(n,s=0,l=1,o=.5,c,d=n,f=n){if(oa.test(s)&&(s=parseFloat(s),s=pt(f.min,f.max,s/100)-f.min),typeof s!="number")return;let m=pt(d.min,d.max,o);n===d&&(m-=s),n.min=ty(n.min,s,l,m,c),n.max=ty(n.max,s,l,m,c)}function ny(n,s,[l,o,c],d,f){cC(n,s[l],s[o],s[c],s.scale,d,f)}const uC=["x","scaleX","originX"],dC=["y","scaleY","originY"];function ay(n,s,l,o){ny(n.x,s,uC,l?l.x:void 0,o?o.x:void 0),ny(n.y,s,dC,l?l.y:void 0,o?o.y:void 0)}function sy(n){return n.translate===0&&n.scale===1}function Mb(n){return sy(n.x)&&sy(n.y)}function iy(n,s){return n.min===s.min&&n.max===s.max}function fC(n,s){return iy(n.x,s.x)&&iy(n.y,s.y)}function ly(n,s){return Math.round(n.min)===Math.round(s.min)&&Math.round(n.max)===Math.round(s.max)}function Ob(n,s){return ly(n.x,s.x)&&ly(n.y,s.y)}function oy(n){return Tn(n.x)/Tn(n.y)}function ry(n,s){return n.translate===s.translate&&n.scale===s.scale&&n.originPoint===s.originPoint}class hC{constructor(){this.members=[]}add(s){Uf(this.members,s),s.scheduleRender()}remove(s){if(zf(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(s){const l=this.members.findIndex(c=>s===c);if(l===0)return!1;let o;for(let c=l;c>=0;c--){const d=this.members[c];if(d.isPresent!==!1){o=d;break}}return o?(this.promote(o),!0):!1}promote(s,l){const o=this.lead;if(s!==o&&(this.prevLead=o,this.lead=s,s.show(),o)){o.instance&&o.scheduleRender(),s.scheduleRender(),s.resumeFrom=o,l&&(s.resumeFrom.preserveOpacity=!0),o.snapshot&&(s.snapshot=o.snapshot,s.snapshot.latestValues=o.animationValues||o.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:c}=s.options;c===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:l,resumingFrom:o}=s;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function mC(n,s,l){let o="";const c=n.x.translate/s.x,d=n.y.translate/s.y,f=(l==null?void 0:l.z)||0;if((c||d||f)&&(o=`translate3d(${c}px, ${d}px, ${f}px) `),(s.x!==1||s.y!==1)&&(o+=`scale(${1/s.x}, ${1/s.y}) `),l){const{transformPerspective:v,rotate:y,rotateX:b,rotateY:_,skewX:T,skewY:N}=l;v&&(o=`perspective(${v}px) ${o}`),y&&(o+=`rotate(${y}deg) `),b&&(o+=`rotateX(${b}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),N&&(o+=`skewY(${N}deg) `)}const m=n.x.scale*s.x,p=n.y.scale*s.y;return(m!==1||p!==1)&&(o+=`scale(${m}, ${p})`),o||"none"}const Rs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Hl=typeof window<"u"&&window.MotionDebug!==void 0,Ad=["","X","Y","Z"],pC={visibility:"hidden"},cy=1e3;let gC=0;function Nd(n,s,l,o){const{latestValues:c}=s;c[n]&&(l[n]=c[n],s.setStaticValue(n,0),o&&(o[n]=0))}function Bb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:s}=n.options;if(!s)return;const l=z0(s);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:c,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",ot,!(c||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&Bb(o)}function Lb({attachResizeListener:n,defaultParent:s,measureScroll:l,checkIsScrollRoot:o,resetTransform:c}){return class{constructor(f={},m=s==null?void 0:s()){this.id=gC++,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,Hl&&(Rs.totalNodes=Rs.resolvedTargetDeltas=Rs.recalculatedProjection=0),this.nodes.forEach(bC),this.nodes.forEach(EC),this.nodes.forEach(jC),this.nodes.forEach(SC),Hl&&window.MotionDebug.record(Rs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new aC)}addEventListener(f,m){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Vf),this.eventHandlers.get(f).add(m)}notifyListeners(f,...m){const p=this.eventHandlers.get(f);p&&p.notify(...m)}hasListeners(f){return this.eventHandlers.has(f)}mount(f,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=tC(f),this.instance=f;const{layoutId:p,layout:v,visualElement:y}=this.options;if(y&&!y.current&&y.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(v||p)&&(this.isLayoutDirty=!0),n){let b;const _=()=>this.root.updateBlockedByResize=!1;n(f,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=sC(_,250),Lr.hasAnimatedSinceResize&&(Lr.hasAnimatedSinceResize=!1,this.nodes.forEach(dy))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&y&&(p||v)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:N})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const D=this.options.transition||y.getDefaultTransition()||DC,{onLayoutAnimationStart:w,onLayoutAnimationComplete:j}=y.getProps(),H=!this.targetLayout||!Ob(this.targetLayout,N)||T,M=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||M||_&&(H||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,M);const $={...Lf(D,"layout"),onPlay:w,onComplete:j};(y.shouldReduceMotion||this.options.layoutRoot)&&($.delay=0,$.type=!1),this.startAnimation($)}else _||dy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=N})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,rs(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(CC),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const b=this.path[y];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 v=this.getTransformTemplate();this.prevTransformTemplateValue=v?v(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(uy);return}this.isUpdating||this.nodes.forEach(_C),this.isUpdating=!1,this.nodes.forEach(TC),this.nodes.forEach(vC),this.nodes.forEach(yC),this.clearAllSnapshots();const m=ra.now();Kt.delta=Oa(0,1e3/60,m-Kt.timestamp),Kt.timestamp=m,Kt.isProcessing=!0,bd.update.process(Kt),bd.preRender.process(Kt),bd.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xC),this.sharedNodes.forEach(AC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ot.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ot.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 f=this.layout;this.layout=this.measure(!1),this.layoutCorrected=jt(),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,f?f.layoutBox:void 0)}updateScroll(f="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(m=!1),m){const p=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:p,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!Mb(this.projectionDelta),p=this.getTransformTemplate(),v=p?p(this.latestValues,""):void 0,y=v!==this.prevTransformTemplateValue;f&&(m||ks(this.latestValues)||y)&&(c(this.instance,v),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return f&&(p=this.removeTransform(p)),kC(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:m}=this.options;if(!m)return jt();const p=m.measureViewportBox();if(!(((f=this.scroll)===null||f===void 0?void 0:f.wasRoot)||this.path.some(RC))){const{scroll:y}=this.root;y&&(Ni(p.x,y.offset.x),Ni(p.y,y.offset.y))}return p}removeElementScroll(f){var m;const p=jt();if(Vn(p,f),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let v=0;v<this.path.length;v++){const y=this.path[v],{scroll:b,options:_}=y;y!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&Vn(p,f),Ni(p.x,b.offset.x),Ni(p.y,b.offset.y))}return p}applyTransform(f,m=!1){const p=jt();Vn(p,f);for(let v=0;v<this.path.length;v++){const y=this.path[v];!m&&y.options.layoutScroll&&y.scroll&&y!==y.root&&wi(p,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),ks(y.latestValues)&&wi(p,y.latestValues)}return ks(this.latestValues)&&wi(p,this.latestValues),p}removeTransform(f){const m=jt();Vn(m,f);for(let p=0;p<this.path.length;p++){const v=this.path[p];if(!v.instance||!ks(v.latestValues))continue;nf(v.latestValues)&&v.updateSnapshot();const y=jt(),b=v.measurePageBox();Vn(y,b),ay(m,v.latestValues,v.snapshot?v.snapshot.layoutBox:void 0,y)}return ks(this.latestValues)&&ay(m,this.latestValues),m}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!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 v=!!this.resumingFrom||this!==p;if(!(f||v&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!(!this.layout||!(b||_))){if(this.resolvedRelativeTargetAt=Kt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=jt(),this.relativeTargetOrigin=jt(),Zl(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=jt(),this.targetWithTransforms=jt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vn(this.target,this.layout.layoutBox),Ab(this.target,this.targetDelta)):Vn(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=jt(),this.relativeTargetOrigin=jt(),Zl(this.relativeTargetOrigin,this.target,T.target),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Hl&&Rs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||nf(this.parent.latestValues)||Cb(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 f;const m=this.getLead(),p=!!this.resumingFrom||this!==m;let v=!0;if((this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty)&&(v=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===Kt.timestamp&&(v=!1),v)return;const{layout:y,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||!(y||b))return;Vn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;qj(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=jt());const{target:N}=m;if(!N){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ey(this.prevProjectionDelta.x,this.projectionDelta.x),ey(this.prevProjectionDelta.y,this.projectionDelta.y)),Kl(this.projectionDelta,this.layoutCorrected,N,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!ry(this.projectionDelta.x,this.prevProjectionDelta.x)||!ry(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",N)),Hl&&Rs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ai(),this.projectionDelta=Ai(),this.projectionDeltaWithTransform=Ai()}setAnimationOrigin(f,m=!1){const p=this.snapshot,v=p?p.latestValues:{},y={...this.latestValues},b=Ai();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const _=jt(),T=p?p.source:void 0,N=this.layout?this.layout.source:void 0,D=T!==N,w=this.getStack(),j=!w||w.members.length<=1,H=!!(D&&!j&&this.options.crossfade===!0&&!this.path.some(wC));this.animationProgress=0;let M;this.mixTargetDelta=$=>{const I=$/1e3;fy(b.x,f.x,I),fy(b.y,f.y,I),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),NC(this.relativeTarget,this.relativeTargetOrigin,_,I),M&&fC(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=jt()),Vn(M,this.relativeTarget)),D&&(this.animationValues=y,lC(y,v,this.latestValues,I,H,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(rs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ot.update(()=>{Lr.hasAnimatedSinceResize=!0,this.currentAnimation=eC(0,cy,{...f,onUpdate:m=>{this.mixTargetDelta(m),f.onUpdate&&f.onUpdate(m)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:p,layout:v,latestValues:y}=f;if(!(!m||!p||!v)){if(this!==f&&this.layout&&v&&Ub(this.options.animationType,this.layout.layoutBox,v.layoutBox)){p=this.target||jt();const b=Tn(this.layout.layoutBox.x);p.x.min=f.target.x.min,p.x.max=p.x.min+b;const _=Tn(this.layout.layoutBox.y);p.y.min=f.target.y.min,p.y.max=p.y.min+_}Vn(m,p),wi(m,y),Kl(this.projectionDeltaWithTransform,this.layoutCorrected,m,y)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new hC),this.sharedNodes.get(f).add(m);const v=m.options.initialPromotionConfig;m.promote({transition:v?v.transition:void 0,preserveFollowOpacity:v&&v.shouldPreserveFollowOpacity?v.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:m}=this.options;return m?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:m}=this.options;return m?(f=this.getStack())===null||f===void 0?void 0:f.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:m,preserveFollowOpacity:p}={}){const v=this.getStack();v&&v.promote(this,p),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:p}=f;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const v={};p.z&&Nd("z",f,v,this.animationValues);for(let y=0;y<Ad.length;y++)Nd(`rotate${Ad[y]}`,f,v,this.animationValues),Nd(`skew${Ad[y]}`,f,v,this.animationValues);f.render();for(const y in v)f.setStaticValue(y,v[y]),this.animationValues&&(this.animationValues[y]=v[y]);f.scheduleRender()}getProjectionStyles(f){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return pC;const v={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Or(f==null?void 0:f.pointerEvents)||"",v.transform=y?y(this.latestValues,""):"none",v;const b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){const D={};return this.options.layoutId&&(D.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,D.pointerEvents=Or(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!ks(this.latestValues)&&(D.transform=y?y({},""):"none",this.hasProjected=!1),D}const _=b.animationValues||b.latestValues;this.applyTransformsToTarget(),v.transform=mC(this.projectionDeltaWithTransform,this.treeScale,_),y&&(v.transform=y(_,v.transform));const{x:T,y:N}=this.projectionDelta;v.transformOrigin=`${T.origin*100}% ${N.origin*100}% 0`,b.animationValues?v.opacity=b===this?(p=(m=_.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:v.opacity=b===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const D in Vr){if(_[D]===void 0)continue;const{correct:w,applyTo:j}=Vr[D],H=v.transform==="none"?_[D]:w(_[D],b);if(j){const M=j.length;for(let $=0;$<M;$++)v[j[$]]=H}else v[D]=H}return this.options.layoutId&&(v.pointerEvents=b===this?Or(f==null?void 0:f.pointerEvents)||"":"none"),v}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var m;return(m=f.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(uy),this.root.sharedNodes.clear()}}}function vC(n){n.updateLayout()}function yC(n){var s;const l=((s=n.resumeFrom)===null||s===void 0?void 0:s.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&l&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:c}=n.layout,{animationType:d}=n.options,f=l.source!==n.layout.source;d==="size"?Hn(b=>{const _=f?l.measuredBox[b]:l.layoutBox[b],T=Tn(_);_.min=o[b].min,_.max=_.min+T}):Ub(d,l.layoutBox,o)&&Hn(b=>{const _=f?l.measuredBox[b]:l.layoutBox[b],T=Tn(o[b]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+T)});const m=Ai();Kl(m,o,l.layoutBox);const p=Ai();f?Kl(p,n.applyTransform(c,!0),l.measuredBox):Kl(p,o,l.layoutBox);const v=!Mb(m);let y=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:T}=b;if(_&&T){const N=jt();Zl(N,l.layoutBox,_.layoutBox);const D=jt();Zl(D,o,T.layoutBox),Ob(N,D)||(y=!0),b.options.layoutRoot&&(n.relativeTarget=D,n.relativeTargetOrigin=N,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:p,layoutDelta:m,hasLayoutChanged:v,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function bC(n){Hl&&Rs.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 SC(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function xC(n){n.clearSnapshot()}function uy(n){n.clearMeasurements()}function _C(n){n.isLayoutDirty=!1}function TC(n){const{visualElement:s}=n.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),n.resetTransform()}function dy(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function EC(n){n.resolveTargetDelta()}function jC(n){n.calcProjection()}function CC(n){n.resetSkewAndRotation()}function AC(n){n.removeLeadSnapshot()}function fy(n,s,l){n.translate=pt(s.translate,0,l),n.scale=pt(s.scale,1,l),n.origin=s.origin,n.originPoint=s.originPoint}function hy(n,s,l,o){n.min=pt(s.min,l.min,o),n.max=pt(s.max,l.max,o)}function NC(n,s,l,o){hy(n.x,s.x,l.x,o),hy(n.y,s.y,l.y,o)}function wC(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const DC={duration:.45,ease:[.4,0,.1,1]},my=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),py=my("applewebkit/")&&!my("chrome/")?Math.round:_n;function gy(n){n.min=py(n.min),n.max=py(n.max)}function kC(n){gy(n.x),gy(n.y)}function Ub(n,s,l){return n==="position"||n==="preserve-aspect"&&!Oj(oy(s),oy(l),.2)}function RC(n){var s;return n!==n.root&&((s=n.scroll)===null||s===void 0?void 0:s.wasRoot)}const MC=Lb({attachResizeListener:(n,s)=>to(n,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wd={current:void 0},zb=Lb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!wd.current){const n=new MC({});n.mount(window),n.setOptions({layoutScroll:!0}),wd.current=n}return wd.current},resetTransform:(n,s)=>{n.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),OC={pan:{Feature:Qj},drag:{Feature:$j,ProjectionNode:zb,MeasureLayout:Db}};function BC(n,s,l){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let c=document;const d=(o=void 0)!==null&&o!==void 0?o:c.querySelectorAll(n);return d?Array.from(d):[]}return Array.from(n)}function Vb(n,s){const l=BC(n),o=new AbortController,c={passive:!0,...s,signal:o.signal};return[l,c,()=>o.abort()]}function vy(n){return s=>{s.pointerType==="touch"||Sb()||n(s)}}function LC(n,s,l={}){const[o,c,d]=Vb(n,l),f=vy(m=>{const{target:p}=m,v=s(m);if(typeof v!="function"||!p)return;const y=vy(b=>{v(b),p.removeEventListener("pointerleave",y)});p.addEventListener("pointerleave",y,c)});return o.forEach(m=>{m.addEventListener("pointerenter",f,c)}),d}function yy(n,s,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const c="onHover"+l,d=o[c];d&&ot.postRender(()=>d(s,ro(s)))}class UC extends us{mount(){const{current:s}=this.node;s&&(this.unmount=LC(s,l=>(yy(this.node,l,"Start"),o=>yy(this.node,o,"End"))))}unmount(){}}class zC extends us{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!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=oo(to(this.node.current,"focus",()=>this.onFocus()),to(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Hb=(n,s)=>s?n===s?!0:Hb(n,s.parentElement):!1,VC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function HC(n){return VC.has(n.tagName)||n.tabIndex!==-1}const Il=new WeakSet;function by(n){return s=>{s.key==="Enter"&&n(s)}}function Dd(n,s){n.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const IC=(n,s)=>{const l=n.currentTarget;if(!l)return;const o=by(()=>{if(Il.has(l))return;Dd(l,"down");const c=by(()=>{Dd(l,"up")}),d=()=>Dd(l,"cancel");l.addEventListener("keyup",c,s),l.addEventListener("blur",d,s)});l.addEventListener("keydown",o,s),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),s)};function Sy(n){return Jf(n)&&!Sb()}function GC(n,s,l={}){const[o,c,d]=Vb(n,l),f=m=>{const p=m.currentTarget;if(!Sy(m)||Il.has(p))return;Il.add(p);const v=s(m),y=(T,N)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",_),!(!Sy(T)||!Il.has(p))&&(Il.delete(p),typeof v=="function"&&v(T,{success:N}))},b=T=>{y(T,l.useGlobalTarget||Hb(p,T.target))},_=T=>{y(T,!1)};window.addEventListener("pointerup",b,c),window.addEventListener("pointercancel",_,c)};return o.forEach(m=>{!HC(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(l.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),m.addEventListener("focus",v=>IC(v,c),c)}),d}function xy(n,s,l){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const c="onTap"+(l==="End"?"":l),d=o[c];d&&ot.postRender(()=>d(s,ro(s)))}class PC extends us{mount(){const{current:s}=this.node;s&&(this.unmount=GC(s,l=>(xy(this.node,l,"Start"),(o,{success:c})=>xy(this.node,o,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sf=new WeakMap,kd=new WeakMap,qC=n=>{const s=sf.get(n.target);s&&s(n)},YC=n=>{n.forEach(qC)};function KC({root:n,...s}){const l=n||document;kd.has(l)||kd.set(l,{});const o=kd.get(l),c=JSON.stringify(s);return o[c]||(o[c]=new IntersectionObserver(YC,{root:n,...s})),o[c]}function ZC(n,s,l){const o=KC(s);return sf.set(n,l),o.observe(n),()=>{sf.delete(n),o.unobserve(n)}}const XC={some:0,all:1};class $C extends us{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:l,margin:o,amount:c="some",once:d}=s,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof c=="number"?c:XC[c]},m=p=>{const{isIntersecting:v}=p;if(this.isInView===v||(this.isInView=v,d&&!v&&this.hasEnteredView))return;v&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",v);const{onViewportEnter:y,onViewportLeave:b}=this.node.getProps(),_=v?y:b;_&&_(p)};return ZC(this.node.current,f,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:l}=this.node;["amount","margin","root"].some(QC(s,l))&&this.startObserver()}unmount(){}}function QC({viewport:n={}},{viewport:s={}}={}){return l=>n[l]!==s[l]}const FC={inView:{Feature:$C},tap:{Feature:PC},focus:{Feature:zC},hover:{Feature:UC}},JC={layout:{ProjectionNode:zb,MeasureLayout:Db}},lf={current:null},Ib={current:!1};function WC(){if(Ib.current=!0,!!_f)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),s=()=>lf.current=n.matches;n.addListener(s),s()}else lf.current=!1}const eA=[...rb,Zt,cs],tA=n=>eA.find(ob(n)),_y=new WeakMap;function nA(n,s,l){for(const o in s){const c=s[o],d=l[o];if(Xt(c))n.addValue(o,c);else if(Xt(d))n.addValue(o,Wl(c,{owner:n}));else if(d!==c)if(n.hasValue(o)){const f=n.getValue(o);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=n.getStaticValue(o);n.addValue(o,Wl(f!==void 0?f:c,{owner:n}))}}for(const o in l)s[o]===void 0&&n.removeValue(o);return s}const Ty=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class aA{scrapeMotionValuesFromProps(s,l,o){return{}}constructor({parent:s,props:l,presenceContext:o,reducedMotionConfig:c,blockInitialAnimation:d,visualState:f},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Xf,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=ra.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,ot.render(this.render,!1,!0))};const{latestValues:p,renderState:v,onUpdate:y}=f;this.onUpdate=y,this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=v,this.parent=s,this.props=l,this.presenceContext=o,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.options=m,this.blockInitialAnimation=!!d,this.isControllingVariants=tc(l),this.isVariantNode=S0(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in _){const N=_[T];p[T]!==void 0&&Xt(N)&&N.set(p[T],!1)}}mount(s){this.current=s,_y.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),Ib.current||WC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){_y.delete(this.current),this.projection&&this.projection.unmount(),rs(this.notifyUpdate),rs(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const l=this.features[s];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(s,l){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const o=Us.has(s),c=l.on("change",m=>{this.latestValues[s]=m,this.props.onUpdate&&ot.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),d=l.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,s,l)),this.valueSubscriptions.set(s,()=>{c(),d(),f&&f(),l.owner&&l.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in Mi){const l=Mi[s];if(!l)continue;const{isEnabled:o,Feature:c}=l;if(!this.features[s]&&c&&o(this.props)&&(this.features[s]=new c(this)),this.features[s]){const d=this.features[s];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):jt()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,l){this.latestValues[s]=l}update(s,l){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<Ty.length;o++){const c=Ty[o];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const d="on"+c,f=s[d];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=nA(this,this.scrapeMotionValuesFromProps(s,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]: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(s){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(s),()=>l.variantChildren.delete(s)}addValue(s,l){const o=this.values.get(s);l!==o&&(o&&this.removeValue(s),this.bindToMotionValue(s,l),this.values.set(s,l),this.latestValues[s]=l.get())}removeValue(s){this.values.delete(s);const l=this.valueSubscriptions.get(s);l&&(l(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,l){if(this.props.values&&this.props.values[s])return this.props.values[s];let o=this.values.get(s);return o===void 0&&l!==void 0&&(o=Wl(l===null?void 0:l,{owner:this}),this.addValue(s,o)),o}readValue(s,l){var o;let c=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(o=this.getBaseTargetFromProps(this.props,s))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,s,this.options);return c!=null&&(typeof c=="string"&&(ib(c)||Q0(c))?c=parseFloat(c):!tA(c)&&cs.test(l)&&(c=nb(s,l)),this.setBaseTarget(s,Xt(c)?c.get():c)),Xt(c)?c.get():c}setBaseTarget(s,l){this.baseTarget[s]=l}getBaseTarget(s){var l;const{initial:o}=this.props;let c;if(typeof o=="string"||typeof o=="object"){const f=Nf(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);f&&(c=f[s])}if(o&&c!==void 0)return c;const d=this.getBaseTargetFromProps(this.props,s);return d!==void 0&&!Xt(d)?d:this.initialValues[s]!==void 0&&c===void 0?void 0:this.baseTarget[s]}on(s,l){return this.events[s]||(this.events[s]=new Vf),this.events[s].add(l)}notify(s,...l){this.events[s]&&this.events[s].notify(...l)}}class Gb extends aA{constructor(){super(...arguments),this.KeyframeResolver=cb}sortInstanceNodePosition(s,l){return s.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(s,l){return s.style?s.style[l]:void 0}removeValueFromRenderState(s,{vars:l,style:o}){delete l[s],delete o[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;Xt(s)&&(this.childSubscription=s.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function sA(n){return window.getComputedStyle(n)}class iA extends Gb{constructor(){super(...arguments),this.type="html",this.renderInstance=w0}readValueFromInstance(s,l){if(Us.has(l)){const o=Zf(l);return o&&o.default||0}else{const o=sA(s),c=(C0(l)?o.getPropertyValue(l):o[l])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:l}){return Nb(s,l)}build(s,l,o){kf(s,l,o.transformTemplate)}scrapeMotionValuesFromProps(s,l,o){return Bf(s,l,o)}}class lA extends Gb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=jt}getBaseTargetFromProps(s,l){return s[l]}readValueFromInstance(s,l){if(Us.has(l)){const o=Zf(l);return o&&o.default||0}return l=D0.has(l)?l:jf(l),s.getAttribute(l)}scrapeMotionValuesFromProps(s,l,o){return M0(s,l,o)}build(s,l,o){Rf(s,l,this.isSVGTag,o.transformTemplate)}renderInstance(s,l,o,c){k0(s,l,o,c)}mount(s){this.isSVGTag=Of(s.tagName),super.mount(s)}}const oA=(n,s)=>Af(n)?new lA(s):new iA(s,{allowProjection:n!==S.Fragment}),rA=M2({...Ej,...FC,...OC,...JC},oA),ca=XT(rA);var St;(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"})(St||(St={}));var Ot;(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"})(Ot||(Ot={}));var ls;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(ls||(ls={}));var os;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(os||(os={}));const cA=8;Object.assign(Object.create(null),{"":St.UNSPECIFIED,text:St.TEXT,tool_use:St.TOOL_USE,tool_result:St.TOOL_RESULT,error:St.ERROR,status:St.STATUS,system:St.SYSTEM,finding:St.FINDING,subtask_create:St.SUBTASK_CREATE,user_input:St.USER_INPUT});St.UNSPECIFIED+"",St.TEXT+"",St.TOOL_USE+"",St.TOOL_RESULT+"",St.ERROR+"",St.STATUS+"",St.SYSTEM+"",St.FINDING+"",St.SUBTASK_CREATE+"",St.USER_INPUT+"";Object.assign(Object.create(null),{"":Ot.UNSPECIFIED,not_started:Ot.NOT_STARTED,working:Ot.WORKING,paused:Ot.PAUSED,complete:Ot.COMPLETE,failed:Ot.FAILED,pending:Ot.NOT_STARTED,assigned:Ot.NOT_STARTED,in_progress:Ot.WORKING,waiting_input:Ot.PAUSED,review:Ot.PAUSED,done:Ot.COMPLETE});Ot.UNSPECIFIED+"",Ot.NOT_STARTED+"",Ot.WORKING+"",Ot.PAUSED+"",Ot.COMPLETE+"",Ot.FAILED+"";Object.assign(Object.create(null),{"":ls.UNSPECIFIED,active:ls.ACTIVE,archived:ls.ARCHIVED});ls.UNSPECIFIED+"",ls.ACTIVE+"",ls.ARCHIVED+"";Object.assign(Object.create(null),{"":os.UNSPECIFIED,open:os.OPEN,closed:os.CLOSED});os.UNSPECIFIED+"",os.OPEN+"",os.CLOSED+"";const uA="_breadcrumbs_17or2_1",dA="_list_17or2_11",fA="_item_17or2_21",hA="_separator_17or2_28",mA="_link_17or2_34",pA="_current_17or2_57",Ti={breadcrumbs:uA,list:dA,item:fA,separator:hA,link:mA,current:pA},gA="›";function Ii({segments:n}){return h.jsx("nav",{className:Ti.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:Ti.list,children:n.map((s,l)=>{const o=l===n.length-1;return h.jsxs("li",{className:Ti.item,children:[l>0&&h.jsx("span",{className:Ti.separator,"aria-hidden":"true",children:gA}),s.url&&!o?h.jsx(vf,{className:Ti.link,to:s.url,title:s.label,children:s.label}):h.jsx("span",{className:Ti.current,"aria-current":"page",title:s.label,children:s.label})]},l)})})})}function of(){of=function(c,d){return new l(c,void 0,d)};var n=RegExp.prototype,s=new WeakMap;function l(c,d,f){var m=new RegExp(c,d);return s.set(m,f||s.get(c)),Yr(m,l.prototype)}function o(c,d){var f=s.get(d);return Object.keys(f).reduce(function(m,p){var v=f[p];if(typeof v=="number")m[p]=c[v];else{for(var y=0;c[v[y]]===void 0&&y+1<v.length;)y++;m[p]=c[v[y]]}return m},Object.create(null))}return(function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),d&&Yr(c,d)})(l,RegExp),l.prototype.exec=function(c){var d=n.exec.call(this,c);if(d){d.groups=o(d,this);var f=d.indices;f&&(f.groups=o(f,this))}return d},l.prototype[Symbol.replace]=function(c,d){if(typeof d=="string"){var f=s.get(this);return n[Symbol.replace].call(this,c,d.replace(/\$<([^>]+)>/g,function(p,v){var y=f[v];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof d=="function"){var m=this;return n[Symbol.replace].call(this,c,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(o(p,m)),d.apply(this,p)})}return n[Symbol.replace].call(this,c,d)},of.apply(this,arguments)}function Yr(n,s){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},Yr(n,s)}function Ey(n,s){(s==null||s>n.length)&&(s=n.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=n[l];return o}function Rd(n,s){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(c,d){if(c){if(typeof c=="string")return Ey(c,d);var f=Object.prototype.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?Ey(c,d):void 0}})(n))||s){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 vA=(function(n){return function(s){return s===void 0&&(s={}),(function(o,c){if(c&&!o.registered(c))throw new Error('The default language "'+c+'" is not registered with refractor.')})(n,s.defaultLanguage),function(o){ox(o,"element",l)};function l(o,c,d){var f,m;if(d&&d.tagName==="pre"&&o.tagName==="code"){var p=(o==null||(f=o.data)==null?void 0:f.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 v,y,b=(function(I){for(var J,te=Rd(I.properties.className);!(J=te()).done;){var Y=J.value;if(Y.slice(0,9)==="language-")return Y.slice(9).toLowerCase()}return null})(o);if(!b&&s.defaultLanguage&&o.properties.className.push("language-"+(b=s.defaultLanguage)),o.properties.className.push("code-highlight"),b)try{var _,T;T=(_=b)!=null&&_.includes("diff-")?b.split("-")[1]:b,v=n.highlight(Tr(o),T),d.properties.className=(d.properties.className||[]).concat("language-"+T)}catch(I){if(!s.ignoreMissing||!/Unknown language/.test(I.message))throw I;v=o}else v=o;v.children=(y=1,function I(J){return J.reduce(function(te,Y){if(Y.type==="text"){var X=Y.value,ue=(X.match(/\n/g)||"").length;if(ue===0)Y.position={start:{line:y,column:1},end:{line:y,column:1}},te.push(Y);else for(var R,pe=X.split(`
88
+ `),ee=Rd(pe.entries());!(R=ee()).done;){var ge=R.value,q=ge[0],V=ge[1];te.push({type:"text",value:q===pe.length-1?V:V+`
89
+ `,position:{start:{line:y+q,column:1},end:{line:y+q,column:1}}})}return y+=ue,te}if(Object.prototype.hasOwnProperty.call(Y,"children")){var Q=y;return Y.children=I(Y.children),te.push(Y),Y.position={start:{line:Q,column:1},end:{line:y,column:1}},te}return te.push(Y),te},[])})(v.children),v.position=v.children.length>0?{start:{line:v.children[0].position.start.line,column:0},end:{line:v.children[v.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var N,D=(function(I){var J=/{([\d,-]+)}/,te=I.split(",").map(function(ue){return ue.trim()}).join();if(J.test(te)){var Y=J.exec(te)[1],X=cx(Y);return function(ue){return X.includes(ue+1)}}return function(){return!1}})(p),w=(function(I){var J=of(/showLineNumbers=(\d+)/i,{lines:1});if(J.test(I)){var te=J.exec(I);return Number(te.groups.lines)}return 1})(p),j=(function(I){for(var J=new Array(I),te=0;te<I;te++)J[te]={type:"element",tagName:"span",properties:{className:[]},children:[]};return J})(v.position.end.line),H=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],M=function(){var I,J,te=N.value,Y=te[0],X=te[1];X.properties.className=["code-line"];var ue=ux(v,function(R){return R.position.start.line<=Y+1&&R.position.end.line>=Y+1});X.children=ue.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||s.showLineNumbers===!0||typeof s.showLineNumbers=="object"&&s.showLineNumbers.includes(b))&&!H.some(function(R){return p.toLowerCase().includes(R)})&&(X.properties.line=[(Y+w).toString()],X.properties.className.push("line-number")),D(Y)&&X.properties.className.push("highlight-line"),(b==="diff"||(I=b)!=null&&I.includes("diff-"))&&Tr(X).substring(0,1)==="-"?X.properties.className.push("deleted"):(b==="diff"||(J=b)!=null&&J.includes("diff-"))&&Tr(X).substring(0,1)==="+"&&X.properties.className.push("inserted")},$=Rd(j.entries());!(N=$()).done;)M();j.length>0&&Tr(j[j.length-1]).trim()===""&&j.pop(),o.children=j}}}})(rx);const yA="_systemEvent_2kh3g_1",bA="_systemTimestamp_2kh3g_9",SA="_textEvent_2kh3g_13",xA="_toolUseEvent_2kh3g_100",_A="_toolUseHeader_2kh3g_116",TA="_toolUsePrefix_2kh3g_123",EA="_toolUseName_2kh3g_128",jA="_toolUseArgs_2kh3g_133",CA="_toolResultEvent_2kh3g_144",AA="_toolResultHeader_2kh3g_150",NA="_toolResultIndicatorOk_2kh3g_174",wA="_toolResultIndicatorError_2kh3g_181",DA="_toolResultLabel_2kh3g_188",kA="_toolResultToggle_2kh3g_192",RA="_toolResultCommand_2kh3g_198",MA="_toolResultEllipsis_2kh3g_208",OA="_toolResultPre_2kh3g_212",BA="_errorEvent_2kh3g_227",LA="_statusEvent_2kh3g_236",UA="_userInputEvent_2kh3g_246",zA="_userInputContent_2kh3g_253",VA="_defaultEvent_2kh3g_265",mt={systemEvent:yA,systemTimestamp:bA,textEvent:SA,toolUseEvent:xA,toolUseHeader:_A,toolUsePrefix:TA,toolUseName:EA,toolUseArgs:jA,toolResultEvent:CA,toolResultHeader:AA,toolResultIndicatorOk:NA,toolResultIndicatorError:wA,toolResultLabel:DA,toolResultToggle:kA,toolResultCommand:RA,toolResultEllipsis:MA,toolResultPre:OA,errorEvent:BA,statusEvent:LA,userInputEvent:UA,userInputContent:zA,defaultEvent:VA};function HA({time:n,content:s}){return h.jsxs("div",{className:mt.systemEvent,children:[h.jsxs("span",{className:mt.systemTimestamp,children:["[",n,"]"]})," ",s]})}function IA({content:n}){return h.jsx("div",{className:mt.textEvent,children:h.jsx(rf,{remarkPlugins:[cf],rehypePlugins:[vA],children:n})})}function GA({content:n}){let s="",l=n;try{const o=JSON.parse(n);s=o.tool||"",l=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:mt.toolUseEvent,children:[h.jsxs("div",{className:mt.toolUseHeader,children:[h.jsx("span",{className:mt.toolUsePrefix,children:">"}),s?h.jsx("span",{className:mt.toolUseName,children:s}):null]}),h.jsx("pre",{className:mt.toolUseArgs,children:l})]})}const jy=5;function PA(n,s){if(s==null)return"";if(typeof s!="object")return String(s);const l=s;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(s);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function qA({content:n,raw:s,toolUseCtx:l}){const[o,c]=S.useState(!1);let d=!1;if(s)try{d=JSON.parse(s).is_error===!0}catch{}const f=n.split(`
90
+ `),m=f.length>jy,p=o?n:f.slice(0,jy).join(`
91
+ `),y=((l==null?void 0:l.tool)??"")||(d?"Tool error":"Tool output"),b=l?PA(l.tool,l.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:d?mt.toolResultIndicatorError:mt.toolResultIndicatorOk,"aria-label":d?"error":"success",children:d?"✗":"✓"}),h.jsx("span",{className:mt.toolResultLabel,children:y}),m&&h.jsx("span",{className:mt.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:mt.toolResultEvent,children:[m?h.jsx("button",{className:mt.toolResultHeader,onClick:()=>{c(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:mt.toolResultHeader,children:_}),b&&h.jsx("div",{className:mt.toolResultCommand,children:b}),h.jsxs("pre",{className:mt.toolResultPre,children:[p,!o&&m&&h.jsx("span",{className:mt.toolResultEllipsis,children:"…"})]})]})}function YA({content:n}){return h.jsxs("div",{className:mt.errorEvent,children:["Error: ",n]})}function KA({content:n}){return h.jsxs("div",{className:mt.statusEvent,children:["--- ",n," ---"]})}function ZA({content:n}){return h.jsx("div",{className:mt.userInputEvent,children:h.jsx("span",{className:mt.userInputContent,children:n})})}function XA({content:n}){return h.jsx("div",{className:mt.defaultEvent,children:n})}function Pb({event:n,toolUseCtx:s}){const l=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(HA,{time:l,content:n.content});case"text":case"output":return h.jsx(IA,{content:n.content});case"tool_use":return h.jsx(GA,{content:n.content});case"tool_result":return h.jsx(qA,{content:n.content,raw:n.raw,toolUseCtx:s});case"error":return h.jsx(YA,{content:n.content});case"status":return h.jsx(KA,{content:n.content});case"user_input":return h.jsx(ZA,{content:n.content});default:return h.jsx(XA,{content:n.content})}}const $A="_overlay_cmicx_1",QA="_dialog_cmicx_11",FA="_title_cmicx_30",JA="_description_cmicx_38",WA="_actions_cmicx_45",eN="_cancelButton_cmicx_52",tN="_confirmButton_cmicx_79",Ds={overlay:$A,dialog:QA,title:FA,description:JA,actions:WA,cancelButton:eN,confirmButton:tN};function sc({isOpen:n,title:s,description:l,confirmLabel:o="Delete",onConfirm:c,onCancel:d}){const f=S.useId(),m=S.useId();return h.jsx(zi,{children:n&&h.jsx(ca.div,{className:Ds.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:d,onKeyDown:p=>{p.key==="Escape"&&d()},role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":l?m:void 0,children:h.jsxs(ca.div,{className:Ds.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:f,className:Ds.title,children:s}),l&&h.jsx("p",{id:m,className:Ds.description,children:l}),h.jsxs("div",{className:Ds.actions,children:[h.jsx("button",{type:"button",className:Ds.cancelButton,onClick:d,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:Ds.confirmButton,onClick:c,children:o})]})]})})})}const nN="_spinner_13c8l_1",aN="_spin_13c8l_1",sN="_sm_13c8l_14",iN="_md_13c8l_20",lN="_lg_13c8l_26",Cy={spinner:nN,spin:aN,sm:sN,md:iN,lg:lN};function Ay({size:n="md",className:s,label:l="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${Cy.spinner} ${Cy[n]} ${s??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const oN="_container_7z2xb_1",rN="_header_7z2xb_5",cN="_addButton_7z2xb_17",uN="_createForm_7z2xb_44",dN="_createInput_7z2xb_50",fN="_createButton_7z2xb_81",hN="_creatingHint_7z2xb_122",mN="_projectRow_7z2xb_131",pN="_selected_7z2xb_149",gN="_expandArrow_7z2xb_154",vN="_expanded_7z2xb_161",yN="_projectName_7z2xb_165",bN="_taskCount_7z2xb_169",SN="_newTaskButton_7z2xb_175",xN="_taskRow_7z2xb_202",_N="_taskStatusIcon_7z2xb_227",TN="_taskTitle_7z2xb_231",EN="_dependencyBadge_7z2xb_238",jN="_blockedBadge_7z2xb_250",CN="_leafSpacer_7z2xb_255",AN="_childCountBadge_7z2xb_260",NN="_addChildButton_7z2xb_273",wN="_emptyCta_7z2xb_317",DN="_ctaDescription_7z2xb_330",kN="_ctaButton_7z2xb_336",RN="_emptyTaskCta_7z2xb_371",MN="_createTaskLink_7z2xb_376",Xe={container:oN,header:rN,addButton:cN,createForm:uN,createInput:dN,createButton:fN,creatingHint:hN,projectRow:mN,selected:pN,expandArrow:gN,expanded:vN,projectName:yN,taskCount:bN,newTaskButton:SN,taskRow:xN,taskStatusIcon:_N,taskTitle:TN,dependencyBadge:EN,blockedBadge:jN,leafSpacer:CN,childCountBadge:AN,addChildButton:NN,emptyCta:wN,ctaDescription:DN,ctaButton:kN,emptyTaskCta:RN,createTaskLink:MN},Ny={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function ON(n){const s=new Map(n.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of s.values())o.parentTaskId&&s.has(o.parentTaskId)?s.get(o.parentTaskId).children.push(o):l.push(o);for(const o of s.values())o.children.sort((c,d)=>c.sortOrder-d.sortOrder);return l.sort((o,c)=>o.sortOrder-c.sortOrder)}const BN=34,LN=16;function qb({node:n,depth:s,expandedTasks:l,toggleTask:o,selectedTaskId:c,navigate:d,projectId:f,taskStatusById:m}){const p=Ny[n.status]||Ny.not_started,v=n.dependsOn.length>0&&n.dependsOn.some(N=>m.get(N)!=="complete"),y=l.has(n.id),b=n.children.length>0,_=c===n.id,T=BN+s*LN;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>d(ki(n.id)),className:`${Xe.taskRow} ${_?Xe.selected:""}`,style:{paddingLeft:T},"data-task-id":n.id,children:[b&&h.jsx("span",{className:`${Xe.expandArrow} ${y?Xe.expanded:""}`,role:"button",tabIndex:0,"aria-label":y?"Collapse task":"Expand task",onClick:N=>{N.stopPropagation(),o(n.id)},onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),o(n.id))},children:"▸"}),!b&&h.jsx("span",{className:Xe.leafSpacer}),h.jsx("span",{className:Xe.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:Xe.taskTitle,title:n.title,children:n.title}),b&&h.jsxs("span",{className:Xe.childCountBadge,children:[n.children.filter(N=>N.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Xe.dependencyBadge} ${v?Xe.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),s<cA&&h.jsx("button",{onClick:N=>{N.stopPropagation(),d(Ri(f,n.id))},title:"Add child task","aria-label":"Add child task",className:Xe.addChildButton,children:"+"})]}),h.jsx(zi,{children:b&&y&&h.jsx(ca.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(N=>h.jsx(qb,{node:N,depth:s+1,expandedTasks:l,toggleTask:o,selectedTaskId:c,navigate:d,projectId:f,taskStatusById:m},N.id))})})]})}function UN(){const{projects:n,tasks:s,loadTasks:l,createProject:o,projectCreating:c}=nn(),d=ua(),[f,m]=S.useState(new Set),[p,v]=S.useState(new Set),[y,b]=S.useState(new Set),[_,T]=S.useState(!1),[N,D]=S.useState(""),w=Wt("/tasks/:taskId/*"),j=Wt("/projects/:projectId"),H=(w==null?void 0:w.params.taskId)!=="new"?w==null?void 0:w.params.taskId:void 0,M=j==null?void 0:j.params.projectId,$=S.useRef(f);$.current=f;const I=S.useMemo(()=>new Map(s.map(X=>[X.id,X.status])),[s]),J=X=>{m(ue=>{const R=new Set(ue);return R.has(X)?R.delete(X):(R.add(X),l(X)),R})},te=X=>{v(ue=>{const R=new Set(ue);return R.has(X)?(R.delete(X),b(pe=>new Set(pe).add(X))):(R.add(X),b(pe=>{const ee=new Set(pe);return ee.delete(X),ee})),R})};S.useEffect(()=>{const X=new Set(s.filter(ue=>ue.parentTaskId).map(ue=>ue.parentTaskId));X.size>0&&v(ue=>{const R=new Set(ue);for(const pe of X)y.has(pe)||R.add(pe);return R})},[s,y]),S.useEffect(()=>{M&&!$.current.has(M)&&(m(X=>new Set(X).add(M)),l(M))},[M,l]);const Y=()=>{!N.trim()||c||(o(N.trim()),D(""),T(!1))};return h.jsxs("div",{className:Xe.container,children:[h.jsxs("div",{className:Xe.header,children:[h.jsx("span",{children:"Projects"}),h.jsx("button",{className:Xe.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]}),_&&h.jsxs("div",{className:Xe.createForm,children:[h.jsx("input",{type:"text",value:N,onChange:X=>D(X.target.value),onKeyDown:X=>X.key==="Enter"&&Y(),placeholder:"Project name...",autoFocus:!0,disabled:c,className:Xe.createInput}),h.jsx("button",{onClick:Y,className:Xe.createButton,disabled:c,children:c?h.jsx(Ay,{size:"sm",label:"Creating project"}):"OK"})]}),c&&h.jsxs("div",{className:Xe.creatingHint,children:[h.jsx(Ay,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:Xe.emptyCta,children:[h.jsx("button",{className:Xe.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:Xe.ctaDescription,children:"Organize your work into projects"})]}),n.map(X=>{const ue=f.has(X.id),R=s.filter(ge=>ge.projectId===X.id),pe=M===X.id,ee=ue?ON(R):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{pe?J(X.id):(ue||J(X.id),d(Ql(X.id)))},className:`${Xe.projectRow} ${pe?Xe.selected:""}`,children:[h.jsx("span",{className:`${Xe.expandArrow} ${ue?Xe.expanded:""}`,children:"▸"}),h.jsx("span",{className:Xe.projectName,title:X.name,children:X.name}),h.jsx("span",{className:Xe.taskCount,children:R.length>0&&`${R.filter(ge=>ge.status==="complete").length}/${R.length}`}),h.jsx("button",{onClick:ge=>{ge.stopPropagation(),d(Ri(X.id))},title:"New task",className:Xe.newTaskButton,children:"+"})]}),h.jsx(zi,{children:ue&&h.jsxs(ca.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:[ee.map(ge=>h.jsx(qb,{node:ge,depth:0,expandedTasks:p,toggleTask:te,selectedTaskId:H,navigate:d,projectId:X.id,taskStatusById:I},ge.id)),R.length===0&&h.jsx("div",{className:Xe.emptyTaskCta,children:h.jsx("button",{className:Xe.createTaskLink,onClick:()=>d(Ri(X.id)),children:"+ Create Task"})})]})})]},X.id)})]})}const zN="_container_1purk_1",VN="_content_1purk_30",wy={container:zN,content:VN},HN=320,Yb=220,Kb=600,Zb="grackle-sidebar-width";function IN(){try{const n=localStorage.getItem(Zb);if(n!==null){const s=Number(n);if(Number.isFinite(s)&&s>=Yb&&s<=Kb)return s}}catch{}return HN}function GN(n){try{localStorage.setItem(Zb,String(n))}catch{}}function PN(){const[n]=S.useState(IN),s=S.useRef(null);return S.useEffect(()=>{const l=s.current;if(!l)return;const o=new ResizeObserver(c=>{for(const d of c){const f=d.borderBoxSize[0];if(f){const m=Math.round(f.inlineSize);m>=Yb&&m<=Kb&&GN(m)}}});return o.observe(l),()=>{o.disconnect()}},[]),h.jsx("div",{className:wy.container,ref:s,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:wy.content,children:h.jsx(UN,{})})})}const qN="_bar_teqep_1",YN="_barColumn_teqep_26",KN="_barRow_teqep_52",ZN="_input_teqep_58",XN="_inputSmall_teqep_87",$N="_select_teqep_150",QN="_btnPrimary_teqep_180",FN="_btnDanger_teqep_211",JN="_btnGhost_teqep_250",WN="_badge_teqep_278",ew="_statusText_teqep_288",tw="_statusCompleted_teqep_293",nw="_statusFailed_teqep_297",aw="_statusBlocked_teqep_301",sw="_hintText_teqep_306",iw="_creatingHint_teqep_311",lw="_errorHint_teqep_319",ow="_disconnectHint_teqep_325",ce={bar:qN,barColumn:YN,barRow:KN,input:ZN,inputSmall:XN,select:$N,btnPrimary:QN,btnDanger:FN,btnGhost:JN,badge:WN,statusText:ew,statusCompleted:tw,statusFailed:nw,statusBlocked:aw,hintText:sw,creatingHint:iw,errorHint:lw,disconnectHint:ow};function Dy({value:n,onChange:s,testId:l}){return h.jsxs("select",{"data-testid":l,value:n,onChange:o=>s(o.target.value),className:ce.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 ky(n,s){if(!n)return!1;const l=s.find(o=>o.id===n);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function Ry({environmentId:n,onReconnect:s}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ce.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>s(n),className:ce.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function rw(){const{spawn:n,sendInput:s,kill:l,sessions:o,tasks:c,environments:d,personas:f,addEnvironment:m,provisionEnvironment:p,codespaces:v,codespaceError:y,codespaceListError:b,codespaceCreating:_,listCodespaces:T,createCodespace:N}=nn(),{showToast:D}=no(),w=ua(),[j]=yf(),H=Wt("/sessions/:sessionId"),M=Wt("/tasks/:taskId"),$=Wt("/tasks/:taskId/stream"),I=Wt("/tasks/:taskId/findings"),J=Wt("/tasks/:taskId/edit"),te=Wt("/sessions/new"),Y=Wt("/environments/new"),X=Wt("/projects/:projectId"),ue=Wt("/tasks/new"),R=Wt("/"),pe=Wt("/settings/*"),ee=H==null?void 0:H.params.sessionId,ge=(M==null?void 0:M.params.taskId)??($==null?void 0:$.params.taskId)??(I==null?void 0:I.params.taskId),q=!!te,V=!!Y,Q=!!X,W=!!ue,Ne=!!J,Te=!!R&&!q&&!V&&!Q&&!W,Ie=!!pe,Ce=q?j.get("env")??"":"",xe=q?j.get("runtime")??"claude-code":"claude-code",[Ee,F]=S.useState(""),[U,qe]=S.useState(q?xe:"claude-code"),[$t,sn]=S.useState(""),Fn=se=>{if(sn(se),se){const ve=f.find(nt=>nt.id===se);ve!=null&&ve.runtime&&qe(ve.runtime)}},[ln,jn]=S.useState(""),[ft,Qt]=S.useState("local"),[Pn,qn]=S.useState("claude-code"),[Cn,Z]=S.useState(""),[ae,oe]=S.useState(""),[he,_e]=S.useState(""),[Se,De]=S.useState(""),[Ve,at]=S.useState(""),[ht,tt]=S.useState(""),[Bt,gt]=S.useState(""),[Jn,Wn]=S.useState(""),[An,Ct]=S.useState(""),[mn,xt]=S.useState("pick");S.useEffect(()=>{q&&qe(xe)},[q,xe]);const zt=ee?o.find(se=>se.id===ee):void 0,ne=ge?c.find(se=>se.id===ge):void 0,we=(ne==null?void 0:ne.latestSessionId)||void 0,Le=we?o.find(se=>se.id===we):void 0,Ye=ne?ne.dependsOn.some(se=>{const ve=c.find(nt=>nt.id===se);return ve&&ve.status!=="complete"}):!1;if(Te||Ie)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a session or click + to start"})});if(Ne||W)return h.jsx(h.Fragment,{});if(V){const se=le=>{if(!le.trim())return!0;const At=Number(le);return Number.isInteger(At)&&At>=1&&At<=65535},ve=()=>!(!ln.trim()||ft==="ssh"&&!Cn.trim()||ft==="codespace"&&!ht.trim()||(ft==="local"||ft==="ssh")&&!se(ae)),nt=()=>{if(!ve())return;const le={};if(ft==="local"){if(Cn.trim()&&(le.host=Cn.trim()),ae.trim()){const At=Number(ae);Number.isInteger(At)&&(le.port=At)}}else if(ft==="ssh"){if(le.host=Cn.trim(),he.trim()&&(le.user=he.trim()),ae.trim()){const At=Number(ae);Number.isInteger(At)&&(le.sshPort=At)}Bt.trim()&&(le.identityFile=Bt.trim())}else ft==="docker"?(Se.trim()&&(le.image=Se.trim()),Ve.trim()&&(le.repo=Ve.trim())):ft==="codespace"&&(le.codespaceName=ht.trim());m(ln.trim(),ft,le,Pn),D("Environment added successfully","success"),jn(""),Qt("local"),qn("claude-code"),Z(""),oe(""),_e(""),De(""),at(""),tt(""),gt(""),Wn(""),Ct(""),xt("pick"),w(Di,{replace:!0})};return h.jsxs("div",{className:ce.barColumn,children:[h.jsxs("div",{className:ce.barRow,children:[h.jsx("span",{className:ce.badge,children:"new env"}),h.jsx("input",{type:"text",value:ln,onChange:le=>jn(le.target.value),placeholder:"Environment name...",autoFocus:!0,className:ce.input}),h.jsxs("select",{value:ft,onChange:le=>{Qt(le.target.value),le.target.value==="codespace"&&(T(),xt("pick"),tt(""))},className:ce.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(Dy,{value:Pn,onChange:qn,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:nt,disabled:!ve(),className:ce.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:ce.barRow,children:[ft==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Cn,onChange:le=>Z(le.target.value),placeholder:"Host (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:ae,onChange:le=>oe(le.target.value),placeholder:"Port (optional)...",className:ce.inputSmall})]}),ft==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Cn,onChange:le=>Z(le.target.value),placeholder:"Host (required)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:he,onChange:le=>_e(le.target.value),placeholder:"User (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:ae,onChange:le=>oe(le.target.value),placeholder:"SSH port (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:Bt,onChange:le=>gt(le.target.value),placeholder:"Identity file (optional)...",className:ce.inputSmall})]}),ft==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Se,onChange:le=>De(le.target.value),placeholder:"Image (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:Ve,onChange:le=>at(le.target.value),placeholder:"Repo (optional)...",className:ce.inputSmall})]}),ft==="codespace"&&mn==="pick"&&h.jsxs(h.Fragment,{children:[!b&&h.jsxs("select",{value:ht,onChange:le=>{le.target.value==="__create__"?(xt("create"),tt("")):(tt(le.target.value),le.target.value&&!ln.trim()&&jn(le.target.value))},disabled:_,className:ce.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),v.map(le=>h.jsxs("option",{value:le.name,children:[le.name," (",le.repository,") — ",le.state]},le.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:ce.creatingHint,children:"Creating codespace..."}),b&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ce.errorHint,children:b}),h.jsx("input",{type:"text",value:ht,onChange:le=>tt(le.target.value),placeholder:"Or enter codespace name manually...",className:ce.inputSmall})]}),y&&!b&&h.jsx("span",{className:ce.errorHint,children:y})]}),ft==="codespace"&&mn==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Jn,onChange:le=>Wn(le.target.value),placeholder:"owner/repo",className:ce.inputSmall}),h.jsx("input",{type:"text",value:An,onChange:le=>Ct(le.target.value),placeholder:"Machine type (optional)...",className:ce.inputSmall}),h.jsx("button",{onClick:()=>{Jn.trim()&&(N(Jn.trim(),An.trim()||void 0),xt("pick"),Wn(""),Ct(""))},disabled:!Jn.trim(),className:ce.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{xt("pick"),Wn(""),Ct("")},className:ce.btnGhost,children:"Cancel"})]})]})]})}if(Q)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a task or click + to create one"})});if(ge&&ne){if(ne.status==="not_started"){const se=Ye?ne.dependsOn.map(ve=>c.find(nt=>nt.id===ve)).filter(ve=>ve&&ve.status!=="complete").map(ve=>ve.title):[];return h.jsx("div",{className:ce.bar,children:Ye?h.jsxs("span",{className:ce.statusBlocked,children:["Blocked by: ",se.join(", ")]}):h.jsx("span",{className:ce.hintText,children:"Use the buttons above to start or manage this task"})})}if(ne.status==="working"||ne.status==="paused"){if((Le==null?void 0:Le.status)==="idle"){const ve=Le.environmentId,nt=ky(ve,d),le=At=>{At.preventDefault();const Nn=ne.latestSessionId||we;!Ee.trim()||!Nn||nt||(s(Nn,Ee),F(""))};return h.jsxs("form",{onSubmit:le,className:ce.bar,children:[nt&&ve&&h.jsx(Ry,{environmentId:ve,onReconnect:p}),h.jsx("input",{type:"text",value:Ee,onChange:At=>F(At.target.value),placeholder:"Type a message...",autoFocus:!nt,disabled:nt,className:ce.input}),h.jsx("span",{title:nt?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ee.trim()||nt,className:ce.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:ce.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ce.input})})}if(ne.status==="complete")return h.jsxs("div",{className:ce.bar,children:[h.jsx("span",{className:`${ce.statusText} ${ce.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>w(Ri(ne.projectId)),className:ce.btnPrimary,children:"+ New Task"})]});if(ne.status==="failed")return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:`${ce.statusText} ${ce.statusFailed}`,children:"Task failed"})})}if(q){const se=ve=>{ve.preventDefault(),!(!Ee.trim()||!Ce)&&(n(Ce,Ee,void 0,U,$t),D("Session started","success"),F(""),sn(""))};return h.jsxs("form",{onSubmit:se,className:ce.bar,children:[h.jsx("span",{className:ce.badge,children:"new chat"}),h.jsx("input",{type:"text",value:Ee,onChange:ve=>F(ve.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ce.input}),h.jsx(Dy,{value:U,onChange:qe,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:$t,onChange:ve=>Fn(ve.target.value),className:ce.select,children:[h.jsx("option",{value:"",children:"No persona"}),f.map(ve=>h.jsx("option",{value:ve.id,children:ve.name},ve.id))]}),h.jsx("button",{type:"submit",disabled:!Ee.trim()||!Ce,className:ce.btnPrimary,children:"Go"})]})}if(ee){const se=(zt==null?void 0:zt.status)==="running",ve=(zt==null?void 0:zt.status)==="idle",nt=zt!==void 0&&["completed","failed","interrupted"].includes(zt.status);if(se)return h.jsxs("div",{className:ce.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ce.input}),h.jsx("button",{onClick:()=>l(ee),className:ce.btnDanger,title:"Stop session",children:"Stop"})]});if(ve){const le=ky(zt.environmentId,d),At=Nn=>{Nn.preventDefault(),!(!Ee.trim()||le)&&(s(ee,Ee),F(""))};return h.jsxs("form",{onSubmit:At,className:ce.bar,children:[le&&zt.environmentId&&h.jsx(Ry,{environmentId:zt.environmentId,onReconnect:p}),h.jsx("input",{type:"text",value:Ee,onChange:Nn=>F(Nn.target.value),placeholder:"Type a message...",autoFocus:!le,disabled:le,className:ce.input}),h.jsx("span",{title:le?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ee.trim()||le,className:ce.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>l(ee),className:ce.btnDanger,title:"Stop session",children:"Stop"})]})}if(nt)return h.jsxs("div",{className:ce.bar,children:[h.jsxs("span",{className:`${ce.statusText} ${ce.hintText}`,children:["Session ",zt.status]}),h.jsx("button",{onClick:()=>w(h0(zt.environmentId,zt.runtime)),className:ce.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Loading..."})})}const cw="_toast_da8ll_1",uw="_success_da8ll_18",dw="_icon_da8ll_22",fw="_error_da8ll_25",hw="_warning_da8ll_32",mw="_info_da8ll_38",pw="_message_da8ll_53",gw="_close_da8ll_60",Ul={toast:cw,success:uw,icon:dw,error:fw,warning:hw,info:mw,message:pw,close:gw},vw={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function yw({toast:n,onDismiss:s}){return S.useEffect(()=>{const l=setTimeout(()=>s(n.id),n.duration);return()=>clearTimeout(l)},[n.id,n.duration,s]),h.jsxs(ca.div,{className:`${Ul.toast} ${Ul[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:Ul.icon,"aria-hidden":"true",children:vw[n.variant]}),h.jsx("span",{className:Ul.message,children:n.message}),h.jsx("button",{type:"button",className:Ul.close,onClick:()=>s(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const bw="_container_qqse2_1",Sw={container:bw};function xw(){const{toasts:n,dismissToast:s}=no();return h.jsx("div",{className:Sw.container,"data-testid":"toast-container",children:h.jsx(zi,{children:n.map(l=>h.jsx(yw,{toast:l,onDismiss:s},l.id))})})}function _w(n,s){const l=S.useRef(null);S.useEffect(()=>{const o=l.current;if(l.current=n,o===null)return;const c=new Map;for(const f of o)c.set(f.id,f);const d=new Set;for(const f of n){d.add(f.id);const m=c.get(f.id);m&&m.status!==f.status&&(f.status==="connecting"||f.status==="sleeping"||(f.status==="connected"?s("Environment connected","success"):f.status==="error"?s("Environment provision failed","error"):f.status==="disconnected"&&(m.status==="connected"?s("Environment disconnected","warning"):s("Environment stopped","info"))))}for(const f of o)d.has(f.id)||s("Environment removed","info")},[n,s])}const Tw="_panelContainer_1blx0_1",Ew="_emptyState_1blx0_8",jw="_projectSummary_1blx0_17",Cw="_projectSummaryTitle_1blx0_28",Aw="_projectSummarySubtitle_1blx0_32",Nw="_header_1blx0_36",ww="_headerInfo_1blx0_63",Dw="_killButton_1blx0_69",kw="_headerTitle_1blx0_98",Rw="_headerActions_1blx0_108",Mw="_taskStatusBadge_1blx0_115",Ow="_taskBranch_1blx0_124",Bw="_taskBlockedBadge_1blx0_130",Lw="_btnPrimary_1blx0_138",Uw="_btnDanger_1blx0_169",zw="_btnGhost_1blx0_208",Vw="_tabBar_1blx0_264",Hw="_tab_1blx0_264",Iw="_active_1blx0_285",Gw="_eventScroll_1blx0_290",Pw="_tabContent_1blx0_296",qw="_noContext_1blx0_301",Yw="_overviewContent_1blx0_307",Kw="_overviewDashboard_1blx0_316",Zw="_overviewHero_1blx0_322",Xw="_statusBadge_1blx0_329",$w="_statusPending_1blx0_341",Qw="_statusInProgress_1blx0_351",Fw="_statusDone_1blx0_361",Jw="_statusFailed_1blx0_366",Ww="_statusWaitingInput_1blx0_371",eD="_overviewBranchPill_1blx0_376",tD="_branchLink_1blx0_391",nD="_overviewSection_1blx0_402",aD="_overviewLabel_1blx0_408",sD="_overviewValue_1blx0_415",iD="_overviewMuted_1blx0_420",lD="_overviewMarkdown_1blx0_426",oD="_envRow_1blx0_495",rD="_envDot_1blx0_501",cD="_envDotGreen_1blx0_508",uD="_envDotYellow_1blx0_512",dD="_envDotRed_1blx0_516",fD="_envDotGray_1blx0_520",hD="_depList_1blx0_524",mD="_depItem_1blx0_530",pD="_depBlocked_1blx0_537",gD="_depDone_1blx0_541",vD="_timeline_1blx0_545",yD="_timelineRow_1blx0_551",bD="_timelineKey_1blx0_558",SD="_timelineValue_1blx0_564",xD="_timelineDelta_1blx0_568",_D="_reviewNotes_1blx0_579",TD="_waitingMessage_1blx0_596",ED="_errorMessage_1blx0_600",jD="_eventOverflowWarning_1blx0_604",CD="_attemptSelector_1blx0_618",AD="_attemptLabel_1blx0_629",ND="_attemptButton_1blx0_633",wD="_attemptActive_1blx0_650",DD="_attemptStatus_1blx0_656",kD="_emptyCta_1blx0_662",RD="_ctaTitle_1blx0_674",MD="_ctaDescription_1blx0_680",OD="_ctaButton_1blx0_687",BD="_projectHeader_1blx0_736",LD="_projectName_1blx0_761",UD="_projectMeta_1blx0_774",zD="_metaRow_1blx0_782",VD="_metaLabel_1blx0_789",HD="_metaValue_1blx0_799",ID="_metaPlaceholder_1blx0_809",GD="_editButton_1blx0_814",PD="_editInput_1blx0_830",qD="_editTextarea_1blx0_862",YD="_editSelect_1blx0_898",KD="_archiveButton_1blx0_931",ZD="_repoLink_1blx0_961",XD="_metaValueClickable_1blx0_971",$D="_editHint_1blx0_990",QD="_editError_1blx0_999",FD="_editInputInvalid_1blx0_1006",JD="_unsavedDot_1blx0_1011",WD="_metaToggle_1blx0_1019",ek="_metaToggleArrow_1blx0_1040",tk="_metaToggleArrowOpen_1blx0_1045",nk="_progressBarContainer_1blx0_1049",ak="_progressBar_1blx0_1049",sk="_progressFill_1blx0_1065",ik="_progressLabel_1blx0_1072",lk="_metaTimestamps_1blx0_1079",ok="_metaTimestamp_1blx0_1079",rk="_editFieldWrapper_1blx0_1095",A={panelContainer:Tw,emptyState:Ew,projectSummary:jw,projectSummaryTitle:Cw,projectSummarySubtitle:Aw,header:Nw,headerInfo:ww,killButton:Dw,headerTitle:kw,headerActions:Rw,taskStatusBadge:Mw,taskBranch:Ow,taskBlockedBadge:Bw,btnPrimary:Lw,btnDanger:Uw,btnGhost:zw,tabBar:Vw,tab:Hw,active:Iw,eventScroll:Gw,tabContent:Pw,noContext:qw,overviewContent:Yw,overviewDashboard:Kw,overviewHero:Zw,statusBadge:Xw,statusPending:$w,statusInProgress:Qw,statusDone:Fw,statusFailed:Jw,statusWaitingInput:Ww,overviewBranchPill:eD,branchLink:tD,overviewSection:nD,overviewLabel:aD,overviewValue:sD,overviewMuted:iD,overviewMarkdown:lD,envRow:oD,envDot:rD,envDotGreen:cD,envDotYellow:uD,envDotRed:dD,envDotGray:fD,depList:hD,depItem:mD,depBlocked:pD,depDone:gD,timeline:vD,timelineRow:yD,timelineKey:bD,timelineValue:SD,timelineDelta:xD,reviewNotes:_D,waitingMessage:TD,errorMessage:ED,eventOverflowWarning:jD,attemptSelector:CD,attemptLabel:AD,attemptButton:ND,attemptActive:wD,attemptStatus:DD,emptyCta:kD,ctaTitle:RD,ctaDescription:MD,ctaButton:OD,projectHeader:BD,projectName:LD,projectMeta:UD,metaRow:zD,metaLabel:VD,metaValue:HD,metaPlaceholder:ID,editButton:GD,editInput:PD,editTextarea:qD,editSelect:YD,archiveButton:KD,repoLink:ZD,metaValueClickable:XD,editHint:$D,editError:QD,editInputInvalid:FD,unsavedDot:JD,metaToggle:WD,metaToggleArrow:ek,metaToggleArrowOpen:tk,progressBarContainer:nk,progressBar:ak,progressFill:sk,progressLabel:ik,metaTimestamps:lk,metaTimestamp:ok,editFieldWrapper:rk};function ck(){const{projects:n,createProject:s}=nn();return n.length===0?h.jsxs("div",{className:A.emptyCta,children:[h.jsx("div",{className:A.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:A.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:A.ctaButton,onClick:()=>{const l=window.prompt("Project name:");l!=null&&l.trim()&&s(l.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:A.emptyState,children:"Select a project or task to get started"})}function uk(n,s){const l=[];let o=n;const c=new Set;for(;o&&s.has(o)&&!c.has(o);){c.add(o);const d=s.get(o);l.unshift(d),o=d.parentTaskId||void 0}return l}const Bs={label:"Home",url:"/"};function dk(n){return n?[Bs,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Bs,{label:"Settings",url:void 0}]}function fk(){return[Bs,{label:"New Environment",url:void 0}]}function hk(){return[Bs,{label:"New Chat",url:void 0}]}function mk(n){return[Bs,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function pk(n,s){const l=s.find(o=>o.id===n);return[Bs,{label:(l==null?void 0:l.name)??"Project",url:void 0}]}function gk(n,s,l){const o=uk(n,l),c=l.get(n),d=c==null?void 0:c.projectId,f=d?s.find(v=>v.id===d):void 0,m=[Bs];f&&m.push({label:f.name,url:Ql(f.id)});for(let v=0;v<o.length-1;v++)m.push({label:o[v].title,url:ki(o[v].id)});const p=o[o.length-1];return m.push({label:(p==null?void 0:p.title)??n,url:void 0}),m}function vk(){const n=hk();return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Ii,{segments:n}),h.jsx("div",{className:A.emptyState,children:"Enter a prompt below to start a new session"})]})}function Xb(n){const s=[];for(const l of n){const o=s[s.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?s[s.length-1]={...o,content:o.content+l.content}:s.push(l)}return s}function $b(n){const s=new Map;for(const d of n)if(d.raw)try{s.set(d,JSON.parse(d.raw))}catch{}const l=new Map;for(const d of n){if(d.eventType!=="tool_use")continue;const f=s.get(d);if(!(!f||typeof f.id!="string"))try{const m=JSON.parse(d.content);l.set(f.id,{tool:m.tool,args:m.args})}catch{}}const o=new Set;return n.map(d=>{if(d.eventType!=="tool_result")return d;const f=s.get(d);if(!f||typeof f.tool_use_id!="string")return d;const m=l.get(f.tool_use_id);return m?(o.add(f.tool_use_id),{...d,toolUseCtx:m}):d}).filter(d=>{if(d.eventType!=="tool_use")return!0;const f=s.get(d);return f&&typeof f.id=="string"?!o.has(f.id):!0})}function yk({sessionId:n,session:s,isActive:l,onKill:o}){return h.jsxs("div",{className:A.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),s&&` | ${s.runtime} | ${s.status}`]}),h.jsxs("span",{className:A.headerInfo,children:[s&&h.jsx("span",{children:s.prompt.length>60?s.prompt.slice(0,60)+"...":s.prompt}),l&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:A.killButton,children:"×"})]})]})}function bk({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:A.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 Sk({sessionEvents:n,session:s,eventsDropped:l,scrollRef:o}){const c=s&&["completed","failed","interrupted"].includes(s.status),d=c?`Session ${s.status} with no events recorded.`:"Waiting for events...";return h.jsxs("div",{ref:o,className:A.eventScroll,children:[n.length===0&&h.jsx("div",{className:c?A.errorMessage:A.waitingMessage,children:d}),h.jsx(bk,{eventsDropped:l}),n.map((f,m)=>h.jsx(Pb,{event:f,toolUseCtx:f.toolUseCtx},`${f.sessionId}-${f.timestamp}-${m}`))]})}function xk(){const{sessionId:n}=Qr(),{events:s,eventsDropped:l,sessions:o,kill:c,loadSessionEvents:d}=nn(),f=S.useRef(null),m=S.useRef(void 0),p=mk(n),v=o.find(_=>_.id===n)??void 0,y=S.useMemo(()=>{const _=n?s.filter(T=>T.sessionId===n):[];return $b(Xb(_))},[s,n]);if(S.useEffect(()=>{n&&n!==m.current&&(m.current=n,d(n))},[n,d]),S.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight)},[y.length]),!n)return h.jsx("div",{className:A.emptyState,children:"No session selected"});const b=(v==null?void 0:v.status)==="running"||(v==null?void 0:v.status)==="idle";return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Ii,{segments:p}),h.jsx(yk,{sessionId:n,session:v,isActive:b,onKill:c}),h.jsx(Sk,{sessionEvents:y,session:v,eventsDropped:l,scrollRef:f})]})}const My=220,Oy=70,_k=40,Tk=60,Ek="hierarchy",jk="dependency";function Ck(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const s=new Gg.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:"TB",nodesep:_k,ranksep:Tk});const l=new Map(n.map(f=>[f.id,f])),o=new Map;for(const f of n)if(f.parentTaskId&&l.has(f.parentTaskId)){const m=o.get(f.parentTaskId)||[];m.push(f),o.set(f.parentTaskId,m)}for(const f of n)s.setNode(f.id,{width:My,height:Oy});const c=[];for(const f of n){if(f.parentTaskId&&l.has(f.parentTaskId)){const m=`hierarchy-${f.parentTaskId}-${f.id}`;s.setEdge(f.parentTaskId,f.id,{},m),c.push({id:m,source:f.parentTaskId,target:f.id,type:"smoothstep",data:{edgeType:Ek},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of f.dependsOn)if(l.has(m)){const p=`dependency-${m}-${f.id}`;s.setEdge(m,f.id,{},p),c.push({id:p,source:m,target:f.id,type:"smoothstep",data:{edgeType:jk},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Gg.layout(s),{nodes:n.map(f=>{const m=s.node(f.id),p=o.get(f.id)||[];return{id:f.id,type:"task",position:{x:m.x-My/2,y:m.y-Oy/2},data:{task:f,childCount:p.length,doneChildCount:p.filter(v=>v.status==="complete").length,hasDependencies:f.dependsOn.length>0}}}),edges:c}},[n])}const Ak="_dagContainer_3al6d_1",Nk="_taskNode_3al6d_26",wk="_taskNodeBorder_3al6d_48",Dk="_taskNodeContent_3al6d_54",kk="_taskNodeHeader_3al6d_64",Rk="_taskNodeIcon_3al6d_71",Mk="_taskNodeTitle_3al6d_76",Ok="_taskNodeBadges_3al6d_84",Bk="_childBadge_3al6d_89",Lk="_depBadge_3al6d_101",Uk="_handle_3al6d_113",zk="_emptyCta_3al6d_120",Vk="_ctaDescription_3al6d_131",Hk="_ctaButton_3al6d_138",en={dagContainer:Ak,taskNode:Nk,taskNodeBorder:wk,taskNodeContent:Dk,taskNodeHeader:kk,taskNodeIcon:Rk,taskNodeTitle:Mk,taskNodeBadges:Ok,childBadge:Bk,depBadge:Lk,handle:Uk,emptyCta:zk,ctaDescription:Vk,ctaButton:Hk},By={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function Ik({data:n}){const{task:s,childCount:l,doneChildCount:o,hasDependencies:c}=n,d=By[s.status]||By.not_started;return h.jsxs("div",{className:en.taskNode,"data-task-id":s.id,"data-task-title":s.title,children:[h.jsx(Pg,{type:"target",position:qg.Top,className:en.handle}),h.jsx("div",{className:en.taskNodeBorder,style:{backgroundColor:d.color}}),h.jsxs("div",{className:en.taskNodeContent,children:[h.jsxs("div",{className:en.taskNodeHeader,children:[h.jsx("span",{className:en.taskNodeIcon,style:{color:d.color},children:d.icon}),h.jsx("span",{className:en.taskNodeTitle,children:s.title})]}),h.jsxs("div",{className:en.taskNodeBadges,children:[l>0&&h.jsxs("span",{className:en.childBadge,children:[o,"/",l]}),c&&h.jsx("span",{className:en.depBadge,children:"dep"})]})]}),h.jsx(Pg,{type:"source",position:qg.Bottom,className:en.handle})]})}const Gk={pending:"--text-tertiary",assigned:"--accent-blue",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",failed:"--accent-red",waiting_input:"--accent-yellow"},Pk={task:Ik};function qk({projectId:n}){const{tasks:s}=nn(),l=ua(),{resolvedThemeId:o}=Ky(),c=S.useMemo(()=>s.filter(y=>y.projectId===n),[s,n]),{nodes:d,edges:f}=Ck(c),m=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),b={};for(const[_,T]of Object.entries(Gk))b[_]=y.getPropertyValue(T).trim()||"#6b7a8d";return b},[o]),p=S.useCallback((y,b)=>{l(ki(b.id))},[l]),v=S.useCallback(y=>{const b=y.data;return m[b.task.status]||m.pending},[m]);return c.length===0?h.jsxs("div",{className:en.emptyCta,children:[h.jsx("button",{className:en.ctaButton,onClick:()=>l(Ri(n)),children:"Create Task"}),h.jsx("div",{className:en.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:en.dagContainer,children:h.jsxs(fx,{nodes:d,edges:f,nodeTypes:Pk,onNodeClick:p,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(hx,{variant:mx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(px,{showInteractive:!1}),h.jsx(gx,{nodeColor:v,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function Yk(n){const s=n.toLowerCase();return s==="ready"||s==="running"||s==="available"||s==="connected"?A.envDotGreen:s==="provisioning"||s==="starting"||s==="pending"||s==="connecting"?A.envDotYellow:s==="error"||s==="failed"||s==="disconnected"?A.envDotRed:A.envDotGray}function Ly(n){if(!n)return"";const s=new Date(n);if(isNaN(s.getTime()))return"";const o=Date.now()-s.getTime();if(o<0)return"just now";const c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const d=Math.floor(c/60);if(d<24)return`${d}h ago`;const f=Math.floor(d/24);return f<30?`${f}d ago`:s.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Kk(){const{projectId:n}=Qr(),s=ua(),{tasks:l,environments:o,projects:c,archiveProject:d,updateProject:f}=nn(),[m,p]=S.useState("tasks"),[v,y]=S.useState(!1),[b,_]=S.useState(null),[T,N]=S.useState(""),[D,w]=S.useState(""),[j,H]=S.useState(!1),M=S.useRef(void 0),$=S.useRef(null),I=S.useRef(null),J=S.useRef(null),te=S.useRef(null),Y=S.useRef(null),X=S.useRef(null),ue=pk(n,c);S.useEffect(()=>{const F=M.current;M.current=n,!(F===void 0||F===n)&&(b!==null||T!=="")&&(_(null),N(""))},[n,b,T]),S.useEffect(()=>{if(b===null)return;const F=b==="name"?I.current:b==="description"?J.current:b==="repoUrl"?te.current:b==="worktreeBasePath"?X.current:Y.current;if(!F)return;const U=window.setTimeout(()=>{F.focus()},0);return()=>{window.clearTimeout(U)}},[b]);const R=c.find(F=>F.id===n),pe=l.filter(F=>F.projectId===n),ee=pe.filter(F=>F.status==="complete").length,ge=pe.length,q=ge>0?Math.round(ee/ge*100):0,V=100,Q=(F,U)=>{$.current=F,_(F),N(U),w("")},W=()=>{$.current=null,_(null),N(""),w("")},Ne=(F,U)=>{if(F==="name"){const qe=U.trim();if(!qe)return"Name is required";if(qe.length>V)return`Max ${V} characters`}if(F==="repoUrl"){const qe=U.trim();if(qe&&!/^https?:\/\/.+/.test(qe))return"Must be a valid http(s) URL"}return""},Te=F=>{if(!R)return;const U=T.trim(),qe=Ne(F,T);if(qe){w(qe);return}if(F==="name"){if(U===R.name){W();return}f(R.id,{name:U})}else if(F==="description"){const $t=T;if($t===R.description){W();return}f(R.id,{description:$t})}else if(F==="repoUrl"){if(U===R.repoUrl){W();return}f(R.id,{repoUrl:U})}else if(F==="defaultEnvironmentId"){if(T===R.defaultEnvironmentId){W();return}f(R.id,{defaultEnvironmentId:T})}else{if(U===R.worktreeBasePath){W();return}f(R.id,{worktreeBasePath:U})}W()},Ie=(F,U)=>{F.key==="Escape"?W():F.key==="Enter"&&U!=="description"&&Te(U)},Ce=F=>R?F==="name"?T.trim()!==R.name:F==="description"?T!==R.description:F==="repoUrl"?T.trim()!==R.repoUrl:F==="defaultEnvironmentId"?T!==R.defaultEnvironmentId:T.trim()!==R.worktreeBasePath:!1,xe=o.find(F=>F.id===(R==null?void 0:R.defaultEnvironmentId)),Ee=b==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Ii,{segments:ue}),h.jsxs("div",{className:A.projectHeader,children:[h.jsx("span",{className:A.projectName,"data-testid":"project-name",children:b==="name"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:I,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:F=>{N(F.target.value),w("")},onBlur:F=>{if($.current==="name"){$.current=null;return}F.relatedTarget instanceof HTMLElement&&F.relatedTarget.dataset.editAction==="name"||Te("name")},onKeyDown:F=>Ie(F,"name"),maxLength:V,"aria-label":"Project name","data-testid":"edit-name-input"}),Ce("name")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:Ee})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>Q("name",(R==null?void 0:R.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(R==null?void 0:R.name)||n}`,"data-testid":"edit-name-button",children:[(R==null?void 0:R.name)||n,h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:A.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:A.metaToggle,onClick:()=>H(!j),"aria-expanded":!j,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${A.metaToggleArrow} ${j?"":A.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!j&&h.jsxs("div",{className:A.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Description"}),h.jsx("div",{className:A.metaValue,children:b==="description"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("textarea",{ref:J,className:A.editTextarea,value:T,onChange:F=>{N(F.target.value),w("")},onBlur:F=>{if($.current==="description"){$.current=null;return}F.relatedTarget instanceof HTMLElement&&F.relatedTarget.dataset.editAction==="description"||Te("description")},onKeyDown:F=>Ie(F,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),Ce("description")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:A.editHint,children:Ee})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>Q("description",(R==null?void 0:R.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[R!=null&&R.description?h.jsx("span",{className:A.overviewMarkdown,children:h.jsx(rf,{remarkPlugins:[cf],children:R.description})}):h.jsx("span",{className:A.metaPlaceholder,children:"No description"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Repository"}),h.jsx("div",{className:A.metaValue,children:b==="repoUrl"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:te,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:F=>{N(F.target.value),w("")},onBlur:F=>{if($.current==="repoUrl"){$.current=null;return}F.relatedTarget instanceof HTMLElement&&F.relatedTarget.dataset.editAction==="repoUrl"||Te("repoUrl")},onKeyDown:F=>Ie(F,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),Ce("repoUrl")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:Ee})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:F=>{F.preventDefault(),Q("repoUrl",(R==null?void 0:R.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[R!=null&&R.repoUrl&&/^https?:\/\//i.test(R.repoUrl)?h.jsx("a",{className:A.repoLink,href:R.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:F=>F.stopPropagation(),children:R.repoUrl}):R!=null&&R.repoUrl?h.jsx("span",{children:R.repoUrl}):h.jsx("span",{className:A.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Environment"}),h.jsx("div",{className:A.metaValue,children:b==="defaultEnvironmentId"?h.jsxs("select",{ref:Y,className:A.editSelect,value:T,onChange:F=>{$.current=null,N(F.target.value);const U=F.target.value;R&&U!==R.defaultEnvironmentId&&f(R.id,{defaultEnvironmentId:U}),W()},onBlur:F=>{if($.current==="defaultEnvironmentId"){$.current=null;return}F.relatedTarget instanceof HTMLElement&&F.relatedTarget.dataset.editAction==="defaultEnvironmentId"||W()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(F=>h.jsx("option",{value:F.id,children:F.displayName},F.id))]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>Q("defaultEnvironmentId",(R==null?void 0:R.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[xe?h.jsxs("span",{className:A.envRow,children:[h.jsx("span",{className:`${A.envDot} ${Yk(xe.status)}`}),xe.displayName]}):h.jsx("span",{className:A.metaPlaceholder,children:(R==null?void 0:R.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Worktree Base"}),h.jsx("div",{className:A.metaValue,children:b==="worktreeBasePath"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:X,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:F=>{N(F.target.value),w("")},onBlur:F=>{if($.current==="worktreeBasePath"){$.current=null;return}F.relatedTarget instanceof HTMLElement&&F.relatedTarget.dataset.editAction==="worktreeBasePath"||Te("worktreeBasePath")},onKeyDown:F=>Ie(F,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Worktree base path","data-testid":"edit-worktree-base-path-input"}),Ce("worktreeBasePath")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:Ee})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>Q("worktreeBasePath",(R==null?void 0:R.worktreeBasePath)||""),title:"Click to edit worktree base path","aria-label":"Edit worktree base path","data-testid":"edit-worktree-base-path-button",children:[R!=null&&R.worktreeBasePath?h.jsx("span",{children:R.worktreeBasePath}):h.jsx("span",{className:A.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),R&&h.jsxs("div",{className:A.metaTimestamps,children:[h.jsxs("span",{className:A.metaTimestamp,children:["Created ",Ly(R.createdAt)]}),R.updatedAt&&R.updatedAt!==R.createdAt&&h.jsxs("span",{className:A.metaTimestamp,children:["· Updated ",Ly(R.updatedAt)]})]})]}),ge>0&&h.jsxs("div",{className:A.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:A.progressBar,children:h.jsx("div",{className:A.progressFill,style:{width:`${q}%`}})}),h.jsxs("span",{className:A.progressLabel,children:[ee,"/",ge]})]}),h.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${A.tab} ${m==="graph"?A.active:""}`,onClick:()=>p("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${A.tab} ${m==="tasks"?A.active:""}`,onClick:()=>p("tasks"),children:"Tasks"})]}),m==="tasks"&&ge>0&&h.jsxs("div",{className:A.projectSummary,children:[h.jsx("span",{className:A.projectSummaryTitle,children:`${ee}/${ge} tasks complete`}),h.jsx("span",{className:A.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&ge===0&&h.jsxs("div",{className:A.emptyCta,children:[h.jsx("button",{className:A.ctaButton,onClick:()=>s(Ri(n)),children:"Create Task"}),h.jsx("div",{className:A.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="graph"&&h.jsx(qk,{projectId:n}),h.jsx(sc,{isOpen:v,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{R&&(d(R.id),s("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const Zk="_container_yc33j_1",Xk="_header_yc33j_8",$k="_headerTitle_yc33j_35",Qk="_badge_yc33j_44",Fk="_headerActions_yc33j_54",Jk="_body_yc33j_61",Wk="_formContent_yc33j_68",eR="_section_yc33j_75",tR="_label_yc33j_81",nR="_titleInput_yc33j_88",aR="_descriptionTextarea_yc33j_121",sR="_parentContext_yc33j_157",iR="_parentLabel_yc33j_165",lR="_parentName_yc33j_172",oR="_depList_yc33j_210",rR="_depItem_yc33j_216",cR="_depItemSelected_yc33j_238",uR="_noDeps_yc33j_242",dR="_btnPrimary_yc33j_248",fR="_btnGhost_yc33j_279",dt={container:Zk,header:Xk,headerTitle:$k,badge:Qk,headerActions:Fk,body:Jk,formContent:Wk,section:eR,label:tR,titleInput:nR,descriptionTextarea:aR,parentContext:sR,parentLabel:iR,parentName:lR,depList:oR,depItem:rR,depItemSelected:cR,noDeps:uR,btnPrimary:dR,btnGhost:fR};function Qb({mode:n,taskId:s,projectId:l,parentTaskId:o}){const{tasks:c,createTask:d,updateTask:f}=nn(),{showToast:m}=no(),p=ua(),v=n==="edit",y=v&&s?c.find(R=>R.id===s):void 0,b=v?(y==null?void 0:y.projectId)??"":l??"",_=v?(y==null?void 0:y.parentTaskId)??"":o??"",T=_?c.find(R=>R.id===_):void 0,[N,D]=S.useState((y==null?void 0:y.title)??""),[w,j]=S.useState((y==null?void 0:y.description)??""),[H,M]=S.useState((y==null?void 0:y.dependsOn)??[]),$=S.useRef(!1);S.useEffect(()=>{v&&y&&!$.current&&($.current=!0,D(y.title),j(y.description),M(y.dependsOn))},[v,y]);const I=c.filter(R=>R.projectId===b&&(!v||R.id!==s)&&R.id!==_),J=N.trim().length>0&&(!v||y!==void 0)&&(v||b.length>0),te=R=>{M(pe=>pe.includes(R)?pe.filter(ee=>ee!==R):[...pe,R])},Y=()=>{J&&(v&&y===void 0||(v&&s?(f(s,N.trim(),w,H),m("Task updated","success"),p(ki(s),{replace:!0})):(d(b,N.trim(),w,H.length>0?H:void 0,_||void 0),m("Task created","success"),p(Ql(b),{replace:!0}))))},X=()=>{p(v&&s?ki(s):Ql(b))},ue=v?"edit task":_?"child task":"new task";return h.jsxs("div",{className:dt.container,children:[h.jsxs("div",{className:dt.header,children:[h.jsxs("div",{className:dt.headerTitle,children:[h.jsx("span",{className:dt.badge,children:ue}),T&&h.jsxs("span",{className:dt.parentContext,children:[h.jsx("span",{className:dt.parentLabel,children:"Child of"}),h.jsx("span",{className:dt.parentName,children:T.title})]})]}),h.jsxs("div",{className:dt.headerActions,children:[h.jsx("button",{onClick:Y,disabled:!J,className:dt.btnPrimary,"data-testid":"task-edit-save",children:v?"Save Changes":"Create"}),h.jsx("button",{onClick:X,className:dt.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:dt.body,children:h.jsxs("div",{className:dt.formContent,children:[h.jsxs("div",{className:dt.section,children:[h.jsx("label",{className:dt.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:N,onChange:R=>D(R.target.value),placeholder:"Task title...",autoFocus:!0,className:dt.titleInput,"data-testid":"task-edit-title",onKeyDown:R=>{R.key==="Enter"&&J&&Y()}})]}),h.jsxs("div",{className:dt.section,children:[h.jsx("label",{className:dt.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:w,onChange:R=>j(R.target.value),placeholder:"Describe the task... (markdown supported)",className:dt.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:dt.section,children:[h.jsx("div",{className:dt.label,children:"Dependencies"}),I.length===0?h.jsx("div",{className:dt.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:dt.depList,children:I.map(R=>{const pe=H.includes(R.id);return h.jsxs("label",{className:`${dt.depItem} ${pe?dt.depItemSelected:""}`,"data-testid":`dep-option-${R.id}`,children:[h.jsx("input",{type:"checkbox",checked:pe,onChange:()=>te(R.id)}),R.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",R.status,")"]})]},R.id)})})]})]})})]})}function hR(){const[n]=yf(),s=n.get("project")??"",l=n.get("parent")??void 0;return s?h.jsx(Qb,{mode:"new",projectId:s,parentTaskId:l}):h.jsx(Id,{to:"/",replace:!0})}function mR(){const{taskId:n}=Qr();return h.jsx(Qb,{mode:"edit",taskId:n})}const pR="_container_u6n1v_1",gR="_emptyState_u6n1v_8",vR="_card_u6n1v_14",yR="_cardHeader_u6n1v_34",bR="_categoryBadge_u6n1v_41",SR="_findingTitle_u6n1v_49",xR="_findingDate_u6n1v_55",_R="_findingContent_u6n1v_61",TR="_tags_u6n1v_67",ER="_tag_u6n1v_67",ia={container:pR,emptyState:gR,card:vR,cardHeader:yR,categoryBadge:bR,findingTitle:SR,findingDate:xR,findingContent:_R,tags:TR,tag:ER};function jR(n){const s=new Date(n),l=new Date,o=l.getTime()-s.getTime(),c=Math.floor(o/1e3),d=Math.floor(c/60),f=Math.floor(d/60),m=Math.floor(f/24);if(c<60)return"just now";if(d<60)return`${d}m ago`;if(f<24)return`${f}h ago`;if(m===1)return"yesterday";if(m<7)return`${m} days ago`;const p=s.getFullYear()===l.getFullYear(),v=s.toLocaleString("en-US",{month:"short"}),y=s.getDate();return p?`${v} ${y}`:`${v} ${y} ${s.getFullYear()}`}const Uy={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 CR({projectId:n}){const{findings:s}=nn(),l=s.filter(o=>o.projectId===n);return l.length===0?h.jsx("div",{className:ia.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:ia.container,children:l.map((o,c)=>{const d=Uy[o.category]||Uy.general;return h.jsxs(ca.div,{className:ia.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:c*.05,duration:.2},children:[h.jsxs("div",{className:ia.cardHeader,children:[h.jsx("span",{className:ia.categoryBadge,style:{background:d.bg,color:d.text},children:o.category}),h.jsx("span",{className:ia.findingTitle,children:o.title}),h.jsx("span",{className:ia.findingDate,title:o.createdAt,children:jR(o.createdAt)})]}),h.jsx("div",{className:ia.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:ia.tags,children:o.tags.map(f=>h.jsx("span",{className:ia.tag,style:{color:d.text,textShadow:`0 0 8px ${d.text}`},children:f},f))})]},o.id)})})}function wr(n){if(!n)return"—";const s=new Date(n);return isNaN(s.getTime())?"—":s.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Md(n,s){if(!n||!s)return;const l=new Date(s).getTime()-new Date(n).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),c=Math.floor(l%6e4/1e3);if(o===0)return`${c}s`;const d=Math.floor(o/60),f=o%60;return d===0?`${o}m ${c}s`:`${d}h ${f}m`}function AR(n){const s=n.toLowerCase();return s==="ready"||s==="running"||s==="available"||s==="connected"?A.envDotGreen:s==="provisioning"||s==="starting"||s==="pending"||s==="connecting"?A.envDotYellow:s==="error"||s==="failed"||s==="disconnected"?A.envDotRed:A.envDotGray}function NR({status:n}){const s={not_started:"Not Started",working:"Working",paused:"Paused",complete:"Complete",failed:"Failed"},l={not_started:A.statusPending,working:A.statusInProgress,paused:A.statusWaitingInput,complete:A.statusDone,failed:A.statusFailed};return h.jsx("span",{className:`${A.statusBadge} ${l[n]??A.statusPending}`,children:s[n]??n})}function wR({task:n,tasksById:s,environments:l,projects:o,taskSessions:c}){const d=c.length>0?c[c.length-1]:void 0,f=(d==null?void 0:d.environmentId)??"",m=f?l.find(y=>y.id===f):void 0,p=o.find(y=>y.id===n.projectId),v=n.branch&&(p!=null&&p.repoUrl)?`${p.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:A.overviewDashboard,children:[h.jsxs("div",{className:A.overviewHero,children:[h.jsx(NR,{status:n.status}),n.branch&&h.jsx("span",{className:A.overviewBranchPill,children:v?h.jsxs("a",{href:v,target:"_blank",rel:"noreferrer noopener",className:A.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Description"}),h.jsx("div",{className:A.overviewMarkdown,children:h.jsx(rf,{remarkPlugins:[cf],children:n.description})})]}),f&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Environment"}),h.jsxs("div",{className:A.envRow,children:[m&&h.jsx("span",{className:`${A.envDot} ${AR(m.status)}`,title:m.status,"aria-label":`Status: ${m.status}`,role:"img"}),h.jsx("span",{className:A.overviewValue,children:(m==null?void 0:m.displayName)??f})]})]}),h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:A.overviewMuted,children:"None"}):h.jsx("div",{className:A.depList,children:n.dependsOn.map(y=>{const b=s.get(y),_=(b==null?void 0:b.status)==="complete";return h.jsxs("div",{className:`${A.depItem} ${_?A.depDone:A.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(b==null?void 0:b.title)??y})]},y)})})]}),h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:A.timeline,children:[n.createdAt&&h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Created"}),h.jsx("span",{className:A.timelineValue,children:wr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=Md(n.createdAt,n.assignedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Assigned"}),h.jsx("span",{className:A.timelineValue,children:wr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=Md(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Started"}),h.jsx("span",{className:A.timelineValue,children:wr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=Md(n.startedAt,n.completedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Completed"}),h.jsx("span",{className:A.timelineValue,children:wr(n.completedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:A.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:A.reviewNotes,children:n.reviewNotes})]})]})}function DR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown."]})}function kR({task:n,sessionId:s,isBlocked:l,onStart:o,onResume:c,onStop:d,onComplete:f,onDelete:m,onEdit:p}){if(n.status==="not_started")return l?h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:p,className:A.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:o,className:A.btnPrimary,children:"Start"}),h.jsx("button",{onClick:p,className:A.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:A.headerActions,children:h.jsx("button",{onClick:d,disabled:!s,className:A.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:f,className:A.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:c,className:A.btnGhost,children:"Resume"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:A.headerActions,children:h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:o,className:A.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]})}function RR({taskSessions:n,selectedSessionId:s,onSelect:l}){if(!(n.length<2))return h.jsxs("div",{className:A.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:A.attemptLabel,children:"Attempts:"}),n.map((o,c)=>{const d=o.id===s,f=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${A.attemptButton} ${d?A.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${c+1} — ${o.status}`,"aria-label":`Attempt #${c+1}, ${o.status}`,"aria-pressed":d,"data-testid":`attempt-${c+1}`,children:["#",c+1,f&&h.jsx("span",{className:A.attemptStatus,children:f})]},o.id)})]})}function Od(){const{taskId:n}=Qr(),s=an(),l=ua(),{events:o,eventsDropped:c,tasks:d,environments:f,loadSessionEvents:m,loadFindings:p,kill:v,startTask:y,resumeTask:b,completeTask:_,deleteTask:T,projects:N,taskSessions:D,loadTaskSessions:w}=nn(),j=S.useRef(null),H=S.useRef(void 0),M=S.useRef(void 0),$=S.useRef(void 0),I=S.useRef(void 0),J=S.useRef(void 0),te=s.pathname.endsWith("/stream")?"stream":s.pathname.endsWith("/findings")?"findings":"overview",[Y,X]=S.useState(te),[ue,R]=S.useState(!1),[pe,ee]=S.useState(void 0),ge=S.useRef(te);te!==ge.current&&(ge.current=te,te!==Y&&X(te));const q=d.find(U=>U.id===n),V=(q==null?void 0:q.projectId)||void 0,Q=q?D[q.id]??[]:[];let W;pe&&Q.some(U=>U.id===pe)?W=pe:W=(q==null?void 0:q.latestSessionId)||void 0;const Ne=()=>{R(!0)},Te=()=>{q&&(T(q.id),R(!1),l(Ql(q.projectId),{replace:!0}))};if((q==null?void 0:q.id)!==M.current&&(M.current=q==null?void 0:q.id,pe!==void 0&&ee(void 0)),S.useEffect(()=>{if(!(q!=null&&q.id))return;const U=q.id!==I.current,qe=q.latestSessionId!==J.current;(U||qe)&&(I.current=q.id,J.current=q.latestSessionId,w(q.id))},[q==null?void 0:q.id,q==null?void 0:q.latestSessionId,w]),(q==null?void 0:q.status)!==$.current){$.current=q==null?void 0:q.status;const U=(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;U&&U!==Y&&X(U)}const Ie=S.useMemo(()=>new Map(d.map(U=>[U.id,U])),[d]),Ce=S.useMemo(()=>{const U=W?o.filter(qe=>qe.sessionId===W):[];return $b(Xb(U))},[o,W]),xe=q?q.dependsOn.some(U=>{const qe=Ie.get(U);return qe!==void 0&&qe.status!=="complete"}):!1,Ee=S.useMemo(()=>gk(n,N,Ie),[n,N,Ie]);S.useEffect(()=>{W&&W!==H.current&&(H.current=W,m(W))},[W,m]),S.useEffect(()=>{Y==="findings"&&V&&p(V)},[Y,V,p]),S.useEffect(()=>{j.current&&Y==="stream"&&(j.current.scrollTop=j.current.scrollHeight)},[Ce.length,Y]);const F=U=>{X(U),l(ki(n,U==="overview"?void 0:U))};return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Ii,{segments:Ee}),h.jsxs("div",{className:A.header,children:[h.jsxs("span",{className:A.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(q==null?void 0:q.title)||n}),q&&h.jsx("span",{className:A.taskStatusBadge,"data-testid":"task-status",children:q.status}),(q==null?void 0:q.branch)&&h.jsx("span",{className:A.taskBranch,children:q.branch}),xe&&h.jsx("span",{className:A.taskBlockedBadge,children:"blocked"})]}),q&&h.jsx(kR,{task:q,sessionId:W,isBlocked:xe,onStart:()=>y(q.id),onResume:()=>b(q.id),onStop:()=>W&&v(W),onComplete:()=>_(q.id),onDelete:Ne,onEdit:()=>l(NT(q.id))})]}),h.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":Y==="overview",className:`${A.tab} ${Y==="overview"?A.active:""}`,onClick:()=>F("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":Y==="stream",className:`${A.tab} ${Y==="stream"?A.active:""}`,onClick:()=>F("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":Y==="findings",className:`${A.tab} ${Y==="findings"?A.active:""}`,onClick:()=>F("findings"),children:"Findings"})]}),h.jsxs(zi,{mode:"wait",children:[Y==="overview"&&h.jsx(ca.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.overviewContent,children:q?h.jsx(wR,{task:q,tasksById:Ie,environments:f,projects:N,taskSessions:Q}):h.jsx("div",{className:A.waitingMessage,children:"No additional details"})},"overview"),Y==="stream"&&h.jsxs(ca.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(RR,{taskSessions:Q,selectedSessionId:W,onSelect:U=>ee(U)}),h.jsxs("div",{ref:j,className:A.eventScroll,children:[!W&&q&&h.jsxs("div",{className:A.emptyCta,children:[h.jsx("button",{className:A.ctaButton,onClick:()=>y(q.id),children:"Start Task"}),h.jsx("div",{className:A.ctaDescription,children:"Click to begin agent execution"})]}),W&&Ce.length===0&&h.jsx("div",{className:A.waitingMessage,children:"Waiting for events..."}),h.jsx(DR,{eventsDropped:c}),Ce.map((U,qe)=>h.jsx(Pb,{event:U,toolUseCtx:U.toolUseCtx},`${U.sessionId}-${U.timestamp}-${qe}`))]})]},"stream"),Y==="findings"&&h.jsx(ca.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.tabContent,children:V?h.jsx(CR,{projectId:V}):h.jsx("div",{className:A.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),q&&h.jsx(sc,{isOpen:ue,title:"Delete Task?",description:`"${q.title}" will be permanently removed.`,onConfirm:Te,onCancel:()=>R(!1)})]})}function MR(){const n=fk();return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Ii,{segments:n}),h.jsx("div",{className:A.emptyState,children:"Configure the new environment below"})]})}const OR="_layout_1sbe4_1",BR="_content_1sbe4_8",zy={layout:OR,content:BR},LR={environments:"Environments",tokens:"Tokens",personas:"Personas",appearance:"Appearance",about:"About"};function UR(){const s=an().pathname.replace(/^\/settings\/?/,"").split("/")[0],l=LR[s],o=dk(l);return h.jsxs("div",{className:zy.layout,children:[h.jsx(Ii,{segments:o}),h.jsx("div",{className:zy.content,children:h.jsx(o0,{})})]})}const zR="_nav_29xjr_1",VR="_tab_29xjr_30",HR="_tabIcon_29xjr_56",IR="_tabActive_29xjr_62",Dr={nav:zR,tab:VR,tabIcon:HR,tabActive:IR},Da=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"tokens",label:"Tokens",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function GR(){var f;const n=an(),s=ua(),l=S.useRef(null),o=((f=Da.find(m=>n.pathname===`${Di}/${m.path}`))==null?void 0:f.path)??Da[0].path,c=S.useCallback(m=>{s(`${Di}/${m}`)},[s]),d=S.useCallback(m=>{var T,N;const p=(T=l.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!p)return;const v=Array.from(p).findIndex(D=>D===document.activeElement),y=v>=0?v:Da.findIndex(D=>D.path===o);let b=y;if(m.key==="ArrowDown")m.preventDefault(),b=(y+1)%Da.length;else if(m.key==="ArrowUp")m.preventDefault(),b=(y-1+Da.length)%Da.length;else if(m.key==="Home")m.preventDefault(),b=0;else if(m.key==="End")m.preventDefault(),b=Da.length-1;else return;const _=Da[b].path;s(`${Di}/${_}`),(N=p[b])==null||N.focus()},[o,s]);return h.jsx("nav",{className:Dr.nav,ref:l,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:d,children:Da.map(m=>{const p=m.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":p,tabIndex:p?0:-1,className:`${Dr.tab} ${p?Dr.tabActive:""}`,onClick:()=>c(m.path),children:[h.jsx("span",{className:Dr.tabIcon,"aria-hidden":"true",children:m.icon}),m.label]},m.path)})})}const PR="_container_1nk8c_1",qR="_header_1nk8c_5",YR="_headerLabel_1nk8c_12",KR="_addButton_1nk8c_20",ZR="_envRow_1nk8c_55",XR="_targeted_1nk8c_69",$R="_expanded_1nk8c_72",QR="_statusDot_1nk8c_76",FR="_pulse_1nk8c_79",JR="_envName_1nk8c_83",WR="_envActions_1nk8c_87",e3="_idleLabel_1nk8c_94",t3="_newChatButton_1nk8c_99",n3="_envActionsRow_1nk8c_126",a3="_connectButton_1nk8c_134",s3="_stopButton_1nk8c_160",i3="_deleteButton_1nk8c_186",l3="_provisionMessage_1nk8c_213",o3="_errorMessage_1nk8c_220",r3="_sessionRow_1nk8c_227",c3="_selected_1nk8c_243",u3="_sessionDot_1nk8c_248",d3="_sessionSummaryRow_1nk8c_252",f3="_sessionExpandArrow_1nk8c_272",h3="_sessionSummaryText_1nk8c_283",m3="_sessionCountBadge_1nk8c_290",p3="_emptyCta_1nk8c_313",g3="_ctaDescription_1nk8c_326",v3="_ctaButton_1nk8c_332",Ze={container:PR,header:qR,headerLabel:YR,addButton:KR,envRow:ZR,targeted:XR,expanded:$R,statusDot:QR,pulse:FR,envName:JR,envActions:WR,idleLabel:e3,newChatButton:t3,envActionsRow:n3,connectButton:a3,stopButton:s3,deleteButton:i3,provisionMessage:l3,errorMessage:o3,sessionRow:r3,selected:c3,sessionDot:u3,sessionSummaryRow:d3,sessionExpandArrow:f3,sessionSummaryText:h3,sessionCountBadge:m3,emptyCta:p3,ctaDescription:g3,ctaButton:v3},y3={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},b3={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},Vy=["running","idle","failed","interrupted","completed"],S3=.2;function x3(n){const s={};for(const d of n)s[d.status]=(s[d.status]||0)+1;const l=Vy.filter(d=>s[d]>0).map(d=>`${s[d]} ${b3[d]||d}`),o=new Set(Vy),c=Object.keys(s).filter(d=>!o.has(d)).sort().map(d=>`${s[d]} ${d}`);return[...l,...c].join(", ")}function _3({status:n}){const s=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:Ze.sessionDot,style:{color:s},children:"●"})}function T3({env:n,envSessions:s,selectedSessionId:l,isNewChatTarget:o,expanded:c,onToggleExpand:d,sessionsExpanded:f,onToggleSessionsExpand:m,provisionProgress:p,onProvision:v,onStop:y,onRemove:b,navigate:_}){const[T,N]=S.useState(!1),D=y3[n.status]||"var(--text-tertiary)",w=n.status==="connected",j=n.status==="connecting",H=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(sc,{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),N(!1)},onCancel:()=>N(!1)}),h.jsxs("div",{className:`${Ze.envRow} ${o?Ze.targeted:""} ${c?Ze.expanded:""}`,"data-testid":"env-row",onClick:d,children:[h.jsx("span",{className:`${Ze.statusDot} ${w?Ze.pulse:""}`,style:{color:D},children:"●"}),h.jsx("span",{className:Ze.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Ze.envActions,children:[s.length===0&&!o&&!c&&h.jsx("span",{className:Ze.idleLabel,children:"(idle)"}),w&&h.jsx("button",{onClick:M=>{M.stopPropagation(),_(h0(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Ze.newChatButton,children:"+"})]})]}),c&&h.jsxs("div",{className:Ze.envActionsRow,children:[j&&p&&h.jsx("span",{className:Ze.provisionMessage,children:p.message}),n.status==="error"&&(p==null?void 0:p.stage)==="error"&&h.jsx("span",{className:Ze.errorMessage,children:p.message}),H&&h.jsx("button",{onClick:M=>{M.stopPropagation(),v(n.id)},className:Ze.connectButton,children:n.status==="error"?"Retry":"Connect"}),w&&h.jsx("button",{onClick:M=>{M.stopPropagation(),y(n.id)},className:Ze.stopButton,children:"Stop"}),!j&&h.jsx("button",{onClick:M=>{M.stopPropagation(),N(!0)},className:Ze.deleteButton,children:"Delete"})]}),s.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Ze.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":f,"aria-label":f?"Collapse sessions":"Expand sessions",onClick:m,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),m())},children:[h.jsx("span",{className:`${Ze.sessionExpandArrow} ${f?Ze.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ze.sessionSummaryText,children:x3(s)}),h.jsx("span",{className:Ze.sessionCountBadge,children:s.length})]}),h.jsx(zi,{children:f&&h.jsx(ca.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:S3,ease:"easeInOut"},style:{overflow:"hidden"},children:s.map(M=>h.jsxs("div",{onClick:$=>{$.stopPropagation(),_(f0(M.id))},className:`${Ze.sessionRow} ${l===M.id?Ze.selected:""}`,title:M.prompt,"data-testid":"session-row",children:[h.jsx(_3,{status:M.status})," ",M.prompt.length>24?M.prompt.slice(0,24)+"...":M.prompt]},M.id))})})]})]})}function E3(){const{environments:n,sessions:s,provisionStatus:l,provisionEnvironment:o,stopEnvironment:c,removeEnvironment:d}=nn(),f=ua(),[m,p]=S.useState(null),[v,y]=S.useState(new Set),b=Wt("/sessions/:sessionId"),_=Wt("/sessions/new"),T=(b==null?void 0:b.params.sessionId)!=="new"?b==null?void 0:b.params.sessionId:void 0,[N]=yf(),D=_?N.get("env")??void 0:void 0;return h.jsxs("div",{className:Ze.container,children:[h.jsxs("div",{className:Ze.header,children:[h.jsx("span",{className:Ze.headerLabel,children:"Environments"}),h.jsx("button",{className:Ze.addButton,onClick:()=>f(rv),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Ze.emptyCta,children:[h.jsx("button",{className:Ze.ctaButton,onClick:()=>f(rv),children:"Add Environment"}),h.jsx("div",{className:Ze.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(w=>{const j=s.filter(H=>H.environmentId===w.id);return h.jsx(T3,{env:w,envSessions:j,selectedSessionId:T,isNewChatTarget:D===w.id,expanded:m===w.id,onToggleExpand:()=>p(m===w.id?null:w.id),sessionsExpanded:v.has(w.id),onToggleSessionsExpand:()=>{y(H=>{const M=new Set(H);return M.has(w.id)?M.delete(w.id):M.add(w.id),M})},provisionProgress:l[w.id],onProvision:o,onStop:c,onRemove:d,navigate:f},w.id)})]})}function j3(){return h.jsx(E3,{})}const C3="_section_1ingb_14",A3="_sectionTitle_1ingb_26",N3="_sectionDescription_1ingb_35",w3="_tokenList_1ingb_48",D3="_tokenRow_1ingb_55",k3="_tokenBadge_1ingb_68",R3="_tokenName_1ingb_83",M3="_tokenTarget_1ingb_90",O3="_deleteButton_1ingb_99",B3="_addForm_1ingb_113",L3="_formRow_1ingb_119",U3="_input_1ingb_125",z3="_select_1ingb_155",V3="_addButton_1ingb_187",H3="_emptyStateInfo_1ingb_221",I3="_themeOptions_1ingb_229",G3="_themeOption_1ingb_229",P3="_themeOptionSelected_1ingb_254",q3="_themeOptionHeader_1ingb_259",Y3="_themeOptionLabel_1ingb_266",K3="_themeOptionDesc_1ingb_273",Z3="_variantToggle_1ingb_279",X3="_variantButton_1ingb_286",$3="_variantActive_1ingb_305",Q3="_themeSwatches_1ingb_311",F3="_themeSwatch_1ingb_311",J3="_systemToggle_1ingb_325",W3="_systemToggleHint_1ingb_341",eM="_themeActive_1ingb_348",tM="_aboutGrid_1ingb_354",nM="_aboutItem_1ingb_360",aM="_aboutLabel_1ingb_373",sM="_aboutValue_1ingb_379",iM="_aboutDot_1ingb_387",lM="_aboutDotConnected_1ingb_394",oM="_aboutDotDisconnected_1ingb_398",fe={section:C3,sectionTitle:A3,sectionDescription:N3,tokenList:w3,tokenRow:D3,tokenBadge:k3,tokenName:R3,tokenTarget:M3,deleteButton:O3,addForm:B3,formRow:L3,input:U3,select:z3,addButton:V3,emptyStateInfo:H3,themeOptions:I3,themeOption:G3,themeOptionSelected:P3,themeOptionHeader:q3,themeOptionLabel:Y3,themeOptionDesc:K3,variantToggle:Z3,variantButton:X3,variantActive:$3,themeSwatches:Q3,themeSwatch:F3,systemToggle:J3,systemToggleHint:W3,themeActive:eM,aboutGrid:tM,aboutItem:nM,aboutLabel:aM,aboutValue:sM,aboutDot:iM,aboutDotConnected:lM,aboutDotDisconnected:oM},rM=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function cM(){const{tokens:n,setToken:s,deleteToken:l}=nn(),{showToast:o}=no(),[c,d]=S.useState(""),[f,m]=S.useState(""),[p,v]=S.useState("env_var"),[y,b]=S.useState(""),[_,T]=S.useState(null),N=j=>{if(j.preventDefault(),!c||!f)return;const H=p==="env_var"?y||c.toUpperCase()+"_TOKEN":"";s(c,f,p,H,p==="file"?y:""),o("Token saved successfully","success"),d(""),m(""),b("")},D=j=>{T(j)},w=()=>{_&&(l(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(sc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:w,onCancel:()=>T(null)}),h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Tokens"}),h.jsx("p",{className:fe.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:fe.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:fe.tokenList,children:n.map(j=>h.jsxs("div",{className:fe.tokenRow,children:[h.jsx("span",{className:fe.tokenBadge,children:j.tokenType}),h.jsx("span",{className:fe.tokenName,children:j.name}),h.jsx("span",{className:fe.tokenTarget,children:j.tokenType==="env_var"?j.envVar:j.filePath}),h.jsx("button",{className:fe.deleteButton,onClick:()=>D(j.name),title:`Delete ${j.name}`,children:"×"})]},j.name))}),h.jsxs("form",{className:fe.addForm,onSubmit:N,children:[h.jsxs("div",{className:fe.formRow,children:[h.jsx("input",{className:fe.input,type:"text",placeholder:"Token name",value:c,onChange:j=>d(j.target.value)}),h.jsx("input",{className:fe.input,type:"password",placeholder:"Value",value:f,onChange:j=>m(j.target.value)})]}),h.jsxs("div",{className:fe.formRow,children:[h.jsx("select",{className:fe.select,value:p,onChange:j=>v(j.target.value),children:rM.map(j=>h.jsx("option",{value:j.value,children:j.label},j.value))}),h.jsx("input",{className:fe.input,type:"text",placeholder:p==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:j=>b(j.target.value)}),h.jsx("button",{className:fe.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function uM(){return h.jsx(cM,{})}const dM="_container_1xcp7_1",fM="_header_1xcp7_7",hM="_form_1xcp7_19",mM="_formActions_1xcp7_87",pM="_list_1xcp7_93",gM="_card_1xcp7_99",vM="_active_1xcp7_109",yM="_cardHeader_1xcp7_113",bM="_cardActions_1xcp7_123",SM="_description_1xcp7_128",xM="_meta_1xcp7_134",_M="_promptDetails_1xcp7_151",TM="_promptText_1xcp7_163",EM="_empty_1xcp7_180",jM="_btnPrimary_1xcp7_186",CM="_btnSecondary_1xcp7_220",AM="_btnSmall_1xcp7_247",NM="_btnDanger_1xcp7_273",Et={container:dM,header:fM,form:hM,formActions:mM,list:pM,card:gM,active:vM,cardHeader:yM,cardActions:bM,description:SM,meta:xM,promptDetails:_M,promptText:TM,empty:EM,btnPrimary:jM,btnSecondary:CM,btnSmall:AM,btnDanger:NM};function wM(){const{personas:n,createPersona:s,updatePersona:l,deletePersona:o}=nn(),[c,d]=S.useState(null),[f,m]=S.useState(!1),[p,v]=S.useState(null),[y,b]=S.useState(""),[_,T]=S.useState(""),[N,D]=S.useState(""),[w,j]=S.useState(""),[H,M]=S.useState(""),[$,I]=S.useState(0),J=()=>{b(""),T(""),D(""),j(""),M(""),I(0)},te=()=>{J(),d(null),m(!0)},Y=ee=>{b(ee.name),T(ee.description),D(ee.systemPrompt),j(ee.runtime),M(ee.model),I(ee.maxTurns),d(ee),m(!1)},X=ee=>{ee.preventDefault(),!(!y.trim()||!N.trim())&&(c?(l(c.id,y,_,N,w,H,$),d(null)):(s(y,_,N,w,H,$),m(!1)),J())},ue=ee=>{o(ee),v(null),(c==null?void 0:c.id)===ee&&(d(null),J())},R=()=>{d(null),m(!1),J()},pe=()=>h.jsxs("form",{onSubmit:X,className:Et.form,children:[h.jsx("h3",{children:c?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:ee=>b(ee.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:_,onChange:ee=>T(ee.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:w,onChange:ee=>j(ee.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:H,onChange:ee=>M(ee.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:$,onChange:ee=>I(parseInt(ee.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:N,onChange:ee=>D(ee.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:Et.formActions,children:[h.jsx("button",{type:"submit",className:Et.btnPrimary,children:c?"Save":"Create"}),h.jsx("button",{type:"button",onClick:R,className:Et.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Et.container,children:[h.jsxs("div",{className:Et.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:te,className:Et.btnPrimary,children:"+ New Persona"})]}),(f||c)&&pe(),n.length===0&&!f?h.jsx("p",{className:Et.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Et.list,children:n.map(ee=>h.jsxs("div",{className:`${Et.card} ${(c==null?void 0:c.id)===ee.id?Et.active:""}`,children:[h.jsxs("div",{className:Et.cardHeader,children:[h.jsx("strong",{children:ee.name}),h.jsxs("div",{className:Et.cardActions,children:[h.jsx("button",{onClick:()=>Y(ee),className:Et.btnSmall,children:"Edit"}),p===ee.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ue(ee.id),className:Et.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>v(null),className:Et.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>v(ee.id),className:Et.btnSmall,children:"Delete"})]})]}),ee.description&&h.jsx("p",{className:Et.description,children:ee.description}),h.jsxs("div",{className:Et.meta,children:[ee.runtime&&h.jsxs("span",{children:["Runtime: ",ee.runtime]}),ee.model&&h.jsxs("span",{children:["Model: ",ee.model]}),ee.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",ee.maxTurns]})]}),h.jsxs("details",{className:Et.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Et.promptText,children:ee.systemPrompt})]})]},ee.id))})]})}function DM(){return h.jsx(wM,{})}function kM(){const{themeId:n,resolvedThemeId:s,setTheme:l,preferSystem:o,setPreferSystem:c}=Ky();return h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Appearance"}),h.jsx("p",{className:fe.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:fe.themeOptions,children:Kr.filter(d=>!d.hidden).map(d=>{const f=!!(d.variantLightId&&d.variantDarkId),m=f?n===d.id||n===d.variantLightId||n===d.variantDarkId:n===d.id,p=f&&s===d.variantLightId;return h.jsxs("button",{type:"button",className:`${fe.themeOption} ${m?fe.themeOptionSelected:""}`,"aria-pressed":m,onClick:()=>l(d.id),children:[h.jsxs("span",{className:fe.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:fe.themeOptionLabel,children:d.label}),h.jsx("span",{className:fe.themeOptionDesc,children:d.description})]}),f&&h.jsxs("span",{className:fe.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${fe.variantButton} ${m&&p?fe.variantActive:""}`,onClick:v=>{v.stopPropagation(),c(!1),l(d.variantLightId)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),c(!1),l(d.variantLightId))},"aria-label":"Light variant","aria-pressed":m&&p,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${fe.variantButton} ${m&&!p?fe.variantActive:""}`,onClick:v=>{v.stopPropagation(),c(!1),l(d.variantDarkId)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),c(!1),l(d.variantDarkId))},"aria-label":"Dark variant","aria-pressed":m&&!p,children:"☾"})]})]}),d.swatches&&h.jsx("span",{className:fe.themeSwatches,children:d.swatches.map((v,y)=>h.jsx("span",{className:fe.themeSwatch,style:{background:v}},y))})]},d.id)})}),h.jsxs("label",{className:fe.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:d=>c(d.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:fe.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:fe.themeActive,children:["Active theme: ",h.jsx("strong",{children:s})]})]})}function RM(){return h.jsx(kM,{})}function MM(){const{connected:n,environments:s,sessions:l}=nn(),o=s.filter(f=>f.status==="connected").length,c=s.length,d=l.filter(f=>["running","idle"].includes(f.status)).length;return h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"About"}),h.jsx("p",{className:fe.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:fe.aboutGrid,children:[h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Connection"}),h.jsxs("span",{className:fe.aboutValue,children:[h.jsx("span",{className:`${fe.aboutDot} ${n?fe.aboutDotConnected:fe.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Environments"}),h.jsxs("span",{className:fe.aboutValue,children:[o,"/",c," connected"]})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:fe.aboutValue,children:d})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Version"}),h.jsx("span",{className:fe.aboutValue,children:"0.26.0"})]})]})]})}function OM(){return h.jsx(MM,{})}const BM="_root_cdda9_1",LM="_body_cdda9_7",UM="_main_cdda9_13",Bd={root:BM,body:LM,main:UM},zM=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function VM(){const{lastSpawnedId:n,environments:s}=nn(),{showToast:l}=no();_w(s,l);const o=ua(),c=an(),d=c.pathname.startsWith(Di);return S.useEffect(()=>{n&&!c.pathname.startsWith("/tasks/")&&o(f0(n),{replace:!0})},[n,o,c.pathname]),h.jsxs("div",{className:Bd.root,children:[h.jsx(LT,{}),h.jsxs("div",{className:Bd.body,children:[d?h.jsx(GR,{}):h.jsx(PN,{}),h.jsxs("div",{className:Bd.main,children:[h.jsx(o0,{}),h.jsx(rw,{})]})]}),h.jsx(xw,{})]})}function HM(){return h.jsx(Z_,{children:h.jsxs(Mt,{element:h.jsx(VM,{}),children:[h.jsx(Mt,{index:!0,element:h.jsx(ck,{})}),h.jsx(Mt,{path:"sessions/new",element:h.jsx(vk,{})}),h.jsx(Mt,{path:"sessions/:sessionId",element:h.jsx(xk,{})}),h.jsx(Mt,{path:"projects/:projectId",element:h.jsx(Kk,{})}),h.jsx(Mt,{path:"tasks/new",element:h.jsx(hR,{})}),h.jsx(Mt,{path:"tasks/:taskId",element:h.jsx(Od,{})}),h.jsx(Mt,{path:"tasks/:taskId/stream",element:h.jsx(Od,{})}),h.jsx(Mt,{path:"tasks/:taskId/findings",element:h.jsx(Od,{})}),h.jsx(Mt,{path:"tasks/:taskId/edit",element:h.jsx(mR,{})}),h.jsx(Mt,{path:"environments/new",element:h.jsx(MR,{})}),h.jsxs(Mt,{path:"settings",element:h.jsx(UR,{}),children:[h.jsx(Mt,{index:!0,element:h.jsx(Id,{to:"environments",replace:!0})}),h.jsx(Mt,{path:"environments",element:h.jsx(j3,{})}),h.jsx(Mt,{path:"tokens",element:h.jsx(uM,{})}),h.jsx(Mt,{path:"personas",element:h.jsx(DM,{})}),h.jsx(Mt,{path:"appearance",element:h.jsx(RM,{})}),h.jsx(Mt,{path:"about",element:h.jsx(OM,{})})]}),h.jsx(Mt,{path:"*",element:h.jsx(Id,{to:"/",replace:!0})})]})})}function IM(){const n=zM?Px:Ox;return h.jsx($x,{children:h.jsx(Yx,{children:h.jsx(n,{children:h.jsx(yT,{children:h.jsx(HM,{})})})})})}xx.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(IM,{})}));