@grackle-ai/web 0.29.1 → 0.31.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 qx,a as S,j as h,v as Yx,b as Fx,t as kr,i as Kx,f as $x,M as jf,c as Nf}from"./markdown-gcy1Jmzi.js";import{r as Zx,d as r0,H as c0,P as u0,i as Xx,B as Qx,a as Jx,C as Wx,M as e_}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(r){if(r.ep)return;r.ep=!0;const u=l(r);fetch(r.href,u)}})();var Ed={exports:{}},Hl={},Ad={exports:{}},Cd={};/**
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 d0;function t_(){return d0||(d0=1,(function(n){function a(L,K){var ee=L.length;L.push(K);e:for(;0<ee;){var ke=ee-1>>>1,je=L[ke];if(0<r(je,K))L[ke]=K,L[ee]=je,ee=ke;else break e}}function l(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var K=L[0],ee=L.pop();if(ee!==K){L[0]=ee;e:for(var ke=0,je=L.length,qe=je>>>1;ke<qe;){var we=2*(ke+1)-1,xe=L[we],Ae=we+1,Q=L[Ae];if(0>r(xe,ee))Ae<je&&0>r(Q,xe)?(L[ke]=Q,L[Ae]=ee,ke=Ae):(L[ke]=xe,L[we]=ee,ke=we);else if(Ae<je&&0>r(Q,ee))L[ke]=Q,L[Ae]=ee,ke=Ae;else break e}}return K}function r(L,K){var ee=L.sortIndex-K.sortIndex;return ee!==0?ee:L.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],g=[],y=1,b=null,_=3,T=!1,j=!1,A=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function X(L){for(var K=l(g);K!==null;){if(K.callback===null)o(g);else if(K.startTime<=L)o(g),K.sortIndex=K.expirationTime,a(p,K);else break;K=l(g)}}function H(L){if(A=!1,X(L),!j)if(l(p)!==null)j=!0,J||(J=!0,pe());else{var K=l(g);K!==null&&G(H,K.startTime-L)}}var J=!1,W=-1,Y=5,ne=-1;function ge(){return w?!0:!(n.unstable_now()-ne<Y)}function U(){if(w=!1,J){var L=n.unstable_now();ne=L;var K=!0;try{e:{j=!1,A&&(A=!1,z(W),W=-1),T=!0;var ee=_;try{t:{for(X(L),b=l(p);b!==null&&!(b.expirationTime>L&&ge());){var ke=b.callback;if(typeof ke=="function"){b.callback=null,_=b.priorityLevel;var je=ke(b.expirationTime<=L);if(L=n.unstable_now(),typeof je=="function"){b.callback=je,X(L),K=!0;break t}b===l(p)&&o(p),X(L)}else o(p);b=l(p)}if(b!==null)K=!0;else{var qe=l(g);qe!==null&&G(H,qe.startTime-L),K=!1}}break e}finally{b=null,_=ee,T=!1}K=void 0}}finally{K?pe():J=!1}}}var pe;if(typeof M=="function")pe=function(){M(U)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ye=te.port2;te.port1.onmessage=U,pe=function(){ye.postMessage(null)}}else pe=function(){C(U,0)};function G(L,K){W=C(function(){L(n.unstable_now())},K)}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(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(L){switch(_){case 1:case 2:case 3:var K=3;break;default:K=_}var ee=_;_=K;try{return L()}finally{_=ee}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(L,K){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ee=_;_=L;try{return K()}finally{_=ee}},n.unstable_scheduleCallback=function(L,K,ee){var ke=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ke+ee:ke):ee=ke,L){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ee+je,L={id:y++,callback:K,priorityLevel:L,startTime:ee,expirationTime:je,sortIndex:-1},ee>ke?(L.sortIndex=ee,a(g,L),l(p)===null&&L===l(g)&&(A?(z(W),W=-1):A=!0,G(H,ee-ke))):(L.sortIndex=je,a(p,L),j||T||(j=!0,J||(J=!0,pe()))),L},n.unstable_shouldYield=ge,n.unstable_wrapCallback=function(L){var K=_;return function(){var ee=_;_=K;try{return L.apply(this,arguments)}finally{_=ee}}}})(Cd)),Cd}var f0;function n_(){return f0||(f0=1,Ad.exports=t_()),Ad.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 h0;function a_(){if(h0)return Hl;h0=1;var n=n_(),a=qx(),l=Zx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,i=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(i=c.return,i!==null){s=i;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return p(c),e;if(f===i)return p(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==i.return)s=c,i=f;else{for(var v=!1,x=c.child;x;){if(x===s){v=!0,s=c,i=f;break}if(x===i){v=!0,i=c,s=f;break}x=x.sibling}if(!v){for(x=f.child;x;){if(x===s){v=!0,s=f,i=c;break}if(x===i){v=!0,i=f,s=c;break}x=x.sibling}if(!v)throw Error(o(189))}}if(s.alternate!==i)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function 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"),j=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),M=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case C:return"Profiler";case w:return"StrictMode";case H:return"Suspense";case J:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case M:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var G=Array.isArray,L=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ke=[],je=-1;function qe(e){return{current:e}}function we(e){0>je||(e.current=ke[je],ke[je]=null,je--)}function xe(e,t){je++,ke[je]=e.current,e.current=t}var Ae=qe(null),Q=qe(null),q=qe(null),I=qe(null);function De(e,t){switch(xe(q,t),xe(Q,e),xe(Ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kg(t),e=Rg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}we(Ae),xe(Ae,e)}function Fe(){we(Ae),we(Q),we(q)}function gt(e){e.memoizedState!==null&&xe(I,e);var t=Ae.current,s=Rg(t,e.type);t!==s&&(xe(Q,e),xe(Ae,s))}function xt(e){Q.current===e&&(we(Ae),we(Q)),I.current===e&&(we(I),Ul._currentValue=ee)}var Gt,Je;function Ze(e){if(Gt===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Gt=t&&t[1]||"",Je=-1<s.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+Gt+e+Je}var Ue=!1;function bn(e,t){if(!e||Ue)return"";Ue=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(V){var B=V}Reflect.construct(e,[],$)}else{try{$.call()}catch(V){B=V}e.call($.prototype)}}else{try{throw Error()}catch(V){B=V}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(V){if(V&&B&&typeof V.stack=="string")return[V.stack,B.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),v=f[0],x=f[1];if(v&&x){var E=v.split(`
20
+ `),O=x.split(`
21
+ `);for(c=i=0;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;for(;c<O.length&&!O[c].includes("DetermineComponentFrameRoot");)c++;if(i===E.length||c===O.length)for(i=E.length-1,c=O.length-1;1<=i&&0<=c&&E[i]!==O[c];)c--;for(;1<=i&&0<=c;i--,c--)if(E[i]!==O[c]){if(i!==1||c!==1)do if(i--,c--,0>c||E[i]!==O[c]){var P=`
22
+ `+E[i].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=i&&0<=c);break}}}finally{Ue=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Ze(s):""}function Sn(e,t){switch(e.tag){case 26:case 27:case 5:return Ze(e.type);case 16:return Ze("Lazy");case 13:return e.child!==t&&t!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return bn(e.type,!1);case 11:return bn(e.type.render,!1);case 1:return bn(e.type,!0);case 31:return Ze("Activity");default:return""}}function Kn(e){try{var t="",s=null;do t+=Sn(e,s),s=e,e=e.return;while(e);return t}catch(i){return`
23
+ Error generating stack: `+i.message+`
24
+ `+i.stack}}var tn=Object.prototype.hasOwnProperty,$n=n.unstable_scheduleCallback,Z=n.unstable_cancelCallback,le=n.unstable_shouldYield,ce=n.unstable_requestPaint,de=n.unstable_now,Te=n.unstable_getCurrentPriorityLevel,Ee=n.unstable_ImmediatePriority,We=n.unstable_UserBlockingPriority,Le=n.unstable_NormalPriority,lt=n.unstable_LowPriority,wt=n.unstable_IdlePriority,_t=n.log,Bt=n.unstable_setDisableYieldValue,ot=null,Tt=null;function rn(e){if(typeof _t=="function"&&Bt(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(ot,e)}catch{}}var vt=Math.clz32?Math.clz32:ps,Yt=Math.log,Ft=Math.LN2;function ps(e){return e>>>=0,e===0?32:31-(Yt(e)/Ft|0)|0}var ae=256,Me=262144,be=4194304;function re(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ie(e,t,s){var i=e.pendingLanes;if(i===0)return 0;var c=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var x=i&134217727;return x!==0?(i=x&~f,i!==0?c=re(i):(v&=x,v!==0?c=re(v):s||(s=x&~e,s!==0&&(c=re(s))))):(x=i&~f,x!==0?c=re(x):v!==0?c=re(v):s||(s=i&~e,s!==0&&(c=re(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function se(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rn(){var e=be;return be<<=1,(be&62914560)===0&&(be=4194304),e}function Fs(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Ua(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vo(e,t,s,i,c,f){var v=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var x=e.entanglements,E=e.expirationTimes,O=e.hiddenUpdates;for(s=v&~s;0<s;){var P=31-vt(s),$=1<<P;x[P]=0,E[P]=-1;var B=O[P];if(B!==null)for(O[P]=null,P=0;P<B.length;P++){var V=B[P];V!==null&&(V.lane&=-536870913)}s&=~$}i!==0&&Zi(e,i,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function Zi(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-vt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|s&261930}function Xi(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var i=31-vt(s),c=1<<i;c&t|e[i]&t&&(e[i]|=t),s&=~c}}function Qi(e,t){var s=t&-t;return s=(s&42)!==0?1:Ks(s),(s&(e.suspendedLanes|t))!==0?0:s}function Ks(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 $s(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ji(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:t0(e.type))}function Wi(e,t){var s=K.p;try{return K.p=e,t()}finally{K.p=s}}var Zn=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Zn,$t="__reactProps$"+Zn,fa="__reactContainer$"+Zn,Zs="__reactEvents$"+Zn,yo="__reactListeners$"+Zn,oe="__reactHandles$"+Zn,Ye="__reactResources$"+Zn,Be="__reactMarker$"+Zn;function Ie(e){delete e[Lt],delete e[$t],delete e[Zs],delete e[yo],delete e[oe]}function nn(e){var t=e[Lt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[fa]||s[Lt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Vg(e);e!==null;){if(s=e[Lt])return s;e=Vg(e)}return t}e=s,s=e.parentNode}return null}function Zt(e){if(e=e[Lt]||e[fa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ft(e){var t=e[Ye];return t||(t=e[Ye]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[Be]=!0}var bh=new Set,Sh={};function gs(e,t){Xs(e,t),Xs(e+"Capture",t)}function Xs(e,t){for(Sh[e]=t,e=0;e<t.length;e++)bh.add(t[e])}var B1=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]*$"),xh={},_h={};function L1(e){return tn.call(_h,e)?!0:tn.call(xh,e)?!1:B1.test(e)?_h[e]=!0:(xh[e]=!0,!1)}function bo(e,t,s){if(L1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function So(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function ha(e,t,s,i){if(i===null)e.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+i)}}function Mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Th(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U1(e,t,s){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(v){s=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(v){s=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vc(e){if(!e._valueTracker){var t=Th(e)?"checked":"value";e._valueTracker=U1(e,t,""+e[t])}}function Eh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),i="";return e&&(i=Th(e)?e.checked?"true":"false":e.value),e=i,e!==s?(t.setValue(e),!0):!1}function xo(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 z1=/[\n"\\]/g;function On(e){return e.replace(z1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yc(e,t,s,i,c,f,v,x){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mn(t)):e.value!==""+Mn(t)&&(e.value=""+Mn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?bc(e,v,Mn(t)):s!=null?bc(e,v,Mn(s)):i!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Mn(x):e.removeAttribute("name")}function Ah(e,t,s,i,c,f,v,x){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){vc(e);return}s=s!=null?""+Mn(s):"",t=t!=null?""+Mn(t):s,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),vc(e)}function bc(e,t,s){t==="number"&&xo(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Qs(e,t,s,i){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&i&&(e[s].defaultSelected=!0)}else{for(s=""+Mn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Ch(e,t,s){if(t!=null&&(t=""+Mn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+Mn(s):""}function jh(e,t,s,i){if(t==null){if(i!=null){if(s!=null)throw Error(o(92));if(G(i)){if(1<i.length)throw Error(o(93));i=i[0]}s=i}s==null&&(s=""),t=s}s=Mn(t),e.defaultValue=s,i=e.textContent,i===s&&i!==""&&i!==null&&(e.value=i),vc(e)}function Js(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var V1=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 Nh(e,t,s){var i=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,s):typeof s!="number"||s===0||V1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function wh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var i in s)!s.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&s[c]!==i&&Nh(e,c,i)}else for(var f in t)t.hasOwnProperty(f)&&Nh(e,f,t[f])}function Sc(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 I1=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"]]),H1=/^[\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 _o(e){return H1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ma(){}var xc=null;function _c(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ws=null,ei=null;function Dh(e){var t=Zt(e);if(t&&(e=t.stateNode)){var s=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(yc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+On(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var i=s[t];if(i!==e&&i.form===e.form){var c=i[$t]||null;if(!c)throw Error(o(90));yc(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)i=s[t],i.form===e.form&&Eh(i)}break e;case"textarea":Ch(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Qs(e,!!s.multiple,t,!1)}}}var Tc=!1;function kh(e,t,s){if(Tc)return e(t,s);Tc=!0;try{var i=e(t);return i}finally{if(Tc=!1,(Ws!==null||ei!==null)&&(cr(),Ws&&(t=Ws,e=ei,ei=Ws=null,Dh(t),e)))for(t=0;t<e.length;t++)Dh(e[t])}}function el(e,t){var s=e.stateNode;if(s===null)return null;var i=s[$t]||null;if(i===null)return null;s=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ec=!1;if(pa)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){Ec=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{Ec=!1}var za=null,Ac=null,To=null;function Rh(){if(To)return To;var e,t=Ac,s=t.length,i,c="value"in za?za.value:za.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var v=s-e;for(i=1;i<=v&&t[s-i]===c[f-i];i++);return To=c.slice(e,1<i?1-i:void 0)}function Eo(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 Ao(){return!0}function Mh(){return!1}function hn(e){function t(s,i,c,f,v){this._reactName=s,this._targetInst=c,this.type=i,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ao:Mh,this.isPropagationStopped=Mh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ao)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ao)},persist:function(){},isPersistent:Ao}),t}var vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Co=hn(vs),nl=b({},vs,{view:0,detail:0}),G1=hn(nl),Cc,jc,al,jo=b({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wc,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!==al&&(al&&e.type==="mousemove"?(Cc=e.screenX-al.screenX,jc=e.screenY-al.screenY):jc=Cc=0,al=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),Oh=hn(jo),P1=b({},jo,{dataTransfer:0}),q1=hn(P1),Y1=b({},nl,{relatedTarget:0}),Nc=hn(Y1),F1=b({},vs,{animationName:0,elapsedTime:0,pseudoElement:0}),K1=hn(F1),$1=b({},vs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Z1=hn($1),X1=b({},vs,{data:0}),Bh=hn(X1),Q1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J1={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"},W1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W1[e])?!!t[e]:!1}function wc(){return eS}var tS=b({},nl,{key:function(e){if(e.key){var t=Q1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Eo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wc,charCode:function(e){return e.type==="keypress"?Eo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Eo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nS=hn(tS),aS=b({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lh=hn(aS),sS=b({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wc}),iS=hn(sS),lS=b({},vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),oS=hn(lS),rS=b({},jo,{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}),cS=hn(rS),uS=b({},vs,{newState:0,oldState:0}),dS=hn(uS),fS=[9,13,27,32],Dc=pa&&"CompositionEvent"in window,sl=null;pa&&"documentMode"in document&&(sl=document.documentMode);var hS=pa&&"TextEvent"in window&&!sl,Uh=pa&&(!Dc||sl&&8<sl&&11>=sl),zh=" ",Vh=!1;function Ih(e,t){switch(e){case"keyup":return fS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function mS(e,t){switch(e){case"compositionend":return Hh(t);case"keypress":return t.which!==32?null:(Vh=!0,zh);case"textInput":return e=t.data,e===zh&&Vh?null:e;default:return null}}function pS(e,t){if(ti)return e==="compositionend"||!Dc&&Ih(e,t)?(e=Rh(),To=Ac=za=null,ti=!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 Uh&&t.locale!=="ko"?null:t.data;default:return null}}var gS={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 Gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gS[e.type]:t==="textarea"}function Ph(e,t,s,i){Ws?ei?ei.push(i):ei=[i]:Ws=i,t=gr(t,"onChange"),0<t.length&&(s=new Co("onChange","change",null,s,i),e.push({event:s,listeners:t}))}var il=null,ll=null;function vS(e){Ag(e,0)}function No(e){var t=yt(e);if(Eh(t))return e}function qh(e,t){if(e==="change")return t}var Yh=!1;if(pa){var kc;if(pa){var Rc="oninput"in document;if(!Rc){var Fh=document.createElement("div");Fh.setAttribute("oninput","return;"),Rc=typeof Fh.oninput=="function"}kc=Rc}else kc=!1;Yh=kc&&(!document.documentMode||9<document.documentMode)}function Kh(){il&&(il.detachEvent("onpropertychange",$h),ll=il=null)}function $h(e){if(e.propertyName==="value"&&No(ll)){var t=[];Ph(t,ll,e,_c(e)),kh(vS,t)}}function yS(e,t,s){e==="focusin"?(Kh(),il=t,ll=s,il.attachEvent("onpropertychange",$h)):e==="focusout"&&Kh()}function bS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return No(ll)}function SS(e,t){if(e==="click")return No(t)}function xS(e,t){if(e==="input"||e==="change")return No(t)}function _S(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:_S;function ol(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(i=0;i<s.length;i++){var c=s[i];if(!tn.call(t,c)||!xn(e[c],t[c]))return!1}return!0}function Zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xh(e,t){var s=Zh(e);e=0;for(var i;s;){if(s.nodeType===3){if(i=e+s.textContent.length,e<=t&&i>=t)return{node:s,offset:t-e};e=i}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Zh(s)}}function Qh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=xo(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=xo(e.document)}return t}function Mc(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 TS=pa&&"documentMode"in document&&11>=document.documentMode,ni=null,Oc=null,rl=null,Bc=!1;function Wh(e,t,s){var i=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Bc||ni==null||ni!==xo(i)||(i=ni,"selectionStart"in i&&Mc(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}),rl&&ol(rl,i)||(rl=i,i=gr(Oc,"onSelect"),0<i.length&&(t=new Co("onSelect","select",null,t,s),e.push({event:t,listeners:i}),t.target=ni)))}function ys(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var ai={animationend:ys("Animation","AnimationEnd"),animationiteration:ys("Animation","AnimationIteration"),animationstart:ys("Animation","AnimationStart"),transitionrun:ys("Transition","TransitionRun"),transitionstart:ys("Transition","TransitionStart"),transitioncancel:ys("Transition","TransitionCancel"),transitionend:ys("Transition","TransitionEnd")},Lc={},em={};pa&&(em=document.createElement("div").style,"AnimationEvent"in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),"TransitionEvent"in window||delete ai.transitionend.transition);function bs(e){if(Lc[e])return Lc[e];if(!ai[e])return e;var t=ai[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in em)return Lc[e]=t[s];return e}var tm=bs("animationend"),nm=bs("animationiteration"),am=bs("animationstart"),ES=bs("transitionrun"),AS=bs("transitionstart"),CS=bs("transitioncancel"),sm=bs("transitionend"),im=new Map,Uc="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(" ");Uc.push("scrollEnd");function Xn(e,t){im.set(e,t),gs(t,[e])}var wo=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)},Bn=[],si=0,zc=0;function Do(){for(var e=si,t=zc=si=0;t<e;){var s=Bn[t];Bn[t++]=null;var i=Bn[t];Bn[t++]=null;var c=Bn[t];Bn[t++]=null;var f=Bn[t];if(Bn[t++]=null,i!==null&&c!==null){var v=i.pending;v===null?c.next=c:(c.next=v.next,v.next=c),i.pending=c}f!==0&&lm(s,c,f)}}function ko(e,t,s,i){Bn[si++]=e,Bn[si++]=t,Bn[si++]=s,Bn[si++]=i,zc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Vc(e,t,s,i){return ko(e,t,s,i),Ro(e)}function Ss(e,t){return ko(e,null,null,t),Ro(e)}function lm(e,t,s){e.lanes|=s;var i=e.alternate;i!==null&&(i.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,i=f.alternate,i!==null&&(i.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-vt(s),e=f.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=s|536870912),f):null}function Ro(e){if(50<Dl)throw Dl=0,$u=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function jS(e,t,s,i){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(e,t,s,i){return new jS(e,t,s,i)}function Ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ga(e,t){var s=e.alternate;return s===null?(s=_n(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function om(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Mo(e,t,s,i,c,f){var v=0;if(i=e,typeof e=="function")Ic(e)&&(v=1);else if(typeof e=="string")v=Rx(e,s,Ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=_n(31,s,t,c),e.elementType=ne,e.lanes=f,e;case A:return xs(s.children,c,f,t);case w:v=8,c|=24;break;case C:return e=_n(12,s,t,c|2),e.elementType=C,e.lanes=f,e;case H:return e=_n(13,s,t,c),e.elementType=H,e.lanes=f,e;case J:return e=_n(19,s,t,c),e.elementType=J,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:v=10;break e;case z:v=9;break e;case X:v=11;break e;case W:v=14;break e;case Y:v=16,i=null;break e}v=29,s=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=_n(v,s,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function xs(e,t,s,i){return e=_n(7,e,i,t),e.lanes=s,e}function Hc(e,t,s){return e=_n(6,e,null,t),e.lanes=s,e}function rm(e){var t=_n(18,null,null,0);return t.stateNode=e,t}function Gc(e,t,s){return t=_n(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var cm=new WeakMap;function Ln(e,t){if(typeof e=="object"&&e!==null){var s=cm.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Kn(t)},cm.set(e,t),t)}return{value:e,source:t,stack:Kn(t)}}var li=[],oi=0,Oo=null,cl=0,Un=[],zn=0,Va=null,ta=1,na="";function va(e,t){li[oi++]=cl,li[oi++]=Oo,Oo=e,cl=t}function um(e,t,s){Un[zn++]=ta,Un[zn++]=na,Un[zn++]=Va,Va=e;var i=ta;e=na;var c=32-vt(i)-1;i&=~(1<<c),s+=1;var f=32-vt(t)+c;if(30<f){var v=c-c%5;f=(i&(1<<v)-1).toString(32),i>>=v,c-=v,ta=1<<32-vt(t)+c|s<<c|i,na=f+e}else ta=1<<f|s<<c|i,na=e}function Pc(e){e.return!==null&&(va(e,1),um(e,1,0))}function qc(e){for(;e===Oo;)Oo=li[--oi],li[oi]=null,cl=li[--oi],li[oi]=null;for(;e===Va;)Va=Un[--zn],Un[zn]=null,na=Un[--zn],Un[zn]=null,ta=Un[--zn],Un[zn]=null}function dm(e,t){Un[zn++]=ta,Un[zn++]=na,Un[zn++]=Va,ta=t.id,na=t.overflow,Va=e}var Xt=null,rt=null,Pe=!1,Ia=null,Vn=!1,Yc=Error(o(519));function Ha(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ul(Ln(t,e)),Yc}function fm(e){var t=e.stateNode,s=e.type,i=e.memoizedProps;switch(t[Lt]=e,t[$t]=i,s){case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":case"embed":Ve("load",t);break;case"video":case"audio":for(s=0;s<Rl.length;s++)Ve(Rl[s],t);break;case"source":Ve("error",t);break;case"img":case"image":case"link":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"input":Ve("invalid",t),Ah(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ve("invalid",t);break;case"textarea":Ve("invalid",t),jh(t,i.value,i.defaultValue,i.children)}s=i.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||i.suppressHydrationWarning===!0||wg(t.textContent,s)?(i.popover!=null&&(Ve("beforetoggle",t),Ve("toggle",t)),i.onScroll!=null&&Ve("scroll",t),i.onScrollEnd!=null&&Ve("scrollend",t),i.onClick!=null&&(t.onclick=ma),t=!0):t=!1,t||Ha(e,!0)}function hm(e){for(Xt=e.return;Xt;)switch(Xt.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:Xt=Xt.return}}function ri(e){if(e!==Xt)return!1;if(!Pe)return hm(e),Pe=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||cd(e.type,e.memoizedProps)),s=!s),s&&rt&&Ha(e),hm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));rt=zg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));rt=zg(e)}else t===27?(t=rt,ts(e.type)?(e=md,md=null,rt=e):rt=t):rt=Xt?Hn(e.stateNode.nextSibling):null;return!0}function _s(){rt=Xt=null,Pe=!1}function Fc(){var e=Ia;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),Ia=null),e}function ul(e){Ia===null?Ia=[e]:Ia.push(e)}var Kc=qe(null),Ts=null,ya=null;function Ga(e,t,s){xe(Kc,t._currentValue),t._currentValue=s}function ba(e){e._currentValue=Kc.current,we(Kc)}function $c(e,t,s){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===s)break;e=e.return}}function Zc(e,t,s,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var v=c.child;f=f.firstContext;e:for(;f!==null;){var x=f;f=c;for(var E=0;E<t.length;E++)if(x.context===t[E]){f.lanes|=s,x=f.alternate,x!==null&&(x.lanes|=s),$c(f.return,s,e),i||(v=null);break e}f=x.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(o(341));v.lanes|=s,f=v.alternate,f!==null&&(f.lanes|=s),$c(v,s,e),v=null}else v=c.child;if(v!==null)v.return=c;else for(v=c;v!==null;){if(v===e){v=null;break}if(c=v.sibling,c!==null){c.return=v.return,v=c;break}v=v.return}c=v}}function ci(e,t,s,i){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var v=c.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var x=c.type;xn(c.pendingProps.value,v.value)||(e!==null?e.push(x):e=[x])}}else if(c===I.current){if(v=c.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ul):e=[Ul])}c=c.return}e!==null&&Zc(t,e,s,i),t.flags|=262144}function Bo(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Es(e){Ts=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qt(e){return mm(Ts,e)}function Lo(e,t){return Ts===null&&Es(e),mm(e,t)}function mm(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},ya===null){if(e===null)throw Error(o(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return s}var NS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},wS=n.unstable_scheduleCallback,DS=n.unstable_NormalPriority,Ut={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xc(){return{controller:new NS,data:new Map,refCount:0}}function dl(e){e.refCount--,e.refCount===0&&wS(DS,function(){e.controller.abort()})}var fl=null,Qc=0,ui=0,di=null;function kS(e,t){if(fl===null){var s=fl=[];Qc=0,ui=ed(),di={status:"pending",value:void 0,then:function(i){s.push(i)}}}return Qc++,t.then(pm,pm),t}function pm(){if(--Qc===0&&fl!==null){di!==null&&(di.status="fulfilled");var e=fl;fl=null,ui=0,di=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function RS(e,t){var s=[],i={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),i}var gm=L.S;L.S=function(e,t){Wp=de(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&kS(e,t),gm!==null&&gm(e,t)};var As=qe(null);function Jc(){var e=As.current;return e!==null?e:it.pooledCache}function Uo(e,t){t===null?xe(As,As.current):xe(As,t.pool)}function vm(){var e=Jc();return e===null?null:{parent:Ut._currentValue,pool:e}}var fi=Error(o(460)),Wc=Error(o(474)),zo=Error(o(542)),Vo={then:function(){}};function ym(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bm(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(ma,ma),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xm(e),e;default:if(typeof t.status=="string")t.then(ma,ma);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xm(e),e}throw js=t,fi}}function Cs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(js=s,fi):s}}var js=null;function Sm(){if(js===null)throw Error(o(459));var e=js;return js=null,e}function xm(e){if(e===fi||e===zo)throw Error(o(483))}var hi=null,hl=0;function Io(e){var t=hl;return hl+=1,hi===null&&(hi=[]),bm(hi,e,t)}function ml(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ho(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 _m(e){function t(k,N){if(e){var R=k.deletions;R===null?(k.deletions=[N],k.flags|=16):R.push(N)}}function s(k,N){if(!e)return null;for(;N!==null;)t(k,N),N=N.sibling;return null}function i(k){for(var N=new Map;k!==null;)k.key!==null?N.set(k.key,k):N.set(k.index,k),k=k.sibling;return N}function c(k,N){return k=ga(k,N),k.index=0,k.sibling=null,k}function f(k,N,R){return k.index=R,e?(R=k.alternate,R!==null?(R=R.index,R<N?(k.flags|=67108866,N):R):(k.flags|=67108866,N)):(k.flags|=1048576,N)}function v(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function x(k,N,R,F){return N===null||N.tag!==6?(N=Hc(R,k.mode,F),N.return=k,N):(N=c(N,R),N.return=k,N)}function E(k,N,R,F){var ve=R.type;return ve===A?P(k,N,R.props.children,F,R.key):N!==null&&(N.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===Y&&Cs(ve)===N.type)?(N=c(N,R.props),ml(N,R),N.return=k,N):(N=Mo(R.type,R.key,R.props,null,k.mode,F),ml(N,R),N.return=k,N)}function O(k,N,R,F){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=Gc(R,k.mode,F),N.return=k,N):(N=c(N,R.children||[]),N.return=k,N)}function P(k,N,R,F,ve){return N===null||N.tag!==7?(N=xs(R,k.mode,F,ve),N.return=k,N):(N=c(N,R),N.return=k,N)}function $(k,N,R){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Hc(""+N,k.mode,R),N.return=k,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case T:return R=Mo(N.type,N.key,N.props,null,k.mode,R),ml(R,N),R.return=k,R;case j:return N=Gc(N,k.mode,R),N.return=k,N;case Y:return N=Cs(N),$(k,N,R)}if(G(N)||pe(N))return N=xs(N,k.mode,R,null),N.return=k,N;if(typeof N.then=="function")return $(k,Io(N),R);if(N.$$typeof===M)return $(k,Lo(k,N),R);Ho(k,N)}return null}function B(k,N,R,F){var ve=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ve!==null?null:x(k,N,""+R,F);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case T:return R.key===ve?E(k,N,R,F):null;case j:return R.key===ve?O(k,N,R,F):null;case Y:return R=Cs(R),B(k,N,R,F)}if(G(R)||pe(R))return ve!==null?null:P(k,N,R,F,null);if(typeof R.then=="function")return B(k,N,Io(R),F);if(R.$$typeof===M)return B(k,N,Lo(k,R),F);Ho(k,R)}return null}function V(k,N,R,F,ve){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return k=k.get(R)||null,x(N,k,""+F,ve);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case T:return k=k.get(F.key===null?R:F.key)||null,E(N,k,F,ve);case j:return k=k.get(F.key===null?R:F.key)||null,O(N,k,F,ve);case Y:return F=Cs(F),V(k,N,R,F,ve)}if(G(F)||pe(F))return k=k.get(R)||null,P(N,k,F,ve,null);if(typeof F.then=="function")return V(k,N,R,Io(F),ve);if(F.$$typeof===M)return V(k,N,R,Lo(N,F),ve);Ho(N,F)}return null}function ue(k,N,R,F){for(var ve=null,Ke=null,me=N,Oe=N=0,Ge=null;me!==null&&Oe<R.length;Oe++){me.index>Oe?(Ge=me,me=null):Ge=me.sibling;var $e=B(k,me,R[Oe],F);if($e===null){me===null&&(me=Ge);break}e&&me&&$e.alternate===null&&t(k,me),N=f($e,N,Oe),Ke===null?ve=$e:Ke.sibling=$e,Ke=$e,me=Ge}if(Oe===R.length)return s(k,me),Pe&&va(k,Oe),ve;if(me===null){for(;Oe<R.length;Oe++)me=$(k,R[Oe],F),me!==null&&(N=f(me,N,Oe),Ke===null?ve=me:Ke.sibling=me,Ke=me);return Pe&&va(k,Oe),ve}for(me=i(me);Oe<R.length;Oe++)Ge=V(me,k,Oe,R[Oe],F),Ge!==null&&(e&&Ge.alternate!==null&&me.delete(Ge.key===null?Oe:Ge.key),N=f(Ge,N,Oe),Ke===null?ve=Ge:Ke.sibling=Ge,Ke=Ge);return e&&me.forEach(function(ls){return t(k,ls)}),Pe&&va(k,Oe),ve}function Se(k,N,R,F){if(R==null)throw Error(o(151));for(var ve=null,Ke=null,me=N,Oe=N=0,Ge=null,$e=R.next();me!==null&&!$e.done;Oe++,$e=R.next()){me.index>Oe?(Ge=me,me=null):Ge=me.sibling;var ls=B(k,me,$e.value,F);if(ls===null){me===null&&(me=Ge);break}e&&me&&ls.alternate===null&&t(k,me),N=f(ls,N,Oe),Ke===null?ve=ls:Ke.sibling=ls,Ke=ls,me=Ge}if($e.done)return s(k,me),Pe&&va(k,Oe),ve;if(me===null){for(;!$e.done;Oe++,$e=R.next())$e=$(k,$e.value,F),$e!==null&&(N=f($e,N,Oe),Ke===null?ve=$e:Ke.sibling=$e,Ke=$e);return Pe&&va(k,Oe),ve}for(me=i(me);!$e.done;Oe++,$e=R.next())$e=V(me,k,Oe,$e.value,F),$e!==null&&(e&&$e.alternate!==null&&me.delete($e.key===null?Oe:$e.key),N=f($e,N,Oe),Ke===null?ve=$e:Ke.sibling=$e,Ke=$e);return e&&me.forEach(function(Px){return t(k,Px)}),Pe&&va(k,Oe),ve}function st(k,N,R,F){if(typeof R=="object"&&R!==null&&R.type===A&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case T:e:{for(var ve=R.key;N!==null;){if(N.key===ve){if(ve=R.type,ve===A){if(N.tag===7){s(k,N.sibling),F=c(N,R.props.children),F.return=k,k=F;break e}}else if(N.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===Y&&Cs(ve)===N.type){s(k,N.sibling),F=c(N,R.props),ml(F,R),F.return=k,k=F;break e}s(k,N);break}else t(k,N);N=N.sibling}R.type===A?(F=xs(R.props.children,k.mode,F,R.key),F.return=k,k=F):(F=Mo(R.type,R.key,R.props,null,k.mode,F),ml(F,R),F.return=k,k=F)}return v(k);case j:e:{for(ve=R.key;N!==null;){if(N.key===ve)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){s(k,N.sibling),F=c(N,R.children||[]),F.return=k,k=F;break e}else{s(k,N);break}else t(k,N);N=N.sibling}F=Gc(R,k.mode,F),F.return=k,k=F}return v(k);case Y:return R=Cs(R),st(k,N,R,F)}if(G(R))return ue(k,N,R,F);if(pe(R)){if(ve=pe(R),typeof ve!="function")throw Error(o(150));return R=ve.call(R),Se(k,N,R,F)}if(typeof R.then=="function")return st(k,N,Io(R),F);if(R.$$typeof===M)return st(k,N,Lo(k,R),F);Ho(k,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,N!==null&&N.tag===6?(s(k,N.sibling),F=c(N,R),F.return=k,k=F):(s(k,N),F=Hc(R,k.mode,F),F.return=k,k=F),v(k)):s(k,N)}return function(k,N,R,F){try{hl=0;var ve=st(k,N,R,F);return hi=null,ve}catch(me){if(me===fi||me===zo)throw me;var Ke=_n(29,me,null,k.mode);return Ke.lanes=F,Ke.return=k,Ke}finally{}}}var Ns=_m(!0),Tm=_m(!1),Pa=!1;function eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tu(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 qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,s){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Xe&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Ro(e),lm(e,null,s),t}return ko(e,i,t,s),Ro(e)}function pl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,s|=i,t.lanes=s,Xi(e,s)}}function nu(e,t){var s=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,s===i)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var v={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=v:f=f.next=v,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var au=!1;function gl(){if(au){var e=di;if(e!==null)throw e}}function vl(e,t,s,i){au=!1;var c=e.updateQueue;Pa=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var E=x,O=E.next;E.next=null,v===null?f=O:v.next=O,v=E;var P=e.alternate;P!==null&&(P=P.updateQueue,x=P.lastBaseUpdate,x!==v&&(x===null?P.firstBaseUpdate=O:x.next=O,P.lastBaseUpdate=E))}if(f!==null){var $=c.baseState;v=0,P=O=E=null,x=f;do{var B=x.lane&-536870913,V=B!==x.lane;if(V?(He&B)===B:(i&B)===B){B!==0&&B===ui&&(au=!0),P!==null&&(P=P.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ue=e,Se=x;B=t;var st=s;switch(Se.tag){case 1:if(ue=Se.payload,typeof ue=="function"){$=ue.call(st,$,B);break e}$=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=Se.payload,B=typeof ue=="function"?ue.call(st,$,B):ue,B==null)break e;$=b({},$,B);break e;case 2:Pa=!0}}B=x.callback,B!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[B]:V.push(B))}else V={lane:B,tag:x.tag,payload:x.payload,callback:x.callback,next:null},P===null?(O=P=V,E=$):P=P.next=V,v|=B;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;V=x,x=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);P===null&&(E=$),c.baseState=E,c.firstBaseUpdate=O,c.lastBaseUpdate=P,f===null&&(c.shared.lanes=0),Xa|=v,e.lanes=v,e.memoizedState=$}}function Em(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Am(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Em(s[e],t)}var mi=qe(null),Go=qe(0);function Cm(e,t){e=Na,xe(Go,e),xe(mi,t),Na=e|t.baseLanes}function su(){xe(Go,Na),xe(mi,mi.current)}function iu(){Na=Go.current,we(mi),we(Go)}var Tn=qe(null),In=null;function Fa(e){var t=e.alternate;xe(Dt,Dt.current&1),xe(Tn,e),In===null&&(t===null||mi.current!==null||t.memoizedState!==null)&&(In=e)}function lu(e){xe(Dt,Dt.current),xe(Tn,e),In===null&&(In=e)}function jm(e){e.tag===22?(xe(Dt,Dt.current),xe(Tn,e),In===null&&(In=e)):Ka()}function Ka(){xe(Dt,Dt.current),xe(Tn,Tn.current)}function En(e){we(Tn),In===e&&(In=null),we(Dt)}var Dt=qe(0);function Po(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||fd(s)||hd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sa=0,Re=null,nt=null,zt=null,qo=!1,pi=!1,ws=!1,Yo=0,yl=0,gi=null,MS=0;function At(){throw Error(o(321))}function ou(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!xn(e[s],t[s]))return!1;return!0}function ru(e,t,s,i,c,f){return Sa=f,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?up:Tu,ws=!1,f=s(i,c),ws=!1,pi&&(f=wm(t,s,i,c)),Nm(e),f}function Nm(e){L.H=xl;var t=nt!==null&&nt.next!==null;if(Sa=0,zt=nt=Re=null,qo=!1,yl=0,gi=null,t)throw Error(o(300));e===null||Vt||(e=e.dependencies,e!==null&&Bo(e)&&(Vt=!0))}function wm(e,t,s,i){Re=e;var c=0;do{if(pi&&(gi=null),yl=0,pi=!1,25<=c)throw Error(o(301));if(c+=1,zt=nt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}L.H=dp,f=t(s,i)}while(pi);return f}function OS(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?bl(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(Re.flags|=1024),t}function cu(){var e=Yo!==0;return Yo=0,e}function uu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function du(e){if(qo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qo=!1}Sa=0,zt=nt=Re=null,pi=!1,yl=Yo=0,gi=null}function cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Re.memoizedState=zt=e:zt=zt.next=e,zt}function kt(){if(nt===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=zt===null?Re.memoizedState:zt.next;if(t!==null)zt=t,nt=e;else{if(e===null)throw Re.alternate===null?Error(o(467)):Error(o(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},zt===null?Re.memoizedState=zt=e:zt=zt.next=e}return zt}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(e){var t=yl;return yl+=1,gi===null&&(gi=[]),e=bm(gi,e,t),t=Re,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?up:Tu),e}function Ko(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bl(e);if(e.$$typeof===M)return Qt(e)}throw Error(o(438,String(e)))}function fu(e){var t=null,s=Re.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var i=Re.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Fo(),Re.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),i=0;i<e;i++)s[i]=ge;return t.index++,s}function xa(e,t){return typeof t=="function"?t(e):t}function $o(e){var t=kt();return hu(t,nt,e)}function hu(e,t,s){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=s;var c=e.baseQueue,f=i.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}t.baseQueue=c=f,i.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var x=v=null,E=null,O=t,P=!1;do{var $=O.lane&-536870913;if($!==O.lane?(He&$)===$:(Sa&$)===$){var B=O.revertLane;if(B===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),$===ui&&(P=!0);else if((Sa&B)===B){O=O.next,B===ui&&(P=!0);continue}else $={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(x=E=$,v=f):E=E.next=$,Re.lanes|=B,Xa|=B;$=O.action,ws&&s(f,$),f=O.hasEagerState?O.eagerState:s(f,$)}else B={lane:$,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(x=E=B,v=f):E=E.next=B,Re.lanes|=$,Xa|=$;O=O.next}while(O!==null&&O!==t);if(E===null?v=f:E.next=x,!xn(f,e.memoizedState)&&(Vt=!0,P&&(s=di,s!==null)))throw s;e.memoizedState=f,e.baseState=v,e.baseQueue=E,i.lastRenderedState=f}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function mu(e){var t=kt(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var i=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var v=c=c.next;do f=e(f,v.action),v=v.next;while(v!==c);xn(f,t.memoizedState)||(Vt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,i]}function Dm(e,t,s){var i=Re,c=kt(),f=Pe;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var v=!xn((nt||c).memoizedState,s);if(v&&(c.memoizedState=s,Vt=!0),c=c.queue,vu(Mm.bind(null,i,c,e),[e]),c.getSnapshot!==t||v||zt!==null&&zt.memoizedState.tag&1){if(i.flags|=2048,vi(9,{destroy:void 0},Rm.bind(null,i,c,s,t),null),it===null)throw Error(o(349));f||(Sa&127)!==0||km(i,t,s)}return s}function km(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Re.updateQueue,t===null?(t=Fo(),Re.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Rm(e,t,s,i){t.value=s,t.getSnapshot=i,Om(t)&&Bm(e)}function Mm(e,t,s){return s(function(){Om(t)&&Bm(e)})}function Om(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!xn(e,s)}catch{return!0}}function Bm(e){var t=Ss(e,2);t!==null&&yn(t,e,2)}function pu(e){var t=cn();if(typeof e=="function"){var s=e;if(e=s(),ws){rn(!0);try{s()}finally{rn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t}function Lm(e,t,s,i){return e.baseState=s,hu(e,nt,typeof i=="function"?i:xa)}function BS(e,t,s,i,c){if(Qo(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};L.T!==null?s(!0):f.isTransition=!1,i(f),s=t.pending,s===null?(f.next=t.pending=f,Um(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Um(e,t){var s=t.action,i=t.payload,c=e.state;if(t.isTransition){var f=L.T,v={};L.T=v;try{var x=s(c,i),E=L.S;E!==null&&E(v,x),zm(e,t,x)}catch(O){gu(e,t,O)}finally{f!==null&&v.types!==null&&(f.types=v.types),L.T=f}}else try{f=s(c,i),zm(e,t,f)}catch(O){gu(e,t,O)}}function zm(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(i){Vm(e,t,i)},function(i){return gu(e,t,i)}):Vm(e,t,s)}function Vm(e,t,s){t.status="fulfilled",t.value=s,Im(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Um(e,s)))}function gu(e,t,s){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=s,Im(t),t=t.next;while(t!==i)}e.action=null}function Im(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hm(e,t){return t}function Gm(e,t){if(Pe){var s=it.formState;if(s!==null){e:{var i=Re;if(Pe){if(rt){t:{for(var c=rt,f=Vn;c.nodeType!==8;){if(!f){c=null;break t}if(c=Hn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){rt=Hn(c.nextSibling),i=c.data==="F!";break e}}Ha(i)}i=!1}i&&(t=s[0])}}return s=cn(),s.memoizedState=s.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hm,lastRenderedState:t},s.queue=i,s=op.bind(null,Re,i),i.dispatch=s,i=pu(!1),f=_u.bind(null,Re,!1,i.queue),i=cn(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,s=BS.bind(null,Re,c,f,s),c.dispatch=s,i.memoizedState=e,[t,s,!1]}function Pm(e){var t=kt();return qm(t,nt,e)}function qm(e,t,s){if(t=hu(e,t,Hm)[0],e=$o(xa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=bl(t)}catch(v){throw v===fi?zo:v}else i=t;t=kt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Re.flags|=2048,vi(9,{destroy:void 0},LS.bind(null,c,s),null)),[i,f,e]}function LS(e,t){e.action=t}function Ym(e){var t=kt(),s=nt;if(s!==null)return qm(t,s,e);kt(),t=t.memoizedState,s=kt();var i=s.queue.dispatch;return s.memoizedState=e,[t,i,!1]}function vi(e,t,s,i){return e={tag:e,create:s,deps:i,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Fo(),Re.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(i=s.next,s.next=e,e.next=i,t.lastEffect=e),e}function Fm(){return kt().memoizedState}function Zo(e,t,s,i){var c=cn();Re.flags|=e,c.memoizedState=vi(1|t,{destroy:void 0},s,i===void 0?null:i)}function Xo(e,t,s,i){var c=kt();i=i===void 0?null:i;var f=c.memoizedState.inst;nt!==null&&i!==null&&ou(i,nt.memoizedState.deps)?c.memoizedState=vi(t,f,s,i):(Re.flags|=e,c.memoizedState=vi(1|t,f,s,i))}function Km(e,t){Zo(8390656,8,e,t)}function vu(e,t){Xo(2048,8,e,t)}function US(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Fo(),Re.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function $m(e){var t=kt().memoizedState;return US({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Zm(e,t){return Xo(4,2,e,t)}function Xm(e,t){return Xo(4,4,e,t)}function Qm(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Jm(e,t,s){s=s!=null?s.concat([e]):null,Xo(4,4,Qm.bind(null,t,e),s)}function yu(){}function Wm(e,t){var s=kt();t=t===void 0?null:t;var i=s.memoizedState;return t!==null&&ou(t,i[1])?i[0]:(s.memoizedState=[e,t],e)}function ep(e,t){var s=kt();t=t===void 0?null:t;var i=s.memoizedState;if(t!==null&&ou(t,i[1]))return i[0];if(i=e(),ws){rn(!0);try{e()}finally{rn(!1)}}return s.memoizedState=[i,t],i}function bu(e,t,s){return s===void 0||(Sa&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=tg(),Re.lanes|=e,Xa|=e,s)}function tp(e,t,s,i){return xn(s,t)?s:mi.current!==null?(e=bu(e,s,i),xn(e,t)||(Vt=!0),e):(Sa&42)===0||(Sa&1073741824)!==0&&(He&261930)===0?(Vt=!0,e.memoizedState=s):(e=tg(),Re.lanes|=e,Xa|=e,t)}function np(e,t,s,i,c){var f=K.p;K.p=f!==0&&8>f?f:8;var v=L.T,x={};L.T=x,_u(e,!1,t,s);try{var E=c(),O=L.S;if(O!==null&&O(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var P=RS(E,i);Sl(e,t,P,jn(e))}else Sl(e,t,i,jn(e))}catch($){Sl(e,t,{then:function(){},status:"rejected",reason:$},jn())}finally{K.p=f,v!==null&&x.types!==null&&(v.types=x.types),L.T=v}}function zS(){}function Su(e,t,s,i){if(e.tag!==5)throw Error(o(476));var c=ap(e).queue;np(e,c,t,ee,s===null?zS:function(){return sp(e),s(i)})}function ap(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:ee},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sp(e){var t=ap(e);t.next===null&&(t=e.alternate.memoizedState),Sl(e,t.next.queue,{},jn())}function xu(){return Qt(Ul)}function ip(){return kt().memoizedState}function lp(){return kt().memoizedState}function VS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=jn();e=qa(s);var i=Ya(t,e,s);i!==null&&(yn(i,t,s),pl(i,t,s)),t={cache:Xc()},e.payload=t;return}t=t.return}}function IS(e,t,s){var i=jn();s={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Qo(e)?rp(t,s):(s=Vc(e,t,s,i),s!==null&&(yn(s,e,i),cp(s,t,i)))}function op(e,t,s){var i=jn();Sl(e,t,s,i)}function Sl(e,t,s,i){var c={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Qo(e))rp(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,x=f(v,s);if(c.hasEagerState=!0,c.eagerState=x,xn(x,v))return ko(e,t,c,0),it===null&&Do(),!1}catch{}finally{}if(s=Vc(e,t,c,i),s!==null)return yn(s,e,i),cp(s,t,i),!0}return!1}function _u(e,t,s,i){if(i={lane:2,revertLane:ed(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Qo(e)){if(t)throw Error(o(479))}else t=Vc(e,s,i,2),t!==null&&yn(t,e,2)}function Qo(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function rp(e,t){pi=qo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function cp(e,t,s){if((s&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,s|=i,t.lanes=s,Xi(e,s)}}var xl={readContext:Qt,use:Ko,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};xl.useEffectEvent=At;var up={readContext:Qt,use:Ko,useCallback:function(e,t){return cn().memoizedState=[e,t===void 0?null:t],e},useContext:Qt,useEffect:Km,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Zo(4194308,4,Qm.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Zo(4194308,4,e,t)},useInsertionEffect:function(e,t){Zo(4,2,e,t)},useMemo:function(e,t){var s=cn();t=t===void 0?null:t;var i=e();if(ws){rn(!0);try{e()}finally{rn(!1)}}return s.memoizedState=[i,t],i},useReducer:function(e,t,s){var i=cn();if(s!==void 0){var c=s(t);if(ws){rn(!0);try{s(t)}finally{rn(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=IS.bind(null,Re,e),[i.memoizedState,e]},useRef:function(e){var t=cn();return e={current:e},t.memoizedState=e},useState:function(e){e=pu(e);var t=e.queue,s=op.bind(null,Re,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:yu,useDeferredValue:function(e,t){var s=cn();return bu(s,e,t)},useTransition:function(){var e=pu(!1);return e=np.bind(null,Re,e.queue,!0,!1),cn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var i=Re,c=cn();if(Pe){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),it===null)throw Error(o(349));(He&127)!==0||km(i,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,Km(Mm.bind(null,i,f,e),[e]),i.flags|=2048,vi(9,{destroy:void 0},Rm.bind(null,i,f,s,t),null),s},useId:function(){var e=cn(),t=it.identifierPrefix;if(Pe){var s=na,i=ta;s=(i&~(1<<32-vt(i)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Yo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=MS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xu,useFormState:Gm,useActionState:Gm,useOptimistic:function(e){var t=cn();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=_u.bind(null,Re,!0,s),s.dispatch=t,[e,t]},useMemoCache:fu,useCacheRefresh:function(){return cn().memoizedState=VS.bind(null,Re)},useEffectEvent:function(e){var t=cn(),s={impl:e};return t.memoizedState=s,function(){if((Xe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Tu={readContext:Qt,use:Ko,useCallback:Wm,useContext:Qt,useEffect:vu,useImperativeHandle:Jm,useInsertionEffect:Zm,useLayoutEffect:Xm,useMemo:ep,useReducer:$o,useRef:Fm,useState:function(){return $o(xa)},useDebugValue:yu,useDeferredValue:function(e,t){var s=kt();return tp(s,nt.memoizedState,e,t)},useTransition:function(){var e=$o(xa)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:Dm,useId:ip,useHostTransitionStatus:xu,useFormState:Pm,useActionState:Pm,useOptimistic:function(e,t){var s=kt();return Lm(s,nt,e,t)},useMemoCache:fu,useCacheRefresh:lp};Tu.useEffectEvent=$m;var dp={readContext:Qt,use:Ko,useCallback:Wm,useContext:Qt,useEffect:vu,useImperativeHandle:Jm,useInsertionEffect:Zm,useLayoutEffect:Xm,useMemo:ep,useReducer:mu,useRef:Fm,useState:function(){return mu(xa)},useDebugValue:yu,useDeferredValue:function(e,t){var s=kt();return nt===null?bu(s,e,t):tp(s,nt.memoizedState,e,t)},useTransition:function(){var e=mu(xa)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:Dm,useId:ip,useHostTransitionStatus:xu,useFormState:Ym,useActionState:Ym,useOptimistic:function(e,t){var s=kt();return nt!==null?Lm(s,nt,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:fu,useCacheRefresh:lp};dp.useEffectEvent=$m;function Eu(e,t,s,i){t=e.memoizedState,s=s(i,t),s=s==null?t:b({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Au={enqueueSetState:function(e,t,s){e=e._reactInternals;var i=jn(),c=qa(i);c.payload=t,s!=null&&(c.callback=s),t=Ya(e,c,i),t!==null&&(yn(t,e,i),pl(t,e,i))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var i=jn(),c=qa(i);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=Ya(e,c,i),t!==null&&(yn(t,e,i),pl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=jn(),i=qa(s);i.tag=2,t!=null&&(i.callback=t),t=Ya(e,i,s),t!==null&&(yn(t,e,s),pl(t,e,s))}};function fp(e,t,s,i,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,v):t.prototype&&t.prototype.isPureReactComponent?!ol(s,i)||!ol(c,f):!0}function hp(e,t,s,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,i),t.state!==e&&Au.enqueueReplaceState(t,t.state,null)}function Ds(e,t){var s=t;if("ref"in t){s={};for(var i in t)i!=="ref"&&(s[i]=t[i])}if(e=e.defaultProps){s===t&&(s=b({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function mp(e){wo(e)}function pp(e){console.error(e)}function gp(e){wo(e)}function Jo(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function vp(e,t,s){try{var i=e.onCaughtError;i(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Cu(e,t,s){return s=qa(s),s.tag=3,s.payload={element:null},s.callback=function(){Jo(e,t)},s}function yp(e){return e=qa(e),e.tag=3,e}function bp(e,t,s,i){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=i.value;e.payload=function(){return c(f)},e.callback=function(){vp(t,s,i)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){vp(t,s,i),typeof c!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})})}function HS(e,t,s,i,c){if(s.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=s.alternate,t!==null&&ci(t,s,c,!0),s=Tn.current,s!==null){switch(s.tag){case 31:case 13:return In===null?ur():s.alternate===null&&Ct===0&&(Ct=3),s.flags&=-257,s.flags|=65536,s.lanes=c,i===Vo?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([i]):t.add(i),Qu(e,i,c)),!1;case 22:return s.flags|=65536,i===Vo?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([i]):s.add(i)),Qu(e,i,c)),!1}throw Error(o(435,s.tag))}return Qu(e,i,c),ur(),!1}if(Pe)return t=Tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==Yc&&(e=Error(o(422),{cause:i}),ul(Ln(e,s)))):(i!==Yc&&(t=Error(o(423),{cause:i}),ul(Ln(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=Ln(i,s),c=Cu(e.stateNode,i,c),nu(e,c),Ct!==4&&(Ct=2)),!1;var f=Error(o(520),{cause:i});if(f=Ln(f,s),wl===null?wl=[f]:wl.push(f),Ct!==4&&(Ct=2),t===null)return!0;i=Ln(i,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=Cu(s.stateNode,i,e),nu(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Qa===null||!Qa.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=yp(c),bp(c,e,s,i),nu(s,c),!1}s=s.return}while(s!==null);return!1}var ju=Error(o(461)),Vt=!1;function Jt(e,t,s,i){t.child=e===null?Tm(t,null,s,i):Ns(t,e.child,s,i)}function Sp(e,t,s,i,c){s=s.render;var f=t.ref;if("ref"in i){var v={};for(var x in i)x!=="ref"&&(v[x]=i[x])}else v=i;return Es(t),i=ru(e,t,s,v,f,c),x=cu(),e!==null&&!Vt?(uu(e,t,c),_a(e,t,c)):(Pe&&x&&Pc(t),t.flags|=1,Jt(e,t,i,c),t.child)}function xp(e,t,s,i,c){if(e===null){var f=s.type;return typeof f=="function"&&!Ic(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,_p(e,t,f,i,c)):(e=Mo(s.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Bu(e,c)){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:ol,s(v,i)&&e.ref===t.ref)return _a(e,t,c)}return t.flags|=1,e=ga(f,i),e.ref=t.ref,e.return=t,t.child=e}function _p(e,t,s,i,c){if(e!==null){var f=e.memoizedProps;if(ol(f,i)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=i=f,Bu(e,c))(e.flags&131072)!==0&&(Vt=!0);else return t.lanes=e.lanes,_a(e,t,c)}return Nu(e,t,s,i,c)}function Tp(e,t,s,i){var c=i.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~f}else i=0,t.child=null;return Ep(e,t,f,s,i)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Uo(t,f!==null?f.cachePool:null),f!==null?Cm(t,f):su(),jm(t);else return i=t.lanes=536870912,Ep(e,t,f!==null?f.baseLanes|s:s,s,i)}else f!==null?(Uo(t,f.cachePool),Cm(t,f),Ka(),t.memoizedState=null):(e!==null&&Uo(t,null),su(),Ka());return Jt(e,t,c,s),t.child}function _l(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ep(e,t,s,i,c){var f=Jc();return f=f===null?null:{parent:Ut._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&Uo(t,null),su(),jm(t),e!==null&&ci(e,t,i,!0),t.childLanes=c,null}function Wo(e,t){return t=tr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,s){return Ns(t,e.child,null,s),e=Wo(t,t.pendingProps),e.flags|=2,En(t),t.memoizedState=null,e}function GS(e,t,s){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(i.mode==="hidden")return e=Wo(t,i),t.lanes=536870912,_l(null,e);if(lu(t),(e=rt)?(e=Ug(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:ta,overflow:na}:null,retryLane:536870912,hydrationErrors:null},s=rm(e),s.return=t,t.child=s,Xt=t,rt=null)):e=null,e===null)throw Ha(t);return t.lanes=536870912,null}return Wo(t,i)}var f=e.memoizedState;if(f!==null){var v=f.dehydrated;if(lu(t),c)if(t.flags&256)t.flags&=-257,t=Ap(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Vt||ci(e,t,s,!1),c=(s&e.childLanes)!==0,Vt||c){if(i=it,i!==null&&(v=Qi(i,s),v!==0&&v!==f.retryLane))throw f.retryLane=v,Ss(e,v),yn(i,e,v),ju;ur(),t=Ap(e,t,s)}else e=f.treeContext,rt=Hn(v.nextSibling),Xt=t,Pe=!0,Ia=null,Vn=!1,e!==null&&dm(t,e),t=Wo(t,i),t.flags|=4096;return t}return e=ga(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function er(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Nu(e,t,s,i,c){return Es(t),s=ru(e,t,s,i,void 0,c),i=cu(),e!==null&&!Vt?(uu(e,t,c),_a(e,t,c)):(Pe&&i&&Pc(t),t.flags|=1,Jt(e,t,s,c),t.child)}function Cp(e,t,s,i,c,f){return Es(t),t.updateQueue=null,s=wm(t,i,s,c),Nm(e),i=cu(),e!==null&&!Vt?(uu(e,t,f),_a(e,t,f)):(Pe&&i&&Pc(t),t.flags|=1,Jt(e,t,s,f),t.child)}function jp(e,t,s,i,c){if(Es(t),t.stateNode===null){var f=ii,v=s.contextType;typeof v=="object"&&v!==null&&(f=Qt(v)),f=new s(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Au,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},eu(t),v=s.contextType,f.context=typeof v=="object"&&v!==null?Qt(v):ii,f.state=t.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Eu(t,s,v,i),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&Au.enqueueReplaceState(f,f.state,null),vl(t,i,f,c),gl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,E=Ds(s,x);f.props=E;var O=f.context,P=s.contextType;v=ii,typeof P=="object"&&P!==null&&(v=Qt(P));var $=s.getDerivedStateFromProps;P=typeof $=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,P||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||O!==v)&&hp(t,f,i,v),Pa=!1;var B=t.memoizedState;f.state=B,vl(t,i,f,c),gl(),O=t.memoizedState,x||B!==O||Pa?(typeof $=="function"&&(Eu(t,s,$,i),O=t.memoizedState),(E=Pa||fp(t,s,E,i,B,O,v))?(P||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=O),f.props=i,f.state=O,f.context=v,i=E):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,tu(e,t),v=t.memoizedProps,P=Ds(s,v),f.props=P,$=t.pendingProps,B=f.context,O=s.contextType,E=ii,typeof O=="object"&&O!==null&&(E=Qt(O)),x=s.getDerivedStateFromProps,(O=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==$||B!==E)&&hp(t,f,i,E),Pa=!1,B=t.memoizedState,f.state=B,vl(t,i,f,c),gl();var V=t.memoizedState;v!==$||B!==V||Pa||e!==null&&e.dependencies!==null&&Bo(e.dependencies)?(typeof x=="function"&&(Eu(t,s,x,i),V=t.memoizedState),(P=Pa||fp(t,s,P,i,B,V,E)||e!==null&&e.dependencies!==null&&Bo(e.dependencies))?(O||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,V,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,V,E)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=V),f.props=i,f.state=V,f.context=E,i=P):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,er(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,s=i&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Ns(t,e.child,null,c),t.child=Ns(t,null,s,c)):Jt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=_a(e,t,c),e}function Np(e,t,s,i){return _s(),t.flags|=256,Jt(e,t,s,i),t.child}var wu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Du(e){return{baseLanes:e,cachePool:vm()}}function ku(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=Cn),e}function wp(e,t,s){var i=t.pendingProps,c=!1,f=(t.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),v&&(c=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(c?Fa(t):Ka(),(e=rt)?(e=Ug(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:ta,overflow:na}:null,retryLane:536870912,hydrationErrors:null},s=rm(e),s.return=t,t.child=s,Xt=t,rt=null)):e=null,e===null)throw Ha(t);return hd(e)?t.lanes=32:t.lanes=536870912,null}var x=i.children;return i=i.fallback,c?(Ka(),c=t.mode,x=tr({mode:"hidden",children:x},c),i=xs(i,c,s,null),x.return=t,i.return=t,x.sibling=i,t.child=x,i=t.child,i.memoizedState=Du(s),i.childLanes=ku(e,v,s),t.memoizedState=wu,_l(null,i)):(Fa(t),Ru(t,x))}var E=e.memoizedState;if(E!==null&&(x=E.dehydrated,x!==null)){if(f)t.flags&256?(Fa(t),t.flags&=-257,t=Mu(e,t,s)):t.memoizedState!==null?(Ka(),t.child=e.child,t.flags|=128,t=null):(Ka(),x=i.fallback,c=t.mode,i=tr({mode:"visible",children:i.children},c),x=xs(x,c,s,null),x.flags|=2,i.return=t,x.return=t,i.sibling=x,t.child=i,Ns(t,e.child,null,s),i=t.child,i.memoizedState=Du(s),i.childLanes=ku(e,v,s),t.memoizedState=wu,t=_l(null,i));else if(Fa(t),hd(x)){if(v=x.nextSibling&&x.nextSibling.dataset,v)var O=v.dgst;v=O,i=Error(o(419)),i.stack="",i.digest=v,ul({value:i,source:null,stack:null}),t=Mu(e,t,s)}else if(Vt||ci(e,t,s,!1),v=(s&e.childLanes)!==0,Vt||v){if(v=it,v!==null&&(i=Qi(v,s),i!==0&&i!==E.retryLane))throw E.retryLane=i,Ss(e,i),yn(v,e,i),ju;fd(x)||ur(),t=Mu(e,t,s)}else fd(x)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,rt=Hn(x.nextSibling),Xt=t,Pe=!0,Ia=null,Vn=!1,e!==null&&dm(t,e),t=Ru(t,i.children),t.flags|=4096);return t}return c?(Ka(),x=i.fallback,c=t.mode,E=e.child,O=E.sibling,i=ga(E,{mode:"hidden",children:i.children}),i.subtreeFlags=E.subtreeFlags&65011712,O!==null?x=ga(O,x):(x=xs(x,c,s,null),x.flags|=2),x.return=t,i.return=t,i.sibling=x,t.child=i,_l(null,i),i=t.child,x=e.child.memoizedState,x===null?x=Du(s):(c=x.cachePool,c!==null?(E=Ut._currentValue,c=c.parent!==E?{parent:E,pool:E}:c):c=vm(),x={baseLanes:x.baseLanes|s,cachePool:c}),i.memoizedState=x,i.childLanes=ku(e,v,s),t.memoizedState=wu,_l(e.child,i)):(Fa(t),s=e.child,e=s.sibling,s=ga(s,{mode:"visible",children:i.children}),s.return=t,s.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=s,t.memoizedState=null,s)}function Ru(e,t){return t=tr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function tr(e,t){return e=_n(22,e,null,t),e.lanes=0,e}function Mu(e,t,s){return Ns(t,e.child,null,s),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dp(e,t,s){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),$c(e.return,t,s)}function Ou(e,t,s,i,c,f){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:s,tailMode:c,treeForkCount:f}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=i,v.tail=s,v.tailMode=c,v.treeForkCount=f)}function kp(e,t,s){var i=t.pendingProps,c=i.revealOrder,f=i.tail;i=i.children;var v=Dt.current,x=(v&2)!==0;if(x?(v=v&1|2,t.flags|=128):v&=1,xe(Dt,v),Jt(e,t,i,s),i=Pe?cl:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dp(e,s,t);else if(e.tag===19)Dp(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Po(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Ou(t,!1,c,s,f,i);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Po(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Ou(t,!0,s,null,f,i);break;case"together":Ou(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function _a(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(ci(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=ga(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=ga(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Bu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bo(e)))}function PS(e,t,s){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),Ga(t,Ut,e.memoizedState.cache),_s();break;case 27:case 5:gt(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:Ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lu(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Fa(t),t.flags|=128,null):(s&t.child.childLanes)!==0?wp(e,t,s):(Fa(t),e=_a(e,t,s),e!==null?e.sibling:null);Fa(t);break;case 19:var c=(e.flags&128)!==0;if(i=(s&t.childLanes)!==0,i||(ci(e,t,s,!1),i=(s&t.childLanes)!==0),c){if(i)return kp(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),xe(Dt,Dt.current),i)break;return null;case 22:return t.lanes=0,Tp(e,t,s,t.pendingProps);case 24:Ga(t,Ut,e.memoizedState.cache)}return _a(e,t,s)}function Rp(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)Vt=!0;else{if(!Bu(e,s)&&(t.flags&128)===0)return Vt=!1,PS(e,t,s);Vt=(e.flags&131072)!==0}else Vt=!1,Pe&&(t.flags&1048576)!==0&&um(t,cl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Cs(t.elementType),t.type=e,typeof e=="function")Ic(e)?(i=Ds(e,i),t.tag=1,t=jp(null,t,e,i,s)):(t.tag=0,t=Nu(null,t,e,i,s));else{if(e!=null){var c=e.$$typeof;if(c===X){t.tag=11,t=Sp(null,t,e,i,s);break e}else if(c===W){t.tag=14,t=xp(null,t,e,i,s);break e}}throw t=ye(e)||e,Error(o(306,t,""))}}return t;case 0:return Nu(e,t,t.type,t.pendingProps,s);case 1:return i=t.type,c=Ds(i,t.pendingProps),jp(e,t,i,c,s);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var f=t.memoizedState;c=f.element,tu(e,t),vl(t,i,null,s);var v=t.memoizedState;if(i=v.cache,Ga(t,Ut,i),i!==f.cache&&Zc(t,[Ut],s,!0),gl(),i=v.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Np(e,t,i,s);break e}else if(i!==c){c=Ln(Error(o(424)),t),ul(c),t=Np(e,t,i,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=Hn(e.firstChild),Xt=t,Pe=!0,Ia=null,Vn=!0,s=Tm(t,null,i,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(_s(),i===c){t=_a(e,t,s);break e}Jt(e,t,i,s)}t=t.child}return t;case 26:return er(e,t),e===null?(s=Pg(t.type,null,t.pendingProps,null))?t.memoizedState=s:Pe||(s=t.type,e=t.pendingProps,i=vr(q.current).createElement(s),i[Lt]=t,i[$t]=e,Wt(i,s,e),ht(i),t.stateNode=i):t.memoizedState=Pg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return gt(t),e===null&&Pe&&(i=t.stateNode=Ig(t.type,t.pendingProps,q.current),Xt=t,Vn=!0,c=rt,ts(t.type)?(md=c,rt=Hn(i.firstChild)):rt=c),Jt(e,t,t.pendingProps.children,s),er(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((c=i=rt)&&(i=bx(i,t.type,t.pendingProps,Vn),i!==null?(t.stateNode=i,Xt=t,rt=Hn(i.firstChild),Vn=!1,c=!0):c=!1),c||Ha(t)),gt(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,i=f.children,cd(c,f)?i=null:v!==null&&cd(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=ru(e,t,OS,null,null,s),Ul._currentValue=c),er(e,t),Jt(e,t,i,s),t.child;case 6:return e===null&&Pe&&((e=s=rt)&&(s=Sx(s,t.pendingProps,Vn),s!==null?(t.stateNode=s,Xt=t,rt=null,e=!0):e=!1),e||Ha(t)),null;case 13:return wp(e,t,s);case 4:return De(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ns(t,null,i,s):Jt(e,t,i,s),t.child;case 11:return Sp(e,t,t.type,t.pendingProps,s);case 7:return Jt(e,t,t.pendingProps,s),t.child;case 8:return Jt(e,t,t.pendingProps.children,s),t.child;case 12:return Jt(e,t,t.pendingProps.children,s),t.child;case 10:return i=t.pendingProps,Ga(t,t.type,i.value),Jt(e,t,i.children,s),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,Es(t),c=Qt(c),i=i(c),t.flags|=1,Jt(e,t,i,s),t.child;case 14:return xp(e,t,t.type,t.pendingProps,s);case 15:return _p(e,t,t.type,t.pendingProps,s);case 19:return kp(e,t,s);case 31:return GS(e,t,s);case 22:return Tp(e,t,s,t.pendingProps);case 24:return Es(t),i=Qt(Ut),e===null?(c=Jc(),c===null&&(c=it,f=Xc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:i,cache:c},eu(t),Ga(t,Ut,c)):((e.lanes&s)!==0&&(tu(e,t),vl(t,null,null,s),gl()),c=e.memoizedState,f=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ga(t,Ut,i)):(i=f.cache,Ga(t,Ut,i),i!==c.cache&&Zc(t,[Ut],s,!0))),Jt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Ta(e){e.flags|=4}function Lu(e,t,s,i,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(ig())e.flags|=8192;else throw js=Vo,Wc}else e.flags&=-16777217}function Mp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$g(t))if(ig())e.flags|=8192;else throw js=Vo,Wc}function nr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Rn():536870912,e.lanes|=t,xi|=t)}function Tl(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,i=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=s,t}function qS(e,t,s){var i=t.pendingProps;switch(qc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return s=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ba(Ut),Fe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ri(t)?Ta(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fc())),ct(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Ta(t),f!==null?(ct(t),Mp(t,f)):(ct(t),Lu(t,c,null,i,s))):f?f!==e.memoizedState?(Ta(t),ct(t),Mp(t,f)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Ta(t),ct(t),Lu(t,c,e,i,s)),null;case 27:if(xt(t),s=q.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ta(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ct(t),null}e=Ae.current,ri(t)?fm(t):(e=Ig(c,i,s),t.stateNode=e,Ta(t))}return ct(t),null;case 5:if(xt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ta(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ct(t),null}if(f=Ae.current,ri(t))fm(t);else{var v=vr(q.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof i.is=="string"?v.createElement("select",{is:i.is}):v.createElement("select"),i.multiple?f.multiple=!0:i.size&&(f.size=i.size);break;default:f=typeof i.is=="string"?v.createElement(c,{is:i.is}):v.createElement(c)}}f[Lt]=t,f[$t]=i;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=f;e:switch(Wt(f,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ta(t)}}return ct(t),Lu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Ta(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=q.current,ri(t)){if(e=t.stateNode,s=t.memoizedProps,i=null,c=Xt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===s||i!==null&&i.suppressHydrationWarning===!0||wg(e.nodeValue,s)),e||Ha(t,!0)}else e=vr(e).createTextNode(i),e[Lt]=t,t.stateNode=e}return ct(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(i=ri(t),s!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Lt]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else s=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(En(t),t):(En(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ct(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ri(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Lt]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),c=!1}else c=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(En(t),t):(En(t),null)}return En(t),(t.flags&128)!==0?(t.lanes=s,t):(s=i!==null,e=e!==null&&e.memoizedState!==null,s&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==c&&(i.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),nr(t,t.updateQueue),ct(t),null);case 4:return Fe(),e===null&&sd(t.stateNode.containerInfo),ct(t),null;case 10:return ba(t.type),ct(t),null;case 19:if(we(Dt),i=t.memoizedState,i===null)return ct(t),null;if(c=(t.flags&128)!==0,f=i.rendering,f===null)if(c)Tl(i,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Po(e),f!==null){for(t.flags|=128,Tl(i,!1),e=f.updateQueue,t.updateQueue=e,nr(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)om(s,e),s=s.sibling;return xe(Dt,Dt.current&1|2),Pe&&va(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&de()>or&&(t.flags|=128,c=!0,Tl(i,!1),t.lanes=4194304)}else{if(!c)if(e=Po(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,nr(t,e),Tl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!f.alternate&&!Pe)return ct(t),null}else 2*de()-i.renderingStartTime>or&&s!==536870912&&(t.flags|=128,c=!0,Tl(i,!1),t.lanes=4194304);i.isBackwards?(f.sibling=t.child,t.child=f):(e=i.last,e!==null?e.sibling=f:t.child=f,i.last=f)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=de(),e.sibling=null,s=Dt.current,xe(Dt,c?s&1|2:s&1),Pe&&va(t,i.treeForkCount),e):(ct(t),null);case 22:case 23:return En(t),iu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(s&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),s=t.updateQueue,s!==null&&nr(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==s&&(t.flags|=2048),e!==null&&we(As),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ba(Ut),ct(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function YS(e,t){switch(qc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(Ut),Fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xt(t),null;case 31:if(t.memoizedState!==null){if(En(t),t.alternate===null)throw Error(o(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(En(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Dt),null;case 4:return Fe(),null;case 10:return ba(t.type),null;case 22:case 23:return En(t),iu(),e!==null&&we(As),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(Ut),null;case 25:return null;default:return null}}function Op(e,t){switch(qc(t),t.tag){case 3:ba(Ut),Fe();break;case 26:case 27:case 5:xt(t);break;case 4:Fe();break;case 31:t.memoizedState!==null&&En(t);break;case 13:En(t);break;case 19:we(Dt);break;case 10:ba(t.type);break;case 22:case 23:En(t),iu(),e!==null&&we(As);break;case 24:ba(Ut)}}function El(e,t){try{var s=t.updateQueue,i=s!==null?s.lastEffect:null;if(i!==null){var c=i.next;s=c;do{if((s.tag&e)===e){i=void 0;var f=s.create,v=s.inst;i=f(),v.destroy=i}s=s.next}while(s!==c)}}catch(x){tt(t,t.return,x)}}function $a(e,t,s){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var f=c.next;i=f;do{if((i.tag&e)===e){var v=i.inst,x=v.destroy;if(x!==void 0){v.destroy=void 0,c=t;var E=s,O=x;try{O()}catch(P){tt(c,E,P)}}}i=i.next}while(i!==f)}}catch(P){tt(t,t.return,P)}}function Bp(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Am(t,s)}catch(i){tt(e,e.return,i)}}}function Lp(e,t,s){s.props=Ds(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(i){tt(e,t,i)}}function Al(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof s=="function"?e.refCleanup=s(i):s.current=i}}catch(c){tt(e,t,c)}}function aa(e,t){var s=e.ref,i=e.refCleanup;if(s!==null)if(typeof i=="function")try{i()}catch(c){tt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){tt(e,t,c)}else s.current=null}function Up(e){var t=e.type,s=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&i.focus();break e;case"img":s.src?i.src=s.src:s.srcSet&&(i.srcset=s.srcSet)}}catch(c){tt(e,e.return,c)}}function Uu(e,t,s){try{var i=e.stateNode;hx(i,e.type,s,t),i[$t]=t}catch(c){tt(e,e.return,c)}}function zp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ts(e.type)||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ts(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 Vu(e,t,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=ma));else if(i!==4&&(i===27&&ts(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Vu(e,t,s),e=e.sibling;e!==null;)Vu(e,t,s),e=e.sibling}function ar(e,t,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(i!==4&&(i===27&&ts(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(ar(e,t,s),e=e.sibling;e!==null;)ar(e,t,s),e=e.sibling}function Vp(e){var t=e.stateNode,s=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Wt(t,i,s),t[Lt]=e,t[$t]=s}catch(f){tt(e,e.return,f)}}var Ea=!1,It=!1,Iu=!1,Ip=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function FS(e,t){if(e=e.containerInfo,od=Er,e=Jh(e),Mc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var i=s.getSelection&&s.getSelection();if(i&&i.rangeCount!==0){s=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var v=0,x=-1,E=-1,O=0,P=0,$=e,B=null;t:for(;;){for(var V;$!==s||c!==0&&$.nodeType!==3||(x=v+c),$!==f||i!==0&&$.nodeType!==3||(E=v+i),$.nodeType===3&&(v+=$.nodeValue.length),(V=$.firstChild)!==null;)B=$,$=V;for(;;){if($===e)break t;if(B===s&&++O===c&&(x=v),B===f&&++P===i&&(E=v),(V=$.nextSibling)!==null)break;$=B,B=$.parentNode}$=V}s=x===-1||E===-1?null:{start:x,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(rd={focusedElem:e,selectionRange:s},Er=!1,Kt=t;Kt!==null;)if(t=Kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Kt=e;else for(;Kt!==null;){switch(t=Kt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,i=s.stateNode;try{var ue=Ds(s.type,c);e=i.getSnapshotBeforeUpdate(ue,f),i.__reactInternalSnapshotBeforeUpdate=e}catch(Se){tt(s,s.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)dd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":dd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Kt=e;break}Kt=t.return}}function Hp(e,t,s){var i=s.flags;switch(s.tag){case 0:case 11:case 15:Ca(e,s),i&4&&El(5,s);break;case 1:if(Ca(e,s),i&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(v){tt(s,s.return,v)}else{var c=Ds(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){tt(s,s.return,v)}}i&64&&Bp(s),i&512&&Al(s,s.return);break;case 3:if(Ca(e,s),i&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Am(e,t)}catch(v){tt(s,s.return,v)}}break;case 27:t===null&&i&4&&Vp(s);case 26:case 5:Ca(e,s),t===null&&i&4&&Up(s),i&512&&Al(s,s.return);break;case 12:Ca(e,s);break;case 31:Ca(e,s),i&4&&qp(e,s);break;case 13:Ca(e,s),i&4&&Yp(e,s),i&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=tx.bind(null,s),xx(e,s))));break;case 22:if(i=s.memoizedState!==null||Ea,!i){t=t!==null&&t.memoizedState!==null||It,c=Ea;var f=It;Ea=i,(It=t)&&!f?ja(e,s,(s.subtreeFlags&8772)!==0):Ca(e,s),Ea=c,It=f}break;case 30:break;default:Ca(e,s)}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ie(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mt=null,mn=!1;function Aa(e,t,s){for(s=s.child;s!==null;)Pp(e,t,s),s=s.sibling}function Pp(e,t,s){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(ot,s)}catch{}switch(s.tag){case 26:It||aa(s,t),Aa(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:It||aa(s,t);var i=mt,c=mn;ts(s.type)&&(mt=s.stateNode,mn=!1),Aa(e,t,s),Ol(s.stateNode),mt=i,mn=c;break;case 5:It||aa(s,t);case 6:if(i=mt,c=mn,mt=null,Aa(e,t,s),mt=i,mn=c,mt!==null)if(mn)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(s.stateNode)}catch(f){tt(s,t,f)}else try{mt.removeChild(s.stateNode)}catch(f){tt(s,t,f)}break;case 18:mt!==null&&(mn?(e=mt,Bg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),wi(e)):Bg(mt,s.stateNode));break;case 4:i=mt,c=mn,mt=s.stateNode.containerInfo,mn=!0,Aa(e,t,s),mt=i,mn=c;break;case 0:case 11:case 14:case 15:$a(2,s,t),It||$a(4,s,t),Aa(e,t,s);break;case 1:It||(aa(s,t),i=s.stateNode,typeof i.componentWillUnmount=="function"&&Lp(s,t,i)),Aa(e,t,s);break;case 21:Aa(e,t,s);break;case 22:It=(i=It)||s.memoizedState!==null,Aa(e,t,s),It=i;break;default:Aa(e,t,s)}}function qp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wi(e)}catch(s){tt(t,t.return,s)}}}function Yp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wi(e)}catch(s){tt(t,t.return,s)}}function KS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ip),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ip),t;default:throw Error(o(435,e.tag))}}function sr(e,t){var s=KS(e);t.forEach(function(i){if(!s.has(i)){s.add(i);var c=nx.bind(null,e,i);i.then(c,c)}})}function pn(e,t){var s=t.deletions;if(s!==null)for(var i=0;i<s.length;i++){var c=s[i],f=e,v=t,x=v;e:for(;x!==null;){switch(x.tag){case 27:if(ts(x.type)){mt=x.stateNode,mn=!1;break e}break;case 5:mt=x.stateNode,mn=!1;break e;case 3:case 4:mt=x.stateNode.containerInfo,mn=!0;break e}x=x.return}if(mt===null)throw Error(o(160));Pp(f,v,c),mt=null,mn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fp(t,e),t=t.sibling}var Qn=null;function Fp(e,t){var s=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),gn(e),i&4&&($a(3,e,e.return),El(3,e),$a(5,e,e.return));break;case 1:pn(t,e),gn(e),i&512&&(It||s===null||aa(s,s.return)),i&64&&Ea&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?i:s.concat(i))));break;case 26:var c=Qn;if(pn(t,e),gn(e),i&512&&(It||s===null||aa(s,s.return)),i&4){var f=s!==null?s.memoizedState:null;if(i=e.memoizedState,s===null)if(i===null)if(e.stateNode===null){e:{i=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Be]||f[Lt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(i),c.head.insertBefore(f,c.querySelector("head > title"))),Wt(f,i,s),f[Lt]=e,ht(f),i=f;break e;case"link":var v=Fg("link","href",c).get(i+(s.href||""));if(v){for(var x=0;x<v.length;x++)if(f=v[x],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){v.splice(x,1);break t}}f=c.createElement(i),Wt(f,i,s),c.head.appendChild(f);break;case"meta":if(v=Fg("meta","content",c).get(i+(s.content||""))){for(x=0;x<v.length;x++)if(f=v[x],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){v.splice(x,1);break t}}f=c.createElement(i),Wt(f,i,s),c.head.appendChild(f);break;default:throw Error(o(468,i))}f[Lt]=e,ht(f),i=f}e.stateNode=i}else Kg(c,e.type,e.stateNode);else e.stateNode=Yg(c,i,e.memoizedProps);else f!==i?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,i===null?Kg(c,e.type,e.stateNode):Yg(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Uu(e,e.memoizedProps,s.memoizedProps)}break;case 27:pn(t,e),gn(e),i&512&&(It||s===null||aa(s,s.return)),s!==null&&i&4&&Uu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(pn(t,e),gn(e),i&512&&(It||s===null||aa(s,s.return)),e.flags&32){c=e.stateNode;try{Js(c,"")}catch(ue){tt(e,e.return,ue)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,Uu(e,c,s!==null?s.memoizedProps:c)),i&1024&&(Iu=!0);break;case 6:if(pn(t,e),gn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,s=e.stateNode;try{s.nodeValue=i}catch(ue){tt(e,e.return,ue)}}break;case 3:if(Sr=null,c=Qn,Qn=yr(t.containerInfo),pn(t,e),Qn=c,gn(e),i&4&&s!==null&&s.memoizedState.isDehydrated)try{wi(t.containerInfo)}catch(ue){tt(e,e.return,ue)}Iu&&(Iu=!1,Kp(e));break;case 4:i=Qn,Qn=yr(e.stateNode.containerInfo),pn(t,e),gn(e),Qn=i;break;case 12:pn(t,e),gn(e);break;case 31:pn(t,e),gn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,sr(e,i)));break;case 13:pn(t,e),gn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(lr=de()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,sr(e,i)));break;case 22:c=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,O=Ea,P=It;if(Ea=O||c,It=P||E,pn(t,e),It=P,Ea=O,gn(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||E||Ea||It||ks(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){E=s=t;try{if(f=E.stateNode,c)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{x=E.stateNode;var $=E.memoizedProps.style,B=$!=null&&$.hasOwnProperty("display")?$.display:null;x.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(ue){tt(E,E.return,ue)}}}else if(t.tag===6){if(s===null){E=t;try{E.stateNode.nodeValue=c?"":E.memoizedProps}catch(ue){tt(E,E.return,ue)}}}else if(t.tag===18){if(s===null){E=t;try{var V=E.stateNode;c?Lg(V,!0):Lg(E.stateNode,!1)}catch(ue){tt(E,E.return,ue)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(s=i.retryQueue,s!==null&&(i.retryQueue=null,sr(e,s))));break;case 19:pn(t,e),gn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,sr(e,i)));break;case 30:break;case 21:break;default:pn(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{for(var s,i=e.return;i!==null;){if(zp(i)){s=i;break}i=i.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=zu(e);ar(e,f,c);break;case 5:var v=s.stateNode;s.flags&32&&(Js(v,""),s.flags&=-33);var x=zu(e);ar(e,x,v);break;case 3:case 4:var E=s.stateNode.containerInfo,O=zu(e);Vu(e,O,E);break;default:throw Error(o(161))}}catch(P){tt(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Kp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ca(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Hp(e,t.alternate,t),t=t.sibling}function ks(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$a(4,t,t.return),ks(t);break;case 1:aa(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Lp(t,t.return,s),ks(t);break;case 27:Ol(t.stateNode);case 26:case 5:aa(t,t.return),ks(t);break;case 22:t.memoizedState===null&&ks(t);break;case 30:ks(t);break;default:ks(t)}e=e.sibling}}function ja(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:ja(c,f,s),El(4,f);break;case 1:if(ja(c,f,s),i=f,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(O){tt(i,i.return,O)}if(i=f,c=i.updateQueue,c!==null){var x=i.stateNode;try{var E=c.shared.hiddenCallbacks;if(E!==null)for(c.shared.hiddenCallbacks=null,c=0;c<E.length;c++)Em(E[c],x)}catch(O){tt(i,i.return,O)}}s&&v&64&&Bp(f),Al(f,f.return);break;case 27:Vp(f);case 26:case 5:ja(c,f,s),s&&i===null&&v&4&&Up(f),Al(f,f.return);break;case 12:ja(c,f,s);break;case 31:ja(c,f,s),s&&v&4&&qp(c,f);break;case 13:ja(c,f,s),s&&v&4&&Yp(c,f);break;case 22:f.memoizedState===null&&ja(c,f,s),Al(f,f.return);break;case 30:break;default:ja(c,f,s)}t=t.sibling}}function Hu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&dl(s))}function Gu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e))}function Jn(e,t,s,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$p(e,t,s,i),t=t.sibling}function $p(e,t,s,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Jn(e,t,s,i),c&2048&&El(9,t);break;case 1:Jn(e,t,s,i);break;case 3:Jn(e,t,s,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e)));break;case 12:if(c&2048){Jn(e,t,s,i),e=t.stateNode;try{var f=t.memoizedProps,v=f.id,x=f.onPostCommit;typeof x=="function"&&x(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){tt(t,t.return,E)}}else Jn(e,t,s,i);break;case 31:Jn(e,t,s,i);break;case 13:Jn(e,t,s,i);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Jn(e,t,s,i):Cl(e,t):f._visibility&2?Jn(e,t,s,i):(f._visibility|=2,yi(e,t,s,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Hu(v,t);break;case 24:Jn(e,t,s,i),c&2048&&Gu(t.alternate,t);break;default:Jn(e,t,s,i)}}function yi(e,t,s,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,v=t,x=s,E=i,O=v.flags;switch(v.tag){case 0:case 11:case 15:yi(f,v,x,E,c),El(8,v);break;case 23:break;case 22:var P=v.stateNode;v.memoizedState!==null?P._visibility&2?yi(f,v,x,E,c):Cl(f,v):(P._visibility|=2,yi(f,v,x,E,c)),c&&O&2048&&Hu(v.alternate,v);break;case 24:yi(f,v,x,E,c),c&&O&2048&&Gu(v.alternate,v);break;default:yi(f,v,x,E,c)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,i=t,c=i.flags;switch(i.tag){case 22:Cl(s,i),c&2048&&Hu(i.alternate,i);break;case 24:Cl(s,i),c&2048&&Gu(i.alternate,i);break;default:Cl(s,i)}t=t.sibling}}var jl=8192;function bi(e,t,s){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Zp(e,t,s),e=e.sibling}function Zp(e,t,s){switch(e.tag){case 26:bi(e,t,s),e.flags&jl&&e.memoizedState!==null&&Mx(s,Qn,e.memoizedState,e.memoizedProps);break;case 5:bi(e,t,s);break;case 3:case 4:var i=Qn;Qn=yr(e.stateNode.containerInfo),bi(e,t,s),Qn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=jl,jl=16777216,bi(e,t,s),jl=i):bi(e,t,s));break;default:bi(e,t,s)}}function Xp(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 Nl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var i=t[s];Kt=i,Jp(i,e)}Xp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qp(e),e=e.sibling}function Qp(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&$a(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ir(e)):Nl(e);break;default:Nl(e)}}function ir(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var i=t[s];Kt=i,Jp(i,e)}Xp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$a(8,t,t.return),ir(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,ir(t));break;default:ir(t)}e=e.sibling}}function Jp(e,t){for(;Kt!==null;){var s=Kt;switch(s.tag){case 0:case 11:case 15:$a(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var i=s.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:dl(s.memoizedState.cache)}if(i=s.child,i!==null)i.return=s,Kt=i;else e:for(s=e;Kt!==null;){i=Kt;var c=i.sibling,f=i.return;if(Gp(i),i===s){Kt=null;break e}if(c!==null){c.return=f,Kt=c;break e}Kt=f}}}var $S={getCacheForType:function(e){var t=Qt(Ut),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Qt(Ut).controller.signal}},ZS=typeof WeakMap=="function"?WeakMap:Map,Xe=0,it=null,ze=null,He=0,et=0,An=null,Za=!1,Si=!1,Pu=!1,Na=0,Ct=0,Xa=0,Rs=0,qu=0,Cn=0,xi=0,wl=null,vn=null,Yu=!1,lr=0,Wp=0,or=1/0,rr=null,Qa=null,Pt=0,Ja=null,_i=null,wa=0,Fu=0,Ku=null,eg=null,Dl=0,$u=null;function jn(){return(Xe&2)!==0&&He!==0?He&-He:L.T!==null?ed():Ji()}function tg(){if(Cn===0)if((He&536870912)===0||Pe){var e=Me;Me<<=1,(Me&3932160)===0&&(Me=262144),Cn=e}else Cn=536870912;return e=Tn.current,e!==null&&(e.flags|=32),Cn}function yn(e,t,s){(e===it&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Ti(e,0),Wa(e,He,Cn,!1)),Ua(e,s),((Xe&2)===0||e!==it)&&(e===it&&((Xe&2)===0&&(Rs|=s),Ct===4&&Wa(e,He,Cn,!1)),sa(e))}function ng(e,t,s){if((Xe&6)!==0)throw Error(o(327));var i=!s&&(t&127)===0&&(t&e.expiredLanes)===0||se(e,t),c=i?JS(e,t):Xu(e,t,!0),f=i;do{if(c===0){Si&&!i&&Wa(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!XS(s)){c=Xu(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var x=e;c=wl;var E=x.current.memoizedState.isDehydrated;if(E&&(Ti(x,v).flags|=256),v=Xu(x,v,!1),v!==2){if(Pu&&!E){x.errorRecoveryDisabledLanes|=f,Rs|=f,c=4;break e}f=vn,vn=c,f!==null&&(vn===null?vn=f:vn.push.apply(vn,f))}c=v}if(f=!1,c!==2)continue}}if(c===1){Ti(e,0),Wa(e,t,0,!0);break}e:{switch(i=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Wa(i,t,Cn,!Za);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=lr+300-de(),10<c)){if(Wa(i,t,Cn,!Za),ie(i,0,!0)!==0)break e;wa=t,i.timeoutHandle=Mg(ag.bind(null,i,s,vn,rr,Yu,t,Cn,Rs,xi,Za,f,"Throttled",-0,0),c);break e}ag(i,s,vn,rr,Yu,t,Cn,Rs,xi,Za,f,null,-0,0)}}break}while(!0);sa(e)}function ag(e,t,s,i,c,f,v,x,E,O,P,$,B,V){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ma},Zp(t,f,$);var ue=(f&62914560)===f?lr-de():(f&4194048)===f?Wp-de():0;if(ue=Ox($,ue),ue!==null){wa=f,e.cancelPendingCommit=ue(dg.bind(null,e,t,f,s,i,c,v,x,E,P,$,null,B,V)),Wa(e,f,v,!O);return}}dg(e,t,f,s,i,c,v,x,E)}function XS(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var i=0;i<s.length;i++){var c=s[i],f=c.getSnapshot;c=c.value;try{if(!xn(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wa(e,t,s,i){t&=~qu,t&=~Rs,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var f=31-vt(c),v=1<<f;i[f]=-1,c&=~v}s!==0&&Zi(e,s,t)}function cr(){return(Xe&6)===0?(kl(0),!1):!0}function Zu(){if(ze!==null){if(et===0)var e=ze.return;else e=ze,ya=Ts=null,du(e),hi=null,hl=0,e=ze;for(;e!==null;)Op(e.alternate,e),e=e.return;ze=null}}function Ti(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,gx(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),wa=0,Zu(),it=e,ze=s=ga(e.current,null),He=t,et=0,An=null,Za=!1,Si=se(e,t),Pu=!1,xi=Cn=qu=Rs=Xa=Ct=0,vn=wl=null,Yu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-vt(i),f=1<<c;t|=e[c],i&=~f}return Na=t,Do(),s}function sg(e,t){Re=null,L.H=xl,t===fi||t===zo?(t=Sm(),et=3):t===Wc?(t=Sm(),et=4):et=t===ju?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,An=t,ze===null&&(Ct=1,Jo(e,Ln(t,e.current)))}function ig(){var e=Tn.current;return e===null?!0:(He&4194048)===He?In===null:(He&62914560)===He||(He&536870912)!==0?e===In:!1}function lg(){var e=L.H;return L.H=xl,e===null?xl:e}function og(){var e=L.A;return L.A=$S,e}function ur(){Ct=4,Za||(He&4194048)!==He&&Tn.current!==null||(Si=!0),(Xa&134217727)===0&&(Rs&134217727)===0||it===null||Wa(it,He,Cn,!1)}function Xu(e,t,s){var i=Xe;Xe|=2;var c=lg(),f=og();(it!==e||He!==t)&&(rr=null,Ti(e,t)),t=!1;var v=Ct;e:do try{if(et!==0&&ze!==null){var x=ze,E=An;switch(et){case 8:Zu(),v=6;break e;case 3:case 2:case 9:case 6:Tn.current===null&&(t=!0);var O=et;if(et=0,An=null,Ei(e,x,E,O),s&&Si){v=0;break e}break;default:O=et,et=0,An=null,Ei(e,x,E,O)}}QS(),v=Ct;break}catch(P){sg(e,P)}while(!0);return t&&e.shellSuspendCounter++,ya=Ts=null,Xe=i,L.H=c,L.A=f,ze===null&&(it=null,He=0,Do()),v}function QS(){for(;ze!==null;)rg(ze)}function JS(e,t){var s=Xe;Xe|=2;var i=lg(),c=og();it!==e||He!==t?(rr=null,or=de()+500,Ti(e,t)):Si=se(e,t);e:do try{if(et!==0&&ze!==null){t=ze;var f=An;t:switch(et){case 1:et=0,An=null,Ei(e,t,f,1);break;case 2:case 9:if(ym(f)){et=0,An=null,cg(t);break}t=function(){et!==2&&et!==9||it!==e||(et=7),sa(e)},f.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:ym(f)?(et=0,An=null,cg(t)):(et=0,An=null,Ei(e,t,f,7));break;case 5:var v=null;switch(ze.tag){case 26:v=ze.memoizedState;case 5:case 27:var x=ze;if(v?$g(v):x.stateNode.complete){et=0,An=null;var E=x.sibling;if(E!==null)ze=E;else{var O=x.return;O!==null?(ze=O,dr(O)):ze=null}break t}}et=0,An=null,Ei(e,t,f,5);break;case 6:et=0,An=null,Ei(e,t,f,6);break;case 8:Zu(),Ct=6;break e;default:throw Error(o(462))}}WS();break}catch(P){sg(e,P)}while(!0);return ya=Ts=null,L.H=i,L.A=c,Xe=s,ze!==null?0:(it=null,He=0,Do(),Ct)}function WS(){for(;ze!==null&&!le();)rg(ze)}function rg(e){var t=Rp(e.alternate,e,Na);e.memoizedProps=e.pendingProps,t===null?dr(e):ze=t}function cg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Cp(s,t,t.pendingProps,t.type,void 0,He);break;case 11:t=Cp(s,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:du(t);default:Op(s,t),t=ze=om(t,Na),t=Rp(s,t,Na)}e.memoizedProps=e.pendingProps,t===null?dr(e):ze=t}function Ei(e,t,s,i){ya=Ts=null,du(t),hi=null,hl=0;var c=t.return;try{if(HS(e,c,t,s,He)){Ct=1,Jo(e,Ln(s,e.current)),ze=null;return}}catch(f){if(c!==null)throw ze=c,f;Ct=1,Jo(e,Ln(s,e.current)),ze=null;return}t.flags&32768?(Pe||i===1?e=!0:Si||(He&536870912)!==0?e=!1:(Za=e=!0,(i===2||i===9||i===3||i===6)&&(i=Tn.current,i!==null&&i.tag===13&&(i.flags|=16384))),ug(t,e)):dr(t)}function dr(e){var t=e;do{if((t.flags&32768)!==0){ug(t,Za);return}e=t.return;var s=qS(t.alternate,t,Na);if(s!==null){ze=s;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);Ct===0&&(Ct=5)}function ug(e,t){do{var s=YS(e.alternate,e);if(s!==null){s.flags&=32767,ze=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=s}while(e!==null);Ct=6,ze=null}function dg(e,t,s,i,c,f,v,x,E){e.cancelPendingCommit=null;do fr();while(Pt!==0);if((Xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=zc,vo(e,s,f,v,x,E),e===it&&(ze=it=null,He=0),_i=t,Ja=e,wa=s,Fu=f,Ku=c,eg=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ax(Le,function(){return gg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=L.T,L.T=null,c=K.p,K.p=2,v=Xe,Xe|=4;try{FS(e,t,s)}finally{Xe=v,K.p=c,L.T=i}}Pt=1,fg(),hg(),mg()}}function fg(){if(Pt===1){Pt=0;var e=Ja,t=_i,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=L.T,L.T=null;var i=K.p;K.p=2;var c=Xe;Xe|=4;try{Fp(t,e);var f=rd,v=Jh(e.containerInfo),x=f.focusedElem,E=f.selectionRange;if(v!==x&&x&&x.ownerDocument&&Qh(x.ownerDocument.documentElement,x)){if(E!==null&&Mc(x)){var O=E.start,P=E.end;if(P===void 0&&(P=O),"selectionStart"in x)x.selectionStart=O,x.selectionEnd=Math.min(P,x.value.length);else{var $=x.ownerDocument||document,B=$&&$.defaultView||window;if(B.getSelection){var V=B.getSelection(),ue=x.textContent.length,Se=Math.min(E.start,ue),st=E.end===void 0?Se:Math.min(E.end,ue);!V.extend&&Se>st&&(v=st,st=Se,Se=v);var k=Xh(x,Se),N=Xh(x,st);if(k&&N&&(V.rangeCount!==1||V.anchorNode!==k.node||V.anchorOffset!==k.offset||V.focusNode!==N.node||V.focusOffset!==N.offset)){var R=$.createRange();R.setStart(k.node,k.offset),V.removeAllRanges(),Se>st?(V.addRange(R),V.extend(N.node,N.offset)):(R.setEnd(N.node,N.offset),V.addRange(R))}}}}for($=[],V=x;V=V.parentNode;)V.nodeType===1&&$.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<$.length;x++){var F=$[x];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}Er=!!od,rd=od=null}finally{Xe=c,K.p=i,L.T=s}}e.current=t,Pt=2}}function hg(){if(Pt===2){Pt=0;var e=Ja,t=_i,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=L.T,L.T=null;var i=K.p;K.p=2;var c=Xe;Xe|=4;try{Hp(e,t.alternate,t)}finally{Xe=c,K.p=i,L.T=s}}Pt=3}}function mg(){if(Pt===4||Pt===3){Pt=0,ce();var e=Ja,t=_i,s=wa,i=eg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pt=5:(Pt=0,_i=Ja=null,pg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Qa=null),$s(s),t=t.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(ot,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=L.T,c=K.p,K.p=2,L.T=null;try{for(var f=e.onRecoverableError,v=0;v<i.length;v++){var x=i[v];f(x.value,{componentStack:x.stack})}}finally{L.T=t,K.p=c}}(wa&3)!==0&&fr(),sa(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===$u?Dl++:(Dl=0,$u=e):Dl=0,kl(0)}}function pg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dl(t)))}function fr(){return fg(),hg(),mg(),gg()}function gg(){if(Pt!==5)return!1;var e=Ja,t=Fu;Fu=0;var s=$s(wa),i=L.T,c=K.p;try{K.p=32>s?32:s,L.T=null,s=Ku,Ku=null;var f=Ja,v=wa;if(Pt=0,_i=Ja=null,wa=0,(Xe&6)!==0)throw Error(o(331));var x=Xe;if(Xe|=4,Qp(f.current),$p(f,f.current,v,s),Xe=x,kl(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(ot,f)}catch{}return!0}finally{K.p=c,L.T=i,pg(e,t)}}function vg(e,t,s){t=Ln(s,t),t=Cu(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(Ua(e,2),sa(e))}function tt(e,t,s){if(e.tag===3)vg(e,e,s);else for(;t!==null;){if(t.tag===3){vg(t,e,s);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Qa===null||!Qa.has(i))){e=Ln(s,e),s=yp(2),i=Ya(t,s,2),i!==null&&(bp(s,i,t,e),Ua(i,2),sa(i));break}}t=t.return}}function Qu(e,t,s){var i=e.pingCache;if(i===null){i=e.pingCache=new ZS;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(s)||(Pu=!0,c.add(s),e=ex.bind(null,e,t,s),t.then(e,e))}function ex(e,t,s){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,it===e&&(He&s)===s&&(Ct===4||Ct===3&&(He&62914560)===He&&300>de()-lr?(Xe&2)===0&&Ti(e,0):qu|=s,xi===He&&(xi=0)),sa(e)}function yg(e,t){t===0&&(t=Rn()),e=Ss(e,t),e!==null&&(Ua(e,t),sa(e))}function tx(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),yg(e,s)}function nx(e,t){var s=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),yg(e,s)}function ax(e,t){return $n(e,t)}var hr=null,Ai=null,Ju=!1,mr=!1,Wu=!1,es=0;function sa(e){e!==Ai&&e.next===null&&(Ai===null?hr=Ai=e:Ai=Ai.next=e),mr=!0,Ju||(Ju=!0,ix())}function kl(e,t){if(!Wu&&mr){Wu=!0;do for(var s=!1,i=hr;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var f=0;else{var v=i.suspendedLanes,x=i.pingedLanes;f=(1<<31-vt(42|e)+1)-1,f&=c&~(v&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,_g(i,f))}else f=He,f=ie(i,i===it?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||se(i,f)||(s=!0,_g(i,f));i=i.next}while(s);Wu=!1}}function sx(){bg()}function bg(){mr=Ju=!1;var e=0;es!==0&&px()&&(e=es);for(var t=de(),s=null,i=hr;i!==null;){var c=i.next,f=Sg(i,t);f===0?(i.next=null,s===null?hr=c:s.next=c,c===null&&(Ai=s)):(s=i,(e!==0||(f&3)!==0)&&(mr=!0)),i=c}Pt!==0&&Pt!==5||kl(e),es!==0&&(es=0)}function Sg(e,t){for(var s=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-vt(f),x=1<<v,E=c[v];E===-1?((x&s)===0||(x&i)!==0)&&(c[v]=Et(x,t)):E<=t&&(e.expiredLanes|=x),f&=~x}if(t=it,s=He,s=ie(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,s===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Z(i),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||se(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(i!==null&&Z(i),$s(s)){case 2:case 8:s=We;break;case 32:s=Le;break;case 268435456:s=wt;break;default:s=Le}return i=xg.bind(null,e),s=$n(s,i),e.callbackPriority=t,e.callbackNode=s,t}return i!==null&&i!==null&&Z(i),e.callbackPriority=2,e.callbackNode=null,2}function xg(e,t){if(Pt!==0&&Pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(fr()&&e.callbackNode!==s)return null;var i=He;return i=ie(e,e===it?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(ng(e,i,t),Sg(e,de()),e.callbackNode!=null&&e.callbackNode===s?xg.bind(null,e):null)}function _g(e,t){if(fr())return null;ng(e,t,!0)}function ix(){vx(function(){(Xe&6)!==0?$n(Ee,sx):bg()})}function ed(){if(es===0){var e=ui;e===0&&(e=ae,ae<<=1,(ae&261888)===0&&(ae=256)),es=e}return es}function Tg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_o(""+e)}function Eg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function lx(e,t,s,i,c){if(t==="submit"&&s&&s.stateNode===c){var f=Tg((c[$t]||null).action),v=i.submitter;v&&(t=(t=v[$t]||null)?Tg(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var x=new Co("action","action",null,i,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(es!==0){var E=v?Eg(c,v):new FormData(c);Su(s,{pending:!0,data:E,method:c.method,action:f},null,E)}}else typeof f=="function"&&(x.preventDefault(),E=v?Eg(c,v):new FormData(c),Su(s,{pending:!0,data:E,method:c.method,action:f},f,E))},currentTarget:c}]})}}for(var td=0;td<Uc.length;td++){var nd=Uc[td],ox=nd.toLowerCase(),rx=nd[0].toUpperCase()+nd.slice(1);Xn(ox,"on"+rx)}Xn(tm,"onAnimationEnd"),Xn(nm,"onAnimationIteration"),Xn(am,"onAnimationStart"),Xn("dblclick","onDoubleClick"),Xn("focusin","onFocus"),Xn("focusout","onBlur"),Xn(ES,"onTransitionRun"),Xn(AS,"onTransitionStart"),Xn(CS,"onTransitionCancel"),Xn(sm,"onTransitionEnd"),Xs("onMouseEnter",["mouseout","mouseover"]),Xs("onMouseLeave",["mouseout","mouseover"]),Xs("onPointerEnter",["pointerout","pointerover"]),Xs("onPointerLeave",["pointerout","pointerover"]),gs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),gs("onBeforeInput",["compositionend","keypress","textInput","paste"]),gs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rl));function Ag(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var i=e[s],c=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var v=i.length-1;0<=v;v--){var x=i[v],E=x.instance,O=x.currentTarget;if(x=x.listener,E!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=O;try{f(c)}catch(P){wo(P)}c.currentTarget=null,f=E}else for(v=0;v<i.length;v++){if(x=i[v],E=x.instance,O=x.currentTarget,x=x.listener,E!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=O;try{f(c)}catch(P){wo(P)}c.currentTarget=null,f=E}}}}function Ve(e,t){var s=t[Zs];s===void 0&&(s=t[Zs]=new Set);var i=e+"__bubble";s.has(i)||(Cg(t,e,2,!1),s.add(i))}function ad(e,t,s){var i=0;t&&(i|=4),Cg(s,e,i,t)}var pr="_reactListening"+Math.random().toString(36).slice(2);function sd(e){if(!e[pr]){e[pr]=!0,bh.forEach(function(s){s!=="selectionchange"&&(cx.has(s)||ad(s,!1,e),ad(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pr]||(t[pr]=!0,ad("selectionchange",!1,t))}}function Cg(e,t,s,i){switch(t0(t)){case 2:var c=Ux;break;case 8:c=zx;break;default:c=bd}s=c.bind(null,t,s,e),c=void 0,!Ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function id(e,t,s,i,c){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var v=i.tag;if(v===3||v===4){var x=i.stateNode.containerInfo;if(x===c)break;if(v===4)for(v=i.return;v!==null;){var E=v.tag;if((E===3||E===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;x!==null;){if(v=nn(x),v===null)return;if(E=v.tag,E===5||E===6||E===26||E===27){i=f=v;continue e}x=x.parentNode}}i=i.return}kh(function(){var O=f,P=_c(s),$=[];e:{var B=im.get(e);if(B!==void 0){var V=Co,ue=e;switch(e){case"keypress":if(Eo(s)===0)break e;case"keydown":case"keyup":V=nS;break;case"focusin":ue="focus",V=Nc;break;case"focusout":ue="blur",V=Nc;break;case"beforeblur":case"afterblur":V=Nc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=q1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=iS;break;case tm:case nm:case am:V=K1;break;case sm:V=oS;break;case"scroll":case"scrollend":V=G1;break;case"wheel":V=cS;break;case"copy":case"cut":case"paste":V=Z1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Lh;break;case"toggle":case"beforetoggle":V=dS}var Se=(t&4)!==0,st=!Se&&(e==="scroll"||e==="scrollend"),k=Se?B!==null?B+"Capture":null:B;Se=[];for(var N=O,R;N!==null;){var F=N;if(R=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||R===null||k===null||(F=el(N,k),F!=null&&Se.push(Ml(N,F,R))),st)break;N=N.return}0<Se.length&&(B=new V(B,ue,null,s,P),$.push({event:B,listeners:Se}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",B&&s!==xc&&(ue=s.relatedTarget||s.fromElement)&&(nn(ue)||ue[fa]))break e;if((V||B)&&(B=P.window===P?P:(B=P.ownerDocument)?B.defaultView||B.parentWindow:window,V?(ue=s.relatedTarget||s.toElement,V=O,ue=ue?nn(ue):null,ue!==null&&(st=u(ue),Se=ue.tag,ue!==st||Se!==5&&Se!==27&&Se!==6)&&(ue=null)):(V=null,ue=O),V!==ue)){if(Se=Oh,F="onMouseLeave",k="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(Se=Lh,F="onPointerLeave",k="onPointerEnter",N="pointer"),st=V==null?B:yt(V),R=ue==null?B:yt(ue),B=new Se(F,N+"leave",V,s,P),B.target=st,B.relatedTarget=R,F=null,nn(P)===O&&(Se=new Se(k,N+"enter",ue,s,P),Se.target=R,Se.relatedTarget=st,F=Se),st=F,V&&ue)t:{for(Se=ux,k=V,N=ue,R=0,F=k;F;F=Se(F))R++;F=0;for(var ve=N;ve;ve=Se(ve))F++;for(;0<R-F;)k=Se(k),R--;for(;0<F-R;)N=Se(N),F--;for(;R--;){if(k===N||N!==null&&k===N.alternate){Se=k;break t}k=Se(k),N=Se(N)}Se=null}else Se=null;V!==null&&jg($,B,V,Se,!1),ue!==null&&st!==null&&jg($,st,ue,Se,!0)}}e:{if(B=O?yt(O):window,V=B.nodeName&&B.nodeName.toLowerCase(),V==="select"||V==="input"&&B.type==="file")var Ke=qh;else if(Gh(B))if(Yh)Ke=xS;else{Ke=bS;var me=yS}else V=B.nodeName,!V||V.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?O&&Sc(O.elementType)&&(Ke=qh):Ke=SS;if(Ke&&(Ke=Ke(e,O))){Ph($,Ke,s,P);break e}me&&me(e,B,O),e==="focusout"&&O&&B.type==="number"&&O.memoizedProps.value!=null&&bc(B,"number",B.value)}switch(me=O?yt(O):window,e){case"focusin":(Gh(me)||me.contentEditable==="true")&&(ni=me,Oc=O,rl=null);break;case"focusout":rl=Oc=ni=null;break;case"mousedown":Bc=!0;break;case"contextmenu":case"mouseup":case"dragend":Bc=!1,Wh($,s,P);break;case"selectionchange":if(TS)break;case"keydown":case"keyup":Wh($,s,P)}var Oe;if(Dc)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else ti?Ih(e,s)&&(Ge="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ge="onCompositionStart");Ge&&(Uh&&s.locale!=="ko"&&(ti||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&ti&&(Oe=Rh()):(za=P,Ac="value"in za?za.value:za.textContent,ti=!0)),me=gr(O,Ge),0<me.length&&(Ge=new Bh(Ge,e,null,s,P),$.push({event:Ge,listeners:me}),Oe?Ge.data=Oe:(Oe=Hh(s),Oe!==null&&(Ge.data=Oe)))),(Oe=hS?mS(e,s):pS(e,s))&&(Ge=gr(O,"onBeforeInput"),0<Ge.length&&(me=new Bh("onBeforeInput","beforeinput",null,s,P),$.push({event:me,listeners:Ge}),me.data=Oe)),lx($,e,O,s,P)}Ag($,t)})}function Ml(e,t,s){return{instance:e,listener:t,currentTarget:s}}function gr(e,t){for(var s=t+"Capture",i=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=el(e,s),c!=null&&i.unshift(Ml(e,c,f)),c=el(e,t),c!=null&&i.push(Ml(e,c,f))),e.tag===3)return i;e=e.return}return[]}function ux(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jg(e,t,s,i,c){for(var f=t._reactName,v=[];s!==null&&s!==i;){var x=s,E=x.alternate,O=x.stateNode;if(x=x.tag,E!==null&&E===i)break;x!==5&&x!==26&&x!==27||O===null||(E=O,c?(O=el(s,f),O!=null&&v.unshift(Ml(s,O,E))):c||(O=el(s,f),O!=null&&v.push(Ml(s,O,E)))),s=s.return}v.length!==0&&e.push({event:t,listeners:v})}var dx=/\r\n?/g,fx=/\u0000|\uFFFD/g;function Ng(e){return(typeof e=="string"?e:""+e).replace(dx,`
25
+ `).replace(fx,"")}function wg(e,t){return t=Ng(t),Ng(e)===t}function at(e,t,s,i,c,f){switch(s){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Js(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Js(e,""+i);break;case"className":So(e,"class",i);break;case"tabIndex":So(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":So(e,s,i);break;case"style":wh(e,i,f);break;case"data":if(t!=="object"){So(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(s);break}i=_o(""+i),e.setAttribute(s,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(t!=="input"&&at(e,t,"name",c.name,c,null),at(e,t,"formEncType",c.formEncType,c,null),at(e,t,"formMethod",c.formMethod,c,null),at(e,t,"formTarget",c.formTarget,c,null)):(at(e,t,"encType",c.encType,c,null),at(e,t,"method",c.method,c,null),at(e,t,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(s);break}i=_o(""+i),e.setAttribute(s,i);break;case"onClick":i!=null&&(e.onclick=ma);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(s=i.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}s=_o(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(s,""+i):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":i===!0?e.setAttribute(s,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(s,i):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(s,i):e.removeAttribute(s);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(s):e.setAttribute(s,i);break;case"popover":Ve("beforetoggle",e),Ve("toggle",e),bo(e,"popover",i);break;case"xlinkActuate":ha(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ha(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ha(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ha(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ha(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ha(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ha(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ha(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ha(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":bo(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=I1.get(s)||s,bo(e,s,i))}}function ld(e,t,s,i,c,f){switch(s){case"style":wh(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(s=i.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof i=="string"?Js(e,i):(typeof i=="number"||typeof i=="bigint")&&Js(e,""+i);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"onClick":i!=null&&(e.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[$t]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof i=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,i,c);break e}s in e?e[s]=i:i===!0?e.setAttribute(s,""):bo(e,s,i)}}}function Wt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",e),Ve("load",e);var i=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var v=s[f];if(v!=null)switch(f){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:at(e,t,f,v,s,null)}}c&&at(e,t,"srcSet",s.srcSet,s,null),i&&at(e,t,"src",s.src,s,null);return;case"input":Ve("invalid",e);var x=f=v=c=null,E=null,O=null;for(i in s)if(s.hasOwnProperty(i)){var P=s[i];if(P!=null)switch(i){case"name":c=P;break;case"type":v=P;break;case"checked":E=P;break;case"defaultChecked":O=P;break;case"value":f=P;break;case"defaultValue":x=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:at(e,t,i,P,s,null)}}Ah(e,f,x,E,O,v,c,!1);return;case"select":Ve("invalid",e),i=v=f=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":f=x;break;case"defaultValue":v=x;break;case"multiple":i=x;default:at(e,t,c,x,s,null)}t=f,s=v,e.multiple=!!i,t!=null?Qs(e,!!i,t,!1):s!=null&&Qs(e,!!i,s,!0);return;case"textarea":Ve("invalid",e),f=c=i=null;for(v in s)if(s.hasOwnProperty(v)&&(x=s[v],x!=null))switch(v){case"value":i=x;break;case"defaultValue":c=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:at(e,t,v,x,s,null)}jh(e,i,c,f);return;case"option":for(E in s)if(s.hasOwnProperty(E)&&(i=s[E],i!=null))switch(E){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:at(e,t,E,i,s,null)}return;case"dialog":Ve("beforetoggle",e),Ve("toggle",e),Ve("cancel",e),Ve("close",e);break;case"iframe":case"object":Ve("load",e);break;case"video":case"audio":for(i=0;i<Rl.length;i++)Ve(Rl[i],e);break;case"image":Ve("error",e),Ve("load",e);break;case"details":Ve("toggle",e);break;case"embed":case"source":case"link":Ve("error",e),Ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in s)if(s.hasOwnProperty(O)&&(i=s[O],i!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:at(e,t,O,i,s,null)}return;default:if(Sc(t)){for(P in s)s.hasOwnProperty(P)&&(i=s[P],i!==void 0&&ld(e,t,P,i,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(i=s[x],i!=null&&at(e,t,x,i,s,null))}function hx(e,t,s,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,v=null,x=null,E=null,O=null,P=null;for(V in s){var $=s[V];if(s.hasOwnProperty(V)&&$!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":E=$;default:i.hasOwnProperty(V)||at(e,t,V,null,i,$)}}for(var B in i){var V=i[B];if($=s[B],i.hasOwnProperty(B)&&(V!=null||$!=null))switch(B){case"type":f=V;break;case"name":c=V;break;case"checked":O=V;break;case"defaultChecked":P=V;break;case"value":v=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==$&&at(e,t,B,V,i,$)}}yc(e,v,x,E,O,P,f,c);return;case"select":V=v=x=B=null;for(f in s)if(E=s[f],s.hasOwnProperty(f)&&E!=null)switch(f){case"value":break;case"multiple":V=E;default:i.hasOwnProperty(f)||at(e,t,f,null,i,E)}for(c in i)if(f=i[c],E=s[c],i.hasOwnProperty(c)&&(f!=null||E!=null))switch(c){case"value":B=f;break;case"defaultValue":x=f;break;case"multiple":v=f;default:f!==E&&at(e,t,c,f,i,E)}t=x,s=v,i=V,B!=null?Qs(e,!!s,B,!1):!!i!=!!s&&(t!=null?Qs(e,!!s,t,!0):Qs(e,!!s,s?[]:"",!1));return;case"textarea":V=B=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!i.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:at(e,t,x,null,i,c)}for(v in i)if(c=i[v],f=s[v],i.hasOwnProperty(v)&&(c!=null||f!=null))switch(v){case"value":B=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&at(e,t,v,c,i,f)}Ch(e,B,V);return;case"option":for(var ue in s)if(B=s[ue],s.hasOwnProperty(ue)&&B!=null&&!i.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:at(e,t,ue,null,i,B)}for(E in i)if(B=i[E],V=s[E],i.hasOwnProperty(E)&&B!==V&&(B!=null||V!=null))switch(E){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:at(e,t,E,B,i,V)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in s)B=s[Se],s.hasOwnProperty(Se)&&B!=null&&!i.hasOwnProperty(Se)&&at(e,t,Se,null,i,B);for(O in i)if(B=i[O],V=s[O],i.hasOwnProperty(O)&&B!==V&&(B!=null||V!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:at(e,t,O,B,i,V)}return;default:if(Sc(t)){for(var st in s)B=s[st],s.hasOwnProperty(st)&&B!==void 0&&!i.hasOwnProperty(st)&&ld(e,t,st,void 0,i,B);for(P in i)B=i[P],V=s[P],!i.hasOwnProperty(P)||B===V||B===void 0&&V===void 0||ld(e,t,P,B,i,V);return}}for(var k in s)B=s[k],s.hasOwnProperty(k)&&B!=null&&!i.hasOwnProperty(k)&&at(e,t,k,null,i,B);for($ in i)B=i[$],V=s[$],!i.hasOwnProperty($)||B===V||B==null&&V==null||at(e,t,$,B,i,V)}function Dg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),i=0;i<s.length;i++){var c=s[i],f=c.transferSize,v=c.initiatorType,x=c.duration;if(f&&x&&Dg(v)){for(v=0,x=c.responseEnd,i+=1;i<s.length;i++){var E=s[i],O=E.startTime;if(O>x)break;var P=E.transferSize,$=E.initiatorType;P&&Dg($)&&(E=E.responseEnd,v+=P*(E<x?1:(x-O)/(E-O)))}if(--i,t+=8*(f+v)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var od=null,rd=null;function vr(e){return e.nodeType===9?e:e.ownerDocument}function kg(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 Rg(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 cd(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 ud=null;function px(){var e=window.event;return e&&e.type==="popstate"?e===ud?!1:(ud=e,!0):(ud=null,!1)}var Mg=typeof setTimeout=="function"?setTimeout:void 0,gx=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,vx=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(yx)}:Mg;function yx(e){setTimeout(function(){throw e})}function ts(e){return e==="head"}function Bg(e,t){var s=t,i=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(i===0){e.removeChild(c),wi(t);return}i--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")i++;else if(s==="html")Ol(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Ol(s);for(var f=s.firstChild;f;){var v=f.nextSibling,x=f.nodeName;f[Be]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=v}}else s==="body"&&Ol(e.ownerDocument.body);s=c}while(s);wi(t)}function Lg(e,t){var s=e;e=0;do{var i=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),i&&i.nodeType===8)if(s=i.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=i}while(s)}function dd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":dd(s),Ie(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function bx(e,t,s,i){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Be])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function Sx(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Hn(e.nextSibling),e===null))return null;return e}function Ug(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Hn(e.nextSibling),e===null))return null;return e}function fd(e){return e.data==="$?"||e.data==="$~"}function hd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xx(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var i=function(){t(),s.removeEventListener("DOMContentLoaded",i)};s.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Hn(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 md=null;function zg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Hn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Vg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Ig(e,t,s){switch(t=vr(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ie(e)}var Gn=new Map,Hg=new Set;function yr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Da=K.d;K.d={f:_x,r:Tx,D:Ex,C:Ax,L:Cx,m:jx,X:wx,S:Nx,M:Dx};function _x(){var e=Da.f(),t=cr();return e||t}function Tx(e){var t=Zt(e);t!==null&&t.tag===5&&t.type==="form"?sp(t):Da.r(e)}var Ci=typeof document>"u"?null:document;function Gg(e,t,s){var i=Ci;if(i&&typeof t=="string"&&t){var c=On(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Hg.has(c)||(Hg.add(c),e={rel:e,crossOrigin:s,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Wt(t,"link",e),ht(t),i.head.appendChild(t)))}}function Ex(e){Da.D(e),Gg("dns-prefetch",e,null)}function Ax(e,t){Da.C(e,t),Gg("preconnect",e,t)}function Cx(e,t,s){Da.L(e,t,s);var i=Ci;if(i&&e&&t){var c='link[rel="preload"][as="'+On(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+On(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+On(s.imageSizes)+'"]')):c+='[href="'+On(e)+'"]';var f=c;switch(t){case"style":f=ji(e);break;case"script":f=Ni(e)}Gn.has(f)||(e=b({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Gn.set(f,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Bl(f))||t==="script"&&i.querySelector(Ll(f))||(t=i.createElement("link"),Wt(t,"link",e),ht(t),i.head.appendChild(t)))}}function jx(e,t){Da.m(e,t);var s=Ci;if(s&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+On(i)+'"][href="'+On(e)+'"]',f=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ni(e)}if(!Gn.has(f)&&(e=b({rel:"modulepreload",href:e},t),Gn.set(f,e),s.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ll(f)))return}i=s.createElement("link"),Wt(i,"link",e),ht(i),s.head.appendChild(i)}}}function Nx(e,t,s){Da.S(e,t,s);var i=Ci;if(i&&e){var c=ft(i).hoistableStyles,f=ji(e);t=t||"default";var v=c.get(f);if(!v){var x={loading:0,preload:null};if(v=i.querySelector(Bl(f)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Gn.get(f))&&pd(e,s);var E=v=i.createElement("link");ht(E),Wt(E,"link",e),E._p=new Promise(function(O,P){E.onload=O,E.onerror=P}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,br(v,t,i)}v={type:"stylesheet",instance:v,count:1,state:x},c.set(f,v)}}}function wx(e,t){Da.X(e,t);var s=Ci;if(s&&e){var i=ft(s).hoistableScripts,c=Ni(e),f=i.get(c);f||(f=s.querySelector(Ll(c)),f||(e=b({src:e,async:!0},t),(t=Gn.get(c))&&gd(e,t),f=s.createElement("script"),ht(f),Wt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Dx(e,t){Da.M(e,t);var s=Ci;if(s&&e){var i=ft(s).hoistableScripts,c=Ni(e),f=i.get(c);f||(f=s.querySelector(Ll(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=Gn.get(c))&&gd(e,t),f=s.createElement("script"),ht(f),Wt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Pg(e,t,s,i){var c=(c=q.current)?yr(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=ji(s.href),s=ft(c).hoistableStyles,i=s.get(t),i||(i={type:"style",instance:null,count:0,state:null},s.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=ji(s.href);var f=ft(c).hoistableStyles,v=f.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=c.querySelector(Bl(e)))&&!f._p&&(v.instance=f,v.state.loading=5),Gn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Gn.set(e,s),f||kx(c,e,s,v.state))),t&&i===null)throw Error(o(528,""));return v}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ni(s),s=ft(c).hoistableScripts,i=s.get(t),i||(i={type:"script",instance:null,count:0,state:null},s.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ji(e){return'href="'+On(e)+'"'}function Bl(e){return'link[rel="stylesheet"]['+e+"]"}function qg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function kx(e,t,s,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Wt(t,"link",s),ht(t),e.head.appendChild(t))}function Ni(e){return'[src="'+On(e)+'"]'}function Ll(e){return"script[async]"+e}function Yg(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+On(s.href)+'"]');if(i)return t.instance=i,ht(i),i;var c=b({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),ht(i),Wt(i,"style",c),br(i,s.precedence,e),t.instance=i;case"stylesheet":c=ji(s.href);var f=e.querySelector(Bl(c));if(f)return t.state.loading|=4,t.instance=f,ht(f),f;i=qg(s),(c=Gn.get(c))&&pd(i,c),f=(e.ownerDocument||e).createElement("link"),ht(f);var v=f;return v._p=new Promise(function(x,E){v.onload=x,v.onerror=E}),Wt(f,"link",i),t.state.loading|=4,br(f,s.precedence,e),t.instance=f;case"script":return f=Ni(s.src),(c=e.querySelector(Ll(f)))?(t.instance=c,ht(c),c):(i=s,(c=Gn.get(f))&&(i=b({},s),gd(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),ht(c),Wt(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,br(i,s.precedence,e));return t.instance}function br(e,t,s){for(var i=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,f=c,v=0;v<i.length;v++){var x=i[v];if(x.dataset.precedence===t)f=x;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function pd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Sr=null;function Fg(e,t,s){if(Sr===null){var i=new Map,c=Sr=new Map;c.set(s,i)}else c=Sr,i=c.get(s),i||(i=new Map,c.set(s,i));if(i.has(e))return i;for(i.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Be]||f[Lt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var x=i.get(v);x?x.push(f):i.set(v,[f])}}return i}function Kg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function Rx(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function $g(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Mx(e,t,s,i){if(s.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=ji(i.href),f=t.querySelector(Bl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=xr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,ht(f);return}f=t.ownerDocument||t,i=qg(i),(c=Gn.get(c))&&pd(i,c),f=f.createElement("link"),ht(f);var v=f;v._p=new Promise(function(x,E){v.onload=x,v.onerror=E}),Wt(f,"link",i),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=xr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var vd=0;function Ox(e,t){return e.stylesheets&&e.count===0&&Tr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var i=setTimeout(function(){if(e.stylesheets&&Tr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&vd===0&&(vd=62500*mx());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>vd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function xr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _r=null;function Tr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_r=new Map,t.forEach(Bx,e),_r=null,xr.call(e))}function Bx(e,t){if(!(t.state.loading&4)){var s=_r.get(e);if(s)var i=s.get(null);else{s=new Map,_r.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var v=c[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(s.set(v.dataset.precedence,v),i=v)}i&&s.set(null,i)}c=t.instance,v=c.getAttribute("data-precedence"),f=s.get(v)||i,f===i&&s.set(null,c),s.set(v,c),this.count++,i=xr.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ul={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Lx(e,t,s,i,c,f,v,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=Fs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fs(0),this.hiddenUpdates=Fs(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Zg(e,t,s,i,c,f,v,x,E,O,P,$){return e=new Lx(e,t,s,v,E,O,P,$,x),t=1,f===!0&&(t|=24),f=_n(3,null,null,t),e.current=f,f.stateNode=e,t=Xc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:s,cache:t},eu(f),e}function Xg(e){return e?(e=ii,e):ii}function Qg(e,t,s,i,c,f){c=Xg(c),i.context===null?i.context=c:i.pendingContext=c,i=qa(t),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Ya(e,i,t),s!==null&&(yn(s,e,t),pl(s,e,t))}function Jg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function yd(e,t){Jg(e,t),(e=e.alternate)&&Jg(e,t)}function Wg(e){if(e.tag===13||e.tag===31){var t=Ss(e,67108864);t!==null&&yn(t,e,67108864),yd(e,67108864)}}function e0(e){if(e.tag===13||e.tag===31){var t=jn();t=Ks(t);var s=Ss(e,t);s!==null&&yn(s,e,t),yd(e,t)}}var Er=!0;function Ux(e,t,s,i){var c=L.T;L.T=null;var f=K.p;try{K.p=2,bd(e,t,s,i)}finally{K.p=f,L.T=c}}function zx(e,t,s,i){var c=L.T;L.T=null;var f=K.p;try{K.p=8,bd(e,t,s,i)}finally{K.p=f,L.T=c}}function bd(e,t,s,i){if(Er){var c=Sd(i);if(c===null)id(e,t,i,Ar,s),n0(e,i);else if(Ix(c,e,t,s,i))i.stopPropagation();else if(n0(e,i),t&4&&-1<Vx.indexOf(e)){for(;c!==null;){var f=Zt(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=re(f.pendingLanes);if(v!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;v;){var E=1<<31-vt(v);x.entanglements[1]|=E,v&=~E}sa(f),(Xe&6)===0&&(or=de()+500,kl(0))}}break;case 31:case 13:x=Ss(f,2),x!==null&&yn(x,f,2),cr(),yd(f,2)}if(f=Sd(i),f===null&&id(e,t,i,Ar,s),f===c)break;c=f}c!==null&&i.stopPropagation()}else id(e,t,i,null,s)}}function Sd(e){return e=_c(e),xd(e)}var Ar=null;function xd(e){if(Ar=null,e=nn(e),e!==null){var t=u(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=m(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ar=e,null}function t0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Te()){case Ee:return 2;case We:return 8;case Le:case lt:return 32;case wt:return 268435456;default:return 32}default:return 32}}var _d=!1,ns=null,as=null,ss=null,zl=new Map,Vl=new Map,is=[],Vx="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 n0(e,t){switch(e){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":as=null;break;case"mouseover":case"mouseout":ss=null;break;case"pointerover":case"pointerout":zl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vl.delete(t.pointerId)}}function Il(e,t,s,i,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:i,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Zt(t),t!==null&&Wg(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Ix(e,t,s,i,c){switch(t){case"focusin":return ns=Il(ns,e,t,s,i,c),!0;case"dragenter":return as=Il(as,e,t,s,i,c),!0;case"mouseover":return ss=Il(ss,e,t,s,i,c),!0;case"pointerover":var f=c.pointerId;return zl.set(f,Il(zl.get(f)||null,e,t,s,i,c)),!0;case"gotpointercapture":return f=c.pointerId,Vl.set(f,Il(Vl.get(f)||null,e,t,s,i,c)),!0}return!1}function a0(e){var t=nn(e.target);if(t!==null){var s=u(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,Wi(e.priority,function(){e0(s)});return}}else if(t===31){if(t=m(s),t!==null){e.blockedOn=t,Wi(e.priority,function(){e0(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Cr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=Sd(e.nativeEvent);if(s===null){s=e.nativeEvent;var i=new s.constructor(s.type,s);xc=i,s.target.dispatchEvent(i),xc=null}else return t=Zt(s),t!==null&&Wg(t),e.blockedOn=s,!1;t.shift()}return!0}function s0(e,t,s){Cr(e)&&s.delete(t)}function Hx(){_d=!1,ns!==null&&Cr(ns)&&(ns=null),as!==null&&Cr(as)&&(as=null),ss!==null&&Cr(ss)&&(ss=null),zl.forEach(s0),Vl.forEach(s0)}function jr(e,t){e.blockedOn===t&&(e.blockedOn=null,_d||(_d=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Hx)))}var Nr=null;function i0(e){Nr!==e&&(Nr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Nr===e&&(Nr=null);for(var t=0;t<e.length;t+=3){var s=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(xd(i||s)===null)continue;break}var f=Zt(s);f!==null&&(e.splice(t,3),t-=3,Su(f,{pending:!0,data:c,method:s.method,action:i},i,c))}}))}function wi(e){function t(E){return jr(E,e)}ns!==null&&jr(ns,e),as!==null&&jr(as,e),ss!==null&&jr(ss,e),zl.forEach(t),Vl.forEach(t);for(var s=0;s<is.length;s++){var i=is[s];i.blockedOn===e&&(i.blockedOn=null)}for(;0<is.length&&(s=is[0],s.blockedOn===null);)a0(s),s.blockedOn===null&&is.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(i=0;i<s.length;i+=3){var c=s[i],f=s[i+1],v=c[$t]||null;if(typeof f=="function")v||i0(s);else if(v){var x=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[$t]||null)x=v.formAction;else if(xd(c)!==null)continue}else x=v.action;typeof x=="function"?s[i+1]=x:(s.splice(i,3),i-=3),i0(s)}}}function l0(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return c=v})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),i||setTimeout(s,20)}function s(){if(!i&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Td(e){this._internalRoot=e}wr.prototype.render=Td.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,i=jn();Qg(s,i,e,t,null,null)},wr.prototype.unmount=Td.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qg(e.current,2,null,e,null,null),cr(),t[fa]=null}};function wr(e){this._internalRoot=e}wr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ji();e={blockedOn:null,target:e,priority:t};for(var s=0;s<is.length&&t!==0&&t<is[s].priority;s++);is.splice(s,0,e),s===0&&a0(e)}};var o0=a.version;if(o0!=="19.2.4")throw Error(o(527,o0,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Gx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dr.isDisabled&&Dr.supportsFiber)try{ot=Dr.inject(Gx),Tt=Dr}catch{}}return Hl.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,i="",c=mp,f=pp,v=gp;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Zg(e,1,!1,null,null,s,i,null,c,f,v,l0),e[fa]=t.current,sd(e),new Td(t)},Hl.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var i=!1,c="",f=mp,v=pp,x=gp,E=null;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.formState!==void 0&&(E=s.formState)),t=Zg(e,1,!0,t,s??null,i,c,E,f,v,x,l0),t.context=Xg(null),s=t.current,i=jn(),i=Ks(i),c=qa(i),c.callback=null,Ya(s,c,i),s=i,t.current.lanes=s,Ua(t,s),sa(t),e[fa]=t.current,sd(e),new wr(t)},Hl.version="19.2.4",Hl}var m0;function s_(){if(m0)return Ed.exports;m0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Ed.exports=a_(),Ed.exports}var i_=s_();/**
26
+ * react-router v7.13.1
27
+ *
28
+ * Copyright (c) Remix Software Inc.
29
+ *
30
+ * This source code is licensed under the MIT license found in the
31
+ * LICENSE.md file in the root directory of this source tree.
32
+ *
33
+ * @license MIT
34
+ */var p0="popstate";function g0(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function l_(n={}){function a(o,r){var g;let u=(g=r.state)==null?void 0:g.masked,{pathname:d,search:m,hash:p}=u||o.location;return Xd("",{pathname:d,search:m,hash:p},r.state&&r.state.usr||null,r.state&&r.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function l(o,r){return typeof r=="string"?r:to(r)}return r_(a,l,null,n)}function ut(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Yn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function o_(){return Math.random().toString(36).substring(2,10)}function v0(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Xd(n,a,l=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Pi(a):a,state:l,key:a&&a.key||o||o_(),unstable_mask:r}}function to({pathname:n="/",search:a="",hash:l=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Pi(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function r_(n,a,l,o={}){let{window:r=document.defaultView,v5Compat:u=!1}=o,d=r.history,m="POP",p=null,g=y();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function y(){return(d.state||{idx:null}).idx}function b(){m="POP";let w=y(),C=w==null?null:w-g;g=w,p&&p({action:m,location:A.location,delta:C})}function _(w,C){m="PUSH";let z=g0(w)?w:Xd(A.location,w,C);g=y()+1;let M=v0(z,g),X=A.createHref(z.unstable_mask||z);try{d.pushState(M,"",X)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;r.location.assign(X)}u&&p&&p({action:m,location:A.location,delta:1})}function T(w,C){m="REPLACE";let z=g0(w)?w:Xd(A.location,w,C);g=y();let M=v0(z,g),X=A.createHref(z.unstable_mask||z);d.replaceState(M,"",X),u&&p&&p({action:m,location:A.location,delta:0})}function j(w){return c_(w)}let A={get action(){return m},get location(){return n(r,d)},listen(w){if(p)throw new Error("A history only accepts one active listener");return r.addEventListener(p0,b),p=w,()=>{r.removeEventListener(p0,b),p=null}},createHref(w){return a(r,w)},createURL:j,encodeLocation(w){let C=j(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:_,replace:T,go(w){return d.go(w)}};return A}function c_(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),ut(l,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:to(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function fy(n,a,l="/"){return u_(n,a,l,!1)}function u_(n,a,l,o){let r=typeof a=="string"?Pi(a):a,u=Oa(r.pathname||"/",l);if(u==null)return null;let d=hy(n);d_(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let g=py(u);m=S_(d[p],g,o)}return m}function hy(n,a=[],l=[],o="",r=!1){let u=(d,m,p=r,g)=>{let y={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;ut(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=ra([o,y.relativePath]),_=l.concat(y);d.children&&d.children.length>0&&(ut(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),hy(d.children,a,_,b,p)),!(d.path==null&&!d.index)&&a.push({path:b,score:y_(b,d.index),routesMeta:_})};return n.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))u(d,m);else for(let g of my(d.path))u(d,m,!0,g)}),a}function my(n){let a=n.split("/");if(a.length===0)return[];let[l,...o]=a,r=l.endsWith("?"),u=l.replace(/\?$/,"");if(o.length===0)return r?[u,""]:[u];let d=my(o.join("/")),m=[];return m.push(...d.map(p=>p===""?u:[u,p].join("/"))),r&&m.push(...d),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function d_(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:b_(a.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var f_=/^:[\w-]+$/,h_=3,m_=2,p_=1,g_=10,v_=-2,y0=n=>n==="*";function y_(n,a){let l=n.split("/"),o=l.length;return l.some(y0)&&(o+=v_),a&&(o+=m_),l.filter(r=>!y0(r)).reduce((r,u)=>r+(f_.test(u)?h_:u===""?p_:g_),o)}function b_(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function S_(n,a,l=!1){let{routesMeta:o}=n,r={},u="/",d=[];for(let m=0;m<o.length;++m){let p=o[m],g=m===o.length-1,y=u==="/"?a:a.slice(u.length)||"/",b=no({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},y),_=p.route;if(!b&&g&&l&&!o[o.length-1].route.index&&(b=no({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(r,b.params),d.push({params:r,pathname:ra([u,b.pathname]),pathnameBase:A_(ra([u,b.pathnameBase])),route:_}),b.pathnameBase!=="/"&&(u=ra([u,b.pathnameBase]))}return d}function no(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=x_(n.path,n.caseSensitive,n.end),r=a.match(l);if(!r)return null;let u=r[0],d=u.replace(/(.)\/+$/,"$1"),m=r.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:b},_)=>{if(y==="*"){let j=m[_]||"";d=u.slice(0,u.length-j.length).replace(/(.)\/+$/,"$1")}const T=m[_];return b&&!T?g[y]=void 0:g[y]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function x_(n,a=!1,l=!0){Yn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p,g,y)=>{if(o.push({paramName:m,isOptional:p!=null}),p){let b=y.charAt(g+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function py(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Yn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Oa(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,o=n.charAt(l);return o&&o!=="/"?null:n.slice(l)||"/"}var __=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function T_(n,a="/"){let{pathname:l,search:o="",hash:r=""}=typeof n=="string"?Pi(n):n,u;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?u=b0(l.substring(1),"/"):u=b0(l,a)):u=a,{pathname:u,search:C_(o),hash:j_(r)}}function b0(n,a){let l=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?l.length>1&&l.pop():r!=="."&&l.push(r)}),l.length>1?l.join("/"):"/"}function jd(n,a,l,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function E_(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function wf(n){let a=E_(n);return a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase)}function sc(n,a,l,o=!1){let r;typeof n=="string"?r=Pi(n):(r={...n},ut(!r.pathname||!r.pathname.includes("?"),jd("?","pathname","search",r)),ut(!r.pathname||!r.pathname.includes("#"),jd("#","pathname","hash",r)),ut(!r.search||!r.search.includes("#"),jd("#","search","hash",r)));let u=n===""||r.pathname==="",d=u?"/":r.pathname,m;if(d==null)m=l;else{let b=a.length-1;if(!o&&d.startsWith("..")){let _=d.split("/");for(;_[0]==="..";)_.shift(),b-=1;r.pathname=_.join("/")}m=b>=0?a[b]:"/"}let p=T_(r,m),g=d&&d!=="/"&&d.endsWith("/"),y=(u||d===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}var ra=n=>n.join("/").replace(/\/\/+/g,"/"),A_=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),C_=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,j_=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,N_=class{constructor(n,a,l,o=!1){this.status=n,this.statusText=a||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function w_(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function D_(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var gy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function vy(n,a){let l=n;if(typeof l!="string"||!__.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,r=!1;if(gy)try{let u=new URL(window.location.href),d=l.startsWith("//")?new URL(u.protocol+l):new URL(l),m=Oa(d.pathname,a);d.origin===u.origin&&m!=null?l=m+d.search+d.hash:r=!0}catch{Yn(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var yy=["POST","PUT","PATCH","DELETE"];new Set(yy);var k_=["GET",...yy];new Set(k_);var qi=S.createContext(null);qi.displayName="DataRouter";var ic=S.createContext(null);ic.displayName="DataRouterState";var R_=S.createContext(!1),by=S.createContext({isTransitioning:!1});by.displayName="ViewTransition";var M_=S.createContext(new Map);M_.displayName="Fetchers";var O_=S.createContext(null);O_.displayName="Await";var kn=S.createContext(null);kn.displayName="Navigation";var co=S.createContext(null);co.displayName="Location";var Fn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Fn.displayName="Route";var Df=S.createContext(null);Df.displayName="RouteError";var Sy="REACT_ROUTER_ERROR",B_="REDIRECT",L_="ROUTE_ERROR_RESPONSE";function U_(n){if(n.startsWith(`${Sy}:${B_}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function z_(n){if(n.startsWith(`${Sy}:${L_}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new N_(a.status,a.statusText,a.data)}catch{}}function V_(n,{relative:a}={}){ut(Ps(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=S.useContext(kn),{hash:r,pathname:u,search:d}=uo(n,{relative:a}),m=u;return l!=="/"&&(m=u==="/"?l:ra([l,u])),o.createHref({pathname:m,search:d,hash:r})}function Ps(){return S.useContext(co)!=null}function fn(){return ut(Ps(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(co).location}function un(n){ut(Ps(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=fn();return S.useMemo(()=>no(n,py(a)),[a,n])}var xy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _y(n){S.useContext(kn).static||S.useLayoutEffect(n)}function lc(){let{isDataRoute:n}=S.useContext(Fn);return n?eT():I_()}function I_(){ut(Ps(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(qi),{basename:a,navigator:l}=S.useContext(kn),{matches:o}=S.useContext(Fn),{pathname:r}=fn(),u=JSON.stringify(wf(o)),d=S.useRef(!1);return _y(()=>{d.current=!0}),S.useCallback((p,g={})=>{if(Yn(d.current,xy),!d.current)return;if(typeof p=="number"){l.go(p);return}let y=sc(p,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:ra([a,y.pathname])),(g.replace?l.replace:l.push)(y,g.state,g)},[a,l,u,r,n])}var H_=S.createContext(null);function G_(n){let a=S.useContext(Fn).outlet;return S.useMemo(()=>a&&S.createElement(H_.Provider,{value:n},a),[a,n])}function oc(){let{matches:n}=S.useContext(Fn),a=n[n.length-1];return a?a.params:{}}function uo(n,{relative:a}={}){let{matches:l}=S.useContext(Fn),{pathname:o}=fn(),r=JSON.stringify(wf(l));return S.useMemo(()=>sc(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function P_(n,a){return Ty(n,a)}function Ty(n,a,l){var w;ut(Ps(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(kn),{matches:r}=S.useContext(Fn),u=r[r.length-1],d=u?u.params:{},m=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let C=g&&g.path||"";Ay(m,!g||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
35
+
36
+ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let y=fn(),b;if(a){let C=typeof a=="string"?Pi(a):a;ut(p==="/"||((w=C.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 "${C.pathname}" was given in the \`location\` prop.`),b=C}else b=y;let _=b.pathname||"/",T=_;if(p!=="/"){let C=p.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let j=fy(n,{pathname:T});Yn(g||j!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Yn(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.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 A=$_(j&&j.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:ra([p,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?p:ra([p,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),r,l);return a&&A?S.createElement(co.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},A):A}function q_(){let n=W_(),a=w_(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),l?S.createElement("pre",{style:r},l):null,d)}var Y_=S.createElement(q_,null),Ey=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const l=z_(n.digest);l&&(n=l)}let a=n!==void 0?S.createElement(Fn.Provider,{value:this.props.routeContext},S.createElement(Df.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(F_,{error:n},a):a}};Ey.contextType=R_;var Nd=new WeakMap;function F_({children:n,error:a}){let{basename:l}=S.useContext(kn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=U_(a.digest);if(o){let r=Nd.get(a);if(r)throw r;let u=vy(o.location,l);if(gy&&!Nd.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Nd.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function K_({routeContext:n,match:a,children:l}){let o=S.useContext(qi);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Fn.Provider,{value:n},l)}function $_(n,a=[],l){let o=l==null?void 0:l.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,u=o==null?void 0:o.errors;if(u!=null){let y=r.findIndex(b=>b.route.id&&(u==null?void 0:u[b.route.id])!==void 0);ut(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),r=r.slice(0,Math.min(r.length,y+1))}let d=!1,m=-1;if(l&&o){d=o.renderFallback;for(let y=0;y<r.length;y++){let b=r[y];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=y),b.route.id){let{loaderData:_,errors:T}=o,j=b.route.loader&&!_.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||j){l.isStatic&&(d=!0),m>=0?r=r.slice(0,m+1):r=[r[0]];break}}}}let p=l==null?void 0:l.onError,g=o&&p?(y,b)=>{var _,T;p(y,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:D_(o.matches),errorInfo:b})}:void 0;return r.reduceRight((y,b,_)=>{let T,j=!1,A=null,w=null;o&&(T=u&&b.route.id?u[b.route.id]:void 0,A=b.route.errorElement||Y_,d&&(m<0&&_===0?(Ay("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,w=null):m===_&&(j=!0,w=b.route.hydrateFallbackElement||null)));let C=a.concat(r.slice(0,_+1)),z=()=>{let M;return T?M=A:j?M=w:b.route.Component?M=S.createElement(b.route.Component,null):b.route.element?M=b.route.element:M=y,S.createElement(K_,{match:b,routeContext:{outlet:y,matches:C,isDataRoute:o!=null},children:M})};return o&&(b.route.ErrorBoundary||b.route.errorElement||_===0)?S.createElement(Ey,{location:o.location,revalidation:o.revalidation,component:A,error:T,children:z(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):z()},null)}function kf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Z_(n){let a=S.useContext(qi);return ut(a,kf(n)),a}function X_(n){let a=S.useContext(ic);return ut(a,kf(n)),a}function Q_(n){let a=S.useContext(Fn);return ut(a,kf(n)),a}function Rf(n){let a=Q_(n),l=a.matches[a.matches.length-1];return ut(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function J_(){return Rf("useRouteId")}function W_(){var o;let n=S.useContext(Df),a=X_("useRouteError"),l=Rf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[l]}function eT(){let{router:n}=Z_("useNavigate"),a=Rf("useNavigate"),l=S.useRef(!1);return _y(()=>{l.current=!0}),S.useCallback(async(r,u={})=>{Yn(l.current,xy),l.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var S0={};function Ay(n,a,l){!a&&!S0[n]&&(S0[n]=!0,Yn(!1,l))}S.memo(tT);function tT({routes:n,future:a,state:l,isStatic:o,onError:r}){return Ty(n,void 0,{state:l,isStatic:o,onError:r})}function Ir({to:n,replace:a,state:l,relative:o}){ut(Ps(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(kn);Yn(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=S.useContext(Fn),{pathname:d}=fn(),m=lc(),p=sc(n,wf(u),d,o==="path"),g=JSON.stringify(p);return S.useEffect(()=>{m(JSON.parse(g),{replace:a,state:l,relative:o})},[m,g,o,a,l]),null}function Cy(n){return G_(n.context)}function Mt(n){ut(!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 nT({basename:n="/",children:a=null,location:l,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){ut(!Ps(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:m,navigator:r,static:u,unstable_useTransitions:d,future:{}}),[m,r,u,d]);typeof l=="string"&&(l=Pi(l));let{pathname:g="/",search:y="",hash:b="",state:_=null,key:T="default",unstable_mask:j}=l,A=S.useMemo(()=>{let w=Oa(g,m);return w==null?null:{location:{pathname:w,search:y,hash:b,state:_,key:T,unstable_mask:j},navigationType:o}},[m,g,y,b,_,T,o,j]);return Yn(A!=null,`<Router basename="${m}"> is not able to match the URL "${g}${y}${b}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:S.createElement(kn.Provider,{value:p},S.createElement(co.Provider,{children:a,value:A}))}function aT({children:n,location:a}){return P_(Qd(n),a)}function Qd(n,a=[]){let l=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let u=[...a,r];if(o.type===S.Fragment){l.push.apply(l,Qd(o.props.children,u));return}ut(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>`),ut(!o.props.index||!o.props.children,"An index route cannot have child routes.");let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Qd(o.props.children,u)),l.push(d)}),l}var Hr="get",Gr="application/x-www-form-urlencoded";function rc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function sT(n){return rc(n)&&n.tagName.toLowerCase()==="button"}function iT(n){return rc(n)&&n.tagName.toLowerCase()==="form"}function lT(n){return rc(n)&&n.tagName.toLowerCase()==="input"}function oT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function rT(n,a){return n.button===0&&(!a||a==="_self")&&!oT(n)}function Jd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,l)=>{let o=n[l];return a.concat(Array.isArray(o)?o.map(r=>[l,r]):[[l,o]])},[]))}function cT(n,a){let l=Jd(n);return a&&a.forEach((o,r)=>{l.has(r)||a.getAll(r).forEach(u=>{l.append(r,u)})}),l}var Rr=null;function uT(){if(Rr===null)try{new FormData(document.createElement("form"),0),Rr=!1}catch{Rr=!0}return Rr}var dT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wd(n){return n!=null&&!dT.has(n)?(Yn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gr}"`),null):n}function fT(n,a){let l,o,r,u,d;if(iT(n)){let m=n.getAttribute("action");o=m?Oa(m,a):null,l=n.getAttribute("method")||Hr,r=wd(n.getAttribute("enctype"))||Gr,u=new FormData(n)}else if(sT(n)||lT(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?Oa(p,a):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||Hr,r=wd(n.getAttribute("formenctype"))||wd(m.getAttribute("enctype"))||Gr,u=new FormData(m,n),!uT()){let{name:g,type:y,value:b}=n;if(y==="image"){let _=g?`${g}.`:"";u.append(`${_}x`,"0"),u.append(`${_}y`,"0")}else g&&u.append(g,b)}}else{if(rc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Hr,o=null,r=Gr,d=n}return u&&r==="text/plain"&&(d=u,u=void 0),{action:o,method:l.toLowerCase(),encType:r,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function hT(n,a,l,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&Oa(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function mT(n,a){if(n.id in a)return a[n.id];try{let l=await import(n.module);return a[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pT(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 gT(n,a,l){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await mT(u,l);return d.links?d.links():[]}return[]}));return ST(o.flat(1).filter(pT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function x0(n,a,l,o,r,u){let d=(p,g)=>l[g]?p.route.id!==l[g].route.id:!0,m=(p,g)=>{var y;return l[g].pathname!==p.pathname||((y=l[g].route.path)==null?void 0:y.endsWith("*"))&&l[g].params["*"]!==p.params["*"]};return u==="assets"?a.filter((p,g)=>d(p,g)||m(p,g)):u==="data"?a.filter((p,g)=>{var b;let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(d(p,g)||m(p,g))return!0;if(p.route.shouldRevalidate){let _=p.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((b=l[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function vT(n,a,{includeHydrateFallback:l}={}){return yT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let u=[r.module];return r.clientActionModule&&(u=u.concat(r.clientActionModule)),r.clientLoaderModule&&(u=u.concat(r.clientLoaderModule)),l&&r.hydrateFallbackModule&&(u=u.concat(r.hydrateFallbackModule)),r.imports&&(u=u.concat(r.imports)),u}).flat(1))}function yT(n){return[...new Set(n)]}function bT(n){let a={},l=Object.keys(n).sort();for(let o of l)a[o]=n[o];return a}function ST(n,a){let l=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(bT(r));return l.has(u)||(l.add(u),o.push({key:u,link:r})),o},[])}function jy(){let n=S.useContext(qi);return Mf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function xT(){let n=S.useContext(ic);return Mf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Of=S.createContext(void 0);Of.displayName="FrameworkContext";function Ny(){let n=S.useContext(Of);return Mf(n,"You must render this element inside a <HydratedRouter> element"),n}function _T(n,a){let l=S.useContext(Of),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:g,onMouseLeave:y,onTouchStart:b}=a,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let A=C=>{C.forEach(z=>{d(z.isIntersecting)})},w=new IntersectionObserver(A,{threshold:.5});return _.current&&w.observe(_.current),()=>{w.disconnect()}}},[n]),S.useEffect(()=>{if(o){let A=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(A)}}},[o]);let T=()=>{r(!0)},j=()=>{r(!1),d(!1)};return l?n!=="intent"?[u,_,{}]:[u,_,{onFocus:Gl(m,T),onBlur:Gl(p,j),onMouseEnter:Gl(g,T),onMouseLeave:Gl(y,j),onTouchStart:Gl(b,T)}]:[!1,_,{}]}function Gl(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function TT({page:n,...a}){let{router:l}=jy(),o=S.useMemo(()=>fy(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?S.createElement(AT,{page:n,matches:o,...a}):null}function ET(n){let{manifest:a,routeModules:l}=Ny(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return gT(n,a,l).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,l]),o}function AT({page:n,matches:a,...l}){let o=fn(),{future:r,manifest:u,routeModules:d}=Ny(),{basename:m}=jy(),{loaderData:p,matches:g}=xT(),y=S.useMemo(()=>x0(n,a,g,u,o,"data"),[n,a,g,u,o]),b=S.useMemo(()=>x0(n,a,g,u,o,"assets"),[n,a,g,u,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let A=new Set,w=!1;if(a.forEach(z=>{var X;let M=u.routes[z.route.id];!M||!M.hasLoader||(!y.some(H=>H.route.id===z.route.id)&&z.route.id in p&&((X=d[z.route.id])!=null&&X.shouldRevalidate)||M.hasClientLoader?w=!0:A.add(z.route.id))}),A.size===0)return[];let C=hT(n,m,r.unstable_trailingSlashAwareDataRequests,"data");return w&&A.size>0&&C.searchParams.set("_routes",a.filter(z=>A.has(z.route.id)).map(z=>z.route.id).join(",")),[C.pathname+C.search]},[m,r.unstable_trailingSlashAwareDataRequests,p,o,u,y,a,n,d]),T=S.useMemo(()=>vT(b,u),[b,u]),j=ET(b);return S.createElement(S.Fragment,null,_.map(A=>S.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...l})),T.map(A=>S.createElement("link",{key:A,rel:"modulepreload",href:A,...l})),j.map(({key:A,link:w})=>S.createElement("link",{key:A,nonce:l.nonce,...w,crossOrigin:w.crossOrigin??l.crossOrigin})))}function CT(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var jT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{jT&&(window.__reactRouterVersion="7.13.1")}catch{}function NT({basename:n,children:a,unstable_useTransitions:l,window:o}){let r=S.useRef();r.current==null&&(r.current=l_({window:o,v5Compat:!0}));let u=r.current,[d,m]=S.useState({action:u.action,location:u.location}),p=S.useCallback(g=>{l===!1?m(g):S.startTransition(()=>m(g))},[l]);return S.useLayoutEffect(()=>u.listen(p),[u,p]),S.createElement(nT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:l})}var wy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bf=S.forwardRef(function({onClick:a,discover:l="render",prefetch:o="none",relative:r,reloadDocument:u,replace:d,unstable_mask:m,state:p,target:g,to:y,preventScrollReset:b,viewTransition:_,unstable_defaultShouldRevalidate:T,...j},A){let{basename:w,navigator:C,unstable_useTransitions:z}=S.useContext(kn),M=typeof y=="string"&&wy.test(y),X=vy(y,w);y=X.to;let H=V_(y,{relative:r}),J=fn(),W=null;if(m){let G=sc(m,[],J.unstable_mask?J.unstable_mask.pathname:"/",!0);w!=="/"&&(G.pathname=G.pathname==="/"?w:ra([w,G.pathname])),W=C.createHref(G)}let[Y,ne,ge]=_T(o,j),U=RT(y,{replace:d,unstable_mask:m,state:p,target:g,preventScrollReset:b,relative:r,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:z});function pe(G){a&&a(G),G.defaultPrevented||U(G)}let te=!(X.isExternal||u),ye=S.createElement("a",{...j,...ge,href:(te?W:void 0)||X.absoluteURL||H,onClick:te?pe:a,ref:CT(A,ne),target:g,"data-discover":!M&&l==="render"?"true":void 0});return Y&&!M?S.createElement(S.Fragment,null,ye,S.createElement(TT,{page:H})):ye});Bf.displayName="Link";var wT=S.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:o="",end:r=!1,style:u,to:d,viewTransition:m,children:p,...g},y){let b=uo(d,{relative:g.relative}),_=fn(),T=S.useContext(ic),{navigator:j,basename:A}=S.useContext(kn),w=T!=null&&UT(b)&&m===!0,C=j.encodeLocation?j.encodeLocation(b).pathname:b.pathname,z=_.pathname,M=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;l||(z=z.toLowerCase(),M=M?M.toLowerCase():null,C=C.toLowerCase()),M&&A&&(M=Oa(M,A)||M);const X=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let H=z===C||!r&&z.startsWith(C)&&z.charAt(X)==="/",J=M!=null&&(M===C||!r&&M.startsWith(C)&&M.charAt(C.length)==="/"),W={isActive:H,isPending:J,isTransitioning:w},Y=H?a:void 0,ne;typeof o=="function"?ne=o(W):ne=[o,H?"active":null,J?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let ge=typeof u=="function"?u(W):u;return S.createElement(Bf,{...g,"aria-current":Y,className:ne,ref:y,style:ge,to:d,viewTransition:m},typeof p=="function"?p(W):p)});wT.displayName="NavLink";var DT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:o,replace:r,state:u,method:d=Hr,action:m,onSubmit:p,relative:g,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_,...T},j)=>{let{unstable_useTransitions:A}=S.useContext(kn),w=BT(),C=LT(m,{relative:g}),z=d.toLowerCase()==="get"?"get":"post",M=typeof m=="string"&&wy.test(m),X=H=>{if(p&&p(H),H.defaultPrevented)return;H.preventDefault();let J=H.nativeEvent.submitter,W=(J==null?void 0:J.getAttribute("formmethod"))||d,Y=()=>w(J||H.currentTarget,{fetcherKey:a,method:W,navigate:l,replace:r,state:u,relative:g,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_});A&&l!==!1?S.startTransition(()=>Y()):Y()};return S.createElement("form",{ref:j,method:z,action:C,onSubmit:o?p:X,...T,"data-discover":!M&&n==="render"?"true":void 0})});DT.displayName="Form";function kT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dy(n){let a=S.useContext(qi);return ut(a,kT(n)),a}function RT(n,{target:a,replace:l,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g}={}){let y=lc(),b=fn(),_=uo(n,{relative:d});return S.useCallback(T=>{if(rT(T,a)){T.preventDefault();let j=l!==void 0?l:to(b)===to(_),A=()=>y(n,{replace:j,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p});g?S.startTransition(()=>A()):A()}},[b,y,_,l,o,r,a,n,u,d,m,p,g])}function Lf(n){Yn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Jd(n)),l=S.useRef(!1),o=fn(),r=S.useMemo(()=>cT(o.search,l.current?null:a.current),[o.search]),u=lc(),d=S.useCallback((m,p)=>{const g=Jd(typeof m=="function"?m(new URLSearchParams(r)):m);l.current=!0,u("?"+g,p)},[u,r]);return[r,d]}var MT=0,OT=()=>`__${String(++MT)}__`;function BT(){let{router:n}=Dy("useSubmit"),{basename:a}=S.useContext(kn),l=J_(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:m,method:p,encType:g,formData:y,body:b}=fT(u,a);if(d.navigate===!1){let _=d.fetcherKey||OT();await o(_,l,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:b,formMethod:d.method||p,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:b,formMethod:d.method||p,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:l,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,r,a,l])}function LT(n,{relative:a}={}){let{basename:l}=S.useContext(kn),o=S.useContext(Fn);ut(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...uo(n||".",{relative:a})},d=fn();if(n==null){u.search=d.search;let m=new URLSearchParams(u.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();u.search=y?`?${y}`:""}}return(!n||n===".")&&r.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:ra([l,u.pathname])),to(u)}function UT(n,{relative:a}={}){let l=S.useContext(by);ut(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Dy("useViewTransitionState"),r=uo(n,{relative:a});if(!l.isTransitioning)return!1;let u=Oa(l.currentLocation.pathname,o)||l.currentLocation.pathname,d=Oa(l.nextLocation.pathname,o)||l.nextLocation.pathname;return no(r.pathname,d)!=null||no(r.pathname,u)!=null}function da(){const n=lc();return S.useCallback((a,l)=>{typeof a=="number"?n(a):n(a,l)},[n])}function ky(n){return`/sessions/${encodeURIComponent(n)}`}function ao(n){return`/projects/${encodeURIComponent(n)}`}function Hs(n,a){const l=`/tasks/${encodeURIComponent(n)}`;return a?`${l}/${a}`:l}function zT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Vi(n,a){const l=new URLSearchParams({project:n});return a&&l.set("parent",a),`/tasks/new?${l.toString()}`}function Ry(n,a){return`/sessions/new?${new URLSearchParams({env:n,runtime:a}).toString()}`}const _0="/environments/new",zi="/settings",VT="/pair";function ln(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Zl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function IT(n){return ln(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 T0(n){return ln(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 E0(n){return ln(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 HT(n){return ln(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 GT(n){return ln(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 PT(n){return ln(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 qT(n){return ln(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const YT=new Set(["off","subscription","api_key"]),Dd=new Set(["off","on"]);function FT(n){return ln(n)&&YT.has(n.claude)&&Dd.has(n.github)&&Dd.has(n.copilot)&&Dd.has(n.codex)}function KT(n){return ln(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function $T(n){return ln(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function ZT(n){return ln(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 ia(n,a,l,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:(Zl(l,`item at index ${u} in "${o}" has unexpected shape`),!1)):(Zl(l,`expected "${o}" to be an array, got ${typeof n}`),[])}function XT(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!ln(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}return{type:a.type,payload:ln(a.payload)?a.payload:void 0}}function QT(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const JT=3e3,Di=5e3,WT=4001;function eE(n){const a=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",l=S.useRef(void 0),[o,r]=S.useState(!1),[u,d]=S.useState([]),[m,p]=S.useState([]),[g,y]=S.useState([]),[b,_]=S.useState(0),[T,j]=S.useState(void 0),[A,w]=S.useState([]),[C,z]=S.useState([]),[M,X]=S.useState([]),[H,J]=S.useState([]),[W,Y]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[ne,ge]=S.useState({}),[U,pe]=S.useState([]),[te,ye]=S.useState(""),[G,L]=S.useState(""),[K,ee]=S.useState(!1),[ke,je]=S.useState([]),[qe,we]=S.useState({}),[xe,Ae]=S.useState(!1),[Q,q]=S.useState(void 0),I=S.useCallback(ae=>{var Me;((Me=l.current)==null?void 0:Me.readyState)===WebSocket.OPEN&&l.current.send(JSON.stringify(ae))},[]);S.useEffect(()=>{let ae,Me;function be(){ae=new WebSocket(a),l.current=ae,ae.onopen=()=>{r(!0),I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"}),I({type:"get_credential_providers"}),I({type:"list_personas"}),I({type:"subscribe_all"})},ae.onmessage=re=>{var se,Et,Rn,Fs,Ua,vo,Zi,Xi,Qi,Ks,$s,Ji,Wi,Zn,Lt,$t,fa,Zs,yo;if(typeof re.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const ie=XT(re.data);if(ie)switch(ie.type){case"environments":d(ia((se=ie.payload)==null?void 0:se.environments,IT,"environments","environments"));break;case"sessions":p(oe=>{var Zt;const Ye=ia((Zt=ie.payload)==null?void 0:Zt.sessions,T0,"sessions","sessions"),Be=new Map(oe.map(yt=>[yt.id,yt.status])),Ie=new Set(["pending","running","idle"]),nn=new Set(["completed","failed","interrupted"]);return Ye.map(yt=>{const ft=Be.get(yt.id);if(!ft||ft===yt.status)return yt;if(nn.has(ft)&&Ie.has(yt.status))return{...yt,status:ft};if(Ie.has(ft)&&Ie.has(yt.status)){const ht=["pending","running","idle"];if(ht.indexOf(ft)>ht.indexOf(yt.status))return{...yt,status:ft}}return yt})});break;case"session_event":{if(!E0(ie.payload)){Zl("session_event","payload is not a valid SessionEvent");break}const oe=ie.payload;let Ye=0;if(y(Be=>{const Ie=[...Be,oe];return Ie.length>Di?(Ye=Ie.length-Di,Ie.slice(-Di)):Ie}),Ye>0&&_(Be=>Be+Ye),oe.eventType==="status"){const Be=QT(oe.content);p(Ie=>Ie.some(Zt=>Zt.id===oe.sessionId)?Ie.map(Zt=>Zt.id===oe.sessionId?{...Zt,status:Be}:Zt):[...Ie,{id:oe.sessionId,environmentId:"",runtime:"",status:Be,prompt:"",startedAt:oe.timestamp}])}break}case"session_events":{const oe=ia((Et=ie.payload)==null?void 0:Et.events,E0,"session_events","events"),Ye=(Rn=ie.payload)==null?void 0:Rn.sessionId;if(typeof Ye!="string"){Zl("session_events","missing or non-string sessionId");break}if(oe.length>0){let Be=0;y(Ie=>{const nn=new Set;for(const ft of Ie)ft.sessionId===Ye&&nn.add(`${ft.timestamp}|${ft.eventType}`);const Zt=oe.filter(ft=>!nn.has(`${ft.timestamp}|${ft.eventType}`)),yt=[...Ie,...Zt].sort((ft,ht)=>ft.sessionId!==ht.sessionId?0:ft.timestamp.localeCompare(ht.timestamp));return yt.length>Di?(Be=yt.length-Di,yt.slice(-Di)):yt}),Be>0&&_(Ie=>Ie+Be)}break}case"spawned":{const oe=(Fs=ie.payload)==null?void 0:Fs.sessionId;typeof oe=="string"&&oe&&j(oe),I({type:"list_sessions"});break}case"projects":w(ia((Ua=ie.payload)==null?void 0:Ua.projects,HT,"projects","projects"));break;case"project_created":Ae(!1),I({type:"list_projects"});break;case"project_archived":I({type:"list_projects"});break;case"project_updated":I({type:"list_projects"});break;case"tasks":{const oe=ia((vo=ie.payload)==null?void 0:vo.tasks,GT,"tasks","tasks"),Ye=(typeof((Zi=ie.payload)==null?void 0:Zi.projectId)=="string"?ie.payload.projectId:"")||(oe.length>0?oe[0].projectId:"");if(!Ye){z(oe);break}z(Be=>[...Be.filter(Ie=>Ie.projectId!==Ye),...oe]);break}case"task_created":{const oe=(Xi=ie.payload)==null?void 0:Xi.task;if(ln(oe)){const Ye=typeof oe.project_id=="string"?oe.project_id:typeof oe.projectId=="string"?oe.projectId:"";Ye&&I({type:"list_tasks",payload:{projectId:Ye}})}break}case"task_started":{const oe=ie.payload;if(!ln(oe))break;q(Be=>oe.taskId&&Be===oe.taskId?void 0:Be),oe.sessionId&&(I({type:"list_sessions"}),typeof oe.taskId=="string"&&typeof oe.sessionId=="string"&&z(Be=>Be.map(Ie=>Ie.id===oe.taskId?{...Ie,latestSessionId:oe.sessionId}:Ie)));const Ye=typeof oe.projectId=="string"?oe.projectId:void 0;Ye?I({type:"list_tasks",payload:{projectId:Ye}}):oe.taskId&&z(Be=>{const Ie=Be.find(nn=>nn.id===oe.taskId);return Ie&&I({type:"list_tasks",payload:{projectId:Ie.projectId}}),Be});break}case"task_completed":case"task_deleted":case"task_updated":{const oe=ie.payload;if(!ln(oe))break;const Ye=typeof oe.projectId=="string"?oe.projectId:void 0;Ye?I({type:"list_tasks",payload:{projectId:Ye}}):oe.taskId&&z(Be=>{const Ie=Be.find(nn=>nn.id===oe.taskId);return Ie&&I({type:"list_tasks",payload:{projectId:Ie.projectId}}),Be});break}case"findings":X(ia((Qi=ie.payload)==null?void 0:Qi.findings,PT,"findings","findings"));break;case"finding_posted":typeof((Ks=ie.payload)==null?void 0:Ks.projectId)=="string"&&I({type:"list_findings",payload:{projectId:ie.payload.projectId}});break;case"tokens":J(ia(($s=ie.payload)==null?void 0:$s.tokens,qT,"tokens","tokens"));break;case"token_changed":I({type:"list_tokens"});break;case"credential_providers":FT(ie.payload)&&Y(ie.payload);break;case"provision_progress":{if(!KT(ie.payload)){Zl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const oe=ie.payload;ge(Ye=>({...Ye,[oe.environmentId]:{stage:oe.stage,message:oe.message,progress:oe.progress}})),oe.stage==="ready"&&setTimeout(()=>{ge(Be=>{const Ie={...Be};return delete Ie[oe.environmentId],Ie})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((Ji=ie.payload)==null?void 0:Ji.environmentId)=="string"){const oe=ie.payload.environmentId;d(Ye=>Ye.filter(Be=>Be.id!==oe)),ge(Ye=>{const Be={...Ye};return delete Be[oe],Be})}I({type:"list_sessions"});break;case"codespaces_list":{const oe=ia((Wi=ie.payload)==null?void 0:Wi.codespaces,$T,"codespaces_list","codespaces"),Ye=typeof((Zn=ie.payload)==null?void 0:Zn.error)=="string"?ie.payload.error:"";pe(oe),L(Ye);break}case"codespace_created":{ee(!1),I({type:"list_codespaces"});break}case"codespace_create_error":{ee(!1);const oe=typeof((Lt=ie.payload)==null?void 0:Lt.message)=="string"?ie.payload.message:"Failed to create codespace";ye(oe);break}case"personas":{const oe=ia(($t=ie.payload)==null?void 0:$t.personas,ZT,"personas","personas");je(oe);break}case"persona_created":case"persona_updated":case"persona_deleted":I({type:"list_personas"});break;case"task_sessions":{const oe=(fa=ie.payload)==null?void 0:fa.taskId;if(typeof oe!="string"||!oe)break;const Ye=ia((Zs=ie.payload)==null?void 0:Zs.sessions,T0,"task_sessions","sessions");we(Be=>({...Be,[oe]:Ye}));break}case"error":console.error("[ws]",(yo=ie.payload)==null?void 0:yo.message);break}},ae.onclose=re=>{if(r(!1),l.current=void 0,Ae(!1),q(void 0),clearTimeout(Me),re.code===WT){window.location.href=VT;return}Me=setTimeout(be,JT)},ae.onerror=()=>{ae.close()}}return be(),()=>{clearTimeout(Me),ae==null||ae.close()}},[a,I]);const De=S.useCallback((ae,Me,be,re,ie,se)=>{I({type:"spawn",payload:{environmentId:ae,prompt:Me,model:be||"",runtime:re||"",personaId:ie||"",worktreeBasePath:se||""}})},[I]),Fe=S.useCallback((ae,Me)=>{I({type:"send_input",payload:{sessionId:ae,text:Me}})},[I]),gt=S.useCallback(ae=>{I({type:"kill",payload:{sessionId:ae}})},[I]),xt=S.useCallback(()=>{I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"})},[I]),Gt=S.useCallback(ae=>{I({type:"get_session_events",payload:{sessionId:ae}})},[I]),Je=S.useCallback(()=>{y([]),_(0)},[]),Ze=S.useCallback((ae,Me,be,re)=>{Ae(!0),I({type:"create_project",payload:{name:ae,description:Me||"",repoUrl:be||"",defaultEnvironmentId:re||""}})},[I]),Ue=S.useCallback(ae=>{I({type:"archive_project",payload:{projectId:ae}})},[I]),bn=S.useCallback((ae,Me)=>{I({type:"update_project",payload:{projectId:ae,...Me}})},[I]),Sn=S.useCallback(ae=>{I({type:"list_tasks",payload:{projectId:ae}})},[I]),Kn=S.useCallback((ae,Me,be,re,ie)=>{I({type:"create_task",payload:{projectId:ae,title:Me,description:be||"",dependsOn:re||[],parentTaskId:ie||""}})},[I]),tn=S.useCallback((ae,Me,be,re,ie,se)=>{q(ae),I({type:"start_task",payload:{taskId:ae,runtime:Me||"",model:be||"",personaId:re||"",environmentId:ie||"",notes:se||""}})},[I]),$n=S.useCallback(ae=>{I({type:"complete_task",payload:{taskId:ae}})},[I]),Z=S.useCallback(ae=>{I({type:"resume_task",payload:{taskId:ae}})},[I]),le=S.useCallback((ae,Me,be,re)=>{I({type:"update_task",payload:{taskId:ae,title:Me,description:be,dependsOn:re}})},[I]),ce=S.useCallback(ae=>{I({type:"delete_task",payload:{taskId:ae}})},[I]),de=S.useCallback(ae=>{I({type:"list_findings",payload:{projectId:ae}})},[I]),Te=S.useCallback((ae,Me,be,re,ie)=>{I({type:"post_finding",payload:{projectId:ae,title:Me,content:be,category:re||"general",tags:ie||[]}})},[I]),Ee=S.useCallback(()=>{I({type:"list_tokens"})},[I]),We=S.useCallback((ae,Me,be,re,ie)=>{I({type:"set_token",payload:{name:ae,value:Me,tokenType:be,envVar:re,filePath:ie}})},[I]),Le=S.useCallback(ae=>{I({type:"delete_token",payload:{name:ae}})},[I]),lt=S.useCallback(ae=>{I({type:"set_credential_providers",payload:ae})},[I]),wt=S.useCallback((ae,Me,be,re)=>{const ie={displayName:ae,adapterType:Me,adapterConfig:be||{}};re&&(ie.defaultRuntime=re),I({type:"add_environment",payload:ie})},[I]),_t=S.useCallback(ae=>{I({type:"provision_environment",payload:{environmentId:ae}})},[I]),Bt=S.useCallback(ae=>{I({type:"stop_environment",payload:{environmentId:ae}})},[I]),ot=S.useCallback(ae=>{I({type:"remove_environment",payload:{environmentId:ae}})},[I]),Tt=S.useCallback(()=>{I({type:"list_codespaces"})},[I]),rn=S.useCallback((ae,Me)=>{if(!o){ye("Not connected to server. Please try again once the connection is restored.");return}ee(!0),ye("");const be={repo:ae};Me&&(be.machine=Me),I({type:"create_codespace",payload:be})},[I,o]),vt=S.useCallback((ae,Me,be,re,ie,se)=>{I({type:"create_persona",payload:{name:ae,description:Me,systemPrompt:be,runtime:re||"",model:ie||"",maxTurns:se||0}})},[I]),Yt=S.useCallback((ae,Me,be,re,ie,se,Et)=>{I({type:"update_persona",payload:{personaId:ae,name:Me||"",description:be||"",systemPrompt:re||"",runtime:ie||"",model:se||"",maxTurns:Et||0}})},[I]),Ft=S.useCallback(ae=>{I({type:"delete_persona",payload:{personaId:ae}})},[I]),ps=S.useCallback(ae=>{I({type:"get_task_sessions",payload:{taskId:ae}})},[I]);return{connected:o,environments:u,sessions:m,events:g,eventsDropped:b,lastSpawnedId:T,projects:A,tasks:C,findings:M,tokens:H,spawn:De,sendInput:Fe,kill:gt,refresh:xt,loadSessionEvents:Gt,clearEvents:Je,createProject:Ze,archiveProject:Ue,updateProject:bn,loadTasks:Sn,createTask:Kn,startTask:tn,completeTask:$n,resumeTask:Z,updateTask:le,deleteTask:ce,loadFindings:de,postFinding:Te,addEnvironment:wt,loadTokens:Ee,setToken:We,deleteToken:Le,credentialProviders:W,updateCredentialProviders:lt,provisionStatus:ne,provisionEnvironment:_t,stopEnvironment:Bt,removeEnvironment:ot,codespaces:U,codespaceError:te,codespaceListError:G,codespaceCreating:K,listCodespaces:Tt,createCodespace:rn,projectCreating:xe,taskStartingId:Q,personas:ke,createPersona:vt,updatePersona:Yt,deletePersona:Ft,taskSessions:qe,loadTaskSessions:ps}}const Uf=S.createContext(void 0);function tE({children:n}){const a=eE();return h.jsx(Uf.Provider,{value:a,children:n})}function on(){const n=S.useContext(Uf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const nE=[{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}],aE=[{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"}],sE=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
37
+ - src/middleware/auth.ts
38
+ - src/routes/login.ts
39
+ - src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
40
+ \`\`\`typescript
41
+ import jwt from "jsonwebtoken";
42
+ import type { Request, Response, NextFunction } from "express";
43
+
44
+ const JWT_SECRET = process.env.JWT_SECRET || "change-me";
45
+
46
+ export function verifyToken(req: Request, res: Response, next: NextFunction): void {
47
+ const header = req.headers.authorization;
48
+ if (!header?.startsWith("Bearer ")) {
49
+ res.status(401).json({ error: "Missing token" });
50
+ return;
51
+ }
52
+ try {
53
+ const decoded = jwt.verify(header.slice(7), JWT_SECRET);
54
+ req.user = decoded;
55
+ next();
56
+ } catch {
57
+ res.status(403).json({ error: "Invalid token" });
58
+ }
59
+ }
60
+ \`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],iE=[{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"}],lE=[{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}],A0=[{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"}],oE=[{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:""}],rE=[{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"}],cE={"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 qt(n){return new Date(Date.now()+n).toISOString()}const C0=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:qt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:qt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:qt(1600),content:`Found 5 endpoints that need refactoring:
61
+ - GET /api/users
62
+ - POST /api/users
63
+ - GET /api/users/:id
64
+ - PUT /api/users/:id
65
+ - DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:qt(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:qt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:qt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:qt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:qt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:qt(1400),content:`Found tables to modify:
66
+ - users (add column: last_login_at)
67
+ - sessions (add index on expires_at)
68
+ - audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:qt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
69
+ The table has 50,000+ rows — this may lock the table briefly.
70
+
71
+ Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:qt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:qt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
72
+ Migration 002_sessions_index.sql applied successfully.
73
+ Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:qt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:qt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:qt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:qt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:qt(1800),content:`Writing test cases:
74
+ - should calculate monthly total
75
+ - should apply discount codes
76
+ - should handle currency conversion
77
+ - should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:qt(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
78
+ The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:qt(3500),content:"failed"}}]}],j0=400;function uE({children:n}){const[a,l]=S.useState(aE),[o,r]=S.useState(sE),[u,d]=S.useState(void 0),[m,p]=S.useState(iE),[g,y]=S.useState(lE),[b,_]=S.useState(A0),[T,j]=S.useState(oE),[A,w]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,z]=S.useState(rE),[M]=S.useState(cE),X=S.useRef(0),H=S.useRef(0),J=S.useRef(new Set),W=S.useRef(new Map),Y=S.useRef(g);Y.current=g;const ne=S.useRef(new Map),ge=S.useRef(new Map),U=S.useCallback(Z=>(X.current+=1,`mock-${Z}-${String(X.current).padStart(3,"0")}`),[]),pe=S.useCallback(()=>{const Z=C0[H.current%C0.length];return H.current+=1,Z},[]),te=S.useCallback((Z,le,ce)=>{const de=setTimeout(()=>{var Te;J.current.delete(de),ce&&((Te=W.current.get(ce))==null||Te.delete(de)),Z()},le);J.current.add(de),ce&&(W.current.has(ce)||W.current.set(ce,new Set),W.current.get(ce).add(de))},[]),ye=S.useCallback(Z=>{const le=W.current.get(Z);le&&(le.forEach(ce=>{clearTimeout(ce),J.current.delete(ce)}),W.current.delete(Z))},[]),G=S.useCallback((Z,le)=>{l(ce=>ce.map(de=>de.id===Z?{...de,status:le}:de))},[]),L=S.useCallback(Z=>{r(le=>[...le,Z])},[]),K=S.useCallback((Z,le,ce)=>{le.forEach((de,Te)=>{te(()=>{const Ee={sessionId:Z,...de.event,timestamp:new Date().toISOString()};L(Ee),de.event.eventType==="status"&&G(Z,de.event.content),Te===le.length-1&&ce&&ce()},de.delayMs,Z)})},[te,L,G]),ee=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:le,runtime:de});const Te=U("sess"),Ee={id:Te,environmentId:Z,runtime:de||"claude-code",status:"running",prompt:le,startedAt:new Date().toISOString()};l(Le=>[...Le,Ee]),d(Te);const We=pe();if(console.log(`[MockGrackle] Playing scenario: ${We.label}`),We.pauseForInput){const Le=We.pauseAfterStep??We.steps.length-1,lt=We.steps.slice(0,Le+1),wt=lt.length>0?lt[lt.length-1].delayMs:0;K(Te,lt),te(()=>{G(Te,"idle"),L({sessionId:Te,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},wt+j0,Te),We.resumeSteps&&ne.current.set(Te,We.resumeSteps)}else K(Te,We.steps)},[U,pe,K,te,G,L]),ke=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),ye(Z),ne.current.delete(Z),G(Z,"interrupted"),L({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(le=>le.map(ce=>ce.latestSessionId===Z&&ce.status==="working"?{...ce,status:"not_started"}:ce))},[ye,G,L]),je=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),qe=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),we=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),xe=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] createProject",{name:Z,description:le});const Te={id:U("proj"),name:Z,description:le||"",repoUrl:ce||"",defaultEnvironmentId:de||"",status:"active",worktreeBasePath:"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(Ee=>[...Ee,Te])},[U]),Ae=S.useCallback(Z=>{console.log("[MockGrackle] archiveProject",Z),p(le=>le.map(ce=>ce.id===Z?{...ce,status:"archived"}:ce))},[]),Q=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),q=S.useCallback((Z,le,ce,de,Te)=>{console.log("[MockGrackle] createTask",{projectId:Z,title:le,parentTaskId:Te}),y(Ee=>{const Le=Ee.filter(Bt=>Bt.projectId===Z).reduce((Bt,ot)=>Math.max(Bt,ot.sortOrder),0),lt=Te?Ee.find(Bt=>Bt.id===Te):void 0;if(Te&&!lt)return console.warn("[MockGrackle] Parent task not found:",Te),Ee;if(lt&&!lt.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",Te),Ee;const wt=lt?lt.depth+1:0,_t={id:U("task"),projectId:Z,title:le,description:ce||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:de||[],reviewNotes:void 0,sortOrder:Le+1,createdAt:new Date().toISOString(),parentTaskId:Te||"",depth:wt,childTaskIds:[],canDecompose:!Te};return[...Ee,_t]})},[U]),I=S.useCallback((Z,le,ce)=>{var lt;console.log("[MockGrackle] startTask",{taskId:Z,runtime:le});const de=Y.current.find(wt=>wt.id===Z),Te=(de==null?void 0:de.title)??"",Ee=U("sess"),We={id:Ee,environmentId:"env-local-01",runtime:le||"claude-code",status:"running",prompt:Te||Z,startedAt:new Date().toISOString()};l(wt=>[...wt,We]),y(wt=>wt.map(_t=>_t.id===Z?{..._t,status:"working",latestSessionId:Ee,branch:`mock/${Z.slice(0,8)}`}:_t));const Le=pe();if(console.log(`[MockGrackle] Playing task scenario: ${Le.label}`),Le.pauseForInput){const wt=Le.pauseAfterStep??Le.steps.length-1,_t=Le.steps.slice(0,wt+1),Bt=_t.length>0?_t[_t.length-1].delayMs:0;if(K(Ee,_t),te(()=>{G(Ee,"idle"),L({sessionId:Ee,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Bt+j0,Ee),Le.resumeSteps){const ot=[...Le.resumeSteps];ne.current.set(Ee,ot);const Tt=ot.reduce((rn,vt)=>Math.max(rn,vt.delayMs),0);ge.current.set(Ee,{taskId:Z,delayAfterResume:Tt+200})}}else{const wt=Le.steps.length>0?Le.steps[Le.steps.length-1].delayMs:0;K(Ee,Le.steps);const _t=(lt=Le.steps[Le.steps.length-1])==null?void 0:lt.event.content;te(()=>{_t==="completed"?y(Bt=>Bt.map(ot=>ot.id===Z&&ot.status==="working"?{...ot,status:"paused"}:ot)):_t==="failed"&&y(Bt=>Bt.map(ot=>ot.id===Z&&ot.status==="working"?{...ot,status:"failed"}:ot))},wt+100,Ee)}},[U,pe,K,te,G,L]),De=S.useCallback((Z,le)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:le}),L({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${le}`}),G(Z,"running"),L({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const ce=ne.current.get(Z);if(ce)ne.current.delete(Z),K(Z,ce);else{const Te=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];K(Z,Te)}const de=ge.current.get(Z);de&&(ge.current.delete(Z),te(()=>{y(Te=>Te.map(Ee=>Ee.id===de.taskId&&Ee.status==="working"?{...Ee,status:"paused"}:Ee))},de.delayAfterResume,Z))},[L,G,K,te]),Fe=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),y(le=>le.map(ce=>ce.id===Z?{...ce,status:"complete"}:ce))},[]),gt=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),xt=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:le}),y(Te=>Te.map(Ee=>Ee.id===Z?{...Ee,title:le.trim()||Ee.title,description:ce,dependsOn:de}:Ee))},[]),Gt=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),y(le=>le.filter(ce=>ce.id!==Z))},[]),Je=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),_(A0.filter(le=>le.projectId===Z))},[]),Ze=S.useCallback((Z,le,ce,de,Te)=>{console.log("[MockGrackle] postFinding",{projectId:Z,title:le});const Ee={id:U("find"),projectId:Z,taskId:"",sessionId:"",category:de||"general",title:le,content:ce,tags:Te||[],createdAt:new Date().toISOString()};_(We=>[...We,Ee])},[U]),Ue=S.useCallback((Z,le,ce,de)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:le,adapterConfig:ce,defaultRuntime:de})},[]),bn=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Sn=S.useCallback((Z,le,ce,de,Te)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:ce}),j(Ee=>[...Ee.filter(Le=>Le.name!==Z),{name:Z,tokenType:ce,envVar:de,filePath:Te,expiresAt:""}])},[]),Kn=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),j(le=>le.filter(ce=>ce.name!==Z))},[]),tn=S.useCallback(Z=>{console.log("[MockGrackle] updateCredentialProviders",Z),w(Z)},[]);S.useEffect(()=>()=>{J.current.forEach(clearTimeout),J.current.clear()},[]);const $n=S.useMemo(()=>({connected:!0,environments:nE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:m,tasks:g,findings:b,tokens:T,credentialProviders:A,spawn:ee,sendInput:De,kill:ke,refresh:je,loadSessionEvents:qe,clearEvents:we,createProject:xe,archiveProject:Ae,updateProject:(Z,le)=>{console.log("[MockGrackle] updateProject",{projectId:Z,...le}),p(ce=>ce.map(de=>de.id!==Z?de:{...de,...le.name!==void 0?{name:le.name}:{},...le.description!==void 0?{description:le.description}:{},...le.repoUrl!==void 0?{repoUrl:le.repoUrl}:{},...le.defaultEnvironmentId!==void 0?{defaultEnvironmentId:le.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:Q,createTask:q,startTask:I,completeTask:Fe,resumeTask:gt,updateTask:xt,deleteTask:Gt,loadFindings:Je,postFinding:Ze,addEnvironment:Ue,loadTokens:bn,setToken:Sn,deleteToken:Kn,updateCredentialProviders:tn,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(Z,le,ce,de,Te,Ee)=>{console.log("[MockGrackle] createPersona",{name:Z});const We={id:`mock-persona-${Date.now()}`,name:Z,description:le,systemPrompt:ce,toolConfig:"{}",runtime:de??"claude-code",model:Te||"",maxTurns:Ee||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};z(Le=>[...Le,We])},updatePersona:(Z,le,ce,de,Te,Ee,We)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:le}),z(Le=>Le.map(lt=>lt.id!==Z?lt:{...lt,...le!==void 0?{name:le}:{},...ce!==void 0?{description:ce}:{},...de!==void 0?{systemPrompt:de}:{},...Te!==void 0?{runtime:Te}:{},...Ee!==void 0?{model:Ee}:{},...We!==void 0?{maxTurns:We}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),z(le=>le.filter(ce=>ce.id!==Z))},taskSessions:M,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)}}),[a,o,u,m,g,b,T,A,C,M,ee,De,ke,je,qe,we,xe,Ae,Q,q,I,Fe,gt,xt,Gt,Je,Ze,Ue,bn,Sn,Kn,tn]);return h.jsx(Uf.Provider,{value:$n,children:n})}const My=S.createContext(void 0),dE=4e3;function fE({children:n}){const[a,l]=S.useState([]),o=S.useRef(0),r=S.useCallback(d=>{l(m=>m.filter(p=>p.id!==d))},[]),u=S.useCallback((d,m="info",p=dE)=>{const g=`toast-${++o.current}`;l(y=>[...y,{id:g,message:d,variant:m,duration:p}])},[]);return h.jsx(My.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function fo(){const n=S.useContext(My);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const cc=[{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"]}],Oy=new Set(cc.map(n=>n.id)),N0="grackle";function Wd(n){return cc.find(a=>a.id===n)}const ef="grackle-theme",By="grackle-prefer-system",Ly="(prefers-color-scheme: dark)";let Yl=[],Pr;function kd(){Pr=void 0;for(const n of Yl)n()}function tf(){return typeof window>"u"?!1:window.matchMedia(Ly).matches}function Xl(){if(typeof localStorage>"u")return N0;try{const n=localStorage.getItem(ef);if(n!==null&&Oy.has(n))return n}catch{}return N0}function Kr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(By)==="true"}catch{return!1}}function nf(n){return cc.find(a=>a.variantLightId===n||a.variantDarkId===n)}function Uy(n,a){const l=Wd(n);if(l!=null&&l.variantDarkId)return a&&l.variantLightId?tf()?l.variantDarkId:l.variantLightId:l.variantDarkId;if(l!=null&&l.hidden&&a){const o=nf(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return tf()?o.variantDarkId:o.variantLightId}return n}function Ri(n,a,l=!1){l&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=Uy(n,a),l&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ri(Xl(),Kr());function hE(){return Pr===void 0&&(Pr={themeId:Xl(),systemDark:tf(),preferSystem:Kr()}),Pr}function mE(n){return Yl=[...Yl,n],()=>{Yl=Yl.filter(a=>a!==n)}}function pE(){const n=S.useSyncExternalStore(mE,hE),{themeId:a,preferSystem:l}=n,o=Uy(a,l),r=S.useCallback(d=>{if(Oy.has(d)){try{localStorage.setItem(ef,d)}catch{}Ri(d,Kr(),!0),kd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem(By,d?"true":"false")}catch{}if(d){const m=Xl(),p=Wd(m);if(p!=null&&p.hidden){const g=nf(m);if(g)try{localStorage.setItem(ef,g.id)}catch{}}}Ri(Xl(),d,!0),kd()},[]);return S.useEffect(()=>{Ri(a,l)},[a,l]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(Ly),m=()=>{const p=Xl(),g=Kr();if(g){const y=Wd(p);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ri(p,g),y!=null&&y.hidden){const b=nf(p);b!=null&&b.variantDarkId&&b.variantLightId&&Ri(p,g)}}kd()};return d.addEventListener("change",m),()=>{d.removeEventListener("change",m)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:l,setPreferSystem:u}}const zy=S.createContext(void 0);function gE({children:n}){const a=pE();return h.jsx(zy.Provider,{value:a,children:n})}function Vy(){const n=S.useContext(zy);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const vE="_container_1he30_1",yE="_brand_1he30_27",bE="_info_1he30_43",SE="_connectionDot_1he30_51",xE="_connected_1he30_54",_E="_disconnected_1he30_58",TE="_settingsButton_1he30_62",Ms={container:vE,brand:yE,info:bE,connectionDot:SE,connected:xE,disconnected:_E,settingsButton:TE};function EE(){const{connected:n,environments:a,sessions:l}=on(),o=da(),r=a.length,u=a.filter(m=>m.status==="connected").length,d=l.filter(m=>["running","idle"].includes(m.status)).length;return h.jsxs("div",{className:Ms.container,children:[h.jsx("button",{type:"button",className:Ms.brand,onClick:()=>o("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Ms.info,children:[h.jsxs("span",{children:[h.jsx("span",{className:`${Ms.connectionDot} ${n?Ms.connected:Ms.disconnected}`,children:"●"})," ",n?"Connected":"Disconnected"]}),h.jsxs("span",{children:[u,"/",r," env",r!==1?"s":""]}),h.jsxs("span",{children:[d," active"]}),h.jsx("button",{className:Ms.settingsButton,onClick:()=>o(zi),title:"Settings",children:"⚙"})]})]})}const zf=S.createContext({});function Vf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const uc=S.createContext(null),If=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class AE extends S.Component{getSnapshotBeforeUpdate(a){const l=this.props.childRef.current;if(l&&a.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=l.offsetHeight||0,o.width=l.offsetWidth||0,o.top=l.offsetTop,o.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function CE({children:n,isPresent:a}){const l=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=S.useContext(If);return S.useInsertionEffect(()=>{const{width:d,height:m,top:p,left:g}=r.current;if(a||!o.current||!d||!m)return;o.current.dataset.motionPopId=l;const y=document.createElement("style");return u&&(y.nonce=u),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
79
+ [data-motion-pop-id="${l}"] {
80
+ position: absolute !important;
81
+ width: ${d}px !important;
82
+ height: ${m}px !important;
83
+ top: ${p}px !important;
84
+ left: ${g}px !important;
85
+ }
86
+ `),()=>{document.head.removeChild(y)}},[a]),h.jsx(AE,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const jE=({children:n,initial:a,isPresent:l,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const m=Vf(NE),p=S.useId(),g=S.useCallback(b=>{m.set(b,!0);for(const _ of m.values())if(!_)return;o&&o()},[m,o]),y=S.useMemo(()=>({id:p,initial:a,isPresent:l,custom:r,onExitComplete:g,register:b=>(m.set(b,!1),()=>m.delete(b))}),u?[Math.random(),g]:[l,g]);return S.useMemo(()=>{m.forEach((b,_)=>m.set(_,!1))},[l]),S.useEffect(()=>{!l&&!m.size&&o&&o()},[l]),d==="popLayout"&&(n=h.jsx(CE,{isPresent:l,children:n})),h.jsx(uc.Provider,{value:y,children:n})};function NE(){return new Map}function Iy(n=!0){const a=S.useContext(uc);if(a===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:r}=a,u=S.useId();S.useEffect(()=>{n&&r(u)},[n]);const d=S.useCallback(()=>n&&o&&o(u),[u,o,n]);return!l&&o?[!1,d]:[!0]}const Mr=n=>n.key||"";function w0(n){const a=[];return S.Children.forEach(n,l=>{S.isValidElement(l)&&a.push(l)}),a}const Hf=typeof window<"u",Hy=Hf?S.useLayoutEffect:S.useEffect,qs=({children:n,custom:a,initial:l=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[m,p]=Iy(d),g=S.useMemo(()=>w0(n),[n]),y=d&&!m?[]:g.map(Mr),b=S.useRef(!0),_=S.useRef(g),T=Vf(()=>new Map),[j,A]=S.useState(g),[w,C]=S.useState(g);Hy(()=>{b.current=!1,_.current=g;for(let X=0;X<w.length;X++){const H=Mr(w[X]);y.includes(H)?T.delete(H):T.get(H)!==!0&&T.set(H,!1)}},[w,y.length,y.join("-")]);const z=[];if(g!==j){let X=[...g];for(let H=0;H<w.length;H++){const J=w[H],W=Mr(J);y.includes(W)||(X.splice(H,0,J),z.push(J))}u==="wait"&&z.length&&(X=z),C(w0(X)),A(g);return}const{forceRender:M}=S.useContext(zf);return h.jsx(h.Fragment,{children:w.map(X=>{const H=Mr(X),J=d&&!m?!1:g===w||y.includes(H),W=()=>{if(T.has(H))T.set(H,!0);else return;let Y=!0;T.forEach(ne=>{ne||(Y=!1)}),Y&&(M==null||M(),C(_.current),d&&(p==null||p()),o&&o())};return h.jsx(jE,{isPresent:J,initial:!b.current||l?void 0:!1,custom:J?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:J?void 0:W,children:X},H)})})},wn=n=>n;let Gy=wn;const wE={useManualTiming:!1};function DE(n){let a=new Set,l=new Set,o=!1,r=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function m(g){u.has(g)&&(p.schedule(g),n()),g(d)}const p={schedule:(g,y=!1,b=!1)=>{const T=b&&o?a:l;return y&&u.add(g),T.has(g)||T.add(g),g},cancel:g=>{l.delete(g),u.delete(g)},process:g=>{if(d=g,o){r=!0;return}o=!0,[a,l]=[l,a],a.forEach(m),a.clear(),o=!1,r&&(r=!1,p.process(g))}};return p}const Or=["read","resolveKeyframes","update","preRender","render","postRender"],kE=40;function Py(n,a){let l=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>l=!0,d=Or.reduce((C,z)=>(C[z]=DE(u),C),{}),{read:m,resolveKeyframes:p,update:g,preRender:y,render:b,postRender:_}=d,T=()=>{const C=performance.now();l=!1,r.delta=o?1e3/60:Math.max(Math.min(C-r.timestamp,kE),1),r.timestamp=C,r.isProcessing=!0,m.process(r),p.process(r),g.process(r),y.process(r),b.process(r),_.process(r),r.isProcessing=!1,l&&a&&(o=!1,n(T))},j=()=>{l=!0,o=!0,r.isProcessing||n(T)};return{schedule:Or.reduce((C,z)=>{const M=d[z];return C[z]=(X,H=!1,J=!1)=>(l||j(),M.schedule(X,H,J)),C},{}),cancel:C=>{for(let z=0;z<Or.length;z++)d[Or[z]].cancel(C)},state:r,steps:d}}const{schedule:dt,cancel:ds,state:en,steps:Rd}=Py(typeof requestAnimationFrame<"u"?requestAnimationFrame:wn,!0),qy=S.createContext({strict:!1}),D0={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"]},Ii={};for(const n in D0)Ii[n]={isEnabled:a=>D0[n].some(l=>!!a[l])};function RE(n){for(const a in n)Ii[a]={...Ii[a],...n[a]}}const ME=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 $r(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||ME.has(n)}let Yy=n=>!$r(n);function OE(n){n&&(Yy=a=>a.startsWith("on")?!$r(a):n(a))}try{OE(require("@emotion/is-prop-valid").default)}catch{}function BE(n,a,l){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(Yy(r)||l===!0&&$r(r)||!a&&!$r(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function LE(n){if(typeof Proxy>"u")return n;const a=new Map,l=(...o)=>n(...o);return new Proxy(l,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const dc=S.createContext({});function so(n){return typeof n=="string"||Array.isArray(n)}function fc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Gf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pf=["initial",...Gf];function hc(n){return fc(n.animate)||Pf.some(a=>so(n[a]))}function Fy(n){return!!(hc(n)||n.variants)}function UE(n,a){if(hc(n)){const{initial:l,animate:o}=n;return{initial:l===!1||so(l)?l:void 0,animate:so(o)?o:void 0}}return n.inherit!==!1?a:{}}function zE(n){const{initial:a,animate:l}=UE(n,S.useContext(dc));return S.useMemo(()=>({initial:a,animate:l}),[k0(a),k0(l)])}function k0(n){return Array.isArray(n)?n.join(" "):n}const VE=Symbol.for("motionComponentSymbol");function Mi(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function IE(n,a,l){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),l&&(typeof l=="function"?l(o):Mi(l)&&(l.current=o))},[a])}const qf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),HE="framerAppearId",Ky="data-"+qf(HE),{schedule:Yf}=Py(queueMicrotask,!1),$y=S.createContext({});function GE(n,a,l,o,r){var u,d;const{visualElement:m}=S.useContext(dc),p=S.useContext(qy),g=S.useContext(uc),y=S.useContext(If).reducedMotion,b=S.useRef(null);o=o||p.renderer,!b.current&&o&&(b.current=o(n,{visualState:a,parent:m,props:l,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:y}));const _=b.current,T=S.useContext($y);_&&!_.projection&&r&&(_.type==="html"||_.type==="svg")&&PE(b.current,l,r,T);const j=S.useRef(!1);S.useInsertionEffect(()=>{_&&j.current&&_.update(l,g)});const A=l[Ky],w=S.useRef(!!A&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,A))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,A)));return Hy(()=>{_&&(j.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Yf.render(_.render),w.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!w.current&&_.animationState&&_.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,A)}),w.current=!1))}),_}function PE(n,a,l,o){const{layoutId:r,layout:u,drag:d,dragConstraints:m,layoutScroll:p,layoutRoot:g}=a;n.projection=new l(n.latestValues,a["data-framer-portal-id"]?void 0:Zy(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||m&&Mi(m),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:g})}function Zy(n){if(n)return n.options.allowProjection!==!1?n.projection:Zy(n.parent)}function qE({preloadedFeatures:n,createVisualElement:a,useRender:l,useVisualState:o,Component:r}){var u,d;n&&RE(n);function m(g,y){let b;const _={...S.useContext(If),...g,layoutId:YE(g)},{isStatic:T}=_,j=zE(g),A=o(g,T);if(!T&&Hf){FE();const w=KE(_);b=w.MeasureLayout,j.visualElement=GE(r,A,_,a,w.ProjectionNode)}return h.jsxs(dc.Provider,{value:j,children:[b&&j.visualElement?h.jsx(b,{visualElement:j.visualElement,..._}):null,l(r,g,IE(A,j.visualElement,y),A,T,j.visualElement)]})}m.displayName=`motion.${typeof r=="string"?r:`create(${(d=(u=r.displayName)!==null&&u!==void 0?u:r.name)!==null&&d!==void 0?d:""})`}`;const p=S.forwardRef(m);return p[VE]=r,p}function YE({layoutId:n}){const a=S.useContext(zf).id;return a&&n!==void 0?a+"-"+n:n}function FE(n,a){S.useContext(qy).strict}function KE(n){const{drag:a,layout:l}=Ii;if(!a&&!l)return{};const o={...a,...l};return{MeasureLayout:a!=null&&a.isEnabled(n)||l!=null&&l.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const $E=["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 Ff(n){return typeof n!="string"||n.includes("-")?!1:!!($E.indexOf(n)>-1||/[A-Z]/u.test(n))}function R0(n){const a=[{},{}];return n==null||n.values.forEach((l,o)=>{a[0][o]=l.get(),a[1][o]=l.getVelocity()}),a}function Kf(n,a,l,o){if(typeof a=="function"){const[r,u]=R0(o);a=a(l!==void 0?l:n.custom,r,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,u]=R0(o);a=a(l!==void 0?l:n.custom,r,u)}return a}const af=n=>Array.isArray(n),ZE=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),XE=n=>af(n)?n[n.length-1]||0:n,sn=n=>!!(n&&n.getVelocity);function qr(n){const a=sn(n)?n.get():n;return ZE(a)?a.toValue():a}function QE({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:l},o,r,u){const d={latestValues:JE(o,r,u,n),renderState:a()};return l&&(d.onMount=m=>l({props:o,current:m,...d}),d.onUpdate=m=>l(m)),d}const Xy=n=>(a,l)=>{const o=S.useContext(dc),r=S.useContext(uc),u=()=>QE(n,a,o,r);return l?u():Vf(u)};function JE(n,a,l,o){const r={},u=o(n,{});for(const _ in u)r[_]=qr(u[_]);let{initial:d,animate:m}=n;const p=hc(n),g=Fy(n);a&&g&&!p&&n.inherit!==!1&&(d===void 0&&(d=a.initial),m===void 0&&(m=a.animate));let y=l?l.initial===!1:!1;y=y||d===!1;const b=y?m:d;if(b&&typeof b!="boolean"&&!fc(b)){const _=Array.isArray(b)?b:[b];for(let T=0;T<_.length;T++){const j=Kf(n,_[T]);if(j){const{transitionEnd:A,transition:w,...C}=j;for(const z in C){let M=C[z];if(Array.isArray(M)){const X=y?M.length-1:0;M=M[X]}M!==null&&(r[z]=M)}for(const z in A)r[z]=A[z]}}}return r}const Yi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ys=new Set(Yi),Qy=n=>a=>typeof a=="string"&&a.startsWith(n),Jy=Qy("--"),WE=Qy("var(--"),$f=n=>WE(n)?eA.test(n.split("/*")[0].trim()):!1,eA=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wy=(n,a)=>a&&typeof n=="number"?a.transform(n):n,Ba=(n,a,l)=>l>a?a:l<n?n:l,Fi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},io={...Fi,transform:n=>Ba(0,1,n)},Br={...Fi,default:1},ho=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),os=ho("deg"),ca=ho("%"),_e=ho("px"),tA=ho("vh"),nA=ho("vw"),M0={...ca,parse:n=>ca.parse(n)/100,transform:n=>ca.transform(n*100)},aA={borderWidth:_e,borderTopWidth:_e,borderRightWidth:_e,borderBottomWidth:_e,borderLeftWidth:_e,borderRadius:_e,radius:_e,borderTopLeftRadius:_e,borderTopRightRadius:_e,borderBottomRightRadius:_e,borderBottomLeftRadius:_e,width:_e,maxWidth:_e,height:_e,maxHeight:_e,top:_e,right:_e,bottom:_e,left:_e,padding:_e,paddingTop:_e,paddingRight:_e,paddingBottom:_e,paddingLeft:_e,margin:_e,marginTop:_e,marginRight:_e,marginBottom:_e,marginLeft:_e,backgroundPositionX:_e,backgroundPositionY:_e},sA={rotate:os,rotateX:os,rotateY:os,rotateZ:os,scale:Br,scaleX:Br,scaleY:Br,scaleZ:Br,skew:os,skewX:os,skewY:os,distance:_e,translateX:_e,translateY:_e,translateZ:_e,x:_e,y:_e,z:_e,perspective:_e,transformPerspective:_e,opacity:io,originX:M0,originY:M0,originZ:_e},O0={...Fi,transform:Math.round},Zf={...aA,...sA,zIndex:O0,size:_e,fillOpacity:io,strokeOpacity:io,numOctaves:O0},iA={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lA=Yi.length;function oA(n,a,l){let o="",r=!0;for(let u=0;u<lA;u++){const d=Yi[u],m=n[d];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(d.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||l){const g=Wy(m,Zf[d]);if(!p){r=!1;const y=iA[d]||d;o+=`${y}(${g}) `}l&&(a[d]=g)}}return o=o.trim(),l?o=l(a,r?"":o):r&&(o="none"),o}function Xf(n,a,l){const{style:o,vars:r,transformOrigin:u}=n;let d=!1,m=!1;for(const p in a){const g=a[p];if(Ys.has(p)){d=!0;continue}else if(Jy(p)){r[p]=g;continue}else{const y=Wy(g,Zf[p]);p.startsWith("origin")?(m=!0,u[p]=y):o[p]=y}}if(a.transform||(d||l?o.transform=oA(a,n.transform,l):o.transform&&(o.transform="none")),m){const{originX:p="50%",originY:g="50%",originZ:y=0}=u;o.transformOrigin=`${p} ${g} ${y}`}}const rA={offset:"stroke-dashoffset",array:"stroke-dasharray"},cA={offset:"strokeDashoffset",array:"strokeDasharray"};function uA(n,a,l=1,o=0,r=!0){n.pathLength=1;const u=r?rA:cA;n[u.offset]=_e.transform(-o);const d=_e.transform(a),m=_e.transform(l);n[u.array]=`${d} ${m}`}function B0(n,a,l){return typeof n=="string"?n:_e.transform(a+l*n)}function dA(n,a,l){const o=B0(a,n.x,n.width),r=B0(l,n.y,n.height);return`${o} ${r}`}function Qf(n,{attrX:a,attrY:l,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:m=1,pathOffset:p=0,...g},y,b){if(Xf(n,g,b),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:j}=n;_.transform&&(j&&(T.transform=_.transform),delete _.transform),j&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=dA(j,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(_.x=a),l!==void 0&&(_.y=l),o!==void 0&&(_.scale=o),d!==void 0&&uA(_,d,m,p,!1)}const Jf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),eb=()=>({...Jf(),attrs:{}}),Wf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function tb(n,{style:a,vars:l},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const u in l)n.style.setProperty(u,l[u])}const nb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ab(n,a,l,o){tb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(nb.has(r)?r:qf(r),a.attrs[r])}const Zr={};function fA(n){Object.assign(Zr,n)}function sb(n,{layout:a,layoutId:l}){return Ys.has(n)||n.startsWith("origin")||(a||l!==void 0)&&(!!Zr[n]||n==="opacity")}function eh(n,a,l){var o;const{style:r}=n,u={};for(const d in r)(sn(r[d])||a.style&&sn(a.style[d])||sb(d,n)||((o=l==null?void 0:l.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(u[d]=r[d]);return u}function ib(n,a,l){const o=eh(n,a,l);for(const r in n)if(sn(n[r])||sn(a[r])){const u=Yi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function hA(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const L0=["x","y","width","height","cx","cy","r"],mA={useVisualState:Xy({scrapeMotionValuesFromProps:ib,createRenderState:eb,onUpdate:({props:n,prevProps:a,current:l,renderState:o,latestValues:r})=>{if(!l)return;let u=!!n.drag;if(!u){for(const m in r)if(Ys.has(m)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let m=0;m<L0.length;m++){const p=L0[m];n[p]!==a[p]&&(d=!0)}d&&dt.read(()=>{hA(l,o),dt.render(()=>{Qf(o,r,Wf(l.tagName),n.transformTemplate),ab(l,o)})})}})},pA={useVisualState:Xy({scrapeMotionValuesFromProps:eh,createRenderState:Jf})};function lb(n,a,l){for(const o in a)!sn(a[o])&&!sb(o,l)&&(n[o]=a[o])}function gA({transformTemplate:n},a){return S.useMemo(()=>{const l=Jf();return Xf(l,a,n),Object.assign({},l.vars,l.style)},[a])}function vA(n,a){const l=n.style||{},o={};return lb(o,l,n),Object.assign(o,gA(n,a)),o}function yA(n,a){const l={},o=vA(n,a);return n.drag&&n.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(l.tabIndex=0),l.style=o,l}function bA(n,a,l,o){const r=S.useMemo(()=>{const u=eb();return Qf(u,a,Wf(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};lb(u,n.style,n),r.style={...u,...r.style}}return r}function SA(n=!1){return(l,o,r,{latestValues:u},d)=>{const p=(Ff(l)?bA:yA)(o,u,d,l),g=BE(o,typeof l=="string",n),y=l!==S.Fragment?{...g,...p,ref:r}:{},{children:b}=o,_=S.useMemo(()=>sn(b)?b.get():b,[b]);return S.createElement(l,{...y,children:_})}}function xA(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...Ff(o)?mA:pA,preloadedFeatures:n,useRender:SA(r),createVisualElement:a,Component:o};return qE(d)}}function ob(n,a){if(!Array.isArray(a))return!1;const l=a.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(a[o]!==n[o])return!1;return!0}function mc(n,a,l){const o=n.getProps();return Kf(o,a,l!==void 0?l:o.custom,n)}function th(n,a){return n?n[a]||n.default||n:void 0}const rb=new Set(["width","height","top","left","right","bottom",...Yi]);let Yr;function _A(){Yr=void 0}const ua={now:()=>(Yr===void 0&&ua.set(en.isProcessing||wE.useManualTiming?en.timestamp:performance.now()),Yr),set:n=>{Yr=n,queueMicrotask(_A)}};function nh(n,a){n.indexOf(a)===-1&&n.push(a)}function ah(n,a){const l=n.indexOf(a);l>-1&&n.splice(l,1)}class sh{constructor(){this.subscriptions=[]}add(a){return nh(this.subscriptions,a),()=>ah(this.subscriptions,a)}notify(a,l,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,l,o);else for(let u=0;u<r;u++){const d=this.subscriptions[u];d&&d(a,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function cb(n,a){return a?n*(1e3/a):0}const U0=30,TA=n=>!isNaN(parseFloat(n));class EA{constructor(a,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=ua.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=l.owner}setCurrent(a){this.current=a,this.updatedAt=ua.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=TA(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,l){this.events[a]||(this.events[a]=new sh);const o=this.events[a].add(l);return a==="change"?()=>{o(),dt.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,l){this.passiveEffect=a,this.stopPassiveEffect=l}set(a,l=!0){!l||!this.passiveEffect?this.updateAndNotify(a,l):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,l=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=ua.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>U0)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,U0);return cb(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(a){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=a(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function lo(n,a){return new EA(n,a)}function AA(n,a,l){n.hasValue(a)?n.getValue(a).set(l):n.addValue(a,lo(l))}function CA(n,a){const l=mc(n,a);let{transitionEnd:o={},transition:r={},...u}=l||{};u={...u,...o};for(const d in u){const m=XE(u[d]);AA(n,d,m)}}function jA(n){return!!(sn(n)&&n.add)}function sf(n,a){const l=n.getValue("willChange");if(jA(l))return l.add(a)}function ub(n){return n.props[Ky]}function ih(n){let a;return()=>(a===void 0&&(a=n()),a)}const NA=ih(()=>window.ScrollTimeline!==void 0);class wA{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,l){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=l}attachTimeline(a,l){const o=this.animations.map(r=>{if(NA()&&r.attachTimeline)return r.attachTimeline(a);if(typeof l=="function")return l(r)});return()=>{o.forEach((r,u)=>{r&&r(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let l=0;l<this.animations.length;l++)a=Math.max(a,this.animations[l].duration);return a}runAll(a){this.animations.forEach(l=>l[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class DA extends wA{then(a,l){return Promise.all(this.animations).then(a).catch(l)}}const Ra=n=>n*1e3,Ma=n=>n/1e3;function lh(n){return typeof n=="function"}function z0(n,a){n.timeline=a,n.onfinish=null}const oh=n=>Array.isArray(n)&&typeof n[0]=="number",kA={linearEasing:void 0};function RA(n,a){const l=ih(n);return()=>{var o;return(o=kA[a])!==null&&o!==void 0?o:l()}}const Xr=RA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hi=(n,a,l)=>{const o=a-n;return o===0?1:(l-n)/o},db=(n,a,l=10)=>{let o="";const r=Math.max(Math.round(a/l),2);for(let u=0;u<r;u++)o+=n(Hi(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function fb(n){return!!(typeof n=="function"&&Xr()||!n||typeof n=="string"&&(n in lf||Xr())||oh(n)||Array.isArray(n)&&n.every(fb))}const Fl=([n,a,l,o])=>`cubic-bezier(${n}, ${a}, ${l}, ${o})`,lf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Fl([0,.65,.55,1]),circOut:Fl([.55,0,1,.45]),backIn:Fl([.31,.01,.66,-.59]),backOut:Fl([.33,1.53,.69,.99])};function hb(n,a){if(n)return typeof n=="function"&&Xr()?db(n,a):oh(n)?Fl(n):Array.isArray(n)?n.map(l=>hb(l,a)||lf.easeOut):lf[n]}const mb=(n,a,l)=>(((1-3*l+3*a)*n+(3*l-6*a))*n+3*a)*n,MA=1e-7,OA=12;function BA(n,a,l,o,r){let u,d,m=0;do d=a+(l-a)/2,u=mb(d,o,r)-n,u>0?l=d:a=d;while(Math.abs(u)>MA&&++m<OA);return d}function mo(n,a,l,o){if(n===a&&l===o)return wn;const r=u=>BA(u,0,1,n,l);return u=>u===0||u===1?u:mb(r(u),a,o)}const pb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,gb=n=>a=>1-n(1-a),vb=mo(.33,1.53,.69,.99),rh=gb(vb),yb=pb(rh),bb=n=>(n*=2)<1?.5*rh(n):.5*(2-Math.pow(2,-10*(n-1))),ch=n=>1-Math.sin(Math.acos(n)),Sb=gb(ch),xb=pb(ch),_b=n=>/^0[^.\s]+$/u.test(n);function LA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||_b(n):!0}const Ql=n=>Math.round(n*1e5)/1e5,uh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function UA(n){return n==null}const zA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dh=(n,a)=>l=>!!(typeof l=="string"&&zA.test(l)&&l.startsWith(n)||a&&!UA(l)&&Object.prototype.hasOwnProperty.call(l,a)),Tb=(n,a,l)=>o=>{if(typeof o!="string")return o;const[r,u,d,m]=o.match(uh);return{[n]:parseFloat(r),[a]:parseFloat(u),[l]:parseFloat(d),alpha:m!==void 0?parseFloat(m):1}},VA=n=>Ba(0,255,n),Md={...Fi,transform:n=>Math.round(VA(n))},Vs={test:dh("rgb","red"),parse:Tb("red","green","blue"),transform:({red:n,green:a,blue:l,alpha:o=1})=>"rgba("+Md.transform(n)+", "+Md.transform(a)+", "+Md.transform(l)+", "+Ql(io.transform(o))+")"};function IA(n){let a="",l="",o="",r="";return n.length>5?(a=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,l+=l,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const of={test:dh("#"),parse:IA,transform:Vs.transform},Oi={test:dh("hsl","hue"),parse:Tb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+ca.transform(Ql(a))+", "+ca.transform(Ql(l))+", "+Ql(io.transform(o))+")"},an={test:n=>Vs.test(n)||of.test(n)||Oi.test(n),parse:n=>Vs.test(n)?Vs.parse(n):Oi.test(n)?Oi.parse(n):of.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Vs.transform(n):Oi.transform(n)},HA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function GA(n){var a,l;return isNaN(n)&&typeof n=="string"&&(((a=n.match(uh))===null||a===void 0?void 0:a.length)||0)+(((l=n.match(HA))===null||l===void 0?void 0:l.length)||0)>0}const Eb="number",Ab="color",PA="var",qA="var(",V0="${}",YA=/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 oo(n){const a=n.toString(),l=[],o={color:[],number:[],var:[]},r=[];let u=0;const m=a.replace(YA,p=>(an.test(p)?(o.color.push(u),r.push(Ab),l.push(an.parse(p))):p.startsWith(qA)?(o.var.push(u),r.push(PA),l.push(p)):(o.number.push(u),r.push(Eb),l.push(parseFloat(p))),++u,V0)).split(V0);return{values:l,split:m,indexes:o,types:r}}function Cb(n){return oo(n).values}function jb(n){const{split:a,types:l}=oo(n),o=a.length;return r=>{let u="";for(let d=0;d<o;d++)if(u+=a[d],r[d]!==void 0){const m=l[d];m===Eb?u+=Ql(r[d]):m===Ab?u+=an.transform(r[d]):u+=r[d]}return u}}const FA=n=>typeof n=="number"?0:n;function KA(n){const a=Cb(n);return jb(n)(a.map(FA))}const fs={test:GA,parse:Cb,createTransformer:jb,getAnimatableNone:KA},$A=new Set(["brightness","contrast","saturate","opacity"]);function ZA(n){const[a,l]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=l.match(uh)||[];if(!o)return n;const r=l.replace(o,"");let u=$A.has(a)?1:0;return o!==l&&(u*=100),a+"("+u+r+")"}const XA=/\b([a-z-]*)\(.*?\)/gu,rf={...fs,getAnimatableNone:n=>{const a=n.match(XA);return a?a.map(ZA).join(" "):n}},QA={...Zf,color:an,backgroundColor:an,outlineColor:an,fill:an,stroke:an,borderColor:an,borderTopColor:an,borderRightColor:an,borderBottomColor:an,borderLeftColor:an,filter:rf,WebkitFilter:rf},fh=n=>QA[n];function Nb(n,a){let l=fh(n);return l!==rf&&(l=fs),l.getAnimatableNone?l.getAnimatableNone(a):void 0}const JA=new Set(["auto","none","0"]);function WA(n,a,l){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!JA.has(u)&&oo(u).values.length&&(r=n[o]),o++}if(r&&l)for(const u of a)n[u]=Nb(l,r)}const I0=n=>n===Fi||n===_e,H0=(n,a)=>parseFloat(n.split(", ")[a]),G0=(n,a)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return H0(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?H0(u[1],n):0}},e2=new Set(["x","y","z"]),t2=Yi.filter(n=>!e2.has(n));function n2(n){const a=[];return t2.forEach(l=>{const o=n.getValue(l);o!==void 0&&(a.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),a}const Gi={width:({x:n},{paddingLeft:a="0",paddingRight:l="0"})=>n.max-n.min-parseFloat(a)-parseFloat(l),height:({y:n},{paddingTop:a="0",paddingBottom:l="0"})=>n.max-n.min-parseFloat(a)-parseFloat(l),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:G0(4,13),y:G0(5,14)};Gi.translateX=Gi.x;Gi.translateY=Gi.y;const Is=new Set;let cf=!1,uf=!1;function wb(){if(uf){const n=Array.from(Is).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),l=new Map;a.forEach(o=>{const r=n2(o);r.length&&(l.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=l.get(o);r&&r.forEach(([u,d])=>{var m;(m=o.getValue(u))===null||m===void 0||m.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}uf=!1,cf=!1,Is.forEach(n=>n.complete()),Is.clear()}function Db(){Is.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(uf=!0)})}function a2(){Db(),wb()}class hh{constructor(a,l,o,r,u,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=l,this.name=o,this.motionValue=r,this.element=u,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Is.add(this),cf||(cf=!0,dt.read(Db),dt.resolveKeyframes(wb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:l,element:o,motionValue:r}=this;for(let u=0;u<a.length;u++)if(a[u]===null)if(u===0){const d=r==null?void 0:r.get(),m=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&l){const p=o.readValue(l,m);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=m),r&&d===void 0&&r.set(a[0])}else a[u]=a[u-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Is.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Is.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const kb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),s2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function i2(n){const a=s2.exec(n);if(!a)return[,];const[,l,o,r]=a;return[`--${l??o}`,r]}function Rb(n,a,l=1){const[o,r]=i2(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return kb(d)?parseFloat(d):d}return $f(r)?Rb(r,a,l+1):r}const Mb=n=>a=>a.test(n),l2={test:n=>n==="auto",parse:n=>n},Ob=[Fi,_e,ca,os,nA,tA,l2],P0=n=>Ob.find(Mb(n));class Bb extends hh{constructor(a,l,o,r,u){super(a,l,o,r,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let p=0;p<a.length;p++){let g=a[p];if(typeof g=="string"&&(g=g.trim(),$f(g))){const y=Rb(g,l.current);y!==void 0&&(a[p]=y),p===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!rb.has(o)||a.length!==2)return;const[r,u]=a,d=P0(r),m=P0(u);if(d!==m)if(I0(d)&&I0(m))for(let p=0;p<a.length;p++){const g=a[p];typeof g=="string"&&(a[p]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:l}=this,o=[];for(let r=0;r<a.length;r++)LA(a[r])&&o.push(r);o.length&&WA(a,o,l)}measureInitialState(){const{element:a,unresolvedKeyframes:l,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),l[0]=this.measuredOrigin;const r=l[l.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:l,name:o,unresolvedKeyframes:r}=this;if(!l||!l.current)return;const u=l.getValue(o);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,m=r[d];r[d]=Gi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([p,g])=>{l.getValue(p).set(g)}),this.resolveNoneKeyframes()}}const q0=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(fs.test(n)||n==="0")&&!n.startsWith("url("));function o2(n){const a=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==a)return!0}function r2(n,a,l,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=q0(r,a),m=q0(u,a);return!d||!m?!1:o2(n)||(l==="spring"||lh(l))&&o}const c2=n=>n!==null;function pc(n,{repeat:a,repeatType:l="loop"},o){const r=n.filter(c2),u=a&&l!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const u2=40;class Lb{constructor({autoplay:a=!0,delay:l=0,type:o="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:d="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ua.now(),this.options={autoplay:a,delay:l,type:o,repeat:r,repeatDelay:u,repeatType:d,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>u2?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&a2(),this._resolved}onKeyframesResolved(a,l){this.resolvedAt=ua.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:m,onUpdate:p,isGenerator:g}=this.options;if(!g&&!r2(a,o,r,u))if(d)this.options.duration=0;else{p&&p(pc(a,this.options,l)),m&&m(),this.resolveFinishedPromise();return}const y=this.initPlayback(a,l);y!==!1&&(this._resolved={keyframes:a,finalKeyframe:l,...y},this.onPostResolved())}onPostResolved(){}then(a,l){return this.currentFinishedPromise.then(a,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const df=2e4;function Ub(n){let a=0;const l=50;let o=n.next(a);for(;!o.done&&a<df;)a+=l,o=n.next(a);return a>=df?1/0:a}const St=(n,a,l)=>n+(a-n)*l;function Od(n,a,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(a-n)*6*l:l<1/2?a:l<2/3?n+(a-n)*(2/3-l)*6:n}function d2({hue:n,saturation:a,lightness:l,alpha:o}){n/=360,a/=100,l/=100;let r=0,u=0,d=0;if(!a)r=u=d=l;else{const m=l<.5?l*(1+a):l+a-l*a,p=2*l-m;r=Od(p,m,n+1/3),u=Od(p,m,n),d=Od(p,m,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Qr(n,a){return l=>l>0?a:n}const Bd=(n,a,l)=>{const o=n*n,r=l*(a*a-o)+o;return r<0?0:Math.sqrt(r)},f2=[of,Vs,Oi],h2=n=>f2.find(a=>a.test(n));function Y0(n){const a=h2(n);if(!a)return!1;let l=a.parse(n);return a===Oi&&(l=d2(l)),l}const F0=(n,a)=>{const l=Y0(n),o=Y0(a);if(!l||!o)return Qr(n,a);const r={...l};return u=>(r.red=Bd(l.red,o.red,u),r.green=Bd(l.green,o.green,u),r.blue=Bd(l.blue,o.blue,u),r.alpha=St(l.alpha,o.alpha,u),Vs.transform(r))},m2=(n,a)=>l=>a(n(l)),po=(...n)=>n.reduce(m2),ff=new Set(["none","hidden"]);function p2(n,a){return ff.has(n)?l=>l<=0?n:a:l=>l>=1?a:n}function g2(n,a){return l=>St(n,a,l)}function mh(n){return typeof n=="number"?g2:typeof n=="string"?$f(n)?Qr:an.test(n)?F0:b2:Array.isArray(n)?zb:typeof n=="object"?an.test(n)?F0:v2:Qr}function zb(n,a){const l=[...n],o=l.length,r=n.map((u,d)=>mh(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)l[d]=r[d](u);return l}}function v2(n,a){const l={...n,...a},o={};for(const r in l)n[r]!==void 0&&a[r]!==void 0&&(o[r]=mh(n[r])(n[r],a[r]));return r=>{for(const u in o)l[u]=o[u](r);return l}}function y2(n,a){var l;const o=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],m=n.indexes[d][r[d]],p=(l=n.values[m])!==null&&l!==void 0?l:0;o[u]=p,r[d]++}return o}const b2=(n,a)=>{const l=fs.createTransformer(a),o=oo(n),r=oo(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?ff.has(n)&&!r.values.length||ff.has(a)&&!o.values.length?p2(n,a):po(zb(y2(o,r),r.values),l):Qr(n,a)};function Vb(n,a,l){return typeof n=="number"&&typeof a=="number"&&typeof l=="number"?St(n,a,l):mh(n)(n,a)}const S2=5;function Ib(n,a,l){const o=Math.max(a-S2,0);return cb(l-n(o),a-o)}const jt={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},Ld=.001;function x2({duration:n=jt.duration,bounce:a=jt.bounce,velocity:l=jt.velocity,mass:o=jt.mass}){let r,u,d=1-a;d=Ba(jt.minDamping,jt.maxDamping,d),n=Ba(jt.minDuration,jt.maxDuration,Ma(n)),d<1?(r=g=>{const y=g*d,b=y*n,_=y-l,T=hf(g,d),j=Math.exp(-b);return Ld-_/T*j},u=g=>{const b=g*d*n,_=b*l+l,T=Math.pow(d,2)*Math.pow(g,2)*n,j=Math.exp(-b),A=hf(Math.pow(g,2),d);return(-r(g)+Ld>0?-1:1)*((_-T)*j)/A}):(r=g=>{const y=Math.exp(-g*n),b=(g-l)*n+1;return-Ld+y*b},u=g=>{const y=Math.exp(-g*n),b=(l-g)*(n*n);return y*b});const m=5/n,p=T2(r,u,m);if(n=Ra(n),isNaN(p))return{stiffness:jt.stiffness,damping:jt.damping,duration:n};{const g=Math.pow(p,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const _2=12;function T2(n,a,l){let o=l;for(let r=1;r<_2;r++)o=o-n(o)/a(o);return o}function hf(n,a){return n*Math.sqrt(1-a*a)}const E2=["duration","bounce"],A2=["stiffness","damping","mass"];function K0(n,a){return a.some(l=>n[l]!==void 0)}function C2(n){let a={velocity:jt.velocity,stiffness:jt.stiffness,damping:jt.damping,mass:jt.mass,isResolvedFromDuration:!1,...n};if(!K0(n,A2)&&K0(n,E2))if(n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),r=o*o,u=2*Ba(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:jt.mass,stiffness:r,damping:u}}else{const l=x2(n);a={...a,...l,mass:jt.mass},a.isResolvedFromDuration=!0}return a}function Hb(n=jt.visualDuration,a=jt.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=l;const u=l.keyframes[0],d=l.keyframes[l.keyframes.length-1],m={done:!1,value:u},{stiffness:p,damping:g,mass:y,duration:b,velocity:_,isResolvedFromDuration:T}=C2({...l,velocity:-Ma(l.velocity||0)}),j=_||0,A=g/(2*Math.sqrt(p*y)),w=d-u,C=Ma(Math.sqrt(p/y)),z=Math.abs(w)<5;o||(o=z?jt.restSpeed.granular:jt.restSpeed.default),r||(r=z?jt.restDelta.granular:jt.restDelta.default);let M;if(A<1){const H=hf(C,A);M=J=>{const W=Math.exp(-A*C*J);return d-W*((j+A*C*w)/H*Math.sin(H*J)+w*Math.cos(H*J))}}else if(A===1)M=H=>d-Math.exp(-C*H)*(w+(j+C*w)*H);else{const H=C*Math.sqrt(A*A-1);M=J=>{const W=Math.exp(-A*C*J),Y=Math.min(H*J,300);return d-W*((j+A*C*w)*Math.sinh(Y)+H*w*Math.cosh(Y))/H}}const X={calculatedDuration:T&&b||null,next:H=>{const J=M(H);if(T)m.done=H>=b;else{let W=0;A<1&&(W=H===0?Ra(j):Ib(M,H,J));const Y=Math.abs(W)<=o,ne=Math.abs(d-J)<=r;m.done=Y&&ne}return m.value=m.done?d:J,m},toString:()=>{const H=Math.min(Ub(X),df),J=db(W=>X.next(H*W).value,H,30);return H+"ms "+J}};return X}function $0({keyframes:n,velocity:a=0,power:l=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:u=500,modifyTarget:d,min:m,max:p,restDelta:g=.5,restSpeed:y}){const b=n[0],_={done:!1,value:b},T=Y=>m!==void 0&&Y<m||p!==void 0&&Y>p,j=Y=>m===void 0?p:p===void 0||Math.abs(m-Y)<Math.abs(p-Y)?m:p;let A=l*a;const w=b+A,C=d===void 0?w:d(w);C!==w&&(A=C-b);const z=Y=>-A*Math.exp(-Y/o),M=Y=>C+z(Y),X=Y=>{const ne=z(Y),ge=M(Y);_.done=Math.abs(ne)<=g,_.value=_.done?C:ge};let H,J;const W=Y=>{T(_.value)&&(H=Y,J=Hb({keyframes:[_.value,j(_.value)],velocity:Ib(M,Y,_.value),damping:r,stiffness:u,restDelta:g,restSpeed:y}))};return W(0),{calculatedDuration:null,next:Y=>{let ne=!1;return!J&&H===void 0&&(ne=!0,X(Y),W(Y)),H!==void 0&&Y>=H?J.next(Y-H):(!ne&&X(Y),_)}}}const j2=mo(.42,0,1,1),N2=mo(0,0,.58,1),Gb=mo(.42,0,.58,1),w2=n=>Array.isArray(n)&&typeof n[0]!="number",D2={linear:wn,easeIn:j2,easeInOut:Gb,easeOut:N2,circIn:ch,circInOut:xb,circOut:Sb,backIn:rh,backInOut:yb,backOut:vb,anticipate:bb},Z0=n=>{if(oh(n)){Gy(n.length===4);const[a,l,o,r]=n;return mo(a,l,o,r)}else if(typeof n=="string")return D2[n];return n};function k2(n,a,l){const o=[],r=l||Vb,u=n.length-1;for(let d=0;d<u;d++){let m=r(n[d],n[d+1]);if(a){const p=Array.isArray(a)?a[d]||wn:a;m=po(p,m)}o.push(m)}return o}function R2(n,a,{clamp:l=!0,ease:o,mixer:r}={}){const u=n.length;if(Gy(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const m=k2(a,o,r),p=m.length,g=y=>{if(d&&y<n[0])return a[0];let b=0;if(p>1)for(;b<n.length-2&&!(y<n[b+1]);b++);const _=Hi(n[b],n[b+1],y);return m[b](_)};return l?y=>g(Ba(n[0],n[u-1],y)):g}function M2(n,a){const l=n[n.length-1];for(let o=1;o<=a;o++){const r=Hi(0,a,o);n.push(St(l,1,r))}}function O2(n){const a=[0];return M2(a,n.length-1),a}function B2(n,a){return n.map(l=>l*a)}function L2(n,a){return n.map(()=>a||Gb).splice(0,n.length-1)}function Jr({duration:n=300,keyframes:a,times:l,ease:o="easeInOut"}){const r=w2(o)?o.map(Z0):Z0(o),u={done:!1,value:a[0]},d=B2(l&&l.length===a.length?l:O2(a),n),m=R2(d,a,{ease:Array.isArray(r)?r:L2(a,r)});return{calculatedDuration:n,next:p=>(u.value=m(p),u.done=p>=n,u)}}const U2=n=>{const a=({timestamp:l})=>n(l);return{start:()=>dt.update(a,!0),stop:()=>ds(a),now:()=>en.isProcessing?en.timestamp:ua.now()}},z2={decay:$0,inertia:$0,tween:Jr,keyframes:Jr,spring:Hb},V2=n=>n/100;class ph extends Lb{constructor(a){super(a),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:p}=this.options;p&&p()};const{name:l,motionValue:o,element:r,keyframes:u}=this.options,d=(r==null?void 0:r.KeyframeResolver)||hh,m=(p,g)=>this.onKeyframesResolved(p,g);this.resolver=new d(u,m,l,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:l="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:u,velocity:d=0}=this.options,m=lh(l)?l:z2[l]||Jr;let p,g;m!==Jr&&typeof a[0]!="number"&&(p=po(V2,Vb(a[0],a[1])),a=[0,100]);const y=m({...this.options,keyframes:a});u==="mirror"&&(g=m({...this.options,keyframes:[...a].reverse(),velocity:-d})),y.calculatedDuration===null&&(y.calculatedDuration=Ub(y));const{calculatedDuration:b}=y,_=b+r,T=_*(o+1)-r;return{generator:y,mirroredGenerator:g,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,l=!1){const{resolved:o}=this;if(!o){const{keyframes:Y}=this.options;return{done:!0,value:Y[Y.length-1]}}const{finalKeyframe:r,generator:u,mirroredGenerator:d,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:g,totalDuration:y,resolvedDuration:b}=o;if(this.startTime===null)return u.next(0);const{delay:_,repeat:T,repeatType:j,repeatDelay:A,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-y/this.speed,this.startTime)),l?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const C=this.currentTime-_*(this.speed>=0?1:-1),z=this.speed>=0?C<0:C>y;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let M=this.currentTime,X=u;if(T){const Y=Math.min(this.currentTime,y)/b;let ne=Math.floor(Y),ge=Y%1;!ge&&Y>=1&&(ge=1),ge===1&&ne--,ne=Math.min(ne,T+1),!!(ne%2)&&(j==="reverse"?(ge=1-ge,A&&(ge-=A/b)):j==="mirror"&&(X=d)),M=Ba(0,1,ge)*b}const H=z?{done:!1,value:p[0]}:X.next(M);m&&(H.value=m(H.value));let{done:J}=H;!z&&g!==null&&(J=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&J);return W&&r!==void 0&&(H.value=pc(p,this.options,r)),w&&w(H.value),W&&this.finish(),H}get duration(){const{resolved:a}=this;return a?Ma(a.calculatedDuration):0}get time(){return Ma(this.currentTime)}set time(a){a=Ra(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const l=this.playbackSpeed!==a;this.playbackSpeed=a,l&&(this.time=Ma(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=U2,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),l&&l();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}}const I2=new Set(["opacity","clipPath","filter","transform"]);function H2(n,a,l,{delay:o=0,duration:r=300,repeat:u=0,repeatType:d="loop",ease:m="easeInOut",times:p}={}){const g={[a]:l};p&&(g.offset=p);const y=hb(m,r);return Array.isArray(y)&&(g.easing=y),n.animate(g,{delay:o,duration:r,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"})}const G2=ih(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Wr=10,P2=2e4;function q2(n){return lh(n.type)||n.type==="spring"||!fb(n.ease)}function Y2(n,a){const l=new ph({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let u=0;for(;!o.done&&u<P2;)o=l.sample(u),r.push(o.value),u+=Wr;return{times:void 0,keyframes:r,duration:u-Wr,ease:"linear"}}const Pb={anticipate:bb,backInOut:yb,circInOut:xb};function F2(n){return n in Pb}class X0 extends Lb{constructor(a){super(a);const{name:l,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new Bb(u,(d,m)=>this.onKeyframesResolved(d,m),l,o,r),this.resolver.scheduleResolve()}initPlayback(a,l){let{duration:o=300,times:r,ease:u,type:d,motionValue:m,name:p,startTime:g}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof u=="string"&&Xr()&&F2(u)&&(u=Pb[u]),q2(this.options)){const{onComplete:b,onUpdate:_,motionValue:T,element:j,...A}=this.options,w=Y2(a,A);a=w.keyframes,a.length===1&&(a[1]=a[0]),o=w.duration,r=w.times,u=w.ease,d="keyframes"}const y=H2(m.owner.current,p,a,{...this.options,duration:o,times:r,ease:u});return y.startTime=g??this.calcStartTime(),this.pendingTimeline?(z0(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:b}=this.options;m.set(pc(a,this.options,l)),b&&b(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:r,type:d,ease:u,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:l}=a;return Ma(l)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:l}=a;return Ma(l.currentTime||0)}set time(a){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=Ra(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:l}=a;return l.playbackRate}set speed(a){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:l}=a;return l.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:l}=a;return l.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:l}=this;if(!l)return wn;const{animation:o}=l;z0(o,a)}return wn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:l}=a;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:l}=a;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:l,keyframes:o,duration:r,type:u,ease:d,times:m}=a;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:y,onComplete:b,element:_,...T}=this.options,j=new ph({...T,keyframes:o,duration:r,type:u,ease:d,times:m,isGenerator:!0}),A=Ra(this.time);g.setWithVelocity(j.sample(A-Wr).value,j.sample(A).value,Wr)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:l,name:o,repeatDelay:r,repeatType:u,damping:d,type:m}=a;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:g}=l.owner.getProps();return G2()&&o&&I2.has(o)&&!p&&!g&&!r&&u!=="mirror"&&d!==0&&m!=="inertia"}}const K2={type:"spring",stiffness:500,damping:25,restSpeed:10},$2=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Z2={type:"keyframes",duration:.8},X2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Q2=(n,{keyframes:a})=>a.length>2?Z2:Ys.has(n)?n.startsWith("scale")?$2(a[1]):K2:X2;function J2({when:n,delay:a,delayChildren:l,staggerChildren:o,staggerDirection:r,repeat:u,repeatType:d,repeatDelay:m,from:p,elapsed:g,...y}){return!!Object.keys(y).length}const gh=(n,a,l,o={},r,u)=>d=>{const m=th(o,n)||{},p=m.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ra(p);let y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:a.getVelocity(),...m,delay:-g,onUpdate:_=>{a.set(_),m.onUpdate&&m.onUpdate(_)},onComplete:()=>{d(),m.onComplete&&m.onComplete()},name:n,motionValue:a,element:u?void 0:r};J2(m)||(y={...y,...Q2(n,y)}),y.duration&&(y.duration=Ra(y.duration)),y.repeatDelay&&(y.repeatDelay=Ra(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&&!u&&a.get()!==void 0){const _=pc(y.keyframes,m);if(_!==void 0)return dt.update(()=>{y.onUpdate(_),y.onComplete()}),new DA([])}return!u&&X0.supports(y)?new X0(y):new ph(y)};function W2({protectedKeys:n,needsAnimating:a},l){const o=n.hasOwnProperty(l)&&a[l]!==!0;return a[l]=!1,o}function qb(n,a,{delay:l=0,transitionOverride:o,type:r}={}){var u;let{transition:d=n.getDefaultTransition(),transitionEnd:m,...p}=a;o&&(d=o);const g=[],y=r&&n.animationState&&n.animationState.getState()[r];for(const b in p){const _=n.getValue(b,(u=n.latestValues[b])!==null&&u!==void 0?u:null),T=p[b];if(T===void 0||y&&W2(y,b))continue;const j={delay:l,...th(d||{},b)};let A=!1;if(window.MotionHandoffAnimation){const C=ub(n);if(C){const z=window.MotionHandoffAnimation(C,b,dt);z!==null&&(j.startTime=z,A=!0)}}sf(n,b),_.start(gh(b,_,T,n.shouldReduceMotion&&rb.has(b)?{type:!1}:j,n,A));const w=_.animation;w&&g.push(w)}return m&&Promise.all(g).then(()=>{dt.update(()=>{m&&CA(n,m)})}),g}function mf(n,a,l={}){var o;const r=mc(n,a,l.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};l.transitionOverride&&(u=l.transitionOverride);const d=r?()=>Promise.all(qb(n,r,l)):()=>Promise.resolve(),m=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:b,staggerDirection:_}=u;return eC(n,a,y+g,b,_,l)}:()=>Promise.resolve(),{when:p}=u;if(p){const[g,y]=p==="beforeChildren"?[d,m]:[m,d];return g().then(()=>y())}else return Promise.all([d(),m(l.delay)])}function eC(n,a,l=0,o=0,r=1,u){const d=[],m=(n.variantChildren.size-1)*o,p=r===1?(g=0)=>g*o:(g=0)=>m-g*o;return Array.from(n.variantChildren).sort(tC).forEach((g,y)=>{g.notify("AnimationStart",a),d.push(mf(g,a,{...u,delay:l+p(y)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function tC(n,a){return n.sortNodePosition(a)}function nC(n,a,l={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>mf(n,u,l));o=Promise.all(r)}else if(typeof a=="string")o=mf(n,a,l);else{const r=typeof a=="function"?mc(n,a,l.custom):a;o=Promise.all(qb(n,r,l))}return o.then(()=>{n.notify("AnimationComplete",a)})}const aC=Pf.length;function Yb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?Yb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const a={};for(let l=0;l<aC;l++){const o=Pf[l],r=n.props[o];(so(r)||r===!1)&&(a[o]=r)}return a}const sC=[...Gf].reverse(),iC=Gf.length;function lC(n){return a=>Promise.all(a.map(({animation:l,options:o})=>nC(n,l,o)))}function oC(n){let a=lC(n),l=Q0(),o=!0;const r=p=>(g,y)=>{var b;const _=mc(n,y,p==="exit"?(b=n.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(_){const{transition:T,transitionEnd:j,...A}=_;g={...g,...A,...j}}return g};function u(p){a=p(n)}function d(p){const{props:g}=n,y=Yb(n.parent)||{},b=[],_=new Set;let T={},j=1/0;for(let w=0;w<iC;w++){const C=sC[w],z=l[C],M=g[C]!==void 0?g[C]:y[C],X=so(M),H=C===p?z.isActive:null;H===!1&&(j=w);let J=M===y[C]&&M!==g[C]&&X;if(J&&o&&n.manuallyAnimateOnMount&&(J=!1),z.protectedKeys={...T},!z.isActive&&H===null||!M&&!z.prevProp||fc(M)||typeof M=="boolean")continue;const W=rC(z.prevProp,M);let Y=W||C===p&&z.isActive&&!J&&X||w>j&&X,ne=!1;const ge=Array.isArray(M)?M:[M];let U=ge.reduce(r(C),{});H===!1&&(U={});const{prevResolvedValues:pe={}}=z,te={...pe,...U},ye=K=>{Y=!0,_.has(K)&&(ne=!0,_.delete(K)),z.needsAnimating[K]=!0;const ee=n.getValue(K);ee&&(ee.liveStyle=!1)};for(const K in te){const ee=U[K],ke=pe[K];if(T.hasOwnProperty(K))continue;let je=!1;af(ee)&&af(ke)?je=!ob(ee,ke):je=ee!==ke,je?ee!=null?ye(K):_.add(K):ee!==void 0&&_.has(K)?ye(K):z.protectedKeys[K]=!0}z.prevProp=M,z.prevResolvedValues=U,z.isActive&&(T={...T,...U}),o&&n.blockInitialAnimation&&(Y=!1),Y&&(!(J&&W)||ne)&&b.push(...ge.map(K=>({animation:K,options:{type:C}})))}if(_.size){const w={};_.forEach(C=>{const z=n.getBaseTarget(C),M=n.getValue(C);M&&(M.liveStyle=!0),w[C]=z??null}),b.push({animation:w})}let A=!!b.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(A=!1),o=!1,A?a(b):Promise.resolve()}function m(p,g){var y;if(l[p].isActive===g)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,g)}),l[p].isActive=g;const b=d(p);for(const _ in l)l[_].protectedKeys={};return b}return{animateChanges:d,setActive:m,setAnimateFunction:u,getState:()=>l,reset:()=>{l=Q0(),o=!0}}}function rC(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!ob(a,n):!1}function Os(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Q0(){return{animate:Os(!0),whileInView:Os(),whileHover:Os(),whileTap:Os(),whileDrag:Os(),whileFocus:Os(),exit:Os()}}class hs{constructor(a){this.isMounted=!1,this.node=a}update(){}}class cC extends hs{constructor(a){super(a),a.animationState||(a.animationState=oC(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();fc(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:l}=this.node.prevProps||{};a!==l&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)===null||a===void 0||a.call(this)}}let uC=0;class dC extends hs{constructor(){super(...arguments),this.id=uC++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const r=this.node.animationState.setActive("exit",!a);l&&!a&&r.then(()=>l(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const fC={animation:{Feature:cC},exit:{Feature:dC}},Wn={x:!1,y:!1};function Fb(){return Wn.x||Wn.y}function hC(n){return n==="x"||n==="y"?Wn[n]?null:(Wn[n]=!0,()=>{Wn[n]=!1}):Wn.x||Wn.y?null:(Wn.x=Wn.y=!0,()=>{Wn.x=Wn.y=!1})}const vh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function ro(n,a,l,o={passive:!0}){return n.addEventListener(a,l,o),()=>n.removeEventListener(a,l)}function go(n){return{point:{x:n.pageX,y:n.pageY}}}const mC=n=>a=>vh(a)&&n(a,go(a));function Jl(n,a,l,o){return ro(n,a,mC(l),o)}const J0=(n,a)=>Math.abs(n-a);function pC(n,a){const l=J0(n.x,a.x),o=J0(n.y,a.y);return Math.sqrt(l**2+o**2)}class Kb{constructor(a,l,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:u=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=zd(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=pC(b.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:j}=b,{timestamp:A}=en;this.history.push({...j,timestamp:A});const{onStart:w,onMove:C}=this.handlers;_||(w&&w(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Ud(_,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:T,onSessionEnd:j,resumeAnimation:A}=this.handlers;if(this.dragSnapToOrigin&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=zd(b.type==="pointercancel"?this.lastMoveEventInfo:Ud(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,w),j&&j(b,w)},!vh(a))return;this.dragSnapToOrigin=u,this.handlers=l,this.transformPagePoint=o,this.contextWindow=r||window;const d=go(a),m=Ud(d,this.transformPagePoint),{point:p}=m,{timestamp:g}=en;this.history=[{...p,timestamp:g}];const{onSessionStart:y}=l;y&&y(a,zd(m,this.history)),this.removeListeners=po(Jl(this.contextWindow,"pointermove",this.handlePointerMove),Jl(this.contextWindow,"pointerup",this.handlePointerUp),Jl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),ds(this.updatePoint)}}function Ud(n,a){return a?{point:a(n.point)}:n}function W0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function zd({point:n},a){return{point:n,delta:W0(n,$b(a)),offset:W0(n,gC(a)),velocity:vC(a,.1)}}function gC(n){return n[0]}function $b(n){return n[n.length-1]}function vC(n,a){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const r=$b(n);for(;l>=0&&(o=n[l],!(r.timestamp-o.timestamp>Ra(a)));)l--;if(!o)return{x:0,y:0};const u=Ma(r.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(r.x-o.x)/u,y:(r.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const Zb=1e-4,yC=1-Zb,bC=1+Zb,Xb=.01,SC=0-Xb,xC=0+Xb;function Dn(n){return n.max-n.min}function _C(n,a,l){return Math.abs(n-a)<=l}function ev(n,a,l,o=.5){n.origin=o,n.originPoint=St(a.min,a.max,n.origin),n.scale=Dn(l)/Dn(a),n.translate=St(l.min,l.max,n.origin)-n.originPoint,(n.scale>=yC&&n.scale<=bC||isNaN(n.scale))&&(n.scale=1),(n.translate>=SC&&n.translate<=xC||isNaN(n.translate))&&(n.translate=0)}function Wl(n,a,l,o){ev(n.x,a.x,l.x,o?o.originX:void 0),ev(n.y,a.y,l.y,o?o.originY:void 0)}function tv(n,a,l){n.min=l.min+a.min,n.max=n.min+Dn(a)}function TC(n,a,l){tv(n.x,a.x,l.x),tv(n.y,a.y,l.y)}function nv(n,a,l){n.min=a.min-l.min,n.max=n.min+Dn(a)}function eo(n,a,l){nv(n.x,a.x,l.x),nv(n.y,a.y,l.y)}function EC(n,{min:a,max:l},o){return a!==void 0&&n<a?n=o?St(a,n,o.min):Math.max(n,a):l!==void 0&&n>l&&(n=o?St(l,n,o.max):Math.min(n,l)),n}function av(n,a,l){return{min:a!==void 0?n.min+a:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function AC(n,{top:a,left:l,bottom:o,right:r}){return{x:av(n.x,l,r),y:av(n.y,a,o)}}function sv(n,a){let l=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function CC(n,a){return{x:sv(n.x,a.x),y:sv(n.y,a.y)}}function jC(n,a){let l=.5;const o=Dn(n),r=Dn(a);return r>o?l=Hi(a.min,a.max-o,n.min):o>r&&(l=Hi(n.min,n.max-r,a.min)),Ba(0,1,l)}function NC(n,a){const l={};return a.min!==void 0&&(l.min=a.min-n.min),a.max!==void 0&&(l.max=a.max-n.min),l}const pf=.35;function wC(n=pf){return n===!1?n=0:n===!0&&(n=pf),{x:iv(n,"left","right"),y:iv(n,"top","bottom")}}function iv(n,a,l){return{min:lv(n,a),max:lv(n,l)}}function lv(n,a){return typeof n=="number"?n:n[a]||0}const ov=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bi=()=>({x:ov(),y:ov()}),rv=()=>({min:0,max:0}),Ot=()=>({x:rv(),y:rv()});function qn(n){return[n("x"),n("y")]}function Qb({top:n,left:a,right:l,bottom:o}){return{x:{min:a,max:l},y:{min:n,max:o}}}function DC({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function kC(n,a){if(!a)return n;const l=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Vd(n){return n===void 0||n===1}function gf({scale:n,scaleX:a,scaleY:l}){return!Vd(n)||!Vd(a)||!Vd(l)}function Ls(n){return gf(n)||Jb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Jb(n){return cv(n.x)||cv(n.y)}function cv(n){return n&&n!=="0%"}function ec(n,a,l){const o=n-l,r=a*o;return l+r}function uv(n,a,l,o,r){return r!==void 0&&(n=ec(n,r,o)),ec(n,l,o)+a}function vf(n,a=0,l=1,o,r){n.min=uv(n.min,a,l,o,r),n.max=uv(n.max,a,l,o,r)}function Wb(n,{x:a,y:l}){vf(n.x,a.translate,a.scale,a.originPoint),vf(n.y,l.translate,l.scale,l.originPoint)}const dv=.999999999999,fv=1.0000000000001;function RC(n,a,l,o=!1){const r=l.length;if(!r)return;a.x=a.y=1;let u,d;for(let m=0;m<r;m++){u=l[m],d=u.projectionDelta;const{visualElement:p}=u.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ui(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,Wb(n,d)),o&&Ls(u.latestValues)&&Ui(n,u.latestValues))}a.x<fv&&a.x>dv&&(a.x=1),a.y<fv&&a.y>dv&&(a.y=1)}function Li(n,a){n.min=n.min+a,n.max=n.max+a}function hv(n,a,l,o,r=.5){const u=St(n.min,n.max,r);vf(n,a,l,u,o)}function Ui(n,a){hv(n.x,a.x,a.scaleX,a.scale,a.originX),hv(n.y,a.y,a.scaleY,a.scale,a.originY)}function e1(n,a){return Qb(kC(n.getBoundingClientRect(),a))}function MC(n,a,l){const o=e1(n,l),{scroll:r}=a;return r&&(Li(o.x,r.offset.x),Li(o.y,r.offset.y)),o}const t1=({current:n})=>n?n.ownerDocument.defaultView:null,OC=new WeakMap;class BC{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ot(),this.visualElement=a}start(a,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=y=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(go(y).point)},u=(y,b)=>{const{drag:_,dragPropagation:T,onDragStart:j}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hC(_),!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),qn(w=>{let C=this.getAxisMotionValue(w).get()||0;if(ca.test(C)){const{projection:z}=this.visualElement;if(z&&z.layout){const M=z.layout.layoutBox[w];M&&(C=Dn(M)*(parseFloat(C)/100))}}this.originPoint[w]=C}),j&&dt.postRender(()=>j(y,b)),sf(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},d=(y,b)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:j,onDrag:A}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:w}=b;if(T&&this.currentDirection===null){this.currentDirection=LC(w),this.currentDirection!==null&&j&&j(this.currentDirection);return}this.updateAxis("x",b.point,w),this.updateAxis("y",b.point,w),this.visualElement.render(),A&&A(y,b)},m=(y,b)=>this.stop(y,b),p=()=>qn(y=>{var b;return this.getAnimationState(y)==="paused"&&((b=this.getAxisMotionValue(y).animation)===null||b===void 0?void 0:b.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Kb(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:t1(this.visualElement)})}stop(a,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=l;this.startAnimation(r);const{onDragEnd:u}=this.getProps();u&&dt.postRender(()=>u(a,l))}cancel(){this.isDragging=!1;const{projection:a,animationState:l}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(a,l,o){const{drag:r}=this.getProps();if(!o||!Lr(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=EC(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){var a;const{dragConstraints:l,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,u=this.constraints;l&&Mi(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&r?this.constraints=AC(r.layoutBox,l):this.constraints=!1,this.elastic=wC(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&qn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=NC(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:l}=this.getProps();if(!a||!Mi(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=MC(o,r.root,this.visualElement.getTransformPagePoint());let d=CC(r.layout.layoutBox,u);if(l){const m=l(DC(d));this.hasMutatedConstraints=!!m,m&&(d=Qb(m))}return d}startAnimation(a){const{drag:l,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},g=qn(y=>{if(!Lr(y,l,this.currentDirection))return;let b=p&&p[y]||{};d&&(b={min:0,max:0});const _=r?200:1e6,T=r?40:1e7,j={type:"inertia",velocity:o?a[y]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...b};return this.startAxisValueAnimation(y,j)});return Promise.all(g).then(m)}startAxisValueAnimation(a,l){const o=this.getAxisMotionValue(a);return sf(this.visualElement,a),o.start(gh(a,o,0,l,this.visualElement,!1))}stopAnimation(){qn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){qn(a=>{var l;return(l=this.getAxisMotionValue(a).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(a){var l;return(l=this.getAxisMotionValue(a).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(a){const l=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[l];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){qn(l=>{const{drag:o}=this.getProps();if(!Lr(l,o,this.currentDirection))return;const{projection:r}=this.visualElement,u=this.getAxisMotionValue(l);if(r&&r.layout){const{min:d,max:m}=r.layout.layoutBox[l];u.set(a[l]-St(d,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!Mi(l)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};qn(d=>{const m=this.getAxisMotionValue(d);if(m&&this.constraints!==!1){const p=m.get();r[d]=jC({min:p,max:p},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),qn(d=>{if(!Lr(d,a,null))return;const m=this.getAxisMotionValue(d),{min:p,max:g}=this.constraints[d];m.set(St(p,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;OC.set(this.visualElement,this);const a=this.visualElement.current,l=Jl(a,"pointerdown",p=>{const{drag:g,dragListener:y=!0}=this.getProps();g&&y&&this.start(p)}),o=()=>{const{dragConstraints:p}=this.getProps();Mi(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,u=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),dt.read(o);const d=ro(window,"resize",()=>this.scalePositionWithinConstraints()),m=r.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:g})=>{this.isDragging&&g&&(qn(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=p[y].translate,b.set(b.get()+p[y].translate))}),this.visualElement.render())}));return()=>{d(),l(),u(),m&&m()}}getProps(){const a=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:u=!1,dragElastic:d=pf,dragMomentum:m=!0}=a;return{...a,drag:l,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:m}}}function Lr(n,a,l){return(a===!0||a===n)&&(l===null||l===n)}function LC(n,a=10){let l=null;return Math.abs(n.y)>a?l="y":Math.abs(n.x)>a&&(l="x"),l}class UC extends hs{constructor(a){super(a),this.removeGroupControls=wn,this.removeListeners=wn,this.controls=new BC(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wn}unmount(){this.removeGroupControls(),this.removeListeners()}}const mv=n=>(a,l)=>{n&&dt.postRender(()=>n(a,l))};class zC extends hs{constructor(){super(...arguments),this.removePointerDownListener=wn}onPointerDown(a){this.session=new Kb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:t1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:l,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:mv(a),onStart:mv(l),onMove:o,onEnd:(u,d)=>{delete this.session,r&&dt.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=Jl(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Fr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Pl={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(_e.test(n))n=parseFloat(n);else return n;const l=pv(n,a.target.x),o=pv(n,a.target.y);return`${l}% ${o}%`}},VC={correct:(n,{treeScale:a,projectionDelta:l})=>{const o=n,r=fs.parse(n);if(r.length>5)return o;const u=fs.createTransformer(n),d=typeof r[0]!="number"?1:0,m=l.x.scale*a.x,p=l.y.scale*a.y;r[0+d]/=m,r[1+d]/=p;const g=St(m,p,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),u(r)}};class IC extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;fA(HC),u&&(l.group&&l.group.add(u),o&&o.register&&r&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),Fr.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:l,visualElement:o,drag:r,isPresent:u}=this.props,d=o.projection;return d&&(d.isPresent=u,r||a.layoutDependency!==l||l===void 0?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||dt.postRender(()=>{const m=d.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Yf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function n1(n){const[a,l]=Iy(),o=S.useContext(zf);return h.jsx(IC,{...n,layoutGroup:o,switchLayoutGroup:S.useContext($y),isPresent:a,safeToRemove:l})}const HC={borderRadius:{...Pl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pl,borderTopRightRadius:Pl,borderBottomLeftRadius:Pl,borderBottomRightRadius:Pl,boxShadow:VC};function GC(n,a,l){const o=sn(n)?n:lo(n);return o.start(gh("",o,a,l)),o.animation}function PC(n){return n instanceof SVGElement&&n.tagName!=="svg"}const qC=(n,a)=>n.depth-a.depth;class YC{constructor(){this.children=[],this.isDirty=!1}add(a){nh(this.children,a),this.isDirty=!0}remove(a){ah(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(qC),this.isDirty=!1,this.children.forEach(a)}}function FC(n,a){const l=ua.now(),o=({timestamp:r})=>{const u=r-l;u>=a&&(ds(o),n(u-a))};return dt.read(o,!0),()=>ds(o)}const a1=["TopLeft","TopRight","BottomLeft","BottomRight"],KC=a1.length,gv=n=>typeof n=="string"?parseFloat(n):n,vv=n=>typeof n=="number"||_e.test(n);function $C(n,a,l,o,r,u){r?(n.opacity=St(0,l.opacity!==void 0?l.opacity:1,ZC(o)),n.opacityExit=St(a.opacity!==void 0?a.opacity:1,0,XC(o))):u&&(n.opacity=St(a.opacity!==void 0?a.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let d=0;d<KC;d++){const m=`border${a1[d]}Radius`;let p=yv(a,m),g=yv(l,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||vv(p)===vv(g)?(n[m]=Math.max(St(gv(p),gv(g),o),0),(ca.test(g)||ca.test(p))&&(n[m]+="%")):n[m]=g}(a.rotate||l.rotate)&&(n.rotate=St(a.rotate||0,l.rotate||0,o))}function yv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const ZC=s1(0,.5,Sb),XC=s1(.5,.95,wn);function s1(n,a,l){return o=>o<n?0:o>a?1:l(Hi(n,a,o))}function bv(n,a){n.min=a.min,n.max=a.max}function Pn(n,a){bv(n.x,a.x),bv(n.y,a.y)}function Sv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function xv(n,a,l,o,r){return n-=a,n=ec(n,1/l,o),r!==void 0&&(n=ec(n,1/r,o)),n}function QC(n,a=0,l=1,o=.5,r,u=n,d=n){if(ca.test(a)&&(a=parseFloat(a),a=St(d.min,d.max,a/100)-d.min),typeof a!="number")return;let m=St(u.min,u.max,o);n===u&&(m-=a),n.min=xv(n.min,a,l,m,r),n.max=xv(n.max,a,l,m,r)}function _v(n,a,[l,o,r],u,d){QC(n,a[l],a[o],a[r],a.scale,u,d)}const JC=["x","scaleX","originX"],WC=["y","scaleY","originY"];function Tv(n,a,l,o){_v(n.x,a,JC,l?l.x:void 0,o?o.x:void 0),_v(n.y,a,WC,l?l.y:void 0,o?o.y:void 0)}function Ev(n){return n.translate===0&&n.scale===1}function i1(n){return Ev(n.x)&&Ev(n.y)}function Av(n,a){return n.min===a.min&&n.max===a.max}function ej(n,a){return Av(n.x,a.x)&&Av(n.y,a.y)}function Cv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function l1(n,a){return Cv(n.x,a.x)&&Cv(n.y,a.y)}function jv(n){return Dn(n.x)/Dn(n.y)}function Nv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class tj{constructor(){this.members=[]}add(a){nh(this.members,a),a.scheduleRender()}remove(a){if(ah(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(a){const l=this.members.findIndex(r=>a===r);if(l===0)return!1;let o;for(let r=l;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(a,l){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,l&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:l,resumingFrom:o}=a;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function nj(n,a,l){let o="";const r=n.x.translate/a.x,u=n.y.translate/a.y,d=(l==null?void 0:l.z)||0;if((r||u||d)&&(o=`translate3d(${r}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),l){const{transformPerspective:g,rotate:y,rotateX:b,rotateY:_,skewX:T,skewY:j}=l;g&&(o=`perspective(${g}px) ${o}`),y&&(o+=`rotate(${y}deg) `),b&&(o+=`rotateX(${b}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),j&&(o+=`skewY(${j}deg) `)}const m=n.x.scale*a.x,p=n.y.scale*a.y;return(m!==1||p!==1)&&(o+=`scale(${m}, ${p})`),o||"none"}const Us={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Kl=typeof window<"u"&&window.MotionDebug!==void 0,Id=["","X","Y","Z"],aj={visibility:"hidden"},wv=1e3;let sj=0;function Hd(n,a,l,o){const{latestValues:r}=a;r[n]&&(l[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function o1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const l=ub(a);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:r,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",dt,!(r||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&o1(o)}function r1({attachResizeListener:n,defaultParent:a,measureScroll:l,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},m=a==null?void 0:a()){this.id=sj++,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,Kl&&(Us.totalNodes=Us.resolvedTargetDeltas=Us.recalculatedProjection=0),this.nodes.forEach(oj),this.nodes.forEach(fj),this.nodes.forEach(hj),this.nodes.forEach(rj),Kl&&window.MotionDebug.record(Us)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new YC)}addEventListener(d,m){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new sh),this.eventHandlers.get(d).add(m)}notifyListeners(d,...m){const p=this.eventHandlers.get(d);p&&p.notify(...m)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=PC(d),this.instance=d;const{layoutId:p,layout:g,visualElement:y}=this.options;if(y&&!y.current&&y.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(g||p)&&(this.isLayoutDirty=!0),n){let b;const _=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=FC(_,250),Fr.hasAnimatedSinceResize&&(Fr.hasAnimatedSinceResize=!1,this.nodes.forEach(kv))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&y&&(p||g)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||y.getDefaultTransition()||yj,{onLayoutAnimationStart:w,onLayoutAnimationComplete:C}=y.getProps(),z=!this.targetLayout||!l1(this.targetLayout,j)||T,M=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||M||_&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,M);const X={...th(A,"layout"),onPlay:w,onComplete:C};(y.shouldReduceMotion||this.options.layoutRoot)&&(X.delay=0,X.type=!1),this.startAnimation(X)}else _||kv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ds(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(mj),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&o1(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 g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Dv);return}this.isUpdating||this.nodes.forEach(uj),this.isUpdating=!1,this.nodes.forEach(dj),this.nodes.forEach(ij),this.nodes.forEach(lj),this.clearAllSnapshots();const m=ua.now();en.delta=Ba(0,1e3/60,m-en.timestamp),en.timestamp=m,en.isProcessing=!0,Rd.update.process(en),Rd.preRender.process(en),Rd.render.process(en),en.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cj),this.sharedNodes.forEach(pj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ot(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(m=!1),m){const p=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:p,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!i1(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;d&&(m||Ls(this.latestValues)||y)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return d&&(p=this.removeTransform(p)),bj(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:m}=this.options;if(!m)return Ot();const p=m.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(Sj))){const{scroll:y}=this.root;y&&(Li(p.x,y.offset.x),Li(p.y,y.offset.y))}return p}removeElementScroll(d){var m;const p=Ot();if(Pn(p,d),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const y=this.path[g],{scroll:b,options:_}=y;y!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&Pn(p,d),Li(p.x,b.offset.x),Li(p.y,b.offset.y))}return p}applyTransform(d,m=!1){const p=Ot();Pn(p,d);for(let g=0;g<this.path.length;g++){const y=this.path[g];!m&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Ui(p,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Ls(y.latestValues)&&Ui(p,y.latestValues)}return Ls(this.latestValues)&&Ui(p,this.latestValues),p}removeTransform(d){const m=Ot();Pn(m,d);for(let p=0;p<this.path.length;p++){const g=this.path[p];if(!g.instance||!Ls(g.latestValues))continue;gf(g.latestValues)&&g.updateSnapshot();const y=Ot(),b=g.measurePageBox();Pn(y,b),Tv(m,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,y)}return Ls(this.latestValues)&&Tv(m,this.latestValues),m}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==en.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var m;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==p;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!(!this.layout||!(b||_))){if(this.resolvedRelativeTargetAt=en.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),eo(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ot(),this.targetWithTransforms=Ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),TC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Pn(this.target,this.layout.layoutBox),Wb(this.target,this.targetDelta)):Pn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),eo(this.relativeTargetOrigin,this.target,T.target),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Kl&&Us.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||gf(this.parent.latestValues)||Jb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var d;const m=this.getLead(),p=!!this.resumingFrom||this!==m;let g=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(g=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===en.timestamp&&(g=!1),g)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;Pn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;RC(this.layoutCorrected,this.treeScale,this.path,p),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=Ot());const{target:j}=m;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sv(this.prevProjectionDelta.x,this.projectionDelta.x),Sv(this.prevProjectionDelta.y,this.projectionDelta.y)),Wl(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!Nv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Nv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j)),Kl&&Us.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),d){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bi(),this.projectionDelta=Bi(),this.projectionDeltaWithTransform=Bi()}setAnimationOrigin(d,m=!1){const p=this.snapshot,g=p?p.latestValues:{},y={...this.latestValues},b=Bi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const _=Ot(),T=p?p.source:void 0,j=this.layout?this.layout.source:void 0,A=T!==j,w=this.getStack(),C=!w||w.members.length<=1,z=!!(A&&!C&&this.options.crossfade===!0&&!this.path.some(vj));this.animationProgress=0;let M;this.mixTargetDelta=X=>{const H=X/1e3;Rv(b.x,d.x,H),Rv(b.y,d.y,H),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(eo(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gj(this.relativeTarget,this.relativeTargetOrigin,_,H),M&&ej(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=Ot()),Pn(M,this.relativeTarget)),A&&(this.animationValues=y,$C(y,g,this.latestValues,H,z,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=H},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ds(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dt.update(()=>{Fr.hasAnimatedSinceResize=!0,this.currentAnimation=GC(0,wv,{...d,onUpdate:m=>{this.mixTargetDelta(m),d.onUpdate&&d.onUpdate(m)},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:m,target:p,layout:g,latestValues:y}=d;if(!(!m||!p||!g)){if(this!==d&&this.layout&&g&&c1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||Ot();const b=Dn(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+b;const _=Dn(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+_}Pn(m,p),Ui(m,y),Wl(this.projectionDeltaWithTransform,this.layoutCorrected,m,y)}}registerSharedNode(d,m){this.sharedNodes.has(d)||this.sharedNodes.set(d,new tj),this.sharedNodes.get(d).add(m);const g=m.options.initialPromotionConfig;m.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(m):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:m}=this.options;return m?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:m}=this.options;return m?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:m,preserveFollowOpacity:p}={}){const g=this.getStack();g&&g.promote(this,p),d&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let m=!1;const{latestValues:p}=d;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const g={};p.z&&Hd("z",d,g,this.animationValues);for(let y=0;y<Id.length;y++)Hd(`rotate${Id[y]}`,d,g,this.animationValues),Hd(`skew${Id[y]}`,d,g,this.animationValues);d.render();for(const y in g)d.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);d.scheduleRender()}getProjectionStyles(d){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return aj;const g={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=qr(d==null?void 0:d.pointerEvents)||"",g.transform=y?y(this.latestValues,""):"none",g;const b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){const A={};return this.options.layoutId&&(A.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,A.pointerEvents=qr(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Ls(this.latestValues)&&(A.transform=y?y({},""):"none",this.hasProjected=!1),A}const _=b.animationValues||b.latestValues;this.applyTransformsToTarget(),g.transform=nj(this.projectionDeltaWithTransform,this.treeScale,_),y&&(g.transform=y(_,g.transform));const{x:T,y:j}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${j.origin*100}% 0`,b.animationValues?g.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:g.opacity=b===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const A in Zr){if(_[A]===void 0)continue;const{correct:w,applyTo:C}=Zr[A],z=g.transform==="none"?_[A]:w(_[A],b);if(C){const M=C.length;for(let X=0;X<M;X++)g[C[X]]=z}else g[A]=z}return this.options.layoutId&&(g.pointerEvents=b===this?qr(d==null?void 0:d.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var m;return(m=d.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(Dv),this.root.sharedNodes.clear()}}}function ij(n){n.updateLayout()}function lj(n){var a;const l=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&l&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:u}=n.options,d=l.source!==n.layout.source;u==="size"?qn(b=>{const _=d?l.measuredBox[b]:l.layoutBox[b],T=Dn(_);_.min=o[b].min,_.max=_.min+T}):c1(u,l.layoutBox,o)&&qn(b=>{const _=d?l.measuredBox[b]:l.layoutBox[b],T=Dn(o[b]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+T)});const m=Bi();Wl(m,o,l.layoutBox);const p=Bi();d?Wl(p,n.applyTransform(r,!0),l.measuredBox):Wl(p,o,l.layoutBox);const g=!i1(m);let y=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:T}=b;if(_&&T){const j=Ot();eo(j,l.layoutBox,_.layoutBox);const A=Ot();eo(A,o,T.layoutBox),l1(j,A)||(y=!0),b.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=j,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:p,layoutDelta:m,hasLayoutChanged:g,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function oj(n){Kl&&Us.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 rj(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function cj(n){n.clearSnapshot()}function Dv(n){n.clearMeasurements()}function uj(n){n.isLayoutDirty=!1}function dj(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function kv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function fj(n){n.resolveTargetDelta()}function hj(n){n.calcProjection()}function mj(n){n.resetSkewAndRotation()}function pj(n){n.removeLeadSnapshot()}function Rv(n,a,l){n.translate=St(a.translate,0,l),n.scale=St(a.scale,1,l),n.origin=a.origin,n.originPoint=a.originPoint}function Mv(n,a,l,o){n.min=St(a.min,l.min,o),n.max=St(a.max,l.max,o)}function gj(n,a,l,o){Mv(n.x,a.x,l.x,o),Mv(n.y,a.y,l.y,o)}function vj(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const yj={duration:.45,ease:[.4,0,.1,1]},Ov=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Bv=Ov("applewebkit/")&&!Ov("chrome/")?Math.round:wn;function Lv(n){n.min=Bv(n.min),n.max=Bv(n.max)}function bj(n){Lv(n.x),Lv(n.y)}function c1(n,a,l){return n==="position"||n==="preserve-aspect"&&!_C(jv(a),jv(l),.2)}function Sj(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const xj=r1({attachResizeListener:(n,a)=>ro(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gd={current:void 0},u1=r1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Gd.current){const n=new xj({});n.mount(window),n.setOptions({layoutScroll:!0}),Gd.current=n}return Gd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),_j={pan:{Feature:zC},drag:{Feature:UC,ProjectionNode:u1,MeasureLayout:n1}};function Tj(n,a,l){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const u=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}function d1(n,a){const l=Tj(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[l,r,()=>o.abort()]}function Uv(n){return a=>{a.pointerType==="touch"||Fb()||n(a)}}function Ej(n,a,l={}){const[o,r,u]=d1(n,l),d=Uv(m=>{const{target:p}=m,g=a(m);if(typeof g!="function"||!p)return;const y=Uv(b=>{g(b),p.removeEventListener("pointerleave",y)});p.addEventListener("pointerleave",y,r)});return o.forEach(m=>{m.addEventListener("pointerenter",d,r)}),u}function zv(n,a,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const r="onHover"+l,u=o[r];u&&dt.postRender(()=>u(a,go(a)))}class Aj extends hs{mount(){const{current:a}=this.node;a&&(this.unmount=Ej(a,l=>(zv(this.node,l,"Start"),o=>zv(this.node,o,"End"))))}unmount(){}}class Cj extends hs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=po(ro(this.node.current,"focus",()=>this.onFocus()),ro(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const f1=(n,a)=>a?n===a?!0:f1(n,a.parentElement):!1,jj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Nj(n){return jj.has(n.tagName)||n.tabIndex!==-1}const $l=new WeakSet;function Vv(n){return a=>{a.key==="Enter"&&n(a)}}function Pd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const wj=(n,a)=>{const l=n.currentTarget;if(!l)return;const o=Vv(()=>{if($l.has(l))return;Pd(l,"down");const r=Vv(()=>{Pd(l,"up")}),u=()=>Pd(l,"cancel");l.addEventListener("keyup",r,a),l.addEventListener("blur",u,a)});l.addEventListener("keydown",o,a),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),a)};function Iv(n){return vh(n)&&!Fb()}function Dj(n,a,l={}){const[o,r,u]=d1(n,l),d=m=>{const p=m.currentTarget;if(!Iv(m)||$l.has(p))return;$l.add(p);const g=a(m),y=(T,j)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",_),!(!Iv(T)||!$l.has(p))&&($l.delete(p),typeof g=="function"&&g(T,{success:j}))},b=T=>{y(T,l.useGlobalTarget||f1(p,T.target))},_=T=>{y(T,!1)};window.addEventListener("pointerup",b,r),window.addEventListener("pointercancel",_,r)};return o.forEach(m=>{!Nj(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(l.useGlobalTarget?window:m).addEventListener("pointerdown",d,r),m.addEventListener("focus",g=>wj(g,r),r)}),u}function Hv(n,a,l){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const r="onTap"+(l==="End"?"":l),u=o[r];u&&dt.postRender(()=>u(a,go(a)))}class kj extends hs{mount(){const{current:a}=this.node;a&&(this.unmount=Dj(a,l=>(Hv(this.node,l,"Start"),(o,{success:r})=>Hv(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const yf=new WeakMap,qd=new WeakMap,Rj=n=>{const a=yf.get(n.target);a&&a(n)},Mj=n=>{n.forEach(Rj)};function Oj({root:n,...a}){const l=n||document;qd.has(l)||qd.set(l,{});const o=qd.get(l),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(Mj,{root:n,...a})),o[r]}function Bj(n,a,l){const o=Oj(a);return yf.set(n,l),o.observe(n),()=>{yf.delete(n),o.unobserve(n)}}const Lj={some:0,all:1};class Uj extends hs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:l,margin:o,amount:r="some",once:u}=a,d={root:l?l.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Lj[r]},m=p=>{const{isIntersecting:g}=p;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:y,onViewportLeave:b}=this.node.getProps(),_=g?y:b;_&&_(p)};return Bj(this.node.current,d,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:l}=this.node;["amount","margin","root"].some(zj(a,l))&&this.startObserver()}unmount(){}}function zj({viewport:n={}},{viewport:a={}}={}){return l=>n[l]!==a[l]}const Vj={inView:{Feature:Uj},tap:{Feature:kj},focus:{Feature:Cj},hover:{Feature:Aj}},Ij={layout:{ProjectionNode:u1,MeasureLayout:n1}},bf={current:null},h1={current:!1};function Hj(){if(h1.current=!0,!!Hf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>bf.current=n.matches;n.addListener(a),a()}else bf.current=!1}const Gj=[...Ob,an,fs],Pj=n=>Gj.find(Mb(n)),Gv=new WeakMap;function qj(n,a,l){for(const o in a){const r=a[o],u=l[o];if(sn(r))n.addValue(o,r);else if(sn(u))n.addValue(o,lo(r,{owner:n}));else if(u!==r)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(o);n.addValue(o,lo(d!==void 0?d:r,{owner:n}))}}for(const o in l)a[o]===void 0&&n.removeValue(o);return a}const Pv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Yj{scrapeMotionValuesFromProps(a,l,o){return{}}constructor({parent:a,props:l,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:u,visualState:d},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=hh,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=ua.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,dt.render(this.render,!1,!0))};const{latestValues:p,renderState:g,onUpdate:y}=d;this.onUpdate=y,this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=g,this.parent=a,this.props=l,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=m,this.blockInitialAnimation=!!u,this.isControllingVariants=hc(l),this.isVariantNode=Fy(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in _){const j=_[T];p[T]!==void 0&&sn(j)&&j.set(p[T],!1)}}mount(a){this.current=a,Gv.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),h1.current||Hj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Gv.delete(this.current),this.projection&&this.projection.unmount(),ds(this.notifyUpdate),ds(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const l=this.features[a];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(a,l){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Ys.has(a),r=l.on("change",m=>{this.latestValues[a]=m,this.props.onUpdate&&dt.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),u=l.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,l)),this.valueSubscriptions.set(a,()=>{r(),u(),d&&d(),l.owner&&l.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Ii){const l=Ii[a];if(!l)continue;const{isEnabled:o,Feature:r}=l;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ot()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,l){this.latestValues[a]=l}update(a,l){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<Pv.length;o++){const r=Pv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const u="on"+r,d=a[u];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=qj(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(a),()=>l.variantChildren.delete(a)}addValue(a,l){const o=this.values.get(a);l!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,l),this.values.set(a,l),this.latestValues[a]=l.get())}removeValue(a){this.values.delete(a);const l=this.valueSubscriptions.get(a);l&&(l(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,l){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&l!==void 0&&(o=lo(l===null?void 0:l,{owner:this}),this.addValue(a,o)),o}readValue(a,l){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(kb(r)||_b(r))?r=parseFloat(r):!Pj(r)&&fs.test(l)&&(r=Nb(a,l)),this.setBaseTarget(a,sn(r)?r.get():r)),sn(r)?r.get():r}setBaseTarget(a,l){this.baseTarget[a]=l}getBaseTarget(a){var l;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const d=Kf(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);d&&(r=d[a])}if(o&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!sn(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,l){return this.events[a]||(this.events[a]=new sh),this.events[a].add(l)}notify(a,...l){this.events[a]&&this.events[a].notify(...l)}}class m1 extends Yj{constructor(){super(...arguments),this.KeyframeResolver=Bb}sortInstanceNodePosition(a,l){return a.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(a,l){return a.style?a.style[l]:void 0}removeValueFromRenderState(a,{vars:l,style:o}){delete l[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;sn(a)&&(this.childSubscription=a.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function Fj(n){return window.getComputedStyle(n)}class Kj extends m1{constructor(){super(...arguments),this.type="html",this.renderInstance=tb}readValueFromInstance(a,l){if(Ys.has(l)){const o=fh(l);return o&&o.default||0}else{const o=Fj(a),r=(Jy(l)?o.getPropertyValue(l):o[l])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:l}){return e1(a,l)}build(a,l,o){Xf(a,l,o.transformTemplate)}scrapeMotionValuesFromProps(a,l,o){return eh(a,l,o)}}class $j extends m1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(a,l){return a[l]}readValueFromInstance(a,l){if(Ys.has(l)){const o=fh(l);return o&&o.default||0}return l=nb.has(l)?l:qf(l),a.getAttribute(l)}scrapeMotionValuesFromProps(a,l,o){return ib(a,l,o)}build(a,l,o){Qf(a,l,this.isSVGTag,o.transformTemplate)}renderInstance(a,l,o,r){ab(a,l,o,r)}mount(a){this.isSVGTag=Wf(a.tagName),super.mount(a)}}const Zj=(n,a)=>Ff(n)?new $j(a):new Kj(a,{allowProjection:n!==S.Fragment}),Xj=xA({...fC,...Vj,..._j,...Ij},Zj),ea=LE(Xj);var Nt;(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"})(Nt||(Nt={}));var Ht;(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"})(Ht||(Ht={}));var cs;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(cs||(cs={}));var us;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(us||(us={}));const Qj=8;Object.assign(Object.create(null),{"":Nt.UNSPECIFIED,text:Nt.TEXT,tool_use:Nt.TOOL_USE,tool_result:Nt.TOOL_RESULT,error:Nt.ERROR,status:Nt.STATUS,system:Nt.SYSTEM,finding:Nt.FINDING,subtask_create:Nt.SUBTASK_CREATE,user_input:Nt.USER_INPUT});Nt.UNSPECIFIED+"",Nt.TEXT+"",Nt.TOOL_USE+"",Nt.TOOL_RESULT+"",Nt.ERROR+"",Nt.STATUS+"",Nt.SYSTEM+"",Nt.FINDING+"",Nt.SUBTASK_CREATE+"",Nt.USER_INPUT+"";Object.assign(Object.create(null),{"":Ht.UNSPECIFIED,not_started:Ht.NOT_STARTED,working:Ht.WORKING,paused:Ht.PAUSED,complete:Ht.COMPLETE,failed:Ht.FAILED,pending:Ht.NOT_STARTED,assigned:Ht.NOT_STARTED,in_progress:Ht.WORKING,waiting_input:Ht.PAUSED,review:Ht.PAUSED,done:Ht.COMPLETE});Ht.UNSPECIFIED+"",Ht.NOT_STARTED+"",Ht.WORKING+"",Ht.PAUSED+"",Ht.COMPLETE+"",Ht.FAILED+"";Object.assign(Object.create(null),{"":cs.UNSPECIFIED,active:cs.ACTIVE,archived:cs.ARCHIVED});cs.UNSPECIFIED+"",cs.ACTIVE+"",cs.ARCHIVED+"";Object.assign(Object.create(null),{"":us.UNSPECIFIED,open:us.OPEN,closed:us.CLOSED});us.UNSPECIFIED+"",us.OPEN+"",us.CLOSED+"";function La(n){return Array.isArray?Array.isArray(n):v1(n)==="[object Array]"}function Jj(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function Wj(n){return n==null?"":Jj(n)}function oa(n){return typeof n=="string"}function p1(n){return typeof n=="number"}function eN(n){return n===!0||n===!1||tN(n)&&v1(n)=="[object Boolean]"}function g1(n){return typeof n=="object"}function tN(n){return g1(n)&&n!==null}function Nn(n){return n!=null}function Yd(n){return!n.trim().length}function v1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const nN="Incorrect 'index' type",aN=n=>`Invalid value for key ${n}`,sN=n=>`Pattern length exceeds max of ${n}.`,iN=n=>`Missing ${n} property in key`,lN=n=>`Property 'weight' in key '${n}' must be a positive integer`,qv=Object.prototype.hasOwnProperty;class oN{constructor(a){this._keys=[],this._keyMap={};let l=0;a.forEach(o=>{let r=y1(o);this._keys.push(r),this._keyMap[r.id]=r,l+=r.weight}),this._keys.forEach(o=>{o.weight/=l})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function y1(n){let a=null,l=null,o=null,r=1,u=null;if(oa(n)||La(n))o=n,a=Yv(n),l=Sf(n);else{if(!qv.call(n,"name"))throw new Error(iN("name"));const d=n.name;if(o=d,qv.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(lN(d));a=Yv(d),l=Sf(d),u=n.getFn}return{path:a,id:l,weight:r,src:o,getFn:u}}function Yv(n){return La(n)?n:n.split(".")}function Sf(n){return La(n)?n.join("."):n}function rN(n,a){let l=[],o=!1;const r=(u,d,m)=>{if(Nn(u))if(!d[m])l.push(u);else{let p=d[m];const g=u[p];if(!Nn(g))return;if(m===d.length-1&&(oa(g)||p1(g)||eN(g)))l.push(Wj(g));else if(La(g)){o=!0;for(let y=0,b=g.length;y<b;y+=1)r(g[y],d,m+1)}else d.length&&r(g,d,m+1)}};return r(n,oa(a)?a.split("."):a,0),o?l:l[0]}const cN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},uN={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},dN={location:0,threshold:.6,distance:100},fN={useExtendedSearch:!1,getFn:rN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ce={...uN,...cN,...dN,...fN};const hN=/[^ ]+/g;function mN(n=1,a=3){const l=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(hN).length;if(l.has(u))return l.get(u);const d=1/Math.pow(u,.5*n),m=parseFloat(Math.round(d*o)/o);return l.set(u,m),m},clear(){l.clear()}}}class yh{constructor({getFn:a=Ce.getFn,fieldNormWeight:l=Ce.fieldNormWeight}={}){this.norm=mN(l,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((l,o)=>{this._keysMap[l.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,oa(this.docs[0])?this.docs.forEach((a,l)=>{this._addString(a,l)}):this.docs.forEach((a,l)=>{this._addObject(a,l)}),this.norm.clear())}add(a){const l=this.size();oa(a)?this._addString(a,l):this._addObject(a,l)}removeAt(a){this.records.splice(a,1);for(let l=a,o=this.size();l<o;l+=1)this.records[l].i-=1}getValueForItemAtKeyId(a,l){return a[this._keysMap[l]]}size(){return this.records.length}_addString(a,l){if(!Nn(a)||Yd(a))return;let o={v:a,i:l,n:this.norm.get(a)};this.records.push(o)}_addObject(a,l){let o={i:l,$:{}};this.keys.forEach((r,u)=>{let d=r.getFn?r.getFn(a):this.getFn(a,r.path);if(Nn(d)){if(La(d)){let m=[];const p=[{nestedArrIndex:-1,value:d}];for(;p.length;){const{nestedArrIndex:g,value:y}=p.pop();if(Nn(y))if(oa(y)&&!Yd(y)){let b={v:y,i:g,n:this.norm.get(y)};m.push(b)}else La(y)&&y.forEach((b,_)=>{p.push({nestedArrIndex:_,value:b})})}o.$[u]=m}else if(oa(d)&&!Yd(d)){let m={v:d,n:this.norm.get(d)};o.$[u]=m}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function b1(n,a,{getFn:l=Ce.getFn,fieldNormWeight:o=Ce.fieldNormWeight}={}){const r=new yh({getFn:l,fieldNormWeight:o});return r.setKeys(n.map(y1)),r.setSources(a),r.create(),r}function pN(n,{getFn:a=Ce.getFn,fieldNormWeight:l=Ce.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new yh({getFn:a,fieldNormWeight:l});return u.setKeys(o),u.setIndexRecords(r),u}function Ur(n,{errors:a=0,currentLocation:l=0,expectedLocation:o=0,distance:r=Ce.distance,ignoreLocation:u=Ce.ignoreLocation}={}){const d=a/n.length;if(u)return d;const m=Math.abs(o-l);return r?d+m/r:m?1:d}function gN(n=[],a=Ce.minMatchCharLength){let l=[],o=-1,r=-1,u=0;for(let d=n.length;u<d;u+=1){let m=n[u];m&&o===-1?o=u:!m&&o!==-1&&(r=u-1,r-o+1>=a&&l.push([o,r]),o=-1)}return n[u-1]&&u-o>=a&&l.push([o,u-1]),l}const zs=32;function vN(n,a,l,{location:o=Ce.location,distance:r=Ce.distance,threshold:u=Ce.threshold,findAllMatches:d=Ce.findAllMatches,minMatchCharLength:m=Ce.minMatchCharLength,includeMatches:p=Ce.includeMatches,ignoreLocation:g=Ce.ignoreLocation}={}){if(a.length>zs)throw new Error(sN(zs));const y=a.length,b=n.length,_=Math.max(0,Math.min(o,b));let T=u,j=_;const A=m>1||p,w=A?Array(b):[];let C;for(;(C=n.indexOf(a,j))>-1;){let W=Ur(a,{currentLocation:C,expectedLocation:_,distance:r,ignoreLocation:g});if(T=Math.min(W,T),j=C+y,A){let Y=0;for(;Y<y;)w[C+Y]=1,Y+=1}}j=-1;let z=[],M=1,X=y+b;const H=1<<y-1;for(let W=0;W<y;W+=1){let Y=0,ne=X;for(;Y<ne;)Ur(a,{errors:W,currentLocation:_+ne,expectedLocation:_,distance:r,ignoreLocation:g})<=T?Y=ne:X=ne,ne=Math.floor((X-Y)/2+Y);X=ne;let ge=Math.max(1,_-ne+1),U=d?b:Math.min(_+ne,b)+y,pe=Array(U+2);pe[U+1]=(1<<W)-1;for(let ye=U;ye>=ge;ye-=1){let G=ye-1,L=l[n.charAt(G)];if(A&&(w[G]=+!!L),pe[ye]=(pe[ye+1]<<1|1)&L,W&&(pe[ye]|=(z[ye+1]|z[ye])<<1|1|z[ye+1]),pe[ye]&H&&(M=Ur(a,{errors:W,currentLocation:G,expectedLocation:_,distance:r,ignoreLocation:g}),M<=T)){if(T=M,j=G,j<=_)break;ge=Math.max(1,2*_-j)}}if(Ur(a,{errors:W+1,currentLocation:_,expectedLocation:_,distance:r,ignoreLocation:g})>T)break;z=pe}const J={isMatch:j>=0,score:Math.max(.001,M)};if(A){const W=gN(w,m);W.length?p&&(J.indices=W):J.isMatch=!1}return J}function yN(n){let a={};for(let l=0,o=n.length;l<o;l+=1){const r=n.charAt(l);a[r]=(a[r]||0)|1<<o-l-1}return a}const tc=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class S1{constructor(a,{location:l=Ce.location,threshold:o=Ce.threshold,distance:r=Ce.distance,includeMatches:u=Ce.includeMatches,findAllMatches:d=Ce.findAllMatches,minMatchCharLength:m=Ce.minMatchCharLength,isCaseSensitive:p=Ce.isCaseSensitive,ignoreDiacritics:g=Ce.ignoreDiacritics,ignoreLocation:y=Ce.ignoreLocation}={}){if(this.options={location:l,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:m,isCaseSensitive:p,ignoreDiacritics:g,ignoreLocation:y},a=p?a:a.toLowerCase(),a=g?tc(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const b=(T,j)=>{this.chunks.push({pattern:T,alphabet:yN(T),startIndex:j})},_=this.pattern.length;if(_>zs){let T=0;const j=_%zs,A=_-j;for(;T<A;)b(this.pattern.substr(T,zs),T),T+=zs;if(j){const w=_-zs;b(this.pattern.substr(w),w)}}else b(this.pattern,0)}searchIn(a){const{isCaseSensitive:l,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=l?a:a.toLowerCase(),a=o?tc(a):a,this.pattern===a){let A={isMatch:!0,score:0};return r&&(A.indices=[[0,a.length-1]]),A}const{location:u,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,ignoreLocation:y}=this.options;let b=[],_=0,T=!1;this.chunks.forEach(({pattern:A,alphabet:w,startIndex:C})=>{const{isMatch:z,score:M,indices:X}=vN(a,A,w,{location:u+C,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,includeMatches:r,ignoreLocation:y});z&&(T=!0),_+=M,z&&X&&(b=[...b,...X])});let j={isMatch:T,score:T?_/this.chunks.length:1};return T&&r&&(j.indices=b),j}}class ms{constructor(a){this.pattern=a}static isMultiMatch(a){return Fv(a,this.multiRegex)}static isSingleMatch(a){return Fv(a,this.singleRegex)}search(){}}function Fv(n,a){const l=n.match(a);return l?l[1]:null}class bN extends ms{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const l=a===this.pattern;return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class SN extends ms{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class xN extends ms{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const l=a.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class _N extends ms{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const l=!a.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,a.length-1]}}}class TN extends ms{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const l=a.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class EN extends ms{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const l=!a.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,a.length-1]}}}class x1 extends ms{constructor(a,{location:l=Ce.location,threshold:o=Ce.threshold,distance:r=Ce.distance,includeMatches:u=Ce.includeMatches,findAllMatches:d=Ce.findAllMatches,minMatchCharLength:m=Ce.minMatchCharLength,isCaseSensitive:p=Ce.isCaseSensitive,ignoreDiacritics:g=Ce.ignoreDiacritics,ignoreLocation:y=Ce.ignoreLocation}={}){super(a),this._bitapSearch=new S1(a,{location:l,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:m,isCaseSensitive:p,ignoreDiacritics:g,ignoreLocation:y})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class _1 extends ms{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let l=0,o;const r=[],u=this.pattern.length;for(;(o=a.indexOf(this.pattern,l))>-1;)l=o+u,r.push([o,l-1]);const d=!!r.length;return{isMatch:d,score:d?0:1,indices:r}}}const xf=[bN,_1,xN,_N,EN,TN,SN,x1],Kv=xf.length,AN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,CN="|";function jN(n,a={}){return n.split(CN).map(l=>{let o=l.trim().split(AN).filter(u=>u&&!!u.trim()),r=[];for(let u=0,d=o.length;u<d;u+=1){const m=o[u];let p=!1,g=-1;for(;!p&&++g<Kv;){const y=xf[g];let b=y.isMultiMatch(m);b&&(r.push(new y(b,a)),p=!0)}if(!p)for(g=-1;++g<Kv;){const y=xf[g];let b=y.isSingleMatch(m);if(b){r.push(new y(b,a));break}}}return r})}const NN=new Set([x1.type,_1.type]);class wN{constructor(a,{isCaseSensitive:l=Ce.isCaseSensitive,ignoreDiacritics:o=Ce.ignoreDiacritics,includeMatches:r=Ce.includeMatches,minMatchCharLength:u=Ce.minMatchCharLength,ignoreLocation:d=Ce.ignoreLocation,findAllMatches:m=Ce.findAllMatches,location:p=Ce.location,threshold:g=Ce.threshold,distance:y=Ce.distance}={}){this.query=null,this.options={isCaseSensitive:l,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:u,findAllMatches:m,ignoreLocation:d,location:p,threshold:g,distance:y},a=l?a:a.toLowerCase(),a=o?tc(a):a,this.pattern=a,this.query=jN(this.pattern,this.options)}static condition(a,l){return l.useExtendedSearch}searchIn(a){const l=this.query;if(!l)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:u}=this.options;a=r?a:a.toLowerCase(),a=u?tc(a):a;let d=0,m=[],p=0;for(let g=0,y=l.length;g<y;g+=1){const b=l[g];m.length=0,d=0;for(let _=0,T=b.length;_<T;_+=1){const j=b[_],{isMatch:A,indices:w,score:C}=j.search(a);if(A){if(d+=1,p+=C,o){const z=j.constructor.type;NN.has(z)?m=[...m,...w]:m.push(w)}}else{p=0,d=0,m.length=0;break}}if(d){let _={isMatch:!0,score:p/d};return o&&(_.indices=m),_}}return{isMatch:!1,score:1}}}const _f=[];function DN(...n){_f.push(...n)}function Tf(n,a){for(let l=0,o=_f.length;l<o;l+=1){let r=_f[l];if(r.condition(n,a))return new r(n,a)}return new S1(n,a)}const nc={AND:"$and",OR:"$or"},Ef={PATH:"$path",PATTERN:"$val"},Af=n=>!!(n[nc.AND]||n[nc.OR]),kN=n=>!!n[Ef.PATH],RN=n=>!La(n)&&g1(n)&&!Af(n),$v=n=>({[nc.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function T1(n,a,{auto:l=!0}={}){const o=r=>{let u=Object.keys(r);const d=kN(r);if(!d&&u.length>1&&!Af(r))return o($v(r));if(RN(r)){const p=d?r[Ef.PATH]:u[0],g=d?r[Ef.PATTERN]:r[p];if(!oa(g))throw new Error(aN(p));const y={keyId:Sf(p),pattern:g};return l&&(y.searcher=Tf(g,a)),y}let m={children:[],operator:u[0]};return u.forEach(p=>{const g=r[p];La(g)&&g.forEach(y=>{m.children.push(o(y))})}),m};return Af(n)||(n=$v(n)),o(n)}function MN(n,{ignoreFieldNorm:a=Ce.ignoreFieldNorm}){n.forEach(l=>{let o=1;l.matches.forEach(({key:r,norm:u,score:d})=>{const m=r?r.weight:null;o*=Math.pow(d===0&&m?Number.EPSILON:d,(m||1)*(a?1:u))}),l.score=o})}function ON(n,a){const l=n.matches;a.matches=[],Nn(l)&&l.forEach(o=>{if(!Nn(o.indices)||!o.indices.length)return;const{indices:r,value:u}=o;let d={indices:r,value:u};o.key&&(d.key=o.key.src),o.idx>-1&&(d.refIndex=o.idx),a.matches.push(d)})}function BN(n,a){a.score=n.score}function LN(n,a,{includeMatches:l=Ce.includeMatches,includeScore:o=Ce.includeScore}={}){const r=[];return l&&r.push(ON),o&&r.push(BN),n.map(u=>{const{idx:d}=u,m={item:a[d],refIndex:d};return r.length&&r.forEach(p=>{p(u,m)}),m})}class Ki{constructor(a,l={},o){this.options={...Ce,...l},this.options.useExtendedSearch,this._keyStore=new oN(this.options.keys),this.setCollection(a,o)}setCollection(a,l){if(this._docs=a,l&&!(l instanceof yh))throw new Error(nN);this._myIndex=l||b1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){Nn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const l=[];for(let o=0,r=this._docs.length;o<r;o+=1){const u=this._docs[o];a(u,o)&&(this.removeAt(o),o-=1,r-=1,l.push(u))}return l}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:l=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:u,sortFn:d,ignoreFieldNorm:m}=this.options;let p=oa(a)?oa(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return MN(p,{ignoreFieldNorm:m}),u&&p.sort(d),p1(l)&&l>-1&&(p=p.slice(0,l)),LN(p,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const l=Tf(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:m})=>{if(!Nn(u))return;const{isMatch:p,score:g,indices:y}=l.searchIn(u);p&&r.push({item:u,idx:d,matches:[{score:g,value:u,norm:m,indices:y}]})}),r}_searchLogical(a){const l=T1(a,this.options),o=(m,p,g)=>{if(!m.children){const{keyId:b,searcher:_}=m,T=this._findMatches({key:this._keyStore.get(b),value:this._myIndex.getValueForItemAtKeyId(p,b),searcher:_});return T&&T.length?[{idx:g,item:p,matches:T}]:[]}const y=[];for(let b=0,_=m.children.length;b<_;b+=1){const T=m.children[b],j=o(T,p,g);if(j.length)y.push(...j);else if(m.operator===nc.AND)return[]}return y},r=this._myIndex.records,u={},d=[];return r.forEach(({$:m,i:p})=>{if(Nn(m)){let g=o(l,m,p);g.length&&(u[p]||(u[p]={idx:p,item:m,matches:[]},d.push(u[p])),g.forEach(({matches:y})=>{u[p].matches.push(...y)}))}}),d}_searchObjectList(a){const l=Tf(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:m})=>{if(!Nn(d))return;let p=[];o.forEach((g,y)=>{p.push(...this._findMatches({key:g,value:d[y],searcher:l}))}),p.length&&u.push({idx:m,item:d,matches:p})}),u}_findMatches({key:a,value:l,searcher:o}){if(!Nn(l))return[];let r=[];if(La(l))l.forEach(({v:u,i:d,n:m})=>{if(!Nn(u))return;const{isMatch:p,score:g,indices:y}=o.searchIn(u);p&&r.push({score:g,key:a,value:u,idx:d,norm:m,indices:y})});else{const{v:u,n:d}=l,{isMatch:m,score:p,indices:g}=o.searchIn(u);m&&r.push({score:p,key:a,value:u,norm:d,indices:g})}return r}}Ki.version="7.1.0";Ki.createIndex=b1;Ki.parseIndex=pN;Ki.config=Ce;Ki.parseQuery=T1;DN(wN);function Zv(n,a,l,o){if(!a.trim())return[];const r=.3;return new Ki(n,{keys:l,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(p=>({item:p.item,score:p.score??1,matches:(p.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const UN="_breadcrumbs_17or2_1",zN="_list_17or2_11",VN="_item_17or2_21",IN="_separator_17or2_28",HN="_link_17or2_34",GN="_current_17or2_57",ki={breadcrumbs:UN,list:zN,item:VN,separator:IN,link:HN,current:GN},PN="›";function $i({segments:n}){return h.jsx("nav",{className:ki.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:ki.list,children:n.map((a,l)=>{const o=l===n.length-1;return h.jsxs("li",{className:ki.item,children:[l>0&&h.jsx("span",{className:ki.separator,"aria-hidden":"true",children:PN}),a.url&&!o?h.jsx(Bf,{className:ki.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:ki.current,"aria-current":"page",title:a.label,children:a.label})]},l)})})})}function Cf(){Cf=function(r,u){return new l(r,void 0,u)};var n=RegExp.prototype,a=new WeakMap;function l(r,u,d){var m=new RegExp(r,u);return a.set(m,d||a.get(r)),ac(m,l.prototype)}function o(r,u){var d=a.get(u);return Object.keys(d).reduce(function(m,p){var g=d[p];if(typeof g=="number")m[p]=r[g];else{for(var y=0;r[g[y]]===void 0&&y+1<g.length;)y++;m[p]=r[g[y]]}return m},Object.create(null))}return(function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),u&&ac(r,u)})(l,RegExp),l.prototype.exec=function(r){var u=n.exec.call(this,r);if(u){u.groups=o(u,this);var d=u.indices;d&&(d.groups=o(d,this))}return u},l.prototype[Symbol.replace]=function(r,u){if(typeof u=="string"){var d=a.get(this);return n[Symbol.replace].call(this,r,u.replace(/\$<([^>]+)>/g,function(p,g){var y=d[g];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof u=="function"){var m=this;return n[Symbol.replace].call(this,r,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(o(p,m)),u.apply(this,p)})}return n[Symbol.replace].call(this,r,u)},Cf.apply(this,arguments)}function ac(n,a){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},ac(n,a)}function Xv(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,o=new Array(a);l<a;l++)o[l]=n[l];return o}function Fd(n,a){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=(function(r,u){if(r){if(typeof r=="string")return Xv(r,u);var d=Object.prototype.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Xv(r,u):void 0}})(n))||a){l&&(n=l);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
87
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qN=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){Yx(o,"element",l)};function l(o,r,u){var d,m;if(u&&u.tagName==="pre"&&o.tagName==="code"){var p=(o==null||(d=o.data)==null?void 0:d.meta)||(o==null||(m=o.properties)==null?void 0:m.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,y,b=(function(H){for(var J,W=Fd(H.properties.className);!(J=W()).done;){var Y=J.value;if(Y.slice(0,9)==="language-")return Y.slice(9).toLowerCase()}return null})(o);if(!b&&a.defaultLanguage&&o.properties.className.push("language-"+(b=a.defaultLanguage)),o.properties.className.push("code-highlight"),b)try{var _,T;T=(_=b)!=null&&_.includes("diff-")?b.split("-")[1]:b,g=n.highlight(kr(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(H){if(!a.ignoreMissing||!/Unknown language/.test(H.message))throw H;g=o}else g=o;g.children=(y=1,function H(J){return J.reduce(function(W,Y){if(Y.type==="text"){var ne=Y.value,ge=(ne.match(/\n/g)||"").length;if(ge===0)Y.position={start:{line:y,column:1},end:{line:y,column:1}},W.push(Y);else for(var U,pe=ne.split(`
88
+ `),te=Fd(pe.entries());!(U=te()).done;){var ye=U.value,G=ye[0],L=ye[1];W.push({type:"text",value:G===pe.length-1?L:L+`
89
+ `,position:{start:{line:y+G,column:1},end:{line:y+G,column:1}}})}return y+=ge,W}if(Object.prototype.hasOwnProperty.call(Y,"children")){var K=y;return Y.children=H(Y.children),W.push(Y),Y.position={start:{line:K,column:1},end:{line:y,column:1}},W}return W.push(Y),W},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var j,A=(function(H){var J=/{([\d,-]+)}/,W=H.split(",").map(function(ge){return ge.trim()}).join();if(J.test(W)){var Y=J.exec(W)[1],ne=Kx(Y);return function(ge){return ne.includes(ge+1)}}return function(){return!1}})(p),w=(function(H){var J=Cf(/showLineNumbers=(\d+)/i,{lines:1});if(J.test(H)){var W=J.exec(H);return Number(W.groups.lines)}return 1})(p),C=(function(H){for(var J=new Array(H),W=0;W<H;W++)J[W]={type:"element",tagName:"span",properties:{className:[]},children:[]};return J})(g.position.end.line),z=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],M=function(){var H,J,W=j.value,Y=W[0],ne=W[1];ne.properties.className=["code-line"];var ge=$x(g,function(U){return U.position.start.line<=Y+1&&U.position.end.line>=Y+1});ne.children=ge.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(b))&&!z.some(function(U){return p.toLowerCase().includes(U)})&&(ne.properties.line=[(Y+w).toString()],ne.properties.className.push("line-number")),A(Y)&&ne.properties.className.push("highlight-line"),(b==="diff"||(H=b)!=null&&H.includes("diff-"))&&kr(ne).substring(0,1)==="-"?ne.properties.className.push("deleted"):(b==="diff"||(J=b)!=null&&J.includes("diff-"))&&kr(ne).substring(0,1)==="+"&&ne.properties.className.push("inserted")},X=Fd(C.entries());!(j=X()).done;)M();C.length>0&&kr(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(Fx);const YN="_systemEvent_2kh3g_1",FN="_systemTimestamp_2kh3g_9",KN="_textEvent_2kh3g_13",$N="_toolUseEvent_2kh3g_100",ZN="_toolUseHeader_2kh3g_116",XN="_toolUsePrefix_2kh3g_123",QN="_toolUseName_2kh3g_128",JN="_toolUseArgs_2kh3g_133",WN="_toolResultEvent_2kh3g_144",ew="_toolResultHeader_2kh3g_150",tw="_toolResultIndicatorOk_2kh3g_174",nw="_toolResultIndicatorError_2kh3g_181",aw="_toolResultLabel_2kh3g_188",sw="_toolResultToggle_2kh3g_192",iw="_toolResultCommand_2kh3g_198",lw="_toolResultEllipsis_2kh3g_208",ow="_toolResultPre_2kh3g_212",rw="_errorEvent_2kh3g_227",cw="_statusEvent_2kh3g_236",uw="_userInputEvent_2kh3g_246",dw="_userInputContent_2kh3g_253",fw="_defaultEvent_2kh3g_265",bt={systemEvent:YN,systemTimestamp:FN,textEvent:KN,toolUseEvent:$N,toolUseHeader:ZN,toolUsePrefix:XN,toolUseName:QN,toolUseArgs:JN,toolResultEvent:WN,toolResultHeader:ew,toolResultIndicatorOk:tw,toolResultIndicatorError:nw,toolResultLabel:aw,toolResultToggle:sw,toolResultCommand:iw,toolResultEllipsis:lw,toolResultPre:ow,errorEvent:rw,statusEvent:cw,userInputEvent:uw,userInputContent:dw,defaultEvent:fw};function hw({time:n,content:a}){return h.jsxs("div",{className:bt.systemEvent,children:[h.jsxs("span",{className:bt.systemTimestamp,children:["[",n,"]"]})," ",a]})}function mw({content:n}){return h.jsx("div",{className:bt.textEvent,children:h.jsx(jf,{remarkPlugins:[Nf],rehypePlugins:[qN],children:n})})}function pw({content:n}){let a="",l=n;try{const o=JSON.parse(n);a=o.tool||"",l=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:bt.toolUseEvent,children:[h.jsxs("div",{className:bt.toolUseHeader,children:[h.jsx("span",{className:bt.toolUsePrefix,children:">"}),a?h.jsx("span",{className:bt.toolUseName,children:a}):null]}),h.jsx("pre",{className:bt.toolUseArgs,children:l})]})}const Qv=5;function gw(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const l=a;if(typeof l.command=="string")return l.command;if(typeof l.file_path=="string")return l.file_path;if(typeof l.pattern=="string"){const o=typeof l.path=="string"?` in ${l.path}`:"";return`${l.pattern}${o}`}if(typeof l.path=="string")return l.path;if(typeof l.query=="string")return l.query;try{const o=JSON.stringify(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function vw({content:n,raw:a,toolUseCtx:l}){const[o,r]=S.useState(!1);let u=!1;if(a)try{u=JSON.parse(a).is_error===!0}catch{}const d=n.split(`
90
+ `),m=d.length>Qv,p=o?n:d.slice(0,Qv).join(`
91
+ `),y=((l==null?void 0:l.tool)??"")||(u?"Tool error":"Tool output"),b=l?gw(l.tool,l.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?bt.toolResultIndicatorError:bt.toolResultIndicatorOk,"aria-label":u?"error":"success",children:u?"✗":"✓"}),h.jsx("span",{className:bt.toolResultLabel,children:y}),m&&h.jsx("span",{className:bt.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:bt.toolResultEvent,children:[m?h.jsx("button",{className:bt.toolResultHeader,onClick:()=>{r(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:bt.toolResultHeader,children:_}),b&&h.jsx("div",{className:bt.toolResultCommand,children:b}),h.jsxs("pre",{className:bt.toolResultPre,children:[p,!o&&m&&h.jsx("span",{className:bt.toolResultEllipsis,children:"…"})]})]})}function yw({content:n}){return h.jsxs("div",{className:bt.errorEvent,children:["Error: ",n]})}function bw({content:n}){return h.jsxs("div",{className:bt.statusEvent,children:["--- ",n," ---"]})}function Sw({content:n}){return h.jsx("div",{className:bt.userInputEvent,children:h.jsx("span",{className:bt.userInputContent,children:n})})}function xw({content:n}){return h.jsx("div",{className:bt.defaultEvent,children:n})}function E1({event:n,toolUseCtx:a}){const l=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(hw,{time:l,content:n.content});case"text":case"output":return h.jsx(mw,{content:n.content});case"tool_use":return h.jsx(pw,{content:n.content});case"tool_result":return h.jsx(vw,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(yw,{content:n.content});case"status":return h.jsx(bw,{content:n.content});case"user_input":return h.jsx(Sw,{content:n.content});default:return h.jsx(xw,{content:n.content})}}const _w="_overlay_cmicx_1",Tw="_dialog_cmicx_11",Ew="_title_cmicx_30",Aw="_description_cmicx_38",Cw="_actions_cmicx_45",jw="_cancelButton_cmicx_52",Nw="_confirmButton_cmicx_79",Bs={overlay:_w,dialog:Tw,title:Ew,description:Aw,actions:Cw,cancelButton:jw,confirmButton:Nw};function gc({isOpen:n,title:a,description:l,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),m=S.useId();return h.jsx(qs,{children:n&&h.jsx(ea.div,{className:Bs.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:u,onKeyDown:p=>{p.key==="Escape"&&u()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":l?m:void 0,children:h.jsxs(ea.div,{className:Bs.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:p=>p.stopPropagation(),children:[h.jsx("h3",{id:d,className:Bs.title,children:a}),l&&h.jsx("p",{id:m,className:Bs.description,children:l}),h.jsxs("div",{className:Bs.actions,children:[h.jsx("button",{type:"button",className:Bs.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:Bs.confirmButton,onClick:r,children:o})]})]})})})}const ww="_spinner_13c8l_1",Dw="_spin_13c8l_1",kw="_sm_13c8l_14",Rw="_md_13c8l_20",Mw="_lg_13c8l_26",Jv={spinner:ww,spin:Dw,sm:kw,md:Rw,lg:Mw};function Wv({size:n="md",className:a,label:l="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${Jv.spinner} ${Jv[n]} ${a??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const Ow="_container_4b672_1",Bw="_header_4b672_5",Lw="_searchInput_4b672_17",Uw="_searchHighlight_4b672_50",zw="_addButton_4b672_56",Vw="_createForm_4b672_83",Iw="_createInput_4b672_89",Hw="_createButton_4b672_120",Gw="_creatingHint_4b672_161",Pw="_projectRow_4b672_170",qw="_selected_4b672_188",Yw="_expandArrow_4b672_193",Fw="_expanded_4b672_200",Kw="_projectName_4b672_204",$w="_taskCount_4b672_208",Zw="_newTaskButton_4b672_214",Xw="_taskRow_4b672_241",Qw="_taskStatusIcon_4b672_266",Jw="_taskTitle_4b672_270",Ww="_dependencyBadge_4b672_277",eD="_blockedBadge_4b672_289",tD="_leafSpacer_4b672_294",nD="_childCountBadge_4b672_299",aD="_addChildButton_4b672_312",sD="_emptyCta_4b672_356",iD="_ctaDescription_4b672_369",lD="_ctaButton_4b672_375",oD="_emptyTaskCta_4b672_410",rD="_headerActions_4b672_415",cD="_groupToggle_4b672_421",uD="_groupToggleActive_4b672_448",dD="_statusGroupHeader_4b672_452",fD="_statusGroupIcon_4b672_471",hD="_statusGroupLabel_4b672_475",mD="_statusGroupCount_4b672_480",pD="_createTaskLink_4b672_493",Ne={container:Ow,header:Bw,searchInput:Lw,searchHighlight:Uw,addButton:zw,createForm:Vw,createInput:Iw,createButton:Hw,creatingHint:Gw,projectRow:Pw,selected:qw,expandArrow:Yw,expanded:Fw,projectName:Kw,taskCount:$w,newTaskButton:Zw,taskRow:Xw,taskStatusIcon:Qw,taskTitle:Jw,dependencyBadge:Ww,blockedBadge:eD,leafSpacer:tD,childCountBadge:nD,addChildButton:aD,emptyCta:sD,ctaDescription:iD,ctaButton:lD,emptyTaskCta:oD,headerActions:rD,groupToggle:cD,groupToggleActive:uD,statusGroupHeader:dD,statusGroupIcon:fD,statusGroupLabel:hD,statusGroupCount:mD,createTaskLink:pD},rs={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:"✗"},blocked:{color:"var(--accent-yellow)",icon:"⦸"}};function gD(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),l=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=l[l.length-1],[u,d]=a[o];u<=r[1]+1?r[1]=Math.max(r[1],d):l.push([u,d])}return l}function A1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const l=gD(a),o=[];let r=0;for(const[u,d]of l)u>r&&o.push(h.jsx("span",{children:n.slice(r,u)},`p${r}`)),o.push(h.jsx("mark",{className:Ne.searchHighlight,children:n.slice(u,d+1)},`m${u}`)),r=d+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const vD=[{name:"name",weight:2},{name:"description",weight:1}],yD=[{name:"title",weight:2},{name:"description",weight:1}],C1=34,bD=16,j1="grackle-group-by-status";function ey(){try{return localStorage.getItem(j1)==="true"}catch{return!1}}function SD(n){try{localStorage.setItem(j1,String(n))}catch{}}const xD=["working","paused","failed","not_started","blocked","complete"],_D={working:"Working",paused:"Paused",failed:"Failed",not_started:"Not Started",blocked:"Blocked",complete:"Complete"};function TD(n,a){const l=new Map;for(const u of n){const m=u.dependsOn.length>0&&u.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":u.status,p=l.get(m);p?p.push(u):l.set(m,[u])}const o=[],r=new Set;for(const u of xD){r.add(u);const d=l.get(u);d&&d.length>0&&(d.sort((m,p)=>m.sortOrder-p.sortOrder),o.push({status:u,label:_D[u]||u,style:rs[u]||rs.not_started,tasks:d}))}for(const[u,d]of l)!r.has(u)&&d.length>0&&(d.sort((m,p)=>m.sortOrder-p.sortOrder),o.push({status:u,label:u,style:rs[u]||rs.not_started,tasks:d}));return o}function ED({group:n,isExpanded:a,onToggle:l,selectedTaskId:o,navigate:r,titleHighlights:u}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:Ne.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:l,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),l())},children:[h.jsx("span",{className:`${Ne.expandArrow} ${a?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:Ne.statusGroupLabel,children:n.label}),h.jsx("span",{className:Ne.statusGroupCount,children:n.tasks.length})]}),h.jsx(qs,{children:a&&h.jsx(ea.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const m=rs[d.status]||rs.not_started,p=o===d.id;return h.jsxs("div",{onClick:()=>r(Hs(d.id)),className:`${Ne.taskRow} ${p?Ne.selected:""}`,style:{paddingLeft:C1},"data-task-id":d.id,children:[h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:m.color},children:m.icon}),h.jsx("span",{className:Ne.taskTitle,title:d.title,children:h.jsx(A1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function AD(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):l.push(o);for(const o of a.values())o.children.sort((r,u)=>r.sortOrder-u.sortOrder);return l.sort((o,r)=>o.sortOrder-r.sortOrder)}function N1({node:n,depth:a,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p}){const g=rs[n.status]||rs.not_started,y=n.dependsOn.length>0&&n.dependsOn.some(A=>m.get(A)!=="complete"),b=l.has(n.id),_=n.children.length>0,T=r===n.id,j=C1+a*bD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(Hs(n.id)),className:`${Ne.taskRow} ${T?Ne.selected:""}`,style:{paddingLeft:j},"data-task-id":n.id,children:[_&&h.jsx("span",{className:`${Ne.expandArrow} ${b?Ne.expanded:""}`,role:"button",tabIndex:0,"aria-label":b?"Collapse task":"Expand task",onClick:A=>{A.stopPropagation(),o(n.id)},onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),A.stopPropagation(),o(n.id))},children:"▸"}),!_&&h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:Ne.taskTitle,title:n.title,children:h.jsx(A1,{text:n.title,indices:p.get(n.id)})}),_&&h.jsxs("span",{className:Ne.childCountBadge,children:[n.children.filter(A=>A.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Ne.dependencyBadge} ${y?Ne.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:y?"blocked":"dep"}),a<Qj&&h.jsx("button",{onClick:A=>{A.stopPropagation(),u(Vi(d,n.id))},title:"Add child task","aria-label":"Add child task",className:Ne.addChildButton,children:"+"})]}),h.jsx(qs,{children:_&&b&&h.jsx(ea.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(A=>h.jsx(N1,{node:A,depth:a+1,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p},A.id))})})]})}function CD(){const{projects:n,tasks:a,loadTasks:l,createProject:o,projectCreating:r}=on(),u=da(),[d,m]=S.useState(new Set),[p,g]=S.useState(new Set),[y,b]=S.useState(new Set),[_,T]=S.useState(!1),[j,A]=S.useState(""),[w,C]=S.useState(ey),[z,M]=S.useState(ey),[X,H]=S.useState(new Map),J=()=>{const q=!w;SD(q),C(q),q&&(M(!0),H(new Map))},W=(q,I)=>{const De=`${q}:${I}`;H(Fe=>{const gt=new Map(Fe),xt=gt.has(De)?gt.get(De):z;return gt.set(De,!xt),gt})},Y=(q,I)=>{const De=`${q}:${I}`;return X.has(De)?X.get(De):z},ne=un("/tasks/:taskId/*"),ge=un("/projects/:projectId"),U=(ne==null?void 0:ne.params.taskId)!=="new"?ne==null?void 0:ne.params.taskId:void 0,pe=ge==null?void 0:ge.params.projectId,te=S.useRef(d);te.current=d;const ye=S.useMemo(()=>new Map(a.map(q=>[q.id,q.status])),[a]),G=q=>{m(I=>{const De=new Set(I);return De.has(q)?De.delete(q):(De.add(q),l(q)),De})},L=q=>{g(I=>{const De=new Set(I);return De.has(q)?(De.delete(q),b(Fe=>new Set(Fe).add(q))):(De.add(q),b(Fe=>{const gt=new Set(Fe);return gt.delete(q),gt})),De})};S.useEffect(()=>{const q=new Set(a.filter(I=>I.parentTaskId).map(I=>I.parentTaskId));q.size>0&&g(I=>{const De=new Set(I);for(const Fe of q)y.has(Fe)||De.add(Fe);return De})},[a,y]),S.useEffect(()=>{pe&&!te.current.has(pe)&&(m(q=>new Set(q).add(pe)),l(pe))},[pe,l]);const K=()=>{!j.trim()||r||(o(j.trim()),A(""),T(!1))},[ee,ke]=S.useState(""),{directMatchTaskIds:je,treeMatchTaskIds:qe,visibleProjectIds:we,matchedProjectIds:xe,titleHighlights:Ae}=S.useMemo(()=>{if(!ee.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const q=Zv(n,ee,vD),I=Zv(a,ee,yD),De=new Set(q.map(Ze=>Ze.item.id)),Fe=new Set(I.map(Ze=>Ze.item.id)),gt=new Map;for(const Ze of I){const Ue=Ze.matches.find(bn=>bn.key==="title");Ue&&gt.set(Ze.item.id,Ue.indices)}const xt=new Set(De);for(const Ze of I)xt.add(Ze.item.projectId);const Gt=new Set(Fe),Je=new Map(a.map(Ze=>[Ze.id,Ze]));for(const Ze of[...Fe]){let Ue=Je.get(Ze);for(;Ue!=null&&Ue.parentTaskId;)Gt.add(Ue.parentTaskId),Ue=Je.get(Ue.parentTaskId)}return{directMatchTaskIds:Fe,treeMatchTaskIds:Gt,visibleProjectIds:xt,matchedProjectIds:De,titleHighlights:gt}},[ee,n,a]),Q=S.useRef(new Set);return S.useEffect(()=>{if(ee.trim())for(const q of n)!d.has(q.id)&&!Q.current.has(q.id)&&(Q.current.add(q.id),l(q.id))},[ee,n,d,l]),h.jsxs("div",{className:Ne.container,children:[h.jsxs("div",{className:Ne.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:Ne.headerActions,children:[h.jsx("button",{className:`${Ne.groupToggle} ${w?Ne.groupToggleActive:""}`,onClick:J,"aria-label":w?"Switch to tree view":"Group tasks by status","aria-pressed":w,title:w?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:Ne.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:ee,onChange:q=>ke(q.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:Ne.searchInput,"data-testid":"sidebar-search"}),_&&h.jsxs("div",{className:Ne.createForm,children:[h.jsx("input",{type:"text",value:j,onChange:q=>A(q.target.value),onKeyDown:q=>q.key==="Enter"&&K(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:Ne.createInput}),h.jsx("button",{onClick:K,className:Ne.createButton,disabled:r,children:r?h.jsx(Wv,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:Ne.creatingHint,children:[h.jsx(Wv,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:Ne.emptyCta,children:[h.jsx("button",{className:Ne.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:Ne.ctaDescription,children:"Organize your work into projects"})]}),n.map(q=>{if(we&&!we.has(q.id))return null;const I=je!==null,De=d.has(q.id)||I,Fe=a.filter(Ue=>Ue.projectId===q.id),gt=(xe==null?void 0:xe.has(q.id))??!1,xt=I&&!gt?w?je:qe:null,Gt=xt?Fe.filter(Ue=>xt.has(Ue.id)):Fe,Je=pe===q.id,Ze=De&&!w?AD(Gt):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{Je?G(q.id):(De||G(q.id),u(ao(q.id)))},className:`${Ne.projectRow} ${Je?Ne.selected:""}`,children:[h.jsx("span",{className:`${Ne.expandArrow} ${De?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.projectName,title:q.name,children:q.name}),h.jsx("span",{className:Ne.taskCount,children:Fe.length>0&&`${Fe.filter(Ue=>Ue.status==="complete").length}/${Fe.length}`}),h.jsx("button",{onClick:Ue=>{Ue.stopPropagation(),u(Vi(q.id))},title:"New task",className:Ne.newTaskButton,children:"+"})]}),h.jsx(qs,{children:De&&h.jsxs(ea.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:[w?TD(Gt,ye).map(Ue=>h.jsx(ED,{group:Ue,isExpanded:Y(q.id,Ue.status),onToggle:()=>W(q.id,Ue.status),selectedTaskId:U,navigate:u,titleHighlights:Ae},Ue.status)):Ze.map(Ue=>h.jsx(N1,{node:Ue,depth:0,expandedTasks:p,toggleTask:L,selectedTaskId:U,navigate:u,projectId:q.id,taskStatusById:ye,titleHighlights:Ae},Ue.id)),Gt.length===0&&h.jsx("div",{className:Ne.emptyTaskCta,children:h.jsx("button",{className:Ne.createTaskLink,onClick:()=>u(Vi(q.id)),children:"+ Create Task"})})]})})]},q.id)})]})}const jD="_container_1purk_1",ND="_content_1purk_30",ty={container:jD,content:ND},wD=320,w1=220,D1=600,k1="grackle-sidebar-width";function DD(){try{const n=localStorage.getItem(k1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=w1&&a<=D1)return a}}catch{}return wD}function kD(n){try{localStorage.setItem(k1,String(n))}catch{}}function RD(){const[n]=S.useState(DD),a=S.useRef(null);return S.useEffect(()=>{const l=a.current;if(!l)return;const o=new ResizeObserver(r=>{for(const u of r){const d=u.borderBoxSize[0];if(d){const m=Math.round(d.inlineSize);m>=w1&&m<=D1&&kD(m)}}});return o.observe(l),()=>{o.disconnect()}},[]),h.jsx("div",{className:ty.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:ty.content,children:h.jsx(CD,{})})})}const MD="_bar_teqep_1",OD="_barColumn_teqep_26",BD="_barRow_teqep_52",LD="_input_teqep_58",UD="_inputSmall_teqep_87",zD="_select_teqep_150",VD="_btnPrimary_teqep_180",ID="_btnDanger_teqep_211",HD="_btnGhost_teqep_250",GD="_badge_teqep_278",PD="_statusText_teqep_288",qD="_statusCompleted_teqep_293",YD="_statusFailed_teqep_297",FD="_statusBlocked_teqep_301",KD="_hintText_teqep_306",$D="_creatingHint_teqep_311",ZD="_errorHint_teqep_319",XD="_disconnectHint_teqep_325",fe={bar:MD,barColumn:OD,barRow:BD,input:LD,inputSmall:UD,select:zD,btnPrimary:VD,btnDanger:ID,btnGhost:HD,badge:GD,statusText:PD,statusCompleted:qD,statusFailed:YD,statusBlocked:FD,hintText:KD,creatingHint:$D,errorHint:ZD,disconnectHint:XD};function ny({value:n,onChange:a,testId:l}){return h.jsxs("select",{"data-testid":l,value:n,onChange:o=>a(o.target.value),className:fe.select,children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"})]})}function ay(n,a){if(!n)return!1;const l=a.find(o=>o.id===n);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function sy({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:fe.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function QD(){const{spawn:n,sendInput:a,kill:l,sessions:o,tasks:r,environments:u,personas:d,addEnvironment:m,provisionEnvironment:p,codespaces:g,codespaceError:y,codespaceListError:b,codespaceCreating:_,listCodespaces:T,createCodespace:j}=on(),{showToast:A}=fo(),w=da(),[C]=Lf(),z=un("/sessions/:sessionId"),M=un("/tasks/:taskId"),X=un("/tasks/:taskId/stream"),H=un("/tasks/:taskId/findings"),J=un("/tasks/:taskId/edit"),W=un("/sessions/new"),Y=un("/environments/new"),ne=un("/projects/:projectId"),ge=un("/tasks/new"),U=un("/"),pe=un("/settings/*"),te=z==null?void 0:z.params.sessionId,ye=(M==null?void 0:M.params.taskId)??(X==null?void 0:X.params.taskId)??(H==null?void 0:H.params.taskId),G=!!W,L=!!Y,K=!!ne,ee=!!ge,ke=!!J,je=!!U&&!G&&!L&&!K&&!ee,qe=!!pe,we=G?C.get("env")??"":"",xe=G?C.get("runtime")??"claude-code":"claude-code",[Ae,Q]=S.useState(""),[q,I]=S.useState(G?xe:"claude-code"),[De,Fe]=S.useState(""),gt=be=>{if(Fe(be),be){const re=d.find(ie=>ie.id===be);re!=null&&re.runtime&&I(re.runtime)}},[xt,Gt]=S.useState(""),[Je,Ze]=S.useState("local"),[Ue,bn]=S.useState("claude-code"),[Sn,Kn]=S.useState(""),[tn,$n]=S.useState(""),[Z,le]=S.useState(""),[ce,de]=S.useState(""),[Te,Ee]=S.useState(""),[We,Le]=S.useState(""),[lt,wt]=S.useState(""),[_t,Bt]=S.useState(""),[ot,Tt]=S.useState(""),[rn,vt]=S.useState("pick");S.useEffect(()=>{G&&I(xe)},[G,xe]);const Yt=te?o.find(be=>be.id===te):void 0,Ft=ye?r.find(be=>be.id===ye):void 0,ps=(Ft==null?void 0:Ft.latestSessionId)||void 0,ae=ps?o.find(be=>be.id===ps):void 0,Me=Ft?Ft.dependsOn.some(be=>{const re=r.find(ie=>ie.id===be);return re&&re.status!=="complete"}):!1;if(je||qe)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a session or click + to start"})});if(ke||ee)return h.jsx(h.Fragment,{});if(L){const be=se=>{if(!se.trim())return!0;const Et=Number(se);return Number.isInteger(Et)&&Et>=1&&Et<=65535},re=()=>!(!xt.trim()||Je==="ssh"&&!Sn.trim()||Je==="codespace"&&!We.trim()||(Je==="local"||Je==="ssh")&&!be(tn)),ie=()=>{if(!re())return;const se={};if(Je==="local"){if(Sn.trim()&&(se.host=Sn.trim()),tn.trim()){const Et=Number(tn);Number.isInteger(Et)&&(se.port=Et)}}else if(Je==="ssh"){if(se.host=Sn.trim(),Z.trim()&&(se.user=Z.trim()),tn.trim()){const Et=Number(tn);Number.isInteger(Et)&&(se.sshPort=Et)}lt.trim()&&(se.identityFile=lt.trim())}else Je==="docker"?(ce.trim()&&(se.image=ce.trim()),Te.trim()&&(se.repo=Te.trim())):Je==="codespace"&&(se.codespaceName=We.trim());m(xt.trim(),Je,se,Ue),A("Environment added successfully","success"),Gt(""),Ze("local"),bn("claude-code"),Kn(""),$n(""),le(""),de(""),Ee(""),Le(""),wt(""),Bt(""),Tt(""),vt("pick"),w(zi,{replace:!0})};return h.jsxs("div",{className:fe.barColumn,children:[h.jsxs("div",{className:fe.barRow,children:[h.jsx("span",{className:fe.badge,children:"new env"}),h.jsx("input",{type:"text",value:xt,onChange:se=>Gt(se.target.value),placeholder:"Environment name...",autoFocus:!0,className:fe.input}),h.jsxs("select",{value:Je,onChange:se=>{Ze(se.target.value),se.target.value==="codespace"&&(T(),vt("pick"),Le(""))},className:fe.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx(ny,{value:Ue,onChange:bn,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:ie,disabled:!re(),className:fe.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:fe.barRow,children:[Je==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Sn,onChange:se=>Kn(se.target.value),placeholder:"Host (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:tn,onChange:se=>$n(se.target.value),placeholder:"Port (optional)...",className:fe.inputSmall})]}),Je==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Sn,onChange:se=>Kn(se.target.value),placeholder:"Host (required)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:Z,onChange:se=>le(se.target.value),placeholder:"User (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:tn,onChange:se=>$n(se.target.value),placeholder:"SSH port (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:lt,onChange:se=>wt(se.target.value),placeholder:"Identity file (optional)...",className:fe.inputSmall})]}),Je==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ce,onChange:se=>de(se.target.value),placeholder:"Image (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:Te,onChange:se=>Ee(se.target.value),placeholder:"Repo (optional)...",className:fe.inputSmall})]}),Je==="codespace"&&rn==="pick"&&h.jsxs(h.Fragment,{children:[!b&&h.jsxs("select",{value:We,onChange:se=>{se.target.value==="__create__"?(vt("create"),Le("")):(Le(se.target.value),se.target.value&&!xt.trim()&&Gt(se.target.value))},disabled:_,className:fe.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(se=>h.jsxs("option",{value:se.name,children:[se.name," (",se.repository,") — ",se.state]},se.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:fe.creatingHint,children:"Creating codespace..."}),b&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.errorHint,children:b}),h.jsx("input",{type:"text",value:We,onChange:se=>Le(se.target.value),placeholder:"Or enter codespace name manually...",className:fe.inputSmall})]}),y&&!b&&h.jsx("span",{className:fe.errorHint,children:y})]}),Je==="codespace"&&rn==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:_t,onChange:se=>Bt(se.target.value),placeholder:"owner/repo",className:fe.inputSmall}),h.jsx("input",{type:"text",value:ot,onChange:se=>Tt(se.target.value),placeholder:"Machine type (optional)...",className:fe.inputSmall}),h.jsx("button",{onClick:()=>{_t.trim()&&(j(_t.trim(),ot.trim()||void 0),vt("pick"),Bt(""),Tt(""))},disabled:!_t.trim(),className:fe.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{vt("pick"),Bt(""),Tt("")},className:fe.btnGhost,children:"Cancel"})]})]})]})}if(K)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a task or click + to create one"})});if(ye&&Ft){if(Ft.status==="not_started"){const be=Me?Ft.dependsOn.map(re=>r.find(ie=>ie.id===re)).filter(re=>re&&re.status!=="complete").map(re=>re.title):[];return h.jsx("div",{className:fe.bar,children:Me?h.jsxs("span",{className:fe.statusBlocked,children:["Blocked by: ",be.join(", ")]}):h.jsx("span",{className:fe.hintText,children:"Use the buttons above to start or manage this task"})})}if(Ft.status==="working"||Ft.status==="paused"){if((ae==null?void 0:ae.status)==="idle"){const re=ae.environmentId,ie=ay(re,u),se=Et=>{Et.preventDefault();const Rn=Ft.latestSessionId||ps;!Ae.trim()||!Rn||ie||(a(Rn,Ae),Q(""))};return h.jsxs("form",{onSubmit:se,className:fe.bar,children:[ie&&re&&h.jsx(sy,{environmentId:re,onReconnect:p}),h.jsx("input",{type:"text",value:Ae,onChange:Et=>Q(Et.target.value),placeholder:"Type a message...",autoFocus:!ie,disabled:ie,className:fe.input}),h.jsx("span",{title:ie?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ae.trim()||ie,className:fe.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input})})}if(Ft.status==="complete")return h.jsxs("div",{className:fe.bar,children:[h.jsx("span",{className:`${fe.statusText} ${fe.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>w(Vi(Ft.projectId)),className:fe.btnPrimary,children:"+ New Task"})]});if(Ft.status==="failed")return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:`${fe.statusText} ${fe.statusFailed}`,children:"Task failed"})})}if(G){const be=re=>{re.preventDefault(),!(!Ae.trim()||!we)&&(n(we,Ae,void 0,q,De),A("Session started","success"),Q(""),Fe(""))};return h.jsxs("form",{onSubmit:be,className:fe.bar,children:[h.jsx("span",{className:fe.badge,children:"new chat"}),h.jsx("input",{type:"text",value:Ae,onChange:re=>Q(re.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:fe.input}),h.jsx(ny,{value:q,onChange:I,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:De,onChange:re=>gt(re.target.value),className:fe.select,children:[h.jsx("option",{value:"",children:"No persona"}),d.map(re=>h.jsx("option",{value:re.id,children:re.name},re.id))]}),h.jsx("button",{type:"submit",disabled:!Ae.trim()||!we,className:fe.btnPrimary,children:"Go"})]})}if(te){const be=(Yt==null?void 0:Yt.status)==="running",re=(Yt==null?void 0:Yt.status)==="idle",ie=Yt!==void 0&&["completed","failed","interrupted"].includes(Yt.status);if(be)return h.jsxs("div",{className:fe.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input}),h.jsx("button",{onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]});if(re){const se=ay(Yt.environmentId,u),Et=Rn=>{Rn.preventDefault(),!(!Ae.trim()||se)&&(a(te,Ae),Q(""))};return h.jsxs("form",{onSubmit:Et,className:fe.bar,children:[se&&Yt.environmentId&&h.jsx(sy,{environmentId:Yt.environmentId,onReconnect:p}),h.jsx("input",{type:"text",value:Ae,onChange:Rn=>Q(Rn.target.value),placeholder:"Type a message...",autoFocus:!se,disabled:se,className:fe.input}),h.jsx("span",{title:se?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ae.trim()||se,className:fe.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]})}if(ie)return h.jsxs("div",{className:fe.bar,children:[h.jsxs("span",{className:`${fe.statusText} ${fe.hintText}`,children:["Session ",Yt.status]}),h.jsx("button",{onClick:()=>w(Ry(Yt.environmentId,Yt.runtime)),className:fe.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Loading..."})})}const JD="_toast_da8ll_1",WD="_success_da8ll_18",ek="_icon_da8ll_22",tk="_error_da8ll_25",nk="_warning_da8ll_32",ak="_info_da8ll_38",sk="_message_da8ll_53",ik="_close_da8ll_60",ql={toast:JD,success:WD,icon:ek,error:tk,warning:nk,info:ak,message:sk,close:ik},lk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function ok({toast:n,onDismiss:a}){return S.useEffect(()=>{const l=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(l)},[n.id,n.duration,a]),h.jsxs(ea.div,{className:`${ql.toast} ${ql[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:ql.icon,"aria-hidden":"true",children:lk[n.variant]}),h.jsx("span",{className:ql.message,children:n.message}),h.jsx("button",{type:"button",className:ql.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const rk="_container_qqse2_1",ck={container:rk};function uk(){const{toasts:n,dismissToast:a}=fo();return h.jsx("div",{className:ck.container,"data-testid":"toast-container",children:h.jsx(qs,{children:n.map(l=>h.jsx(ok,{toast:l,onDismiss:a},l.id))})})}function dk(n,a){const l=S.useRef(null);S.useEffect(()=>{const o=l.current;if(l.current=n,o===null)return;const r=new Map;for(const d of o)r.set(d.id,d);const u=new Set;for(const d of n){u.add(d.id);const m=r.get(d.id);m&&m.status!==d.status&&(d.status==="connecting"||d.status==="sleeping"||(d.status==="connected"?a("Environment connected","success"):d.status==="error"?a("Environment provision failed","error"):d.status==="disconnected"&&(m.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))))}for(const d of o)u.has(d.id)||a("Environment removed","info")},[n,a])}const fk="_panelContainer_1blx0_1",hk="_emptyState_1blx0_8",mk="_projectSummary_1blx0_17",pk="_projectSummaryTitle_1blx0_28",gk="_projectSummarySubtitle_1blx0_32",vk="_header_1blx0_36",yk="_headerInfo_1blx0_63",bk="_killButton_1blx0_69",Sk="_headerTitle_1blx0_98",xk="_headerActions_1blx0_108",_k="_taskStatusBadge_1blx0_115",Tk="_taskBranch_1blx0_124",Ek="_taskBlockedBadge_1blx0_130",Ak="_btnPrimary_1blx0_138",Ck="_btnDanger_1blx0_169",jk="_btnGhost_1blx0_208",Nk="_tabBar_1blx0_264",wk="_tab_1blx0_264",Dk="_active_1blx0_285",kk="_eventScroll_1blx0_290",Rk="_tabContent_1blx0_296",Mk="_noContext_1blx0_301",Ok="_overviewContent_1blx0_307",Bk="_overviewDashboard_1blx0_316",Lk="_overviewHero_1blx0_322",Uk="_statusBadge_1blx0_329",zk="_statusPending_1blx0_341",Vk="_statusInProgress_1blx0_351",Ik="_statusDone_1blx0_361",Hk="_statusFailed_1blx0_366",Gk="_statusWaitingInput_1blx0_371",Pk="_overviewBranchPill_1blx0_376",qk="_branchLink_1blx0_391",Yk="_overviewSection_1blx0_402",Fk="_overviewLabel_1blx0_408",Kk="_overviewValue_1blx0_415",$k="_overviewMuted_1blx0_420",Zk="_overviewMarkdown_1blx0_426",Xk="_envRow_1blx0_495",Qk="_envDot_1blx0_501",Jk="_envDotGreen_1blx0_508",Wk="_envDotYellow_1blx0_512",eR="_envDotRed_1blx0_516",tR="_envDotGray_1blx0_520",nR="_depList_1blx0_524",aR="_depItem_1blx0_530",sR="_depBlocked_1blx0_537",iR="_depDone_1blx0_541",lR="_timeline_1blx0_545",oR="_timelineRow_1blx0_551",rR="_timelineKey_1blx0_558",cR="_timelineValue_1blx0_564",uR="_timelineDelta_1blx0_568",dR="_reviewNotes_1blx0_579",fR="_waitingMessage_1blx0_596",hR="_errorMessage_1blx0_600",mR="_eventOverflowWarning_1blx0_604",pR="_attemptSelector_1blx0_618",gR="_attemptLabel_1blx0_629",vR="_attemptButton_1blx0_633",yR="_attemptActive_1blx0_650",bR="_attemptStatus_1blx0_656",SR="_emptyCta_1blx0_662",xR="_ctaTitle_1blx0_674",_R="_ctaDescription_1blx0_680",TR="_ctaButton_1blx0_687",ER="_projectHeader_1blx0_736",AR="_projectName_1blx0_761",CR="_projectMeta_1blx0_774",jR="_metaRow_1blx0_782",NR="_metaLabel_1blx0_789",wR="_metaValue_1blx0_799",DR="_metaPlaceholder_1blx0_809",kR="_editButton_1blx0_814",RR="_editInput_1blx0_830",MR="_editTextarea_1blx0_862",OR="_editSelect_1blx0_898",BR="_archiveButton_1blx0_931",LR="_repoLink_1blx0_961",UR="_metaValueClickable_1blx0_971",zR="_editHint_1blx0_990",VR="_editError_1blx0_999",IR="_editInputInvalid_1blx0_1006",HR="_unsavedDot_1blx0_1011",GR="_metaToggle_1blx0_1019",PR="_metaToggleArrow_1blx0_1040",qR="_metaToggleArrowOpen_1blx0_1045",YR="_progressBarContainer_1blx0_1049",FR="_progressBar_1blx0_1049",KR="_progressFill_1blx0_1065",$R="_progressLabel_1blx0_1072",ZR="_metaTimestamps_1blx0_1079",XR="_metaTimestamp_1blx0_1079",QR="_editFieldWrapper_1blx0_1095",D={panelContainer:fk,emptyState:hk,projectSummary:mk,projectSummaryTitle:pk,projectSummarySubtitle:gk,header:vk,headerInfo:yk,killButton:bk,headerTitle:Sk,headerActions:xk,taskStatusBadge:_k,taskBranch:Tk,taskBlockedBadge:Ek,btnPrimary:Ak,btnDanger:Ck,btnGhost:jk,tabBar:Nk,tab:wk,active:Dk,eventScroll:kk,tabContent:Rk,noContext:Mk,overviewContent:Ok,overviewDashboard:Bk,overviewHero:Lk,statusBadge:Uk,statusPending:zk,statusInProgress:Vk,statusDone:Ik,statusFailed:Hk,statusWaitingInput:Gk,overviewBranchPill:Pk,branchLink:qk,overviewSection:Yk,overviewLabel:Fk,overviewValue:Kk,overviewMuted:$k,overviewMarkdown:Zk,envRow:Xk,envDot:Qk,envDotGreen:Jk,envDotYellow:Wk,envDotRed:eR,envDotGray:tR,depList:nR,depItem:aR,depBlocked:sR,depDone:iR,timeline:lR,timelineRow:oR,timelineKey:rR,timelineValue:cR,timelineDelta:uR,reviewNotes:dR,waitingMessage:fR,errorMessage:hR,eventOverflowWarning:mR,attemptSelector:pR,attemptLabel:gR,attemptButton:vR,attemptActive:yR,attemptStatus:bR,emptyCta:SR,ctaTitle:xR,ctaDescription:_R,ctaButton:TR,projectHeader:ER,projectName:AR,projectMeta:CR,metaRow:jR,metaLabel:NR,metaValue:wR,metaPlaceholder:DR,editButton:kR,editInput:RR,editTextarea:MR,editSelect:OR,archiveButton:BR,repoLink:LR,metaValueClickable:UR,editHint:zR,editError:VR,editInputInvalid:IR,unsavedDot:HR,metaToggle:GR,metaToggleArrow:PR,metaToggleArrowOpen:qR,progressBarContainer:YR,progressBar:FR,progressFill:KR,progressLabel:$R,metaTimestamps:ZR,metaTimestamp:XR,editFieldWrapper:QR};function JR(){const{projects:n,createProject:a}=on();return n.length===0?h.jsxs("div",{className:D.emptyCta,children:[h.jsx("div",{className:D.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:D.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:D.ctaButton,onClick:()=>{const l=window.prompt("Project name:");l!=null&&l.trim()&&a(l.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:D.emptyState,children:"Select a project or task to get started"})}function WR(n,a){const l=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const u=a.get(o);l.unshift(u),o=u.parentTaskId||void 0}return l}const Gs={label:"Home",url:"/"};function eM(n){return n?[Gs,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Gs,{label:"Settings",url:void 0}]}function tM(){return[Gs,{label:"New Environment",url:void 0}]}function nM(){return[Gs,{label:"New Chat",url:void 0}]}function aM(n){return[Gs,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function sM(n,a){const l=a.find(o=>o.id===n);return[Gs,{label:(l==null?void 0:l.name)??"Project",url:void 0}]}function iM(n,a,l){const o=WR(n,l),r=l.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,m=[Gs];d&&m.push({label:d.name,url:ao(d.id)});for(let g=0;g<o.length-1;g++)m.push({label:o[g].title,url:Hs(o[g].id)});const p=o[o.length-1];return m.push({label:(p==null?void 0:p.title)??n,url:void 0}),m}function lM(){const n=nM();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Enter a prompt below to start a new session"})]})}function R1(n){const a=[];for(const l of n){const o=a[a.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+l.content}:a.push(l)}return a}function M1(n){const a=new Map;for(const u of n)if(u.raw)try{a.set(u,JSON.parse(u.raw))}catch{}const l=new Map;for(const u of n){if(u.eventType!=="tool_use")continue;const d=a.get(u);if(!(!d||typeof d.id!="string"))try{const m=JSON.parse(u.content);l.set(d.id,{tool:m.tool,args:m.args})}catch{}}const o=new Set;return n.map(u=>{if(u.eventType!=="tool_result")return u;const d=a.get(u);if(!d||typeof d.tool_use_id!="string")return u;const m=l.get(d.tool_use_id);return m?(o.add(d.tool_use_id),{...u,toolUseCtx:m}):u}).filter(u=>{if(u.eventType!=="tool_use")return!0;const d=a.get(u);return d&&typeof d.id=="string"?!o.has(d.id):!0})}function oM({sessionId:n,session:a,isActive:l,onKill:o}){return h.jsxs("div",{className:D.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:D.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),l&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:D.killButton,children:"×"})]})]})}function rM({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function cM({sessionEvents:n,session:a,eventsDropped:l,scrollRef:o}){const r=a&&["completed","failed","interrupted"].includes(a.status),u=r?`Session ${a.status} with no events recorded.`:"Waiting for events...";return h.jsxs("div",{ref:o,className:D.eventScroll,children:[n.length===0&&h.jsx("div",{className:r?D.errorMessage:D.waitingMessage,children:u}),h.jsx(rM,{eventsDropped:l}),n.map((d,m)=>h.jsx(E1,{event:d,toolUseCtx:d.toolUseCtx},`${d.sessionId}-${d.timestamp}-${m}`))]})}function uM(){const{sessionId:n}=oc(),{events:a,eventsDropped:l,sessions:o,kill:r,loadSessionEvents:u}=on(),d=S.useRef(null),m=S.useRef(void 0),p=aM(n),g=o.find(_=>_.id===n)??void 0,y=S.useMemo(()=>{const _=n?a.filter(T=>T.sessionId===n):[];return M1(R1(_))},[a,n]);if(S.useEffect(()=>{n&&n!==m.current&&(m.current=n,u(n))},[n,u]),S.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[y.length]),!n)return h.jsx("div",{className:D.emptyState,children:"No session selected"});const b=(g==null?void 0:g.status)==="running"||(g==null?void 0:g.status)==="idle";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:p}),h.jsx(oM,{sessionId:n,session:g,isActive:b,onKill:r}),h.jsx(cM,{sessionEvents:y,session:g,eventsDropped:l,scrollRef:d})]})}const iy=220,ly=70,dM=40,fM=60,hM="hierarchy",mM="dependency";function pM(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new r0.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:dM,ranksep:fM});const l=new Map(n.map(d=>[d.id,d])),o=new Map;for(const d of n)if(d.parentTaskId&&l.has(d.parentTaskId)){const m=o.get(d.parentTaskId)||[];m.push(d),o.set(d.parentTaskId,m)}for(const d of n)a.setNode(d.id,{width:iy,height:ly});const r=[];for(const d of n){if(d.parentTaskId&&l.has(d.parentTaskId)){const m=`hierarchy-${d.parentTaskId}-${d.id}`;a.setEdge(d.parentTaskId,d.id,{},m),r.push({id:m,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:hM},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of d.dependsOn)if(l.has(m)){const p=`dependency-${m}-${d.id}`;a.setEdge(m,d.id,{},p),r.push({id:p,source:m,target:d.id,type:"smoothstep",data:{edgeType:mM},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return r0.layout(a),{nodes:n.map(d=>{const m=a.node(d.id),p=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:m.x-iy/2,y:m.y-ly/2},data:{task:d,childCount:p.length,doneChildCount:p.filter(g=>g.status==="complete").length,hasDependencies:d.dependsOn.length>0}}}),edges:r}},[n])}const gM="_dagContainer_3al6d_1",vM="_taskNode_3al6d_26",yM="_taskNodeBorder_3al6d_48",bM="_taskNodeContent_3al6d_54",SM="_taskNodeHeader_3al6d_64",xM="_taskNodeIcon_3al6d_71",_M="_taskNodeTitle_3al6d_76",TM="_taskNodeBadges_3al6d_84",EM="_childBadge_3al6d_89",AM="_depBadge_3al6d_101",CM="_handle_3al6d_113",jM="_emptyCta_3al6d_120",NM="_ctaDescription_3al6d_131",wM="_ctaButton_3al6d_138",dn={dagContainer:gM,taskNode:vM,taskNodeBorder:yM,taskNodeContent:bM,taskNodeHeader:SM,taskNodeIcon:xM,taskNodeTitle:_M,taskNodeBadges:TM,childBadge:EM,depBadge:AM,handle:CM,emptyCta:jM,ctaDescription:NM,ctaButton:wM},oy={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 DM({data:n}){const{task:a,childCount:l,doneChildCount:o,hasDependencies:r}=n,u=oy[a.status]||oy.not_started;return h.jsxs("div",{className:dn.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(c0,{type:"target",position:u0.Top,className:dn.handle}),h.jsx("div",{className:dn.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:dn.taskNodeContent,children:[h.jsxs("div",{className:dn.taskNodeHeader,children:[h.jsx("span",{className:dn.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:dn.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:dn.taskNodeBadges,children:[l>0&&h.jsxs("span",{className:dn.childBadge,children:[o,"/",l]}),r&&h.jsx("span",{className:dn.depBadge,children:"dep"})]})]}),h.jsx(c0,{type:"source",position:u0.Bottom,className:dn.handle})]})}const kM={pending:"--text-tertiary",assigned:"--accent-blue",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",failed:"--accent-red",waiting_input:"--accent-yellow"},RM={task:DM};function MM({projectId:n}){const{tasks:a}=on(),l=da(),{resolvedThemeId:o}=Vy(),r=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),{nodes:u,edges:d}=pM(r),m=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),b={};for(const[_,T]of Object.entries(kM))b[_]=y.getPropertyValue(T).trim()||"#6b7a8d";return b},[o]),p=S.useCallback((y,b)=>{l(Hs(b.id))},[l]),g=S.useCallback(y=>{const b=y.data;return m[b.task.status]||m.pending},[m]);return r.length===0?h.jsxs("div",{className:dn.emptyCta,children:[h.jsx("button",{className:dn.ctaButton,onClick:()=>l(Vi(n)),children:"Create Task"}),h.jsx("div",{className:dn.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:dn.dagContainer,children:h.jsxs(Xx,{nodes:u,edges:d,nodeTypes:RM,onNodeClick:p,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(Qx,{variant:Jx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(Wx,{showInteractive:!1}),h.jsx(e_,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function OM(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function ry(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const u=Math.floor(r/60);if(u<24)return`${u}h ago`;const d=Math.floor(u/24);return d<30?`${d}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function BM(){const{projectId:n}=oc(),a=da(),{tasks:l,environments:o,projects:r,archiveProject:u,updateProject:d}=on(),[m,p]=S.useState("tasks"),[g,y]=S.useState(!1),[b,_]=S.useState(null),[T,j]=S.useState(""),[A,w]=S.useState(""),[C,z]=S.useState(!1),M=S.useRef(void 0),X=S.useRef(null),H=S.useRef(null),J=S.useRef(null),W=S.useRef(null),Y=S.useRef(null),ne=S.useRef(null),ge=sM(n,r);S.useEffect(()=>{const Q=M.current;M.current=n,!(Q===void 0||Q===n)&&(b!==null||T!=="")&&(_(null),j(""))},[n,b,T]),S.useEffect(()=>{if(b===null)return;const Q=b==="name"?H.current:b==="description"?J.current:b==="repoUrl"?W.current:b==="worktreeBasePath"?ne.current:Y.current;if(!Q)return;const q=window.setTimeout(()=>{Q.focus()},0);return()=>{window.clearTimeout(q)}},[b]);const U=r.find(Q=>Q.id===n),pe=l.filter(Q=>Q.projectId===n),te=pe.filter(Q=>Q.status==="complete").length,ye=pe.length,G=ye>0?Math.round(te/ye*100):0,L=100,K=(Q,q)=>{X.current=Q,_(Q),j(q),w("")},ee=()=>{X.current=null,_(null),j(""),w("")},ke=(Q,q)=>{if(Q==="name"){const I=q.trim();if(!I)return"Name is required";if(I.length>L)return`Max ${L} characters`}if(Q==="repoUrl"){const I=q.trim();if(I&&!/^https?:\/\/.+/.test(I))return"Must be a valid http(s) URL"}return""},je=Q=>{if(!U)return;const q=T.trim(),I=ke(Q,T);if(I){w(I);return}if(Q==="name"){if(q===U.name){ee();return}d(U.id,{name:q})}else if(Q==="description"){const De=T;if(De===U.description){ee();return}d(U.id,{description:De})}else if(Q==="repoUrl"){if(q===U.repoUrl){ee();return}d(U.id,{repoUrl:q})}else if(Q==="defaultEnvironmentId"){if(T===U.defaultEnvironmentId){ee();return}d(U.id,{defaultEnvironmentId:T})}else{if(q===U.worktreeBasePath){ee();return}d(U.id,{worktreeBasePath:q})}ee()},qe=(Q,q)=>{Q.key==="Escape"?ee():Q.key==="Enter"&&q!=="description"&&je(q)},we=Q=>U?Q==="name"?T.trim()!==U.name:Q==="description"?T!==U.description:Q==="repoUrl"?T.trim()!==U.repoUrl:Q==="defaultEnvironmentId"?T!==U.defaultEnvironmentId:T.trim()!==U.worktreeBasePath:!1,xe=o.find(Q=>Q.id===(U==null?void 0:U.defaultEnvironmentId)),Ae=b==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:ge}),h.jsxs("div",{className:D.projectHeader,children:[h.jsx("span",{className:D.projectName,"data-testid":"project-name",children:b==="name"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:H,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:T,onChange:Q=>{j(Q.target.value),w("")},onBlur:Q=>{if(X.current==="name"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="name"||je("name")},onKeyDown:Q=>qe(Q,"name"),maxLength:L,"aria-label":"Project name","data-testid":"edit-name-input"}),we("name")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>K("name",(U==null?void 0:U.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(U==null?void 0:U.name)||n}`,"data-testid":"edit-name-button",children:[(U==null?void 0:U.name)||n,h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:D.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:D.metaToggle,onClick:()=>z(!C),"aria-expanded":!C,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${D.metaToggleArrow} ${C?"":D.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!C&&h.jsxs("div",{className:D.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Description"}),h.jsx("div",{className:D.metaValue,children:b==="description"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("textarea",{ref:J,className:D.editTextarea,value:T,onChange:Q=>{j(Q.target.value),w("")},onBlur:Q=>{if(X.current==="description"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="description"||je("description")},onKeyDown:Q=>qe(Q,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),we("description")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>K("description",(U==null?void 0:U.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[U!=null&&U.description?h.jsx("span",{className:D.overviewMarkdown,children:h.jsx(jf,{remarkPlugins:[Nf],children:U.description})}):h.jsx("span",{className:D.metaPlaceholder,children:"No description"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Repository"}),h.jsx("div",{className:D.metaValue,children:b==="repoUrl"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:W,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:T,onChange:Q=>{j(Q.target.value),w("")},onBlur:Q=>{if(X.current==="repoUrl"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="repoUrl"||je("repoUrl")},onKeyDown:Q=>qe(Q,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),we("repoUrl")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:Q=>{Q.preventDefault(),K("repoUrl",(U==null?void 0:U.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[U!=null&&U.repoUrl&&/^https?:\/\//i.test(U.repoUrl)?h.jsx("a",{className:D.repoLink,href:U.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:Q=>Q.stopPropagation(),children:U.repoUrl}):U!=null&&U.repoUrl?h.jsx("span",{children:U.repoUrl}):h.jsx("span",{className:D.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Environment"}),h.jsx("div",{className:D.metaValue,children:b==="defaultEnvironmentId"?h.jsxs("select",{ref:Y,className:D.editSelect,value:T,onChange:Q=>{X.current=null,j(Q.target.value);const q=Q.target.value;U&&q!==U.defaultEnvironmentId&&d(U.id,{defaultEnvironmentId:q}),ee()},onBlur:Q=>{if(X.current==="defaultEnvironmentId"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="defaultEnvironmentId"||ee()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(Q=>h.jsx("option",{value:Q.id,children:Q.displayName},Q.id))]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>K("defaultEnvironmentId",(U==null?void 0:U.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[xe?h.jsxs("span",{className:D.envRow,children:[h.jsx("span",{className:`${D.envDot} ${OM(xe.status)}`}),xe.displayName]}):h.jsx("span",{className:D.metaPlaceholder,children:(U==null?void 0:U.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Worktree Base"}),h.jsx("div",{className:D.metaValue,children:b==="worktreeBasePath"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:ne,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:T,onChange:Q=>{j(Q.target.value),w("")},onBlur:Q=>{if(X.current==="worktreeBasePath"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="worktreeBasePath"||je("worktreeBasePath")},onKeyDown:Q=>qe(Q,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Worktree base path","data-testid":"edit-worktree-base-path-input"}),we("worktreeBasePath")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:Ae})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>K("worktreeBasePath",(U==null?void 0:U.worktreeBasePath)||""),title:"Click to edit worktree base path","aria-label":"Edit worktree base path","data-testid":"edit-worktree-base-path-button",children:[U!=null&&U.worktreeBasePath?h.jsx("span",{children:U.worktreeBasePath}):h.jsx("span",{className:D.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),U&&h.jsxs("div",{className:D.metaTimestamps,children:[h.jsxs("span",{className:D.metaTimestamp,children:["Created ",ry(U.createdAt)]}),U.updatedAt&&U.updatedAt!==U.createdAt&&h.jsxs("span",{className:D.metaTimestamp,children:["· Updated ",ry(U.updatedAt)]})]})]}),ye>0&&h.jsxs("div",{className:D.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:D.progressBar,children:h.jsx("div",{className:D.progressFill,style:{width:`${G}%`}})}),h.jsxs("span",{className:D.progressLabel,children:[te,"/",ye]})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${D.tab} ${m==="graph"?D.active:""}`,onClick:()=>p("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${D.tab} ${m==="tasks"?D.active:""}`,onClick:()=>p("tasks"),children:"Tasks"})]}),m==="tasks"&&ye>0&&h.jsxs("div",{className:D.projectSummary,children:[h.jsx("span",{className:D.projectSummaryTitle,children:`${te}/${ye} tasks complete`}),h.jsx("span",{className:D.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&ye===0&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>a(Vi(n)),children:"Create Task"}),h.jsx("div",{className:D.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="graph"&&h.jsx(MM,{projectId:n}),h.jsx(gc,{isOpen:g,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{U&&(u(U.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const LM="_container_yc33j_1",UM="_header_yc33j_8",zM="_headerTitle_yc33j_35",VM="_badge_yc33j_44",IM="_headerActions_yc33j_54",HM="_body_yc33j_61",GM="_formContent_yc33j_68",PM="_section_yc33j_75",qM="_label_yc33j_81",YM="_titleInput_yc33j_88",FM="_descriptionTextarea_yc33j_121",KM="_parentContext_yc33j_157",$M="_parentLabel_yc33j_165",ZM="_parentName_yc33j_172",XM="_depList_yc33j_210",QM="_depItem_yc33j_216",JM="_depItemSelected_yc33j_238",WM="_noDeps_yc33j_242",e3="_btnPrimary_yc33j_248",t3="_btnGhost_yc33j_279",pt={container:LM,header:UM,headerTitle:zM,badge:VM,headerActions:IM,body:HM,formContent:GM,section:PM,label:qM,titleInput:YM,descriptionTextarea:FM,parentContext:KM,parentLabel:$M,parentName:ZM,depList:XM,depItem:QM,depItemSelected:JM,noDeps:WM,btnPrimary:e3,btnGhost:t3};function O1({mode:n,taskId:a,projectId:l,parentTaskId:o}){const{tasks:r,createTask:u,updateTask:d}=on(),{showToast:m}=fo(),p=da(),g=n==="edit",y=g&&a?r.find(U=>U.id===a):void 0,b=g?(y==null?void 0:y.projectId)??"":l??"",_=g?(y==null?void 0:y.parentTaskId)??"":o??"",T=_?r.find(U=>U.id===_):void 0,[j,A]=S.useState((y==null?void 0:y.title)??""),[w,C]=S.useState((y==null?void 0:y.description)??""),[z,M]=S.useState((y==null?void 0:y.dependsOn)??[]),X=S.useRef(!1);S.useEffect(()=>{g&&y&&!X.current&&(X.current=!0,A(y.title),C(y.description),M(y.dependsOn))},[g,y]);const H=r.filter(U=>U.projectId===b&&(!g||U.id!==a)&&U.id!==_),J=j.trim().length>0&&(!g||y!==void 0)&&(g||b.length>0),W=U=>{M(pe=>pe.includes(U)?pe.filter(te=>te!==U):[...pe,U])},Y=()=>{J&&(g&&y===void 0||(g&&a?(d(a,j.trim(),w,z),m("Task updated","success"),p(Hs(a),{replace:!0})):(u(b,j.trim(),w,z.length>0?z:void 0,_||void 0),m("Task created","success"),p(ao(b),{replace:!0}))))},ne=()=>{p(g&&a?Hs(a):ao(b))},ge=g?"edit task":_?"child task":"new task";return h.jsxs("div",{className:pt.container,children:[h.jsxs("div",{className:pt.header,children:[h.jsxs("div",{className:pt.headerTitle,children:[h.jsx("span",{className:pt.badge,children:ge}),T&&h.jsxs("span",{className:pt.parentContext,children:[h.jsx("span",{className:pt.parentLabel,children:"Child of"}),h.jsx("span",{className:pt.parentName,children:T.title})]})]}),h.jsxs("div",{className:pt.headerActions,children:[h.jsx("button",{onClick:Y,disabled:!J,className:pt.btnPrimary,"data-testid":"task-edit-save",children:g?"Save Changes":"Create"}),h.jsx("button",{onClick:ne,className:pt.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:pt.body,children:h.jsxs("div",{className:pt.formContent,children:[h.jsxs("div",{className:pt.section,children:[h.jsx("label",{className:pt.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:j,onChange:U=>A(U.target.value),placeholder:"Task title...",autoFocus:!0,className:pt.titleInput,"data-testid":"task-edit-title",onKeyDown:U=>{U.key==="Enter"&&J&&Y()}})]}),h.jsxs("div",{className:pt.section,children:[h.jsx("label",{className:pt.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:w,onChange:U=>C(U.target.value),placeholder:"Describe the task... (markdown supported)",className:pt.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:pt.section,children:[h.jsx("div",{className:pt.label,children:"Dependencies"}),H.length===0?h.jsx("div",{className:pt.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:pt.depList,children:H.map(U=>{const pe=z.includes(U.id);return h.jsxs("label",{className:`${pt.depItem} ${pe?pt.depItemSelected:""}`,"data-testid":`dep-option-${U.id}`,children:[h.jsx("input",{type:"checkbox",checked:pe,onChange:()=>W(U.id)}),U.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",U.status,")"]})]},U.id)})})]})]})})]})}function n3(){const[n]=Lf(),a=n.get("project")??"",l=n.get("parent")??void 0;return a?h.jsx(O1,{mode:"new",projectId:a,parentTaskId:l}):h.jsx(Ir,{to:"/",replace:!0})}function a3(){const{taskId:n}=oc();return h.jsx(O1,{mode:"edit",taskId:n})}const s3="_container_u6n1v_1",i3="_emptyState_u6n1v_8",l3="_card_u6n1v_14",o3="_cardHeader_u6n1v_34",r3="_categoryBadge_u6n1v_41",c3="_findingTitle_u6n1v_49",u3="_findingDate_u6n1v_55",d3="_findingContent_u6n1v_61",f3="_tags_u6n1v_67",h3="_tag_u6n1v_67",la={container:s3,emptyState:i3,card:l3,cardHeader:o3,categoryBadge:r3,findingTitle:c3,findingDate:u3,findingContent:d3,tags:f3,tag:h3};function m3(n){const a=new Date(n),l=new Date,o=l.getTime()-a.getTime(),r=Math.floor(o/1e3),u=Math.floor(r/60),d=Math.floor(u/60),m=Math.floor(d/24);if(r<60)return"just now";if(u<60)return`${u}m ago`;if(d<24)return`${d}h ago`;if(m===1)return"yesterday";if(m<7)return`${m} days ago`;const p=a.getFullYear()===l.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),y=a.getDate();return p?`${g} ${y}`:`${g} ${y} ${a.getFullYear()}`}const cy={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 p3({projectId:n}){const{findings:a}=on(),l=a.filter(o=>o.projectId===n);return l.length===0?h.jsx("div",{className:la.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:la.container,children:l.map((o,r)=>{const u=cy[o.category]||cy.general;return h.jsxs(ea.div,{className:la.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:la.cardHeader,children:[h.jsx("span",{className:la.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:la.findingTitle,children:o.title}),h.jsx("span",{className:la.findingDate,title:o.createdAt,children:m3(o.createdAt)})]}),h.jsx("div",{className:la.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:la.tags,children:o.tags.map(d=>h.jsx("span",{className:la.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function zr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Kd(n,a){if(!n||!a)return;const l=new Date(a).getTime()-new Date(n).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),r=Math.floor(l%6e4/1e3);if(o===0)return`${r}s`;const u=Math.floor(o/60),d=o%60;return u===0?`${o}m ${r}s`:`${u}h ${d}m`}function g3(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function v3({status:n}){const a={not_started:"Not Started",working:"Working",paused:"Paused",complete:"Complete",failed:"Failed"},l={not_started:D.statusPending,working:D.statusInProgress,paused:D.statusWaitingInput,complete:D.statusDone,failed:D.statusFailed};return h.jsx("span",{className:`${D.statusBadge} ${l[n]??D.statusPending}`,children:a[n]??n})}function y3({task:n,tasksById:a,environments:l,projects:o,taskSessions:r}){const u=r.length>0?r[r.length-1]:void 0,d=(u==null?void 0:u.environmentId)??"",m=d?l.find(y=>y.id===d):void 0,p=o.find(y=>y.id===n.projectId),g=n.branch&&(p!=null&&p.repoUrl)?`${p.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:D.overviewDashboard,children:[h.jsxs("div",{className:D.overviewHero,children:[h.jsx(v3,{status:n.status}),n.branch&&h.jsx("span",{className:D.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:D.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Description"}),h.jsx("div",{className:D.overviewMarkdown,children:h.jsx(jf,{remarkPlugins:[Nf],children:n.description})})]}),d&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Environment"}),h.jsxs("div",{className:D.envRow,children:[m&&h.jsx("span",{className:`${D.envDot} ${g3(m.status)}`,title:m.status,"aria-label":`Status: ${m.status}`,role:"img"}),h.jsx("span",{className:D.overviewValue,children:(m==null?void 0:m.displayName)??d})]})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:D.overviewMuted,children:"None"}):h.jsx("div",{className:D.depList,children:n.dependsOn.map(y=>{const b=a.get(y),_=(b==null?void 0:b.status)==="complete";return h.jsxs("div",{className:`${D.depItem} ${_?D.depDone:D.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(b==null?void 0:b.title)??y})]},y)})})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:D.timeline,children:[n.createdAt&&h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Created"}),h.jsx("span",{className:D.timelineValue,children:zr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=Kd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Assigned"}),h.jsx("span",{className:D.timelineValue,children:zr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=Kd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Started"}),h.jsx("span",{className:D.timelineValue,children:zr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=Kd(n.startedAt,n.completedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Completed"}),h.jsx("span",{className:D.timelineValue,children:zr(n.completedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:D.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:D.reviewNotes,children:n.reviewNotes})]})]})}function b3({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown."]})}function S3({task:n,sessionId:a,isBlocked:l,onStart:o,onResume:r,onStop:u,onComplete:d,onDelete:m,onEdit:p}){if(n.status==="not_started")return l?h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:p,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Start"}),h.jsx("button",{onClick:p,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:u,disabled:!a,className:D.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:d,className:D.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:D.btnGhost,children:"Resume"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]})}function x3({taskSessions:n,selectedSessionId:a,onSelect:l}){if(!(n.length<2))return h.jsxs("div",{className:D.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:D.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const u=o.id===a,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${D.attemptButton} ${u?D.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":u,"data-testid":`attempt-${r+1}`,children:["#",r+1,d&&h.jsx("span",{className:D.attemptStatus,children:d})]},o.id)})]})}function $d(){const{taskId:n}=oc(),a=fn(),l=da(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:m,loadFindings:p,kill:g,startTask:y,resumeTask:b,completeTask:_,deleteTask:T,projects:j,taskSessions:A,loadTaskSessions:w}=on(),C=S.useRef(null),z=S.useRef(void 0),M=S.useRef(void 0),X=S.useRef(void 0),H=S.useRef(void 0),J=S.useRef(void 0),W=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[Y,ne]=S.useState(W),[ge,U]=S.useState(!1),[pe,te]=S.useState(void 0),ye=S.useRef(W);W!==ye.current&&(ye.current=W,W!==Y&&ne(W));const G=u.find(q=>q.id===n),L=(G==null?void 0:G.projectId)||void 0,K=G?A[G.id]??[]:[];let ee;pe&&K.some(q=>q.id===pe)?ee=pe:ee=(G==null?void 0:G.latestSessionId)||void 0;const ke=()=>{U(!0)},je=()=>{G&&(T(G.id),U(!1),l(ao(G.projectId),{replace:!0}))};if((G==null?void 0:G.id)!==M.current&&(M.current=G==null?void 0:G.id,pe!==void 0&&te(void 0)),S.useEffect(()=>{if(!(G!=null&&G.id))return;const q=G.id!==H.current,I=G.latestSessionId!==J.current;(q||I)&&(H.current=G.id,J.current=G.latestSessionId,w(G.id))},[G==null?void 0:G.id,G==null?void 0:G.latestSessionId,w]),(G==null?void 0:G.status)!==X.current){X.current=G==null?void 0:G.status;const q=(G==null?void 0:G.status)==="not_started"?"overview":(G==null?void 0:G.status)==="working"||(G==null?void 0:G.status)==="paused"?"stream":(G==null?void 0:G.status)==="complete"?"findings":void 0;q&&q!==Y&&ne(q)}const qe=S.useMemo(()=>new Map(u.map(q=>[q.id,q])),[u]),we=S.useMemo(()=>{const q=ee?o.filter(I=>I.sessionId===ee):[];return M1(R1(q))},[o,ee]),xe=G?G.dependsOn.some(q=>{const I=qe.get(q);return I!==void 0&&I.status!=="complete"}):!1,Ae=S.useMemo(()=>iM(n,j,qe),[n,j,qe]);S.useEffect(()=>{ee&&ee!==z.current&&(z.current=ee,m(ee))},[ee,m]),S.useEffect(()=>{Y==="findings"&&L&&p(L)},[Y,L,p]),S.useEffect(()=>{C.current&&Y==="stream"&&(C.current.scrollTop=C.current.scrollHeight)},[we.length,Y]);const Q=q=>{ne(q),l(Hs(n,q==="overview"?void 0:q))};return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:Ae}),h.jsxs("div",{className:D.header,children:[h.jsxs("span",{className:D.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(G==null?void 0:G.title)||n}),G&&h.jsx("span",{className:D.taskStatusBadge,"data-testid":"task-status",children:G.status}),(G==null?void 0:G.branch)&&h.jsx("span",{className:D.taskBranch,children:G.branch}),xe&&h.jsx("span",{className:D.taskBlockedBadge,children:"blocked"})]}),G&&h.jsx(S3,{task:G,sessionId:ee,isBlocked:xe,onStart:()=>y(G.id),onResume:()=>b(G.id),onStop:()=>ee&&g(ee),onComplete:()=>_(G.id),onDelete:ke,onEdit:()=>l(zT(G.id))})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":Y==="overview",className:`${D.tab} ${Y==="overview"?D.active:""}`,onClick:()=>Q("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":Y==="stream",className:`${D.tab} ${Y==="stream"?D.active:""}`,onClick:()=>Q("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":Y==="findings",className:`${D.tab} ${Y==="findings"?D.active:""}`,onClick:()=>Q("findings"),children:"Findings"})]}),h.jsxs(qs,{mode:"wait",children:[Y==="overview"&&h.jsx(ea.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.overviewContent,children:G?h.jsx(y3,{task:G,tasksById:qe,environments:d,projects:j,taskSessions:K}):h.jsx("div",{className:D.waitingMessage,children:"No additional details"})},"overview"),Y==="stream"&&h.jsxs(ea.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(x3,{taskSessions:K,selectedSessionId:ee,onSelect:q=>te(q)}),h.jsxs("div",{ref:C,className:D.eventScroll,children:[!ee&&G&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>y(G.id),children:"Start Task"}),h.jsx("div",{className:D.ctaDescription,children:"Click to begin agent execution"})]}),ee&&we.length===0&&h.jsx("div",{className:D.waitingMessage,children:"Waiting for events..."}),h.jsx(b3,{eventsDropped:r}),we.map((q,I)=>h.jsx(E1,{event:q,toolUseCtx:q.toolUseCtx},`${q.sessionId}-${q.timestamp}-${I}`))]})]},"stream"),Y==="findings"&&h.jsx(ea.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.tabContent,children:L?h.jsx(p3,{projectId:L}):h.jsx("div",{className:D.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),G&&h.jsx(gc,{isOpen:ge,title:"Delete Task?",description:`"${G.title}" will be permanently removed.`,onConfirm:je,onCancel:()=>U(!1)})]})}function _3(){const n=tM();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Configure the new environment below"})]})}const T3="_layout_1sbe4_1",E3="_content_1sbe4_8",uy={layout:T3,content:E3},A3={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function C3(){const a=fn().pathname.replace(/^\/settings\/?/,"").split("/")[0],l=A3[a],o=eM(l);return h.jsxs("div",{className:uy.layout,children:[h.jsx($i,{segments:o}),h.jsx("div",{className:uy.content,children:h.jsx(Cy,{})})]})}const j3="_nav_29xjr_1",N3="_tab_29xjr_30",w3="_tabIcon_29xjr_56",D3="_tabActive_29xjr_62",Vr={nav:j3,tab:N3,tabIcon:w3,tabActive:D3},ka=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function k3(){var d;const n=fn(),a=da(),l=S.useRef(null),o=((d=ka.find(m=>n.pathname===`${zi}/${m.path}`))==null?void 0:d.path)??ka[0].path,r=S.useCallback(m=>{a(`${zi}/${m}`)},[a]),u=S.useCallback(m=>{var T,j;const p=(T=l.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!p)return;const g=Array.from(p).findIndex(A=>A===document.activeElement),y=g>=0?g:ka.findIndex(A=>A.path===o);let b=y;if(m.key==="ArrowDown")m.preventDefault(),b=(y+1)%ka.length;else if(m.key==="ArrowUp")m.preventDefault(),b=(y-1+ka.length)%ka.length;else if(m.key==="Home")m.preventDefault(),b=0;else if(m.key==="End")m.preventDefault(),b=ka.length-1;else return;const _=ka[b].path;a(`${zi}/${_}`),(j=p[b])==null||j.focus()},[o,a]);return h.jsx("nav",{className:Vr.nav,ref:l,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:ka.map(m=>{const p=m.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":p,tabIndex:p?0:-1,className:`${Vr.tab} ${p?Vr.tabActive:""}`,onClick:()=>r(m.path),children:[h.jsx("span",{className:Vr.tabIcon,"aria-hidden":"true",children:m.icon}),m.label]},m.path)})})}const R3="_container_1nk8c_1",M3="_header_1nk8c_5",O3="_headerLabel_1nk8c_12",B3="_addButton_1nk8c_20",L3="_envRow_1nk8c_55",U3="_targeted_1nk8c_69",z3="_expanded_1nk8c_72",V3="_statusDot_1nk8c_76",I3="_pulse_1nk8c_79",H3="_envName_1nk8c_83",G3="_envActions_1nk8c_87",P3="_idleLabel_1nk8c_94",q3="_newChatButton_1nk8c_99",Y3="_envActionsRow_1nk8c_126",F3="_connectButton_1nk8c_134",K3="_stopButton_1nk8c_160",$3="_deleteButton_1nk8c_186",Z3="_provisionMessage_1nk8c_213",X3="_errorMessage_1nk8c_220",Q3="_sessionRow_1nk8c_227",J3="_selected_1nk8c_243",W3="_sessionDot_1nk8c_248",eO="_sessionSummaryRow_1nk8c_252",tO="_sessionExpandArrow_1nk8c_272",nO="_sessionSummaryText_1nk8c_283",aO="_sessionCountBadge_1nk8c_290",sO="_emptyCta_1nk8c_313",iO="_ctaDescription_1nk8c_326",lO="_ctaButton_1nk8c_332",Qe={container:R3,header:M3,headerLabel:O3,addButton:B3,envRow:L3,targeted:U3,expanded:z3,statusDot:V3,pulse:I3,envName:H3,envActions:G3,idleLabel:P3,newChatButton:q3,envActionsRow:Y3,connectButton:F3,stopButton:K3,deleteButton:$3,provisionMessage:Z3,errorMessage:X3,sessionRow:Q3,selected:J3,sessionDot:W3,sessionSummaryRow:eO,sessionExpandArrow:tO,sessionSummaryText:nO,sessionCountBadge:aO,emptyCta:sO,ctaDescription:iO,ctaButton:lO},oO={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},rO={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},dy=["running","idle","failed","interrupted","completed"],cO=.2;function uO(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const l=dy.filter(u=>a[u]>0).map(u=>`${a[u]} ${rO[u]||u}`),o=new Set(dy),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...l,...r].join(", ")}function dO({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:Qe.sessionDot,style:{color:a},children:"●"})}function fO({env:n,envSessions:a,selectedSessionId:l,isNewChatTarget:o,expanded:r,onToggleExpand:u,sessionsExpanded:d,onToggleSessionsExpand:m,provisionProgress:p,onProvision:g,onStop:y,onRemove:b,navigate:_}){const[T,j]=S.useState(!1),A=oO[n.status]||"var(--text-tertiary)",w=n.status==="connected",C=n.status==="connecting",z=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(gc,{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),j(!1)},onCancel:()=>j(!1)}),h.jsxs("div",{className:`${Qe.envRow} ${o?Qe.targeted:""} ${r?Qe.expanded:""}`,"data-testid":"env-row",onClick:u,children:[h.jsx("span",{className:`${Qe.statusDot} ${w?Qe.pulse:""}`,style:{color:A},children:"●"}),h.jsx("span",{className:Qe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Qe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:Qe.idleLabel,children:"(idle)"}),w&&h.jsx("button",{onClick:M=>{M.stopPropagation(),_(Ry(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Qe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:Qe.envActionsRow,children:[C&&p&&h.jsx("span",{className:Qe.provisionMessage,children:p.message}),n.status==="error"&&(p==null?void 0:p.stage)==="error"&&h.jsx("span",{className:Qe.errorMessage,children:p.message}),z&&h.jsx("button",{onClick:M=>{M.stopPropagation(),g(n.id)},className:Qe.connectButton,children:n.status==="error"?"Retry":"Connect"}),w&&h.jsx("button",{onClick:M=>{M.stopPropagation(),y(n.id)},className:Qe.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:M=>{M.stopPropagation(),j(!0)},className:Qe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Qe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:m,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),m())},children:[h.jsx("span",{className:`${Qe.sessionExpandArrow} ${d?Qe.expanded:""}`,children:"▸"}),h.jsx("span",{className:Qe.sessionSummaryText,children:uO(a)}),h.jsx("span",{className:Qe.sessionCountBadge,children:a.length})]}),h.jsx(qs,{children:d&&h.jsx(ea.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:cO,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(M=>h.jsxs("div",{onClick:X=>{X.stopPropagation(),_(ky(M.id))},className:`${Qe.sessionRow} ${l===M.id?Qe.selected:""}`,title:M.prompt,"data-testid":"session-row",children:[h.jsx(dO,{status:M.status})," ",M.prompt.length>24?M.prompt.slice(0,24)+"...":M.prompt]},M.id))})})]})]})}function hO(){const{environments:n,sessions:a,provisionStatus:l,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=on(),d=da(),[m,p]=S.useState(null),[g,y]=S.useState(new Set),b=un("/sessions/:sessionId"),_=un("/sessions/new"),T=(b==null?void 0:b.params.sessionId)!=="new"?b==null?void 0:b.params.sessionId:void 0,[j]=Lf(),A=_?j.get("env")??void 0:void 0;return h.jsxs("div",{className:Qe.container,children:[h.jsxs("div",{className:Qe.header,children:[h.jsx("span",{className:Qe.headerLabel,children:"Environments"}),h.jsx("button",{className:Qe.addButton,onClick:()=>d(_0),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Qe.emptyCta,children:[h.jsx("button",{className:Qe.ctaButton,onClick:()=>d(_0),children:"Add Environment"}),h.jsx("div",{className:Qe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(w=>{const C=a.filter(z=>z.environmentId===w.id);return h.jsx(fO,{env:w,envSessions:C,selectedSessionId:T,isNewChatTarget:A===w.id,expanded:m===w.id,onToggleExpand:()=>p(m===w.id?null:w.id),sessionsExpanded:g.has(w.id),onToggleSessionsExpand:()=>{y(z=>{const M=new Set(z);return M.has(w.id)?M.delete(w.id):M.add(w.id),M})},provisionProgress:l[w.id],onProvision:o,onStop:r,onRemove:u,navigate:d},w.id)})]})}function mO(){return h.jsx(hO,{})}const pO="_section_1ingb_14",gO="_sectionTitle_1ingb_26",vO="_sectionDescription_1ingb_35",yO="_tokenList_1ingb_48",bO="_tokenRow_1ingb_55",SO="_tokenBadge_1ingb_68",xO="_tokenName_1ingb_83",_O="_tokenTarget_1ingb_90",TO="_deleteButton_1ingb_99",EO="_addForm_1ingb_113",AO="_formRow_1ingb_119",CO="_input_1ingb_125",jO="_select_1ingb_155",NO="_addButton_1ingb_187",wO="_emptyStateInfo_1ingb_221",DO="_themeOptions_1ingb_229",kO="_themeOption_1ingb_229",RO="_themeOptionSelected_1ingb_254",MO="_themeOptionHeader_1ingb_259",OO="_themeOptionLabel_1ingb_266",BO="_themeOptionDesc_1ingb_273",LO="_variantToggle_1ingb_279",UO="_variantButton_1ingb_286",zO="_variantActive_1ingb_305",VO="_themeSwatches_1ingb_311",IO="_themeSwatch_1ingb_311",HO="_systemToggle_1ingb_325",GO="_systemToggleHint_1ingb_341",PO="_themeActive_1ingb_348",qO="_aboutGrid_1ingb_354",YO="_aboutItem_1ingb_360",FO="_aboutLabel_1ingb_373",KO="_aboutValue_1ingb_379",$O="_aboutDot_1ingb_387",ZO="_aboutDotConnected_1ingb_394",XO="_aboutDotDisconnected_1ingb_398",he={section:pO,sectionTitle:gO,sectionDescription:vO,tokenList:yO,tokenRow:bO,tokenBadge:SO,tokenName:xO,tokenTarget:_O,deleteButton:TO,addForm:EO,formRow:AO,input:CO,select:jO,addButton:NO,emptyStateInfo:wO,themeOptions:DO,themeOption:kO,themeOptionSelected:RO,themeOptionHeader:MO,themeOptionLabel:OO,themeOptionDesc:BO,variantToggle:LO,variantButton:UO,variantActive:zO,themeSwatches:VO,themeSwatch:IO,systemToggle:HO,systemToggleHint:GO,themeActive:PO,aboutGrid:qO,aboutItem:YO,aboutLabel:FO,aboutValue:KO,aboutDot:$O,aboutDotConnected:ZO,aboutDotDisconnected:XO},QO=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function JO(){const{credentialProviders:n,updateCredentialProviders:a}=on(),l=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:he.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:he.tokenList,children:QO.map(o=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenName,children:o.label}),h.jsx("span",{className:he.tokenTarget,children:o.description}),h.jsx("select",{className:he.select,value:n[o.key],onChange:r=>l(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const WO=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function e6(){const{tokens:n,setToken:a,deleteToken:l}=on(),{showToast:o}=fo(),[r,u]=S.useState(""),[d,m]=S.useState(""),[p,g]=S.useState("env_var"),[y,b]=S.useState(""),[_,T]=S.useState(null),j=C=>{if(C.preventDefault(),!r||!d)return;const z=p==="env_var"?y||r.toUpperCase()+"_TOKEN":"";a(r,d,p,z,p==="file"?y:""),o("Token saved successfully","success"),u(""),m(""),b("")},A=C=>{T(C)},w=()=>{_&&(l(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(gc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:w,onCancel:()=>T(null)}),h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Tokens"}),h.jsx("p",{className:he.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:he.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:he.tokenList,children:n.map(C=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenBadge,children:C.tokenType}),h.jsx("span",{className:he.tokenName,children:C.name}),h.jsx("span",{className:he.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:he.deleteButton,onClick:()=>A(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:he.addForm,onSubmit:j,children:[h.jsxs("div",{className:he.formRow,children:[h.jsx("input",{className:he.input,type:"text",placeholder:"Token name",value:r,onChange:C=>u(C.target.value)}),h.jsx("input",{className:he.input,type:"password",placeholder:"Value",value:d,onChange:C=>m(C.target.value)})]}),h.jsxs("div",{className:he.formRow,children:[h.jsx("select",{className:he.select,value:p,onChange:C=>g(C.target.value),children:WO.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.jsx("input",{className:he.input,type:"text",placeholder:p==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:C=>b(C.target.value)}),h.jsx("button",{className:he.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function t6(){return h.jsxs(h.Fragment,{children:[h.jsx(JO,{}),h.jsx(e6,{})]})}const n6="_container_1xcp7_1",a6="_header_1xcp7_7",s6="_form_1xcp7_19",i6="_formActions_1xcp7_87",l6="_list_1xcp7_93",o6="_card_1xcp7_99",r6="_active_1xcp7_109",c6="_cardHeader_1xcp7_113",u6="_cardActions_1xcp7_123",d6="_description_1xcp7_128",f6="_meta_1xcp7_134",h6="_promptDetails_1xcp7_151",m6="_promptText_1xcp7_163",p6="_empty_1xcp7_180",g6="_btnPrimary_1xcp7_186",v6="_btnSecondary_1xcp7_220",y6="_btnSmall_1xcp7_247",b6="_btnDanger_1xcp7_273",Rt={container:n6,header:a6,form:s6,formActions:i6,list:l6,card:o6,active:r6,cardHeader:c6,cardActions:u6,description:d6,meta:f6,promptDetails:h6,promptText:m6,empty:p6,btnPrimary:g6,btnSecondary:v6,btnSmall:y6,btnDanger:b6};function S6(){const{personas:n,createPersona:a,updatePersona:l,deletePersona:o}=on(),[r,u]=S.useState(null),[d,m]=S.useState(!1),[p,g]=S.useState(null),[y,b]=S.useState(""),[_,T]=S.useState(""),[j,A]=S.useState(""),[w,C]=S.useState(""),[z,M]=S.useState(""),[X,H]=S.useState(0),J=()=>{b(""),T(""),A(""),C(""),M(""),H(0)},W=()=>{J(),u(null),m(!0)},Y=te=>{b(te.name),T(te.description),A(te.systemPrompt),C(te.runtime),M(te.model),H(te.maxTurns),u(te),m(!1)},ne=te=>{te.preventDefault(),!(!y.trim()||!j.trim())&&(r?(l(r.id,y,_,j,w,z,X),u(null)):(a(y,_,j,w,z,X),m(!1)),J())},ge=te=>{o(te),g(null),(r==null?void 0:r.id)===te&&(u(null),J())},U=()=>{u(null),m(!1),J()},pe=()=>h.jsxs("form",{onSubmit:ne,className:Rt.form,children:[h.jsx("h3",{children:r?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:te=>b(te.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:_,onChange:te=>T(te.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:w,onChange:te=>C(te.target.value),children:[h.jsx("option",{value:"",children:"Default"}),h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:z,onChange:te=>M(te.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:X,onChange:te=>H(parseInt(te.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:j,onChange:te=>A(te.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:Rt.formActions,children:[h.jsx("button",{type:"submit",className:Rt.btnPrimary,children:r?"Save":"Create"}),h.jsx("button",{type:"button",onClick:U,className:Rt.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Rt.container,children:[h.jsxs("div",{className:Rt.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:W,className:Rt.btnPrimary,children:"+ New Persona"})]}),(d||r)&&pe(),n.length===0&&!d?h.jsx("p",{className:Rt.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Rt.list,children:n.map(te=>h.jsxs("div",{className:`${Rt.card} ${(r==null?void 0:r.id)===te.id?Rt.active:""}`,children:[h.jsxs("div",{className:Rt.cardHeader,children:[h.jsx("strong",{children:te.name}),h.jsxs("div",{className:Rt.cardActions,children:[h.jsx("button",{onClick:()=>Y(te),className:Rt.btnSmall,children:"Edit"}),p===te.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ge(te.id),className:Rt.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>g(null),className:Rt.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>g(te.id),className:Rt.btnSmall,children:"Delete"})]})]}),te.description&&h.jsx("p",{className:Rt.description,children:te.description}),h.jsxs("div",{className:Rt.meta,children:[te.runtime&&h.jsxs("span",{children:["Runtime: ",te.runtime]}),te.model&&h.jsxs("span",{children:["Model: ",te.model]}),te.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",te.maxTurns]})]}),h.jsxs("details",{className:Rt.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Rt.promptText,children:te.systemPrompt})]})]},te.id))})]})}function x6(){return h.jsx(S6,{})}function _6(){const{themeId:n,resolvedThemeId:a,setTheme:l,preferSystem:o,setPreferSystem:r}=Vy();return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Appearance"}),h.jsx("p",{className:he.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:he.themeOptions,children:cc.filter(u=>!u.hidden).map(u=>{const d=!!(u.variantLightId&&u.variantDarkId),m=d?n===u.id||n===u.variantLightId||n===u.variantDarkId:n===u.id,p=d&&a===u.variantLightId;return h.jsxs("button",{type:"button",className:`${he.themeOption} ${m?he.themeOptionSelected:""}`,"aria-pressed":m,onClick:()=>l(u.id),children:[h.jsxs("span",{className:he.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:he.themeOptionLabel,children:u.label}),h.jsx("span",{className:he.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:he.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&p?he.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),l(u.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),l(u.variantLightId))},"aria-label":"Light variant","aria-pressed":m&&p,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&!p?he.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),l(u.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),l(u.variantDarkId))},"aria-label":"Dark variant","aria-pressed":m&&!p,children:"☾"})]})]}),u.swatches&&h.jsx("span",{className:he.themeSwatches,children:u.swatches.map((g,y)=>h.jsx("span",{className:he.themeSwatch,style:{background:g}},y))})]},u.id)})}),h.jsxs("label",{className:he.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:u=>r(u.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:he.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:he.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function T6(){return h.jsx(_6,{})}function E6(){const{connected:n,environments:a,sessions:l}=on(),o=a.filter(d=>d.status==="connected").length,r=a.length,u=l.filter(d=>["running","idle"].includes(d.status)).length;return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"About"}),h.jsx("p",{className:he.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:he.aboutGrid,children:[h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Connection"}),h.jsxs("span",{className:he.aboutValue,children:[h.jsx("span",{className:`${he.aboutDot} ${n?he.aboutDotConnected:he.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Environments"}),h.jsxs("span",{className:he.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:he.aboutValue,children:u})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Version"}),h.jsx("span",{className:he.aboutValue,children:"0.30.0"})]})]})]})}function A6(){return h.jsx(E6,{})}const C6="_root_cdda9_1",j6="_body_cdda9_7",N6="_main_cdda9_13",Zd={root:C6,body:j6,main:N6},w6=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function D6(){const{lastSpawnedId:n,environments:a}=on(),{showToast:l}=fo();dk(a,l);const o=da(),r=fn(),u=r.pathname.startsWith(zi);return S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(ky(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Zd.root,children:[h.jsx(EE,{}),h.jsxs("div",{className:Zd.body,children:[u?h.jsx(k3,{}):h.jsx(RD,{}),h.jsxs("div",{className:Zd.main,children:[h.jsx(Cy,{}),h.jsx(QD,{})]})]}),h.jsx(uk,{})]})}function k6(){return h.jsx(aT,{children:h.jsxs(Mt,{element:h.jsx(D6,{}),children:[h.jsx(Mt,{index:!0,element:h.jsx(JR,{})}),h.jsx(Mt,{path:"sessions/new",element:h.jsx(lM,{})}),h.jsx(Mt,{path:"sessions/:sessionId",element:h.jsx(uM,{})}),h.jsx(Mt,{path:"projects/:projectId",element:h.jsx(BM,{})}),h.jsx(Mt,{path:"tasks/new",element:h.jsx(n3,{})}),h.jsx(Mt,{path:"tasks/:taskId",element:h.jsx($d,{})}),h.jsx(Mt,{path:"tasks/:taskId/stream",element:h.jsx($d,{})}),h.jsx(Mt,{path:"tasks/:taskId/findings",element:h.jsx($d,{})}),h.jsx(Mt,{path:"tasks/:taskId/edit",element:h.jsx(a3,{})}),h.jsx(Mt,{path:"environments/new",element:h.jsx(_3,{})}),h.jsxs(Mt,{path:"settings",element:h.jsx(C3,{}),children:[h.jsx(Mt,{index:!0,element:h.jsx(Ir,{to:"environments",replace:!0})}),h.jsx(Mt,{path:"environments",element:h.jsx(mO,{})}),h.jsx(Mt,{path:"credentials",element:h.jsx(t6,{})}),h.jsx(Mt,{path:"tokens",element:h.jsx(Ir,{to:"../credentials",replace:!0})}),h.jsx(Mt,{path:"personas",element:h.jsx(x6,{})}),h.jsx(Mt,{path:"appearance",element:h.jsx(T6,{})}),h.jsx(Mt,{path:"about",element:h.jsx(A6,{})})]}),h.jsx(Mt,{path:"*",element:h.jsx(Ir,{to:"/",replace:!0})})]})})}function R6(){const n=w6?uE:tE;return h.jsx(gE,{children:h.jsx(fE,{children:h.jsx(n,{children:h.jsx(NT,{children:h.jsx(k6,{})})})})})}i_.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(R6,{})}));