@grackle-ai/web 0.17.1 → 0.18.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.
@@ -1,78 +0,0 @@
1
- import{r as rS,a as T,j as m,v as cS,b as uS,t as Zo,i as dS,f as fS,M as p0,c as g0}from"./markdown-gcy1Jmzi.js";import{r as hS,d as wp,H as Mp,P as Op,i as mS,B as pS,a as gS,C as vS,M as yS}from"./dagview-EHk2VaeR.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function l(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=l(u);fetch(u.href,f)}})();var _u={exports:{}},cl={},xu={exports:{}},Au={};/**
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 Rp;function bS(){return Rp||(Rp=1,(function(a){function i(A,Z){var at=A.length;A.push(Z);t:for(;0<at;){var tt=at-1>>>1,jt=A[tt];if(0<u(jt,Z))A[tt]=Z,A[at]=jt,at=tt;else break t}}function l(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var Z=A[0],at=A.pop();if(at!==Z){A[0]=at;t:for(var tt=0,jt=A.length,Jt=jt>>>1;tt<Jt;){var Rt=2*(tt+1)-1,St=A[Rt],Y=Rt+1,te=A[Y];if(0>u(St,at))Y<jt&&0>u(te,St)?(A[tt]=te,A[Y]=at,tt=Y):(A[tt]=St,A[Rt]=at,tt=Rt);else if(Y<jt&&0>u(te,at))A[tt]=te,A[Y]=at,tt=Y;else break t}}return Z}function u(A,Z){var at=A.sortIndex-Z.sortIndex;return at!==0?at:A.id-Z.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var d=Date,p=d.now();a.unstable_now=function(){return d.now()-p}}var g=[],v=[],b=1,S=null,x=3,D=!1,w=!1,O=!1,q=!1,B=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function K(A){for(var Z=l(v);Z!==null;){if(Z.callback===null)r(v);else if(Z.startTime<=A)r(v),Z.sortIndex=Z.expirationTime,i(g,Z);else break;Z=l(v)}}function G(A){if(O=!1,K(A),!w)if(l(g)!==null)w=!0,Q||(Q=!0,Et());else{var Z=l(v);Z!==null&&zt(G,Z.startTime-A)}}var Q=!1,W=-1,V=5,F=-1;function rt(){return q?!0:!(a.unstable_now()-F<V)}function mt(){if(q=!1,Q){var A=a.unstable_now();F=A;var Z=!0;try{t:{w=!1,O&&(O=!1,X(W),W=-1),D=!0;var at=x;try{e:{for(K(A),S=l(g);S!==null&&!(S.expirationTime>A&&rt());){var tt=S.callback;if(typeof tt=="function"){S.callback=null,x=S.priorityLevel;var jt=tt(S.expirationTime<=A);if(A=a.unstable_now(),typeof jt=="function"){S.callback=jt,K(A),Z=!0;break e}S===l(g)&&r(g),K(A)}else r(g);S=l(g)}if(S!==null)Z=!0;else{var Jt=l(v);Jt!==null&&zt(G,Jt.startTime-A),Z=!1}}break t}finally{S=null,x=at,D=!1}Z=void 0}}finally{Z?Et():Q=!1}}}var Et;if(typeof R=="function")Et=function(){R(mt)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,Lt=P.port2;P.port1.onmessage=mt,Et=function(){Lt.postMessage(null)}}else Et=function(){B(mt,0)};function zt(A,Z){W=B(function(){A(a.unstable_now())},Z)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(A){A.callback=null},a.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<A?Math.floor(1e3/A):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(A){switch(x){case 1:case 2:case 3:var Z=3;break;default:Z=x}var at=x;x=Z;try{return A()}finally{x=at}},a.unstable_requestPaint=function(){q=!0},a.unstable_runWithPriority=function(A,Z){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var at=x;x=A;try{return Z()}finally{x=at}},a.unstable_scheduleCallback=function(A,Z,at){var tt=a.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?tt+at:tt):at=tt,A){case 1:var jt=-1;break;case 2:jt=250;break;case 5:jt=1073741823;break;case 4:jt=1e4;break;default:jt=5e3}return jt=at+jt,A={id:b++,callback:Z,priorityLevel:A,startTime:at,expirationTime:jt,sortIndex:-1},at>tt?(A.sortIndex=at,i(v,A),l(g)===null&&A===l(v)&&(O?(X(W),W=-1):O=!0,zt(G,at-tt))):(A.sortIndex=jt,i(g,A),w||D||(w=!0,Q||(Q=!0,Et()))),A},a.unstable_shouldYield=rt,a.unstable_wrapCallback=function(A){var Z=x;return function(){var at=x;x=Z;try{return A.apply(this,arguments)}finally{x=at}}}})(Au)),Au}var Bp;function SS(){return Bp||(Bp=1,xu.exports=bS()),xu.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 zp;function TS(){if(zp)return cl;zp=1;var a=SS(),i=rS(),l=hS();function r(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function d(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(f(t)!==t)throw Error(r(188))}function v(t){var e=t.alternate;if(!e){if(e=f(t),e===null)throw Error(r(188));return e!==t?null:t}for(var n=t,s=e;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(s=o.return,s!==null){n=s;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return g(o),t;if(c===s)return g(o),e;c=c.sibling}throw Error(r(188))}if(n.return!==s.return)n=o,s=c;else{for(var h=!1,y=o.child;y;){if(y===n){h=!0,n=o,s=c;break}if(y===s){h=!0,s=o,n=c;break}y=y.sibling}if(!h){for(y=c.child;y;){if(y===n){h=!0,n=c,s=o;break}if(y===s){h=!0,s=c,n=o;break}y=y.sibling}if(!h)throw Error(r(189))}}if(n.alternate!==s)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,x=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),R=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),rt=Symbol.for("react.memo_cache_sentinel"),mt=Symbol.iterator;function Et(t){return t===null||typeof t!="object"?null:(t=mt&&t[mt]||t["@@iterator"],typeof t=="function"?t:null)}var P=Symbol.for("react.client.reference");function Lt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===P?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case B:return"Profiler";case q:return"StrictMode";case G:return"Suspense";case Q:return"SuspenseList";case F:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case R:return t.displayName||"Context";case X:return(t._context.displayName||"Context")+".Consumer";case K:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case W:return e=t.displayName||null,e!==null?e:Lt(t.type)||"Memo";case V:e=t._payload,t=t._init;try{return Lt(t(e))}catch{}}return null}var zt=Array.isArray,A=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},tt=[],jt=-1;function Jt(t){return{current:t}}function Rt(t){0>jt||(t.current=tt[jt],tt[jt]=null,jt--)}function St(t,e){jt++,tt[jt]=t.current,t.current=e}var Y=Jt(null),te=Jt(null),ye=Jt(null),re=Jt(null);function qe(t,e){switch(St(ye,e),St(te,t),St(Y,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?tp(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=tp(e),t=ep(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Rt(Y),St(Y,t)}function bt(){Rt(Y),Rt(te),Rt(ye)}function ce(t){t.memoizedState!==null&&St(re,t);var e=Y.current,n=ep(e,t.type);e!==n&&(St(te,t),St(Y,n))}function De(t){te.current===t&&(Rt(Y),Rt(te)),re.current===t&&(Rt(re),il._currentValue=at)}var Ve,bn;function ke(t){if(Ve===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Ve=e&&e[1]||"",bn=-1<n.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+Ve+t+bn}var ln=!1;function Cn(t,e){if(!t||ln)return"";ln=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(e){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(M){var k=M}Reflect.construct(t,[],H)}else{try{H.call()}catch(M){k=M}t.call(H.prototype)}}else{try{throw Error()}catch(M){k=M}(H=t())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(M){if(M&&k&&typeof M.stack=="string")return[M.stack,k.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),h=c[0],y=c[1];if(h&&y){var _=h.split(`
20
- `),N=y.split(`
21
- `);for(o=s=0;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;for(;o<N.length&&!N[o].includes("DetermineComponentFrameRoot");)o++;if(s===_.length||o===N.length)for(s=_.length-1,o=N.length-1;1<=s&&0<=o&&_[s]!==N[o];)o--;for(;1<=s&&0<=o;s--,o--)if(_[s]!==N[o]){if(s!==1||o!==1)do if(s--,o--,0>o||_[s]!==N[o]){var z=`
22
- `+_[s].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),z}while(1<=s&&0<=o);break}}}finally{ln=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?ke(n):""}function I(t,e){switch(t.tag){case 26:case 27:case 5:return ke(t.type);case 16:return ke("Lazy");case 13:return t.child!==e&&e!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Cn(t.type,!1);case 11:return Cn(t.type.render,!1);case 1:return Cn(t.type,!0);case 31:return ke("Activity");default:return""}}function it(t){try{var e="",n=null;do e+=I(t,n),n=t,t=t.return;while(t);return e}catch(s){return`
23
- Error generating stack: `+s.message+`
24
- `+s.stack}}var lt=Object.prototype.hasOwnProperty,ut=a.unstable_scheduleCallback,pt=a.unstable_cancelCallback,ht=a.unstable_shouldYield,xt=a.unstable_requestPaint,Ht=a.unstable_now,dt=a.unstable_getCurrentPriorityLevel,st=a.unstable_ImmediatePriority,Yt=a.unstable_UserBlockingPriority,et=a.unstable_NormalPriority,Zt=a.unstable_LowPriority,xe=a.unstable_IdlePriority,fi=a.log,hi=a.unstable_setDisableYieldValue,Ln=null,J=null;function Ct(t){if(typeof fi=="function"&&hi(t),J&&typeof J.setStrictMode=="function")try{J.setStrictMode(Ln,t)}catch{}}var Bt=Math.clz32?Math.clz32:Nn,ie=Math.log,vt=Math.LN2;function Nn(t){return t>>>=0,t===0?32:31-(ie(t)/vt|0)|0}var Sn=256,La=262144,Ha=4194304;function Dn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ga(t,e,n){var s=t.pendingLanes;if(s===0)return 0;var o=0,c=t.suspendedLanes,h=t.pingedLanes;t=t.warmLanes;var y=s&134217727;return y!==0?(s=y&~c,s!==0?o=Dn(s):(h&=y,h!==0?o=Dn(h):n||(n=y&~t,n!==0&&(o=Dn(n))))):(y=s&~c,y!==0?o=Dn(y):h!==0?o=Dn(h):n||(n=s&~t,n!==0&&(o=Dn(n)))),o===0?0:e!==0&&e!==o&&(e&c)===0&&(c=o&-o,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:o}function oa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Dl(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 mi(){var t=Ha;return Ha<<=1,(Ha&62914560)===0&&(Ha=4194304),t}function fs(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ra(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function kl(t,e,n,s,o,c){var h=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var y=t.entanglements,_=t.expirationTimes,N=t.hiddenUpdates;for(n=h&~n;0<n;){var z=31-Bt(n),H=1<<z;y[z]=0,_[z]=-1;var k=N[z];if(k!==null)for(N[z]=null,z=0;z<k.length;z++){var M=k[z];M!==null&&(M.lane&=-536870913)}n&=~H}s!==0&&pi(t,s,0),c!==0&&o===0&&t.tag!==0&&(t.suspendedLanes|=c&~(h&~e))}function pi(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-Bt(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|n&261930}function gi(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var s=31-Bt(n),o=1<<s;o&e|t[s]&e&&(t[s]|=e),n&=~o}}function vi(t,e){var n=e&-e;return n=(n&42)!==0?1:hs(n),(n&(t.suspendedLanes|e))!==0?0:n}function hs(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ms(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function yi(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:Ap(t.type))}function bi(t,e){var n=Z.p;try{return Z.p=t,e()}finally{Z.p=n}}var Tn=Math.random().toString(36).slice(2),$="__reactFiber$"+Tn,Tt="__reactProps$"+Tn,kt="__reactContainer$"+Tn,$t="__reactEvents$"+Tn,ps="__reactListeners$"+Tn,gs="__reactHandles$"+Tn,wl="__reactResources$"+Tn,Si="__reactMarker$"+Tn;function mr(t){delete t[$],delete t[Tt],delete t[$t],delete t[ps],delete t[gs]}function vs(t){var e=t[$];if(e)return e;for(var n=t.parentNode;n;){if(e=n[kt]||n[$]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=rp(t);t!==null;){if(n=t[$])return n;t=rp(t)}return e}t=n,n=t.parentNode}return null}function ys(t){if(t=t[$]||t[kt]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ti(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function bs(t){var e=t[wl];return e||(e=t[wl]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Ee(t){t[Si]=!0}var Gd=new Set,qd={};function qa(t,e){Ss(t,e),Ss(t+"Capture",e)}function Ss(t,e){for(qd[t]=e,t=0;t<e.length;t++)Gd.add(e[t])}var Wv=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]*$"),Yd={},Id={};function ty(t){return lt.call(Id,t)?!0:lt.call(Yd,t)?!1:Wv.test(t)?Id[t]=!0:(Yd[t]=!0,!1)}function Ml(t,e,n){if(ty(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Ol(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Hn(t,e,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+s)}}function on(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Zd(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ey(t,e,n){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(h){n=""+h,c.call(this,h)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(h){n=""+h},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function pr(t){if(!t._valueTracker){var e=Zd(t)?"checked":"value";t._valueTracker=ey(t,e,""+t[e])}}function Xd(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),s="";return t&&(s=Zd(t)?t.checked?"true":"false":t.value),t=s,t!==n?(e.setValue(t),!0):!1}function Rl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var ny=/[\n"\\]/g;function rn(t){return t.replace(ny,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function gr(t,e,n,s,o,c,h,y){t.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.type=h:t.removeAttribute("type"),e!=null?h==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+on(e)):t.value!==""+on(e)&&(t.value=""+on(e)):h!=="submit"&&h!=="reset"||t.removeAttribute("value"),e!=null?vr(t,h,on(e)):n!=null?vr(t,h,on(n)):s!=null&&t.removeAttribute("value"),o==null&&c!=null&&(t.defaultChecked=!!c),o!=null&&(t.checked=o&&typeof o!="function"&&typeof o!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.name=""+on(y):t.removeAttribute("name")}function Kd(t,e,n,s,o,c,h,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){pr(t);return}n=n!=null?""+on(n):"",e=e!=null?""+on(e):n,y||e===t.value||(t.value=e),t.defaultValue=e}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=y?t.checked:!!s,t.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.name=h),pr(t)}function vr(t,e,n){e==="number"&&Rl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Ts(t,e,n,s){if(t=t.options,e){e={};for(var o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&s&&(t[n].defaultSelected=!0)}else{for(n=""+on(n),e=null,o=0;o<t.length;o++){if(t[o].value===n){t[o].selected=!0,s&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function Qd(t,e,n){if(e!=null&&(e=""+on(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+on(n):""}function Pd(t,e,n,s){if(e==null){if(s!=null){if(n!=null)throw Error(r(92));if(zt(s)){if(1<s.length)throw Error(r(93));s=s[0]}n=s}n==null&&(n=""),e=n}n=on(e),t.defaultValue=n,s=t.textContent,s===n&&s!==""&&s!==null&&(t.value=s),pr(t)}function _s(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ay=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 Fd(t,e,n){var s=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,n):typeof n!="number"||n===0||ay.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Jd(t,e,n){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var o in e)s=e[o],e.hasOwnProperty(o)&&n[o]!==s&&Fd(t,o,s)}else for(var c in e)e.hasOwnProperty(c)&&Fd(t,c,e[c])}function yr(t){if(t.indexOf("-")===-1)return!1;switch(t){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 sy=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"]]),iy=/^[\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 Bl(t){return iy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Gn(){}var br=null;function Sr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var xs=null,As=null;function $d(t){var e=ys(t);if(e&&(t=e.stateNode)){var n=t[Tt]||null;t:switch(t=e.stateNode,e.type){case"input":if(gr(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+rn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var s=n[e];if(s!==t&&s.form===t.form){var o=s[Tt]||null;if(!o)throw Error(r(90));gr(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(e=0;e<n.length;e++)s=n[e],s.form===t.form&&Xd(s)}break t;case"textarea":Qd(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Ts(t,!!n.multiple,e,!1)}}}var Tr=!1;function Wd(t,e,n){if(Tr)return t(e,n);Tr=!0;try{var s=t(e);return s}finally{if(Tr=!1,(xs!==null||As!==null)&&(xo(),xs&&(e=xs,t=As,As=xs=null,$d(e),t)))for(e=0;e<t.length;e++)$d(t[e])}}function _i(t,e){var n=t.stateNode;if(n===null)return null;var s=n[Tt]||null;if(s===null)return null;n=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(r(231,e,typeof n));return n}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_r=!1;if(qn)try{var xi={};Object.defineProperty(xi,"passive",{get:function(){_r=!0}}),window.addEventListener("test",xi,xi),window.removeEventListener("test",xi,xi)}catch{_r=!1}var ca=null,xr=null,zl=null;function tf(){if(zl)return zl;var t,e=xr,n=e.length,s,o="value"in ca?ca.value:ca.textContent,c=o.length;for(t=0;t<n&&e[t]===o[t];t++);var h=n-t;for(s=1;s<=h&&e[n-s]===o[c-s];s++);return zl=o.slice(t,1<s?1-s:void 0)}function Ul(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Vl(){return!0}function ef(){return!1}function Ye(t){function e(n,s,o,c,h){this._reactName=n,this._targetInst=o,this.type=s,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var y in t)t.hasOwnProperty(y)&&(n=t[y],this[y]=n?n(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Vl:ef,this.isPropagationStopped=ef,this}return S(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),e}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ll=Ye(Ya),Ai=S({},Ya,{view:0,detail:0}),ly=Ye(Ai),Ar,jr,ji,Hl=S({},Ai,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ji&&(ji&&t.type==="mousemove"?(Ar=t.screenX-ji.screenX,jr=t.screenY-ji.screenY):jr=Ar=0,ji=t),Ar)},movementY:function(t){return"movementY"in t?t.movementY:jr}}),nf=Ye(Hl),oy=S({},Hl,{dataTransfer:0}),ry=Ye(oy),cy=S({},Ai,{relatedTarget:0}),Er=Ye(cy),uy=S({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),dy=Ye(uy),fy=S({},Ya,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),hy=Ye(fy),my=S({},Ya,{data:0}),af=Ye(my),py={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gy={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"},vy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=vy[t])?!!e[t]:!1}function Cr(){return yy}var by=S({},Ai,{key:function(t){if(t.key){var e=py[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ul(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?gy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cr,charCode:function(t){return t.type==="keypress"?Ul(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ul(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Sy=Ye(by),Ty=S({},Hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sf=Ye(Ty),_y=S({},Ai,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cr}),xy=Ye(_y),Ay=S({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),jy=Ye(Ay),Ey=S({},Hl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Cy=Ye(Ey),Ny=S({},Ya,{newState:0,oldState:0}),Dy=Ye(Ny),ky=[9,13,27,32],Nr=qn&&"CompositionEvent"in window,Ei=null;qn&&"documentMode"in document&&(Ei=document.documentMode);var wy=qn&&"TextEvent"in window&&!Ei,lf=qn&&(!Nr||Ei&&8<Ei&&11>=Ei),of=" ",rf=!1;function cf(t,e){switch(t){case"keyup":return ky.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var js=!1;function My(t,e){switch(t){case"compositionend":return uf(e);case"keypress":return e.which!==32?null:(rf=!0,of);case"textInput":return t=e.data,t===of&&rf?null:t;default:return null}}function Oy(t,e){if(js)return t==="compositionend"||!Nr&&cf(t,e)?(t=tf(),zl=xr=ca=null,js=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return lf&&e.locale!=="ko"?null:e.data;default:return null}}var Ry={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 df(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Ry[t.type]:e==="textarea"}function ff(t,e,n,s){xs?As?As.push(s):As=[s]:xs=s,e=ko(e,"onChange"),0<e.length&&(n=new Ll("onChange","change",null,n,s),t.push({event:n,listeners:e}))}var Ci=null,Ni=null;function By(t){Qm(t,0)}function Gl(t){var e=Ti(t);if(Xd(e))return t}function hf(t,e){if(t==="change")return e}var mf=!1;if(qn){var Dr;if(qn){var kr="oninput"in document;if(!kr){var pf=document.createElement("div");pf.setAttribute("oninput","return;"),kr=typeof pf.oninput=="function"}Dr=kr}else Dr=!1;mf=Dr&&(!document.documentMode||9<document.documentMode)}function gf(){Ci&&(Ci.detachEvent("onpropertychange",vf),Ni=Ci=null)}function vf(t){if(t.propertyName==="value"&&Gl(Ni)){var e=[];ff(e,Ni,t,Sr(t)),Wd(By,e)}}function zy(t,e,n){t==="focusin"?(gf(),Ci=e,Ni=n,Ci.attachEvent("onpropertychange",vf)):t==="focusout"&&gf()}function Uy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Gl(Ni)}function Vy(t,e){if(t==="click")return Gl(e)}function Ly(t,e){if(t==="input"||t==="change")return Gl(e)}function Hy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Pe=typeof Object.is=="function"?Object.is:Hy;function Di(t,e){if(Pe(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var o=n[s];if(!lt.call(e,o)||!Pe(t[o],e[o]))return!1}return!0}function yf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function bf(t,e){var n=yf(t);t=0;for(var s;n;){if(n.nodeType===3){if(s=t+n.textContent.length,t<=e&&s>=e)return{node:n,offset:e-t};t=s}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=yf(n)}}function Sf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Sf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Tf(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Rl(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Rl(t.document)}return e}function wr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Gy=qn&&"documentMode"in document&&11>=document.documentMode,Es=null,Mr=null,ki=null,Or=!1;function _f(t,e,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Or||Es==null||Es!==Rl(s)||(s=Es,"selectionStart"in s&&wr(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ki&&Di(ki,s)||(ki=s,s=ko(Mr,"onSelect"),0<s.length&&(e=new Ll("onSelect","select",null,e,n),t.push({event:e,listeners:s}),e.target=Es)))}function Ia(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Cs={animationend:Ia("Animation","AnimationEnd"),animationiteration:Ia("Animation","AnimationIteration"),animationstart:Ia("Animation","AnimationStart"),transitionrun:Ia("Transition","TransitionRun"),transitionstart:Ia("Transition","TransitionStart"),transitioncancel:Ia("Transition","TransitionCancel"),transitionend:Ia("Transition","TransitionEnd")},Rr={},xf={};qn&&(xf=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function Za(t){if(Rr[t])return Rr[t];if(!Cs[t])return t;var e=Cs[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in xf)return Rr[t]=e[n];return t}var Af=Za("animationend"),jf=Za("animationiteration"),Ef=Za("animationstart"),qy=Za("transitionrun"),Yy=Za("transitionstart"),Iy=Za("transitioncancel"),Cf=Za("transitionend"),Nf=new Map,Br="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(" ");Br.push("scrollEnd");function _n(t,e){Nf.set(t,e),qa(e,[t])}var ql=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},cn=[],Ns=0,zr=0;function Yl(){for(var t=Ns,e=zr=Ns=0;e<t;){var n=cn[e];cn[e++]=null;var s=cn[e];cn[e++]=null;var o=cn[e];cn[e++]=null;var c=cn[e];if(cn[e++]=null,s!==null&&o!==null){var h=s.pending;h===null?o.next=o:(o.next=h.next,h.next=o),s.pending=o}c!==0&&Df(n,o,c)}}function Il(t,e,n,s){cn[Ns++]=t,cn[Ns++]=e,cn[Ns++]=n,cn[Ns++]=s,zr|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Ur(t,e,n,s){return Il(t,e,n,s),Zl(t)}function Xa(t,e){return Il(t,null,null,e),Zl(t)}function Df(t,e,n){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n);for(var o=!1,c=t.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(o=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,o&&e!==null&&(o=31-Bt(n),t=c.hiddenUpdates,s=t[o],s===null?t[o]=[e]:s.push(e),e.lane=n|536870912),c):null}function Zl(t){if(50<$i)throw $i=0,Xc=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Ds={};function Zy(t,e,n,s){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fe(t,e,n,s){return new Zy(t,e,n,s)}function Vr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Yn(t,e){var n=t.alternate;return n===null?(n=Fe(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function kf(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Xl(t,e,n,s,o,c){var h=0;if(s=t,typeof t=="function")Vr(t)&&(h=1);else if(typeof t=="string")h=Fb(t,n,Y.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case F:return t=Fe(31,n,e,o),t.elementType=F,t.lanes=c,t;case O:return Ka(n.children,o,c,e);case q:h=8,o|=24;break;case B:return t=Fe(12,n,e,o|2),t.elementType=B,t.lanes=c,t;case G:return t=Fe(13,n,e,o),t.elementType=G,t.lanes=c,t;case Q:return t=Fe(19,n,e,o),t.elementType=Q,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:h=10;break t;case X:h=9;break t;case K:h=11;break t;case W:h=14;break t;case V:h=16,s=null;break t}h=29,n=Error(r(130,t===null?"null":typeof t,"")),s=null}return e=Fe(h,n,e,o),e.elementType=t,e.type=s,e.lanes=c,e}function Ka(t,e,n,s){return t=Fe(7,t,s,e),t.lanes=n,t}function Lr(t,e,n){return t=Fe(6,t,null,e),t.lanes=n,t}function wf(t){var e=Fe(18,null,null,0);return e.stateNode=t,e}function Hr(t,e,n){return e=Fe(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Mf=new WeakMap;function un(t,e){if(typeof t=="object"&&t!==null){var n=Mf.get(t);return n!==void 0?n:(e={value:t,source:e,stack:it(e)},Mf.set(t,e),e)}return{value:t,source:e,stack:it(e)}}var ks=[],ws=0,Kl=null,wi=0,dn=[],fn=0,ua=null,kn=1,wn="";function In(t,e){ks[ws++]=wi,ks[ws++]=Kl,Kl=t,wi=e}function Of(t,e,n){dn[fn++]=kn,dn[fn++]=wn,dn[fn++]=ua,ua=t;var s=kn;t=wn;var o=32-Bt(s)-1;s&=~(1<<o),n+=1;var c=32-Bt(e)+o;if(30<c){var h=o-o%5;c=(s&(1<<h)-1).toString(32),s>>=h,o-=h,kn=1<<32-Bt(e)+o|n<<o|s,wn=c+t}else kn=1<<c|n<<o|s,wn=t}function Gr(t){t.return!==null&&(In(t,1),Of(t,1,0))}function qr(t){for(;t===Kl;)Kl=ks[--ws],ks[ws]=null,wi=ks[--ws],ks[ws]=null;for(;t===ua;)ua=dn[--fn],dn[fn]=null,wn=dn[--fn],dn[fn]=null,kn=dn[--fn],dn[fn]=null}function Rf(t,e){dn[fn++]=kn,dn[fn++]=wn,dn[fn++]=ua,kn=e.id,wn=e.overflow,ua=t}var we=null,ee=null,Ot=!1,da=null,hn=!1,Yr=Error(r(519));function fa(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mi(un(e,t)),Yr}function Bf(t){var e=t.stateNode,n=t.type,s=t.memoizedProps;switch(e[$]=t,e[Tt]=s,n){case"dialog":Dt("cancel",e),Dt("close",e);break;case"iframe":case"object":case"embed":Dt("load",e);break;case"video":case"audio":for(n=0;n<tl.length;n++)Dt(tl[n],e);break;case"source":Dt("error",e);break;case"img":case"image":case"link":Dt("error",e),Dt("load",e);break;case"details":Dt("toggle",e);break;case"input":Dt("invalid",e),Kd(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Dt("invalid",e);break;case"textarea":Dt("invalid",e),Pd(e,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||s.suppressHydrationWarning===!0||$m(e.textContent,n)?(s.popover!=null&&(Dt("beforetoggle",e),Dt("toggle",e)),s.onScroll!=null&&Dt("scroll",e),s.onScrollEnd!=null&&Dt("scrollend",e),s.onClick!=null&&(e.onclick=Gn),e=!0):e=!1,e||fa(t,!0)}function zf(t){for(we=t.return;we;)switch(we.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:we=we.return}}function Ms(t){if(t!==we)return!1;if(!Ot)return zf(t),Ot=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||ou(t.type,t.memoizedProps)),n=!n),n&&ee&&fa(t),zf(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));ee=op(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));ee=op(t)}else e===27?(e=ee,Ea(t.type)?(t=fu,fu=null,ee=t):ee=e):ee=we?pn(t.stateNode.nextSibling):null;return!0}function Qa(){ee=we=null,Ot=!1}function Ir(){var t=da;return t!==null&&(Ke===null?Ke=t:Ke.push.apply(Ke,t),da=null),t}function Mi(t){da===null?da=[t]:da.push(t)}var Zr=Jt(null),Pa=null,Zn=null;function ha(t,e,n){St(Zr,e._currentValue),e._currentValue=n}function Xn(t){t._currentValue=Zr.current,Rt(Zr)}function Xr(t,e,n){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===n)break;t=t.return}}function Kr(t,e,n,s){var o=t.child;for(o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){var h=o.child;c=c.firstContext;t:for(;c!==null;){var y=c;c=o;for(var _=0;_<e.length;_++)if(y.context===e[_]){c.lanes|=n,y=c.alternate,y!==null&&(y.lanes|=n),Xr(c.return,n,t),s||(h=null);break t}c=y.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(r(341));h.lanes|=n,c=h.alternate,c!==null&&(c.lanes|=n),Xr(h,n,t),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===t){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function Os(t,e,n,s){t=null;for(var o=e,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(r(387));if(h=h.memoizedProps,h!==null){var y=o.type;Pe(o.pendingProps.value,h.value)||(t!==null?t.push(y):t=[y])}}else if(o===re.current){if(h=o.alternate,h===null)throw Error(r(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(t!==null?t.push(il):t=[il])}o=o.return}t!==null&&Kr(e,t,n,s),e.flags|=262144}function Ql(t){for(t=t.firstContext;t!==null;){if(!Pe(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Fa(t){Pa=t,Zn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Me(t){return Uf(Pa,t)}function Pl(t,e){return Pa===null&&Fa(t),Uf(t,e)}function Uf(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Zn===null){if(t===null)throw Error(r(308));Zn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Zn=Zn.next=e;return n}var Xy=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},Ky=a.unstable_scheduleCallback,Qy=a.unstable_NormalPriority,be={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qr(){return{controller:new Xy,data:new Map,refCount:0}}function Oi(t){t.refCount--,t.refCount===0&&Ky(Qy,function(){t.controller.abort()})}var Ri=null,Pr=0,Rs=0,Bs=null;function Py(t,e){if(Ri===null){var n=Ri=[];Pr=0,Rs=$c(),Bs={status:"pending",value:void 0,then:function(s){n.push(s)}}}return Pr++,e.then(Vf,Vf),e}function Vf(){if(--Pr===0&&Ri!==null){Bs!==null&&(Bs.status="fulfilled");var t=Ri;Ri=null,Rs=0,Bs=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Fy(t,e){var n=[],s={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var o=0;o<n.length;o++)(0,n[o])(e)},function(o){for(s.status="rejected",s.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),s}var Lf=A.S;A.S=function(t,e){_m=Ht(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Py(t,e),Lf!==null&&Lf(t,e)};var Ja=Jt(null);function Fr(){var t=Ja.current;return t!==null?t:Wt.pooledCache}function Fl(t,e){e===null?St(Ja,Ja.current):St(Ja,e.pool)}function Hf(){var t=Fr();return t===null?null:{parent:be._currentValue,pool:t}}var zs=Error(r(460)),Jr=Error(r(474)),Jl=Error(r(542)),$l={then:function(){}};function Gf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function qf(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Gn,Gn),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,If(t),t;default:if(typeof e.status=="string")e.then(Gn,Gn);else{if(t=Wt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var o=e;o.status="fulfilled",o.value=s}},function(s){if(e.status==="pending"){var o=e;o.status="rejected",o.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,If(t),t}throw Wa=e,zs}}function $a(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Wa=n,zs):n}}var Wa=null;function Yf(){if(Wa===null)throw Error(r(459));var t=Wa;return Wa=null,t}function If(t){if(t===zs||t===Jl)throw Error(r(483))}var Us=null,Bi=0;function Wl(t){var e=Bi;return Bi+=1,Us===null&&(Us=[]),qf(Us,t,e)}function zi(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function to(t,e){throw e.$$typeof===x?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Zf(t){function e(E,j){if(t){var C=E.deletions;C===null?(E.deletions=[j],E.flags|=16):C.push(j)}}function n(E,j){if(!t)return null;for(;j!==null;)e(E,j),j=j.sibling;return null}function s(E){for(var j=new Map;E!==null;)E.key!==null?j.set(E.key,E):j.set(E.index,E),E=E.sibling;return j}function o(E,j){return E=Yn(E,j),E.index=0,E.sibling=null,E}function c(E,j,C){return E.index=C,t?(C=E.alternate,C!==null?(C=C.index,C<j?(E.flags|=67108866,j):C):(E.flags|=67108866,j)):(E.flags|=1048576,j)}function h(E){return t&&E.alternate===null&&(E.flags|=67108866),E}function y(E,j,C,L){return j===null||j.tag!==6?(j=Lr(C,E.mode,L),j.return=E,j):(j=o(j,C),j.return=E,j)}function _(E,j,C,L){var ft=C.type;return ft===O?z(E,j,C.props.children,L,C.key):j!==null&&(j.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===V&&$a(ft)===j.type)?(j=o(j,C.props),zi(j,C),j.return=E,j):(j=Xl(C.type,C.key,C.props,null,E.mode,L),zi(j,C),j.return=E,j)}function N(E,j,C,L){return j===null||j.tag!==4||j.stateNode.containerInfo!==C.containerInfo||j.stateNode.implementation!==C.implementation?(j=Hr(C,E.mode,L),j.return=E,j):(j=o(j,C.children||[]),j.return=E,j)}function z(E,j,C,L,ft){return j===null||j.tag!==7?(j=Ka(C,E.mode,L,ft),j.return=E,j):(j=o(j,C),j.return=E,j)}function H(E,j,C){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Lr(""+j,E.mode,C),j.return=E,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case D:return C=Xl(j.type,j.key,j.props,null,E.mode,C),zi(C,j),C.return=E,C;case w:return j=Hr(j,E.mode,C),j.return=E,j;case V:return j=$a(j),H(E,j,C)}if(zt(j)||Et(j))return j=Ka(j,E.mode,C,null),j.return=E,j;if(typeof j.then=="function")return H(E,Wl(j),C);if(j.$$typeof===R)return H(E,Pl(E,j),C);to(E,j)}return null}function k(E,j,C,L){var ft=j!==null?j.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ft!==null?null:y(E,j,""+C,L);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case D:return C.key===ft?_(E,j,C,L):null;case w:return C.key===ft?N(E,j,C,L):null;case V:return C=$a(C),k(E,j,C,L)}if(zt(C)||Et(C))return ft!==null?null:z(E,j,C,L,null);if(typeof C.then=="function")return k(E,j,Wl(C),L);if(C.$$typeof===R)return k(E,j,Pl(E,C),L);to(E,C)}return null}function M(E,j,C,L,ft){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return E=E.get(C)||null,y(j,E,""+L,ft);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return E=E.get(L.key===null?C:L.key)||null,_(j,E,L,ft);case w:return E=E.get(L.key===null?C:L.key)||null,N(j,E,L,ft);case V:return L=$a(L),M(E,j,C,L,ft)}if(zt(L)||Et(L))return E=E.get(C)||null,z(j,E,L,ft,null);if(typeof L.then=="function")return M(E,j,C,Wl(L),ft);if(L.$$typeof===R)return M(E,j,C,Pl(j,L),ft);to(j,L)}return null}function ot(E,j,C,L){for(var ft=null,Ut=null,ct=j,At=j=0,Mt=null;ct!==null&&At<C.length;At++){ct.index>At?(Mt=ct,ct=null):Mt=ct.sibling;var Vt=k(E,ct,C[At],L);if(Vt===null){ct===null&&(ct=Mt);break}t&&ct&&Vt.alternate===null&&e(E,ct),j=c(Vt,j,At),Ut===null?ft=Vt:Ut.sibling=Vt,Ut=Vt,ct=Mt}if(At===C.length)return n(E,ct),Ot&&In(E,At),ft;if(ct===null){for(;At<C.length;At++)ct=H(E,C[At],L),ct!==null&&(j=c(ct,j,At),Ut===null?ft=ct:Ut.sibling=ct,Ut=ct);return Ot&&In(E,At),ft}for(ct=s(ct);At<C.length;At++)Mt=M(ct,E,At,C[At],L),Mt!==null&&(t&&Mt.alternate!==null&&ct.delete(Mt.key===null?At:Mt.key),j=c(Mt,j,At),Ut===null?ft=Mt:Ut.sibling=Mt,Ut=Mt);return t&&ct.forEach(function(wa){return e(E,wa)}),Ot&&In(E,At),ft}function gt(E,j,C,L){if(C==null)throw Error(r(151));for(var ft=null,Ut=null,ct=j,At=j=0,Mt=null,Vt=C.next();ct!==null&&!Vt.done;At++,Vt=C.next()){ct.index>At?(Mt=ct,ct=null):Mt=ct.sibling;var wa=k(E,ct,Vt.value,L);if(wa===null){ct===null&&(ct=Mt);break}t&&ct&&wa.alternate===null&&e(E,ct),j=c(wa,j,At),Ut===null?ft=wa:Ut.sibling=wa,Ut=wa,ct=Mt}if(Vt.done)return n(E,ct),Ot&&In(E,At),ft;if(ct===null){for(;!Vt.done;At++,Vt=C.next())Vt=H(E,Vt.value,L),Vt!==null&&(j=c(Vt,j,At),Ut===null?ft=Vt:Ut.sibling=Vt,Ut=Vt);return Ot&&In(E,At),ft}for(ct=s(ct);!Vt.done;At++,Vt=C.next())Vt=M(ct,E,At,Vt.value,L),Vt!==null&&(t&&Vt.alternate!==null&&ct.delete(Vt.key===null?At:Vt.key),j=c(Vt,j,At),Ut===null?ft=Vt:Ut.sibling=Vt,Ut=Vt);return t&&ct.forEach(function(oS){return e(E,oS)}),Ot&&In(E,At),ft}function Ft(E,j,C,L){if(typeof C=="object"&&C!==null&&C.type===O&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case D:t:{for(var ft=C.key;j!==null;){if(j.key===ft){if(ft=C.type,ft===O){if(j.tag===7){n(E,j.sibling),L=o(j,C.props.children),L.return=E,E=L;break t}}else if(j.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===V&&$a(ft)===j.type){n(E,j.sibling),L=o(j,C.props),zi(L,C),L.return=E,E=L;break t}n(E,j);break}else e(E,j);j=j.sibling}C.type===O?(L=Ka(C.props.children,E.mode,L,C.key),L.return=E,E=L):(L=Xl(C.type,C.key,C.props,null,E.mode,L),zi(L,C),L.return=E,E=L)}return h(E);case w:t:{for(ft=C.key;j!==null;){if(j.key===ft)if(j.tag===4&&j.stateNode.containerInfo===C.containerInfo&&j.stateNode.implementation===C.implementation){n(E,j.sibling),L=o(j,C.children||[]),L.return=E,E=L;break t}else{n(E,j);break}else e(E,j);j=j.sibling}L=Hr(C,E.mode,L),L.return=E,E=L}return h(E);case V:return C=$a(C),Ft(E,j,C,L)}if(zt(C))return ot(E,j,C,L);if(Et(C)){if(ft=Et(C),typeof ft!="function")throw Error(r(150));return C=ft.call(C),gt(E,j,C,L)}if(typeof C.then=="function")return Ft(E,j,Wl(C),L);if(C.$$typeof===R)return Ft(E,j,Pl(E,C),L);to(E,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,j!==null&&j.tag===6?(n(E,j.sibling),L=o(j,C),L.return=E,E=L):(n(E,j),L=Lr(C,E.mode,L),L.return=E,E=L),h(E)):n(E,j)}return function(E,j,C,L){try{Bi=0;var ft=Ft(E,j,C,L);return Us=null,ft}catch(ct){if(ct===zs||ct===Jl)throw ct;var Ut=Fe(29,ct,null,E.mode);return Ut.lanes=L,Ut.return=E,Ut}finally{}}}var ts=Zf(!0),Xf=Zf(!1),ma=!1;function $r(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wr(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function pa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ga(t,e,n){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Gt&2)!==0){var o=s.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),s.pending=e,e=Zl(t),Df(t,null,n),e}return Il(t,s,e,n),Zl(t)}function Ui(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,gi(t,n)}}function tc(t,e){var n=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var o=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?o=c=h:c=c.next=h,n=n.next}while(n!==null);c===null?o=c=e:c=c.next=e}else o=c=e;n={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var ec=!1;function Vi(){if(ec){var t=Bs;if(t!==null)throw t}}function Li(t,e,n,s){ec=!1;var o=t.updateQueue;ma=!1;var c=o.firstBaseUpdate,h=o.lastBaseUpdate,y=o.shared.pending;if(y!==null){o.shared.pending=null;var _=y,N=_.next;_.next=null,h===null?c=N:h.next=N,h=_;var z=t.alternate;z!==null&&(z=z.updateQueue,y=z.lastBaseUpdate,y!==h&&(y===null?z.firstBaseUpdate=N:y.next=N,z.lastBaseUpdate=_))}if(c!==null){var H=o.baseState;h=0,z=N=_=null,y=c;do{var k=y.lane&-536870913,M=k!==y.lane;if(M?(wt&k)===k:(s&k)===k){k!==0&&k===Rs&&(ec=!0),z!==null&&(z=z.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});t:{var ot=t,gt=y;k=e;var Ft=n;switch(gt.tag){case 1:if(ot=gt.payload,typeof ot=="function"){H=ot.call(Ft,H,k);break t}H=ot;break t;case 3:ot.flags=ot.flags&-65537|128;case 0:if(ot=gt.payload,k=typeof ot=="function"?ot.call(Ft,H,k):ot,k==null)break t;H=S({},H,k);break t;case 2:ma=!0}}k=y.callback,k!==null&&(t.flags|=64,M&&(t.flags|=8192),M=o.callbacks,M===null?o.callbacks=[k]:M.push(k))}else M={lane:k,tag:y.tag,payload:y.payload,callback:y.callback,next:null},z===null?(N=z=M,_=H):z=z.next=M,h|=k;if(y=y.next,y===null){if(y=o.shared.pending,y===null)break;M=y,y=M.next,M.next=null,o.lastBaseUpdate=M,o.shared.pending=null}}while(!0);z===null&&(_=H),o.baseState=_,o.firstBaseUpdate=N,o.lastBaseUpdate=z,c===null&&(o.shared.lanes=0),Ta|=h,t.lanes=h,t.memoizedState=H}}function Kf(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function Qf(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Kf(n[t],e)}var Vs=Jt(null),eo=Jt(0);function Pf(t,e){t=ea,St(eo,t),St(Vs,e),ea=t|e.baseLanes}function nc(){St(eo,ea),St(Vs,Vs.current)}function ac(){ea=eo.current,Rt(Vs),Rt(eo)}var Je=Jt(null),mn=null;function va(t){var e=t.alternate;St(me,me.current&1),St(Je,t),mn===null&&(e===null||Vs.current!==null||e.memoizedState!==null)&&(mn=t)}function sc(t){St(me,me.current),St(Je,t),mn===null&&(mn=t)}function Ff(t){t.tag===22?(St(me,me.current),St(Je,t),mn===null&&(mn=t)):ya()}function ya(){St(me,me.current),St(Je,Je.current)}function $e(t){Rt(Je),mn===t&&(mn=null),Rt(me)}var me=Jt(0);function no(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uu(n)||du(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Kn=0,_t=null,Qt=null,Se=null,ao=!1,Ls=!1,es=!1,so=0,Hi=0,Hs=null,Jy=0;function ue(){throw Error(r(321))}function ic(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Pe(t[n],e[n]))return!1;return!0}function lc(t,e,n,s,o,c){return Kn=c,_t=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,A.H=t===null||t.memoizedState===null?Oh:Tc,es=!1,c=n(s,o),es=!1,Ls&&(c=$f(e,n,s,o)),Jf(t),c}function Jf(t){A.H=Yi;var e=Qt!==null&&Qt.next!==null;if(Kn=0,Se=Qt=_t=null,ao=!1,Hi=0,Hs=null,e)throw Error(r(300));t===null||Te||(t=t.dependencies,t!==null&&Ql(t)&&(Te=!0))}function $f(t,e,n,s){_t=t;var o=0;do{if(Ls&&(Hs=null),Hi=0,Ls=!1,25<=o)throw Error(r(301));if(o+=1,Se=Qt=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}A.H=Rh,c=e(n,s)}while(Ls);return c}function $y(){var t=A.H,e=t.useState()[0];return e=typeof e.then=="function"?Gi(e):e,t=t.useState()[0],(Qt!==null?Qt.memoizedState:null)!==t&&(_t.flags|=1024),e}function oc(){var t=so!==0;return so=0,t}function rc(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function cc(t){if(ao){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}ao=!1}Kn=0,Se=Qt=_t=null,Ls=!1,Hi=so=0,Hs=null}function Le(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?_t.memoizedState=Se=t:Se=Se.next=t,Se}function pe(){if(Qt===null){var t=_t.alternate;t=t!==null?t.memoizedState:null}else t=Qt.next;var e=Se===null?_t.memoizedState:Se.next;if(e!==null)Se=e,Qt=t;else{if(t===null)throw _t.alternate===null?Error(r(467)):Error(r(310));Qt=t,t={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},Se===null?_t.memoizedState=Se=t:Se=Se.next=t}return Se}function io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gi(t){var e=Hi;return Hi+=1,Hs===null&&(Hs=[]),t=qf(Hs,t,e),e=_t,(Se===null?e.memoizedState:Se.next)===null&&(e=e.alternate,A.H=e===null||e.memoizedState===null?Oh:Tc),t}function lo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Gi(t);if(t.$$typeof===R)return Me(t)}throw Error(r(438,String(t)))}function uc(t){var e=null,n=_t.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var s=_t.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(o){return o.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=io(),_t.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),s=0;s<t;s++)n[s]=rt;return e.index++,n}function Qn(t,e){return typeof e=="function"?e(t):e}function oo(t){var e=pe();return dc(e,Qt,t)}function dc(t,e,n){var s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var o=t.baseQueue,c=s.pending;if(c!==null){if(o!==null){var h=o.next;o.next=c.next,c.next=h}e.baseQueue=o=c,s.pending=null}if(c=t.baseState,o===null)t.memoizedState=c;else{e=o.next;var y=h=null,_=null,N=e,z=!1;do{var H=N.lane&-536870913;if(H!==N.lane?(wt&H)===H:(Kn&H)===H){var k=N.revertLane;if(k===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),H===Rs&&(z=!0);else if((Kn&k)===k){N=N.next,k===Rs&&(z=!0);continue}else H={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},_===null?(y=_=H,h=c):_=_.next=H,_t.lanes|=k,Ta|=k;H=N.action,es&&n(c,H),c=N.hasEagerState?N.eagerState:n(c,H)}else k={lane:H,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},_===null?(y=_=k,h=c):_=_.next=k,_t.lanes|=H,Ta|=H;N=N.next}while(N!==null&&N!==e);if(_===null?h=c:_.next=y,!Pe(c,t.memoizedState)&&(Te=!0,z&&(n=Bs,n!==null)))throw n;t.memoizedState=c,t.baseState=h,t.baseQueue=_,s.lastRenderedState=c}return o===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function fc(t){var e=pe(),n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=t;var s=n.dispatch,o=n.pending,c=e.memoizedState;if(o!==null){n.pending=null;var h=o=o.next;do c=t(c,h.action),h=h.next;while(h!==o);Pe(c,e.memoizedState)||(Te=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),n.lastRenderedState=c}return[c,s]}function Wf(t,e,n){var s=_t,o=pe(),c=Ot;if(c){if(n===void 0)throw Error(r(407));n=n()}else n=e();var h=!Pe((Qt||o).memoizedState,n);if(h&&(o.memoizedState=n,Te=!0),o=o.queue,pc(nh.bind(null,s,o,t),[t]),o.getSnapshot!==e||h||Se!==null&&Se.memoizedState.tag&1){if(s.flags|=2048,Gs(9,{destroy:void 0},eh.bind(null,s,o,n,e),null),Wt===null)throw Error(r(349));c||(Kn&127)!==0||th(s,e,n)}return n}function th(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=_t.updateQueue,e===null?(e=io(),_t.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function eh(t,e,n,s){e.value=n,e.getSnapshot=s,ah(e)&&sh(t)}function nh(t,e,n){return n(function(){ah(e)&&sh(t)})}function ah(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Pe(t,n)}catch{return!0}}function sh(t){var e=Xa(t,2);e!==null&&Qe(e,t,2)}function hc(t){var e=Le();if(typeof t=="function"){var n=t;if(t=n(),es){Ct(!0);try{n()}finally{Ct(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:t},e}function ih(t,e,n,s){return t.baseState=n,dc(t,Qt,typeof s=="function"?s:Qn)}function Wy(t,e,n,s,o){if(uo(t))throw Error(r(485));if(t=e.action,t!==null){var c={payload:o,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){c.listeners.push(h)}};A.T!==null?n(!0):c.isTransition=!1,s(c),n=e.pending,n===null?(c.next=e.pending=c,lh(e,c)):(c.next=n.next,e.pending=n.next=c)}}function lh(t,e){var n=e.action,s=e.payload,o=t.state;if(e.isTransition){var c=A.T,h={};A.T=h;try{var y=n(o,s),_=A.S;_!==null&&_(h,y),oh(t,e,y)}catch(N){mc(t,e,N)}finally{c!==null&&h.types!==null&&(c.types=h.types),A.T=c}}else try{c=n(o,s),oh(t,e,c)}catch(N){mc(t,e,N)}}function oh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){rh(t,e,s)},function(s){return mc(t,e,s)}):rh(t,e,n)}function rh(t,e,n){e.status="fulfilled",e.value=n,ch(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,lh(t,n)))}function mc(t,e,n){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=n,ch(e),e=e.next;while(e!==s)}t.action=null}function ch(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function uh(t,e){return e}function dh(t,e){if(Ot){var n=Wt.formState;if(n!==null){t:{var s=_t;if(Ot){if(ee){e:{for(var o=ee,c=hn;o.nodeType!==8;){if(!c){o=null;break e}if(o=pn(o.nextSibling),o===null){o=null;break e}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){ee=pn(o.nextSibling),s=o.data==="F!";break t}}fa(s)}s=!1}s&&(e=n[0])}}return n=Le(),n.memoizedState=n.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uh,lastRenderedState:e},n.queue=s,n=kh.bind(null,_t,s),s.dispatch=n,s=hc(!1),c=Sc.bind(null,_t,!1,s.queue),s=Le(),o={state:e,dispatch:null,action:t,pending:null},s.queue=o,n=Wy.bind(null,_t,o,c,n),o.dispatch=n,s.memoizedState=t,[e,n,!1]}function fh(t){var e=pe();return hh(e,Qt,t)}function hh(t,e,n){if(e=dc(t,e,uh)[0],t=oo(Qn)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=Gi(e)}catch(h){throw h===zs?Jl:h}else s=e;e=pe();var o=e.queue,c=o.dispatch;return n!==e.memoizedState&&(_t.flags|=2048,Gs(9,{destroy:void 0},tb.bind(null,o,n),null)),[s,c,t]}function tb(t,e){t.action=e}function mh(t){var e=pe(),n=Qt;if(n!==null)return hh(e,n,t);pe(),e=e.memoizedState,n=pe();var s=n.queue.dispatch;return n.memoizedState=t,[e,s,!1]}function Gs(t,e,n,s){return t={tag:t,create:n,deps:s,inst:e,next:null},e=_t.updateQueue,e===null&&(e=io(),_t.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(s=n.next,n.next=t,t.next=s,e.lastEffect=t),t}function ph(){return pe().memoizedState}function ro(t,e,n,s){var o=Le();_t.flags|=t,o.memoizedState=Gs(1|e,{destroy:void 0},n,s===void 0?null:s)}function co(t,e,n,s){var o=pe();s=s===void 0?null:s;var c=o.memoizedState.inst;Qt!==null&&s!==null&&ic(s,Qt.memoizedState.deps)?o.memoizedState=Gs(e,c,n,s):(_t.flags|=t,o.memoizedState=Gs(1|e,c,n,s))}function gh(t,e){ro(8390656,8,t,e)}function pc(t,e){co(2048,8,t,e)}function eb(t){_t.flags|=4;var e=_t.updateQueue;if(e===null)e=io(),_t.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function vh(t){var e=pe().memoizedState;return eb({ref:e,nextImpl:t}),function(){if((Gt&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function yh(t,e){return co(4,2,t,e)}function bh(t,e){return co(4,4,t,e)}function Sh(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Th(t,e,n){n=n!=null?n.concat([t]):null,co(4,4,Sh.bind(null,e,t),n)}function gc(){}function _h(t,e){var n=pe();e=e===void 0?null:e;var s=n.memoizedState;return e!==null&&ic(e,s[1])?s[0]:(n.memoizedState=[t,e],t)}function xh(t,e){var n=pe();e=e===void 0?null:e;var s=n.memoizedState;if(e!==null&&ic(e,s[1]))return s[0];if(s=t(),es){Ct(!0);try{t()}finally{Ct(!1)}}return n.memoizedState=[s,e],s}function vc(t,e,n){return n===void 0||(Kn&1073741824)!==0&&(wt&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=Am(),_t.lanes|=t,Ta|=t,n)}function Ah(t,e,n,s){return Pe(n,e)?n:Vs.current!==null?(t=vc(t,n,s),Pe(t,e)||(Te=!0),t):(Kn&42)===0||(Kn&1073741824)!==0&&(wt&261930)===0?(Te=!0,t.memoizedState=n):(t=Am(),_t.lanes|=t,Ta|=t,e)}function jh(t,e,n,s,o){var c=Z.p;Z.p=c!==0&&8>c?c:8;var h=A.T,y={};A.T=y,Sc(t,!1,e,n);try{var _=o(),N=A.S;if(N!==null&&N(y,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var z=Fy(_,s);qi(t,e,z,en(t))}else qi(t,e,s,en(t))}catch(H){qi(t,e,{then:function(){},status:"rejected",reason:H},en())}finally{Z.p=c,h!==null&&y.types!==null&&(h.types=y.types),A.T=h}}function nb(){}function yc(t,e,n,s){if(t.tag!==5)throw Error(r(476));var o=Eh(t).queue;jh(t,o,e,at,n===null?nb:function(){return Ch(t),n(s)})}function Eh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:at},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Ch(t){var e=Eh(t);e.next===null&&(e=t.alternate.memoizedState),qi(t,e.next.queue,{},en())}function bc(){return Me(il)}function Nh(){return pe().memoizedState}function Dh(){return pe().memoizedState}function ab(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=en();t=pa(n);var s=ga(e,t,n);s!==null&&(Qe(s,e,n),Ui(s,e,n)),e={cache:Qr()},t.payload=e;return}e=e.return}}function sb(t,e,n){var s=en();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},uo(t)?wh(e,n):(n=Ur(t,e,n,s),n!==null&&(Qe(n,t,s),Mh(n,e,s)))}function kh(t,e,n){var s=en();qi(t,e,n,s)}function qi(t,e,n,s){var o={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(uo(t))wh(e,o);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var h=e.lastRenderedState,y=c(h,n);if(o.hasEagerState=!0,o.eagerState=y,Pe(y,h))return Il(t,e,o,0),Wt===null&&Yl(),!1}catch{}finally{}if(n=Ur(t,e,o,s),n!==null)return Qe(n,t,s),Mh(n,e,s),!0}return!1}function Sc(t,e,n,s){if(s={lane:2,revertLane:$c(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},uo(t)){if(e)throw Error(r(479))}else e=Ur(t,n,s,2),e!==null&&Qe(e,t,2)}function uo(t){var e=t.alternate;return t===_t||e!==null&&e===_t}function wh(t,e){Ls=ao=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Mh(t,e,n){if((n&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,gi(t,n)}}var Yi={readContext:Me,use:lo,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useLayoutEffect:ue,useInsertionEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useSyncExternalStore:ue,useId:ue,useHostTransitionStatus:ue,useFormState:ue,useActionState:ue,useOptimistic:ue,useMemoCache:ue,useCacheRefresh:ue};Yi.useEffectEvent=ue;var Oh={readContext:Me,use:lo,useCallback:function(t,e){return Le().memoizedState=[t,e===void 0?null:e],t},useContext:Me,useEffect:gh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,ro(4194308,4,Sh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ro(4194308,4,t,e)},useInsertionEffect:function(t,e){ro(4,2,t,e)},useMemo:function(t,e){var n=Le();e=e===void 0?null:e;var s=t();if(es){Ct(!0);try{t()}finally{Ct(!1)}}return n.memoizedState=[s,e],s},useReducer:function(t,e,n){var s=Le();if(n!==void 0){var o=n(e);if(es){Ct(!0);try{n(e)}finally{Ct(!1)}}}else o=e;return s.memoizedState=s.baseState=o,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},s.queue=t,t=t.dispatch=sb.bind(null,_t,t),[s.memoizedState,t]},useRef:function(t){var e=Le();return t={current:t},e.memoizedState=t},useState:function(t){t=hc(t);var e=t.queue,n=kh.bind(null,_t,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:gc,useDeferredValue:function(t,e){var n=Le();return vc(n,t,e)},useTransition:function(){var t=hc(!1);return t=jh.bind(null,_t,t.queue,!0,!1),Le().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var s=_t,o=Le();if(Ot){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),Wt===null)throw Error(r(349));(wt&127)!==0||th(s,e,n)}o.memoizedState=n;var c={value:n,getSnapshot:e};return o.queue=c,gh(nh.bind(null,s,c,t),[t]),s.flags|=2048,Gs(9,{destroy:void 0},eh.bind(null,s,c,n,e),null),n},useId:function(){var t=Le(),e=Wt.identifierPrefix;if(Ot){var n=wn,s=kn;n=(s&~(1<<32-Bt(s)-1)).toString(32)+n,e="_"+e+"R_"+n,n=so++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=Jy++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:bc,useFormState:dh,useActionState:dh,useOptimistic:function(t){var e=Le();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=Sc.bind(null,_t,!0,n),n.dispatch=e,[t,e]},useMemoCache:uc,useCacheRefresh:function(){return Le().memoizedState=ab.bind(null,_t)},useEffectEvent:function(t){var e=Le(),n={impl:t};return e.memoizedState=n,function(){if((Gt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Tc={readContext:Me,use:lo,useCallback:_h,useContext:Me,useEffect:pc,useImperativeHandle:Th,useInsertionEffect:yh,useLayoutEffect:bh,useMemo:xh,useReducer:oo,useRef:ph,useState:function(){return oo(Qn)},useDebugValue:gc,useDeferredValue:function(t,e){var n=pe();return Ah(n,Qt.memoizedState,t,e)},useTransition:function(){var t=oo(Qn)[0],e=pe().memoizedState;return[typeof t=="boolean"?t:Gi(t),e]},useSyncExternalStore:Wf,useId:Nh,useHostTransitionStatus:bc,useFormState:fh,useActionState:fh,useOptimistic:function(t,e){var n=pe();return ih(n,Qt,t,e)},useMemoCache:uc,useCacheRefresh:Dh};Tc.useEffectEvent=vh;var Rh={readContext:Me,use:lo,useCallback:_h,useContext:Me,useEffect:pc,useImperativeHandle:Th,useInsertionEffect:yh,useLayoutEffect:bh,useMemo:xh,useReducer:fc,useRef:ph,useState:function(){return fc(Qn)},useDebugValue:gc,useDeferredValue:function(t,e){var n=pe();return Qt===null?vc(n,t,e):Ah(n,Qt.memoizedState,t,e)},useTransition:function(){var t=fc(Qn)[0],e=pe().memoizedState;return[typeof t=="boolean"?t:Gi(t),e]},useSyncExternalStore:Wf,useId:Nh,useHostTransitionStatus:bc,useFormState:mh,useActionState:mh,useOptimistic:function(t,e){var n=pe();return Qt!==null?ih(n,Qt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:uc,useCacheRefresh:Dh};Rh.useEffectEvent=vh;function _c(t,e,n,s){e=t.memoizedState,n=n(s,e),n=n==null?e:S({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var xc={enqueueSetState:function(t,e,n){t=t._reactInternals;var s=en(),o=pa(s);o.payload=e,n!=null&&(o.callback=n),e=ga(t,o,s),e!==null&&(Qe(e,t,s),Ui(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var s=en(),o=pa(s);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=ga(t,o,s),e!==null&&(Qe(e,t,s),Ui(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=en(),s=pa(n);s.tag=2,e!=null&&(s.callback=e),e=ga(t,s,n),e!==null&&(Qe(e,t,n),Ui(e,t,n))}};function Bh(t,e,n,s,o,c,h){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,h):e.prototype&&e.prototype.isPureReactComponent?!Di(n,s)||!Di(o,c):!0}function zh(t,e,n,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,s),e.state!==t&&xc.enqueueReplaceState(e,e.state,null)}function ns(t,e){var n=e;if("ref"in e){n={};for(var s in e)s!=="ref"&&(n[s]=e[s])}if(t=t.defaultProps){n===e&&(n=S({},n));for(var o in t)n[o]===void 0&&(n[o]=t[o])}return n}function Uh(t){ql(t)}function Vh(t){console.error(t)}function Lh(t){ql(t)}function fo(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function Hh(t,e,n){try{var s=t.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Ac(t,e,n){return n=pa(n),n.tag=3,n.payload={element:null},n.callback=function(){fo(t,e)},n}function Gh(t){return t=pa(t),t.tag=3,t}function qh(t,e,n,s){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=s.value;t.payload=function(){return o(c)},t.callback=function(){Hh(e,n,s)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(t.callback=function(){Hh(e,n,s),typeof o!="function"&&(_a===null?_a=new Set([this]):_a.add(this));var y=s.stack;this.componentDidCatch(s.value,{componentStack:y!==null?y:""})})}function ib(t,e,n,s,o){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=n.alternate,e!==null&&Os(e,n,o,!0),n=Je.current,n!==null){switch(n.tag){case 31:case 13:return mn===null?Ao():n.alternate===null&&de===0&&(de=3),n.flags&=-257,n.flags|=65536,n.lanes=o,s===$l?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([s]):e.add(s),Pc(t,s,o)),!1;case 22:return n.flags|=65536,s===$l?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([s]):n.add(s)),Pc(t,s,o)),!1}throw Error(r(435,n.tag))}return Pc(t,s,o),Ao(),!1}if(Ot)return e=Je.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=o,s!==Yr&&(t=Error(r(422),{cause:s}),Mi(un(t,n)))):(s!==Yr&&(e=Error(r(423),{cause:s}),Mi(un(e,n))),t=t.current.alternate,t.flags|=65536,o&=-o,t.lanes|=o,s=un(s,n),o=Ac(t.stateNode,s,o),tc(t,o),de!==4&&(de=2)),!1;var c=Error(r(520),{cause:s});if(c=un(c,n),Ji===null?Ji=[c]:Ji.push(c),de!==4&&(de=2),e===null)return!0;s=un(s,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=o&-o,n.lanes|=t,t=Ac(n.stateNode,s,t),tc(n,t),!1;case 1:if(e=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(_a===null||!_a.has(c))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Gh(o),qh(o,t,n,s),tc(n,o),!1}n=n.return}while(n!==null);return!1}var jc=Error(r(461)),Te=!1;function Oe(t,e,n,s){e.child=t===null?Xf(e,null,n,s):ts(e,t.child,n,s)}function Yh(t,e,n,s,o){n=n.render;var c=e.ref;if("ref"in s){var h={};for(var y in s)y!=="ref"&&(h[y]=s[y])}else h=s;return Fa(e),s=lc(t,e,n,h,c,o),y=oc(),t!==null&&!Te?(rc(t,e,o),Pn(t,e,o)):(Ot&&y&&Gr(e),e.flags|=1,Oe(t,e,s,o),e.child)}function Ih(t,e,n,s,o){if(t===null){var c=n.type;return typeof c=="function"&&!Vr(c)&&c.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=c,Zh(t,e,c,s,o)):(t=Xl(n.type,null,s,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!Oc(t,o)){var h=c.memoizedProps;if(n=n.compare,n=n!==null?n:Di,n(h,s)&&t.ref===e.ref)return Pn(t,e,o)}return e.flags|=1,t=Yn(c,s),t.ref=e.ref,t.return=e,e.child=t}function Zh(t,e,n,s,o){if(t!==null){var c=t.memoizedProps;if(Di(c,s)&&t.ref===e.ref)if(Te=!1,e.pendingProps=s=c,Oc(t,o))(t.flags&131072)!==0&&(Te=!0);else return e.lanes=t.lanes,Pn(t,e,o)}return Ec(t,e,n,s,o)}function Xh(t,e,n,s){var o=s.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,t!==null){for(s=e.child=t.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~c}else s=0,e.child=null;return Kh(t,e,c,n,s)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Fl(e,c!==null?c.cachePool:null),c!==null?Pf(e,c):nc(),Ff(e);else return s=e.lanes=536870912,Kh(t,e,c!==null?c.baseLanes|n:n,n,s)}else c!==null?(Fl(e,c.cachePool),Pf(e,c),ya(),e.memoizedState=null):(t!==null&&Fl(e,null),nc(),ya());return Oe(t,e,o,n),e.child}function Ii(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Kh(t,e,n,s,o){var c=Fr();return c=c===null?null:{parent:be._currentValue,pool:c},e.memoizedState={baseLanes:n,cachePool:c},t!==null&&Fl(e,null),nc(),Ff(e),t!==null&&Os(t,e,s,!0),e.childLanes=o,null}function ho(t,e){return e=po({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Qh(t,e,n){return ts(e,t.child,null,n),t=ho(e,e.pendingProps),t.flags|=2,$e(e),e.memoizedState=null,t}function lb(t,e,n){var s=e.pendingProps,o=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Ot){if(s.mode==="hidden")return t=ho(e,s),e.lanes=536870912,Ii(null,t);if(sc(e),(t=ee)?(t=lp(t,hn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ua!==null?{id:kn,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},n=wf(t),n.return=e,e.child=n,we=e,ee=null)):t=null,t===null)throw fa(e);return e.lanes=536870912,null}return ho(e,s)}var c=t.memoizedState;if(c!==null){var h=c.dehydrated;if(sc(e),o)if(e.flags&256)e.flags&=-257,e=Qh(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(Te||Os(t,e,n,!1),o=(n&t.childLanes)!==0,Te||o){if(s=Wt,s!==null&&(h=vi(s,n),h!==0&&h!==c.retryLane))throw c.retryLane=h,Xa(t,h),Qe(s,t,h),jc;Ao(),e=Qh(t,e,n)}else t=c.treeContext,ee=pn(h.nextSibling),we=e,Ot=!0,da=null,hn=!1,t!==null&&Rf(e,t),e=ho(e,s),e.flags|=4096;return e}return t=Yn(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function mo(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function Ec(t,e,n,s,o){return Fa(e),n=lc(t,e,n,s,void 0,o),s=oc(),t!==null&&!Te?(rc(t,e,o),Pn(t,e,o)):(Ot&&s&&Gr(e),e.flags|=1,Oe(t,e,n,o),e.child)}function Ph(t,e,n,s,o,c){return Fa(e),e.updateQueue=null,n=$f(e,s,n,o),Jf(t),s=oc(),t!==null&&!Te?(rc(t,e,c),Pn(t,e,c)):(Ot&&s&&Gr(e),e.flags|=1,Oe(t,e,n,c),e.child)}function Fh(t,e,n,s,o){if(Fa(e),e.stateNode===null){var c=Ds,h=n.contextType;typeof h=="object"&&h!==null&&(c=Me(h)),c=new n(s,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=xc,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=s,c.state=e.memoizedState,c.refs={},$r(e),h=n.contextType,c.context=typeof h=="object"&&h!==null?Me(h):Ds,c.state=e.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(_c(e,n,h,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(h=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),h!==c.state&&xc.enqueueReplaceState(c,c.state,null),Li(e,s,c,o),Vi(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){c=e.stateNode;var y=e.memoizedProps,_=ns(n,y);c.props=_;var N=c.context,z=n.contextType;h=Ds,typeof z=="object"&&z!==null&&(h=Me(z));var H=n.getDerivedStateFromProps;z=typeof H=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=e.pendingProps!==y,z||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||N!==h)&&zh(e,c,s,h),ma=!1;var k=e.memoizedState;c.state=k,Li(e,s,c,o),Vi(),N=e.memoizedState,y||k!==N||ma?(typeof H=="function"&&(_c(e,n,H,s),N=e.memoizedState),(_=ma||Bh(e,n,_,s,k,N,h))?(z||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=N),c.props=s,c.state=N,c.context=h,s=_):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{c=e.stateNode,Wr(t,e),h=e.memoizedProps,z=ns(n,h),c.props=z,H=e.pendingProps,k=c.context,N=n.contextType,_=Ds,typeof N=="object"&&N!==null&&(_=Me(N)),y=n.getDerivedStateFromProps,(N=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==H||k!==_)&&zh(e,c,s,_),ma=!1,k=e.memoizedState,c.state=k,Li(e,s,c,o),Vi();var M=e.memoizedState;h!==H||k!==M||ma||t!==null&&t.dependencies!==null&&Ql(t.dependencies)?(typeof y=="function"&&(_c(e,n,y,s),M=e.memoizedState),(z=ma||Bh(e,n,z,s,k,M,_)||t!==null&&t.dependencies!==null&&Ql(t.dependencies))?(N||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,M,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,M,_)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=M),c.props=s,c.state=M,c.context=_,s=z):(typeof c.componentDidUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),s=!1)}return c=s,mo(t,e),s=(e.flags&128)!==0,c||s?(c=e.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&s?(e.child=ts(e,t.child,null,o),e.child=ts(e,null,n,o)):Oe(t,e,n,o),e.memoizedState=c.state,t=e.child):t=Pn(t,e,o),t}function Jh(t,e,n,s){return Qa(),e.flags|=256,Oe(t,e,n,s),e.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nc(t){return{baseLanes:t,cachePool:Hf()}}function Dc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=tn),t}function $h(t,e,n){var s=e.pendingProps,o=!1,c=(e.flags&128)!==0,h;if((h=c)||(h=t!==null&&t.memoizedState===null?!1:(me.current&2)!==0),h&&(o=!0,e.flags&=-129),h=(e.flags&32)!==0,e.flags&=-33,t===null){if(Ot){if(o?va(e):ya(),(t=ee)?(t=lp(t,hn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ua!==null?{id:kn,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},n=wf(t),n.return=e,e.child=n,we=e,ee=null)):t=null,t===null)throw fa(e);return du(t)?e.lanes=32:e.lanes=536870912,null}var y=s.children;return s=s.fallback,o?(ya(),o=e.mode,y=po({mode:"hidden",children:y},o),s=Ka(s,o,n,null),y.return=e,s.return=e,y.sibling=s,e.child=y,s=e.child,s.memoizedState=Nc(n),s.childLanes=Dc(t,h,n),e.memoizedState=Cc,Ii(null,s)):(va(e),kc(e,y))}var _=t.memoizedState;if(_!==null&&(y=_.dehydrated,y!==null)){if(c)e.flags&256?(va(e),e.flags&=-257,e=wc(t,e,n)):e.memoizedState!==null?(ya(),e.child=t.child,e.flags|=128,e=null):(ya(),y=s.fallback,o=e.mode,s=po({mode:"visible",children:s.children},o),y=Ka(y,o,n,null),y.flags|=2,s.return=e,y.return=e,s.sibling=y,e.child=s,ts(e,t.child,null,n),s=e.child,s.memoizedState=Nc(n),s.childLanes=Dc(t,h,n),e.memoizedState=Cc,e=Ii(null,s));else if(va(e),du(y)){if(h=y.nextSibling&&y.nextSibling.dataset,h)var N=h.dgst;h=N,s=Error(r(419)),s.stack="",s.digest=h,Mi({value:s,source:null,stack:null}),e=wc(t,e,n)}else if(Te||Os(t,e,n,!1),h=(n&t.childLanes)!==0,Te||h){if(h=Wt,h!==null&&(s=vi(h,n),s!==0&&s!==_.retryLane))throw _.retryLane=s,Xa(t,s),Qe(h,t,s),jc;uu(y)||Ao(),e=wc(t,e,n)}else uu(y)?(e.flags|=192,e.child=t.child,e=null):(t=_.treeContext,ee=pn(y.nextSibling),we=e,Ot=!0,da=null,hn=!1,t!==null&&Rf(e,t),e=kc(e,s.children),e.flags|=4096);return e}return o?(ya(),y=s.fallback,o=e.mode,_=t.child,N=_.sibling,s=Yn(_,{mode:"hidden",children:s.children}),s.subtreeFlags=_.subtreeFlags&65011712,N!==null?y=Yn(N,y):(y=Ka(y,o,n,null),y.flags|=2),y.return=e,s.return=e,s.sibling=y,e.child=s,Ii(null,s),s=e.child,y=t.child.memoizedState,y===null?y=Nc(n):(o=y.cachePool,o!==null?(_=be._currentValue,o=o.parent!==_?{parent:_,pool:_}:o):o=Hf(),y={baseLanes:y.baseLanes|n,cachePool:o}),s.memoizedState=y,s.childLanes=Dc(t,h,n),e.memoizedState=Cc,Ii(t.child,s)):(va(e),n=t.child,t=n.sibling,n=Yn(n,{mode:"visible",children:s.children}),n.return=e,n.sibling=null,t!==null&&(h=e.deletions,h===null?(e.deletions=[t],e.flags|=16):h.push(t)),e.child=n,e.memoizedState=null,n)}function kc(t,e){return e=po({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function po(t,e){return t=Fe(22,t,null,e),t.lanes=0,t}function wc(t,e,n){return ts(e,t.child,null,n),t=kc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Wh(t,e,n){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),Xr(t.return,e,n)}function Mc(t,e,n,s,o,c){var h=t.memoizedState;h===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:o,treeForkCount:c}:(h.isBackwards=e,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=n,h.tailMode=o,h.treeForkCount=c)}function tm(t,e,n){var s=e.pendingProps,o=s.revealOrder,c=s.tail;s=s.children;var h=me.current,y=(h&2)!==0;if(y?(h=h&1|2,e.flags|=128):h&=1,St(me,h),Oe(t,e,s,n),s=Ot?wi:0,!y&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Wh(t,n,e);else if(t.tag===19)Wh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(o){case"forwards":for(n=e.child,o=null;n!==null;)t=n.alternate,t!==null&&no(t)===null&&(o=n),n=n.sibling;n=o,n===null?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),Mc(e,!1,o,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&no(t)===null){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=t}Mc(e,!0,n,null,c,s);break;case"together":Mc(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function Pn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ta|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Os(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,n=Yn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Yn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Oc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Ql(t)))}function ob(t,e,n){switch(e.tag){case 3:qe(e,e.stateNode.containerInfo),ha(e,be,t.memoizedState.cache),Qa();break;case 27:case 5:ce(e);break;case 4:qe(e,e.stateNode.containerInfo);break;case 10:ha(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,sc(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(va(e),e.flags|=128,null):(n&e.child.childLanes)!==0?$h(t,e,n):(va(e),t=Pn(t,e,n),t!==null?t.sibling:null);va(e);break;case 19:var o=(t.flags&128)!==0;if(s=(n&e.childLanes)!==0,s||(Os(t,e,n,!1),s=(n&e.childLanes)!==0),o){if(s)return tm(t,e,n);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),St(me,me.current),s)break;return null;case 22:return e.lanes=0,Xh(t,e,n,e.pendingProps);case 24:ha(e,be,t.memoizedState.cache)}return Pn(t,e,n)}function em(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)Te=!0;else{if(!Oc(t,n)&&(e.flags&128)===0)return Te=!1,ob(t,e,n);Te=(t.flags&131072)!==0}else Te=!1,Ot&&(e.flags&1048576)!==0&&Of(e,wi,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=$a(e.elementType),e.type=t,typeof t=="function")Vr(t)?(s=ns(t,s),e.tag=1,e=Fh(null,e,t,s,n)):(e.tag=0,e=Ec(null,e,t,s,n));else{if(t!=null){var o=t.$$typeof;if(o===K){e.tag=11,e=Yh(null,e,t,s,n);break t}else if(o===W){e.tag=14,e=Ih(null,e,t,s,n);break t}}throw e=Lt(t)||t,Error(r(306,e,""))}}return e;case 0:return Ec(t,e,e.type,e.pendingProps,n);case 1:return s=e.type,o=ns(s,e.pendingProps),Fh(t,e,s,o,n);case 3:t:{if(qe(e,e.stateNode.containerInfo),t===null)throw Error(r(387));s=e.pendingProps;var c=e.memoizedState;o=c.element,Wr(t,e),Li(e,s,null,n);var h=e.memoizedState;if(s=h.cache,ha(e,be,s),s!==c.cache&&Kr(e,[be],n,!0),Vi(),s=h.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:h.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=Jh(t,e,s,n);break t}else if(s!==o){o=un(Error(r(424)),e),Mi(o),e=Jh(t,e,s,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ee=pn(t.firstChild),we=e,Ot=!0,da=null,hn=!0,n=Xf(e,null,s,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Qa(),s===o){e=Pn(t,e,n);break t}Oe(t,e,s,n)}e=e.child}return e;case 26:return mo(t,e),t===null?(n=fp(e.type,null,e.pendingProps,null))?e.memoizedState=n:Ot||(n=e.type,t=e.pendingProps,s=wo(ye.current).createElement(n),s[$]=e,s[Tt]=t,Re(s,n,t),Ee(s),e.stateNode=s):e.memoizedState=fp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return ce(e),t===null&&Ot&&(s=e.stateNode=cp(e.type,e.pendingProps,ye.current),we=e,hn=!0,o=ee,Ea(e.type)?(fu=o,ee=pn(s.firstChild)):ee=o),Oe(t,e,e.pendingProps.children,n),mo(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Ot&&((o=s=ee)&&(s=Ub(s,e.type,e.pendingProps,hn),s!==null?(e.stateNode=s,we=e,ee=pn(s.firstChild),hn=!1,o=!0):o=!1),o||fa(e)),ce(e),o=e.type,c=e.pendingProps,h=t!==null?t.memoizedProps:null,s=c.children,ou(o,c)?s=null:h!==null&&ou(o,h)&&(e.flags|=32),e.memoizedState!==null&&(o=lc(t,e,$y,null,null,n),il._currentValue=o),mo(t,e),Oe(t,e,s,n),e.child;case 6:return t===null&&Ot&&((t=n=ee)&&(n=Vb(n,e.pendingProps,hn),n!==null?(e.stateNode=n,we=e,ee=null,t=!0):t=!1),t||fa(e)),null;case 13:return $h(t,e,n);case 4:return qe(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=ts(e,null,s,n):Oe(t,e,s,n),e.child;case 11:return Yh(t,e,e.type,e.pendingProps,n);case 7:return Oe(t,e,e.pendingProps,n),e.child;case 8:return Oe(t,e,e.pendingProps.children,n),e.child;case 12:return Oe(t,e,e.pendingProps.children,n),e.child;case 10:return s=e.pendingProps,ha(e,e.type,s.value),Oe(t,e,s.children,n),e.child;case 9:return o=e.type._context,s=e.pendingProps.children,Fa(e),o=Me(o),s=s(o),e.flags|=1,Oe(t,e,s,n),e.child;case 14:return Ih(t,e,e.type,e.pendingProps,n);case 15:return Zh(t,e,e.type,e.pendingProps,n);case 19:return tm(t,e,n);case 31:return lb(t,e,n);case 22:return Xh(t,e,n,e.pendingProps);case 24:return Fa(e),s=Me(be),t===null?(o=Fr(),o===null&&(o=Wt,c=Qr(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),e.memoizedState={parent:s,cache:o},$r(e),ha(e,be,o)):((t.lanes&n)!==0&&(Wr(t,e),Li(e,null,null,n),Vi()),o=t.memoizedState,c=e.memoizedState,o.parent!==s?(o={parent:s,cache:s},e.memoizedState=o,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=o),ha(e,be,s)):(s=c.cache,ha(e,be,s),s!==o.cache&&Kr(e,[be],n,!0))),Oe(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function Fn(t){t.flags|=4}function Rc(t,e,n,s,o){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(o&335544128)===o)if(t.stateNode.complete)t.flags|=8192;else if(Nm())t.flags|=8192;else throw Wa=$l,Jr}else t.flags&=-16777217}function nm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!vp(e))if(Nm())t.flags|=8192;else throw Wa=$l,Jr}function go(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?mi():536870912,t.lanes|=e,Zs|=e)}function Zi(t,e){if(!Ot)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function ne(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,s=0;if(e)for(var o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=s,t.childLanes=n,e}function rb(t,e,n){var s=e.pendingProps;switch(qr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(e),null;case 1:return ne(e),null;case 3:return n=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),Xn(be),bt(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ms(e)?Fn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Ir())),ne(e),null;case 26:var o=e.type,c=e.memoizedState;return t===null?(Fn(e),c!==null?(ne(e),nm(e,c)):(ne(e),Rc(e,o,null,s,n))):c?c!==t.memoizedState?(Fn(e),ne(e),nm(e,c)):(ne(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&Fn(e),ne(e),Rc(e,o,t,s,n)),null;case 27:if(De(e),n=ye.current,o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&Fn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return ne(e),null}t=Y.current,Ms(e)?Bf(e):(t=cp(o,s,n),e.stateNode=t,Fn(e))}return ne(e),null;case 5:if(De(e),o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&Fn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return ne(e),null}if(c=Y.current,Ms(e))Bf(e);else{var h=wo(ye.current);switch(c){case 1:c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=h.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?h.createElement(o,{is:s.is}):h.createElement(o)}}c[$]=e,c[Tt]=s;t:for(h=e.child;h!==null;){if(h.tag===5||h.tag===6)c.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break t;for(;h.sibling===null;){if(h.return===null||h.return===e)break t;h=h.return}h.sibling.return=h.return,h=h.sibling}e.stateNode=c;t:switch(Re(c,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&Fn(e)}}return ne(e),Rc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&Fn(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(r(166));if(t=ye.current,Ms(e)){if(t=e.stateNode,n=e.memoizedProps,s=null,o=we,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}t[$]=e,t=!!(t.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||$m(t.nodeValue,n)),t||fa(e,!0)}else t=wo(t).createTextNode(s),t[$]=e,e.stateNode=t}return ne(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(s=Ms(e),n!==null){if(t===null){if(!s)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[$]=e}else Qa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),t=!1}else n=Ir(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?($e(e),e):($e(e),null);if((e.flags&128)!==0)throw Error(r(558))}return ne(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(o=Ms(e),s!==null&&s.dehydrated!==null){if(t===null){if(!o)throw Error(r(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[$]=e}else Qa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),o=!1}else o=Ir(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),o=!0;if(!o)return e.flags&256?($e(e),e):($e(e),null)}return $e(e),(e.flags&128)!==0?(e.lanes=n,e):(n=s!==null,t=t!==null&&t.memoizedState!==null,n&&(s=e.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==o&&(s.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),go(e,e.updateQueue),ne(e),null);case 4:return bt(),t===null&&nu(e.stateNode.containerInfo),ne(e),null;case 10:return Xn(e.type),ne(e),null;case 19:if(Rt(me),s=e.memoizedState,s===null)return ne(e),null;if(o=(e.flags&128)!==0,c=s.rendering,c===null)if(o)Zi(s,!1);else{if(de!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=no(t),c!==null){for(e.flags|=128,Zi(s,!1),t=c.updateQueue,e.updateQueue=t,go(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)kf(n,t),n=n.sibling;return St(me,me.current&1|2),Ot&&In(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&Ht()>To&&(e.flags|=128,o=!0,Zi(s,!1),e.lanes=4194304)}else{if(!o)if(t=no(c),t!==null){if(e.flags|=128,o=!0,t=t.updateQueue,e.updateQueue=t,go(e,t),Zi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Ot)return ne(e),null}else 2*Ht()-s.renderingStartTime>To&&n!==536870912&&(e.flags|=128,o=!0,Zi(s,!1),e.lanes=4194304);s.isBackwards?(c.sibling=e.child,e.child=c):(t=s.last,t!==null?t.sibling=c:e.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ht(),t.sibling=null,n=me.current,St(me,o?n&1|2:n&1),Ot&&In(e,s.treeForkCount),t):(ne(e),null);case 22:case 23:return $e(e),ac(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(n&536870912)!==0&&(e.flags&128)===0&&(ne(e),e.subtreeFlags&6&&(e.flags|=8192)):ne(e),n=e.updateQueue,n!==null&&go(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==n&&(e.flags|=2048),t!==null&&Rt(Ja),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Xn(be),ne(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function cb(t,e){switch(qr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Xn(be),bt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return De(e),null;case 31:if(e.memoizedState!==null){if($e(e),e.alternate===null)throw Error(r(340));Qa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if($e(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Qa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Rt(me),null;case 4:return bt(),null;case 10:return Xn(e.type),null;case 22:case 23:return $e(e),ac(),t!==null&&Rt(Ja),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Xn(be),null;case 25:return null;default:return null}}function am(t,e){switch(qr(e),e.tag){case 3:Xn(be),bt();break;case 26:case 27:case 5:De(e);break;case 4:bt();break;case 31:e.memoizedState!==null&&$e(e);break;case 13:$e(e);break;case 19:Rt(me);break;case 10:Xn(e.type);break;case 22:case 23:$e(e),ac(),t!==null&&Rt(Ja);break;case 24:Xn(be)}}function Xi(t,e){try{var n=e.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var o=s.next;n=o;do{if((n.tag&t)===t){s=void 0;var c=n.create,h=n.inst;s=c(),h.destroy=s}n=n.next}while(n!==o)}}catch(y){Kt(e,e.return,y)}}function ba(t,e,n){try{var s=e.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&t)===t){var h=s.inst,y=h.destroy;if(y!==void 0){h.destroy=void 0,o=e;var _=n,N=y;try{N()}catch(z){Kt(o,_,z)}}}s=s.next}while(s!==c)}}catch(z){Kt(e,e.return,z)}}function sm(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Qf(e,n)}catch(s){Kt(t,t.return,s)}}}function im(t,e,n){n.props=ns(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(s){Kt(t,e,s)}}function Ki(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof n=="function"?t.refCleanup=n(s):n.current=s}}catch(o){Kt(t,e,o)}}function Mn(t,e){var n=t.ref,s=t.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(o){Kt(t,e,o)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Kt(t,e,o)}else n.current=null}function lm(t){var e=t.type,n=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break t;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(o){Kt(t,t.return,o)}}function Bc(t,e,n){try{var s=t.stateNode;wb(s,t.type,n,e),s[Tt]=e}catch(o){Kt(t,t.return,o)}}function om(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ea(t.type)||t.tag===4}function zc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||om(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ea(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Uc(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Gn));else if(s!==4&&(s===27&&Ea(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Uc(t,e,n),t=t.sibling;t!==null;)Uc(t,e,n),t=t.sibling}function vo(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(s!==4&&(s===27&&Ea(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(vo(t,e,n),t=t.sibling;t!==null;)vo(t,e,n),t=t.sibling}function rm(t){var e=t.stateNode,n=t.memoizedProps;try{for(var s=t.type,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);Re(e,s,n),e[$]=t,e[Tt]=n}catch(c){Kt(t,t.return,c)}}var Jn=!1,_e=!1,Vc=!1,cm=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function ub(t,e){if(t=t.containerInfo,iu=Vo,t=Tf(t),wr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var h=0,y=-1,_=-1,N=0,z=0,H=t,k=null;e:for(;;){for(var M;H!==n||o!==0&&H.nodeType!==3||(y=h+o),H!==c||s!==0&&H.nodeType!==3||(_=h+s),H.nodeType===3&&(h+=H.nodeValue.length),(M=H.firstChild)!==null;)k=H,H=M;for(;;){if(H===t)break e;if(k===n&&++N===o&&(y=h),k===c&&++z===s&&(_=h),(M=H.nextSibling)!==null)break;H=k,k=H.parentNode}H=M}n=y===-1||_===-1?null:{start:y,end:_}}else n=null}n=n||{start:0,end:0}}else n=null;for(lu={focusedElem:t,selectionRange:n},Vo=!1,Ce=e;Ce!==null;)if(e=Ce,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ce=t;else for(;Ce!==null;){switch(e=Ce,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)o=t[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,n=e,o=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var ot=ns(n.type,o);t=s.getSnapshotBeforeUpdate(ot,c),s.__reactInternalSnapshotBeforeUpdate=t}catch(gt){Kt(n,n.return,gt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)cu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":cu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=e.sibling,t!==null){t.return=e.return,Ce=t;break}Ce=e.return}}function um(t,e,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(t,n),s&4&&Xi(5,n);break;case 1:if(Wn(t,n),s&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(h){Kt(n,n.return,h)}else{var o=ns(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(o,e,t.__reactInternalSnapshotBeforeUpdate)}catch(h){Kt(n,n.return,h)}}s&64&&sm(n),s&512&&Ki(n,n.return);break;case 3:if(Wn(t,n),s&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{Qf(t,e)}catch(h){Kt(n,n.return,h)}}break;case 27:e===null&&s&4&&rm(n);case 26:case 5:Wn(t,n),e===null&&s&4&&lm(n),s&512&&Ki(n,n.return);break;case 12:Wn(t,n);break;case 31:Wn(t,n),s&4&&hm(t,n);break;case 13:Wn(t,n),s&4&&mm(t,n),s&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=bb.bind(null,n),Lb(t,n))));break;case 22:if(s=n.memoizedState!==null||Jn,!s){e=e!==null&&e.memoizedState!==null||_e,o=Jn;var c=_e;Jn=s,(_e=e)&&!c?ta(t,n,(n.subtreeFlags&8772)!==0):Wn(t,n),Jn=o,_e=c}break;case 30:break;default:Wn(t,n)}}function dm(t){var e=t.alternate;e!==null&&(t.alternate=null,dm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&mr(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var se=null,Ie=!1;function $n(t,e,n){for(n=n.child;n!==null;)fm(t,e,n),n=n.sibling}function fm(t,e,n){if(J&&typeof J.onCommitFiberUnmount=="function")try{J.onCommitFiberUnmount(Ln,n)}catch{}switch(n.tag){case 26:_e||Mn(n,e),$n(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:_e||Mn(n,e);var s=se,o=Ie;Ea(n.type)&&(se=n.stateNode,Ie=!1),$n(t,e,n),nl(n.stateNode),se=s,Ie=o;break;case 5:_e||Mn(n,e);case 6:if(s=se,o=Ie,se=null,$n(t,e,n),se=s,Ie=o,se!==null)if(Ie)try{(se.nodeType===9?se.body:se.nodeName==="HTML"?se.ownerDocument.body:se).removeChild(n.stateNode)}catch(c){Kt(n,e,c)}else try{se.removeChild(n.stateNode)}catch(c){Kt(n,e,c)}break;case 18:se!==null&&(Ie?(t=se,sp(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Ws(t)):sp(se,n.stateNode));break;case 4:s=se,o=Ie,se=n.stateNode.containerInfo,Ie=!0,$n(t,e,n),se=s,Ie=o;break;case 0:case 11:case 14:case 15:ba(2,n,e),_e||ba(4,n,e),$n(t,e,n);break;case 1:_e||(Mn(n,e),s=n.stateNode,typeof s.componentWillUnmount=="function"&&im(n,e,s)),$n(t,e,n);break;case 21:$n(t,e,n);break;case 22:_e=(s=_e)||n.memoizedState!==null,$n(t,e,n),_e=s;break;default:$n(t,e,n)}}function hm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ws(t)}catch(n){Kt(e,e.return,n)}}}function mm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ws(t)}catch(n){Kt(e,e.return,n)}}function db(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new cm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new cm),e;default:throw Error(r(435,t.tag))}}function yo(t,e){var n=db(t);e.forEach(function(s){if(!n.has(s)){n.add(s);var o=Sb.bind(null,t,s);s.then(o,o)}})}function Ze(t,e){var n=e.deletions;if(n!==null)for(var s=0;s<n.length;s++){var o=n[s],c=t,h=e,y=h;t:for(;y!==null;){switch(y.tag){case 27:if(Ea(y.type)){se=y.stateNode,Ie=!1;break t}break;case 5:se=y.stateNode,Ie=!1;break t;case 3:case 4:se=y.stateNode.containerInfo,Ie=!0;break t}y=y.return}if(se===null)throw Error(r(160));fm(c,h,o),se=null,Ie=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)pm(e,t),e=e.sibling}var xn=null;function pm(t,e){var n=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ze(e,t),Xe(t),s&4&&(ba(3,t,t.return),Xi(3,t),ba(5,t,t.return));break;case 1:Ze(e,t),Xe(t),s&512&&(_e||n===null||Mn(n,n.return)),s&64&&Jn&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var o=xn;if(Ze(e,t),Xe(t),s&512&&(_e||n===null||Mn(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=t.memoizedState,n===null)if(s===null)if(t.stateNode===null){t:{s=t.type,n=t.memoizedProps,o=o.ownerDocument||o;e:switch(s){case"title":c=o.getElementsByTagName("title")[0],(!c||c[Si]||c[$]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(s),o.head.insertBefore(c,o.querySelector("head > title"))),Re(c,s,n),c[$]=t,Ee(c),s=c;break t;case"link":var h=pp("link","href",o).get(s+(n.href||""));if(h){for(var y=0;y<h.length;y++)if(c=h[y],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){h.splice(y,1);break e}}c=o.createElement(s),Re(c,s,n),o.head.appendChild(c);break;case"meta":if(h=pp("meta","content",o).get(s+(n.content||""))){for(y=0;y<h.length;y++)if(c=h[y],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){h.splice(y,1);break e}}c=o.createElement(s),Re(c,s,n),o.head.appendChild(c);break;default:throw Error(r(468,s))}c[$]=t,Ee(c),s=c}t.stateNode=s}else gp(o,t.type,t.stateNode);else t.stateNode=mp(o,s,t.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?gp(o,t.type,t.stateNode):mp(o,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Bc(t,t.memoizedProps,n.memoizedProps)}break;case 27:Ze(e,t),Xe(t),s&512&&(_e||n===null||Mn(n,n.return)),n!==null&&s&4&&Bc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(Ze(e,t),Xe(t),s&512&&(_e||n===null||Mn(n,n.return)),t.flags&32){o=t.stateNode;try{_s(o,"")}catch(ot){Kt(t,t.return,ot)}}s&4&&t.stateNode!=null&&(o=t.memoizedProps,Bc(t,o,n!==null?n.memoizedProps:o)),s&1024&&(Vc=!0);break;case 6:if(Ze(e,t),Xe(t),s&4){if(t.stateNode===null)throw Error(r(162));s=t.memoizedProps,n=t.stateNode;try{n.nodeValue=s}catch(ot){Kt(t,t.return,ot)}}break;case 3:if(Ro=null,o=xn,xn=Mo(e.containerInfo),Ze(e,t),xn=o,Xe(t),s&4&&n!==null&&n.memoizedState.isDehydrated)try{Ws(e.containerInfo)}catch(ot){Kt(t,t.return,ot)}Vc&&(Vc=!1,gm(t));break;case 4:s=xn,xn=Mo(t.stateNode.containerInfo),Ze(e,t),Xe(t),xn=s;break;case 12:Ze(e,t),Xe(t);break;case 31:Ze(e,t),Xe(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,yo(t,s)));break;case 13:Ze(e,t),Xe(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(So=Ht()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,yo(t,s)));break;case 22:o=t.memoizedState!==null;var _=n!==null&&n.memoizedState!==null,N=Jn,z=_e;if(Jn=N||o,_e=z||_,Ze(e,t),_e=z,Jn=N,Xe(t),s&8192)t:for(e=t.stateNode,e._visibility=o?e._visibility&-2:e._visibility|1,o&&(n===null||_||Jn||_e||as(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){_=n=e;try{if(c=_.stateNode,o)h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{y=_.stateNode;var H=_.memoizedProps.style,k=H!=null&&H.hasOwnProperty("display")?H.display:null;y.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ot){Kt(_,_.return,ot)}}}else if(e.tag===6){if(n===null){_=e;try{_.stateNode.nodeValue=o?"":_.memoizedProps}catch(ot){Kt(_,_.return,ot)}}}else if(e.tag===18){if(n===null){_=e;try{var M=_.stateNode;o?ip(M,!0):ip(_.stateNode,!1)}catch(ot){Kt(_,_.return,ot)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,yo(t,n))));break;case 19:Ze(e,t),Xe(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,yo(t,s)));break;case 30:break;case 21:break;default:Ze(e,t),Xe(t)}}function Xe(t){var e=t.flags;if(e&2){try{for(var n,s=t.return;s!==null;){if(om(s)){n=s;break}s=s.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var o=n.stateNode,c=zc(t);vo(t,c,o);break;case 5:var h=n.stateNode;n.flags&32&&(_s(h,""),n.flags&=-33);var y=zc(t);vo(t,y,h);break;case 3:case 4:var _=n.stateNode.containerInfo,N=zc(t);Uc(t,N,_);break;default:throw Error(r(161))}}catch(z){Kt(t,t.return,z)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function gm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;gm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Wn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)um(t,e.alternate,e),e=e.sibling}function as(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:ba(4,e,e.return),as(e);break;case 1:Mn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&im(e,e.return,n),as(e);break;case 27:nl(e.stateNode);case 26:case 5:Mn(e,e.return),as(e);break;case 22:e.memoizedState===null&&as(e);break;case 30:as(e);break;default:as(e)}t=t.sibling}}function ta(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,o=t,c=e,h=c.flags;switch(c.tag){case 0:case 11:case 15:ta(o,c,n),Xi(4,c);break;case 1:if(ta(o,c,n),s=c,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(N){Kt(s,s.return,N)}if(s=c,o=s.updateQueue,o!==null){var y=s.stateNode;try{var _=o.shared.hiddenCallbacks;if(_!==null)for(o.shared.hiddenCallbacks=null,o=0;o<_.length;o++)Kf(_[o],y)}catch(N){Kt(s,s.return,N)}}n&&h&64&&sm(c),Ki(c,c.return);break;case 27:rm(c);case 26:case 5:ta(o,c,n),n&&s===null&&h&4&&lm(c),Ki(c,c.return);break;case 12:ta(o,c,n);break;case 31:ta(o,c,n),n&&h&4&&hm(o,c);break;case 13:ta(o,c,n),n&&h&4&&mm(o,c);break;case 22:c.memoizedState===null&&ta(o,c,n),Ki(c,c.return);break;case 30:break;default:ta(o,c,n)}e=e.sibling}}function Lc(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&Oi(n))}function Hc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Oi(t))}function An(t,e,n,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vm(t,e,n,s),e=e.sibling}function vm(t,e,n,s){var o=e.flags;switch(e.tag){case 0:case 11:case 15:An(t,e,n,s),o&2048&&Xi(9,e);break;case 1:An(t,e,n,s);break;case 3:An(t,e,n,s),o&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Oi(t)));break;case 12:if(o&2048){An(t,e,n,s),t=e.stateNode;try{var c=e.memoizedProps,h=c.id,y=c.onPostCommit;typeof y=="function"&&y(h,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){Kt(e,e.return,_)}}else An(t,e,n,s);break;case 31:An(t,e,n,s);break;case 13:An(t,e,n,s);break;case 23:break;case 22:c=e.stateNode,h=e.alternate,e.memoizedState!==null?c._visibility&2?An(t,e,n,s):Qi(t,e):c._visibility&2?An(t,e,n,s):(c._visibility|=2,qs(t,e,n,s,(e.subtreeFlags&10256)!==0||!1)),o&2048&&Lc(h,e);break;case 24:An(t,e,n,s),o&2048&&Hc(e.alternate,e);break;default:An(t,e,n,s)}}function qs(t,e,n,s,o){for(o=o&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,h=e,y=n,_=s,N=h.flags;switch(h.tag){case 0:case 11:case 15:qs(c,h,y,_,o),Xi(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?qs(c,h,y,_,o):Qi(c,h):(z._visibility|=2,qs(c,h,y,_,o)),o&&N&2048&&Lc(h.alternate,h);break;case 24:qs(c,h,y,_,o),o&&N&2048&&Hc(h.alternate,h);break;default:qs(c,h,y,_,o)}e=e.sibling}}function Qi(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,s=e,o=s.flags;switch(s.tag){case 22:Qi(n,s),o&2048&&Lc(s.alternate,s);break;case 24:Qi(n,s),o&2048&&Hc(s.alternate,s);break;default:Qi(n,s)}e=e.sibling}}var Pi=8192;function Ys(t,e,n){if(t.subtreeFlags&Pi)for(t=t.child;t!==null;)ym(t,e,n),t=t.sibling}function ym(t,e,n){switch(t.tag){case 26:Ys(t,e,n),t.flags&Pi&&t.memoizedState!==null&&Jb(n,xn,t.memoizedState,t.memoizedProps);break;case 5:Ys(t,e,n);break;case 3:case 4:var s=xn;xn=Mo(t.stateNode.containerInfo),Ys(t,e,n),xn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Pi,Pi=16777216,Ys(t,e,n),Pi=s):Ys(t,e,n));break;default:Ys(t,e,n)}}function bm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Fi(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];Ce=s,Tm(s,t)}bm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sm(t),t=t.sibling}function Sm(t){switch(t.tag){case 0:case 11:case 15:Fi(t),t.flags&2048&&ba(9,t,t.return);break;case 3:Fi(t);break;case 12:Fi(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,bo(t)):Fi(t);break;default:Fi(t)}}function bo(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];Ce=s,Tm(s,t)}bm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:ba(8,e,e.return),bo(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,bo(e));break;default:bo(e)}t=t.sibling}}function Tm(t,e){for(;Ce!==null;){var n=Ce;switch(n.tag){case 0:case 11:case 15:ba(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Oi(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,Ce=s;else t:for(n=t;Ce!==null;){s=Ce;var o=s.sibling,c=s.return;if(dm(s),s===n){Ce=null;break t}if(o!==null){o.return=c,Ce=o;break t}Ce=c}}}var fb={getCacheForType:function(t){var e=Me(be),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Me(be).controller.signal}},hb=typeof WeakMap=="function"?WeakMap:Map,Gt=0,Wt=null,Nt=null,wt=0,Xt=0,We=null,Sa=!1,Is=!1,Gc=!1,ea=0,de=0,Ta=0,ss=0,qc=0,tn=0,Zs=0,Ji=null,Ke=null,Yc=!1,So=0,_m=0,To=1/0,_o=null,_a=null,Ae=0,xa=null,Xs=null,na=0,Ic=0,Zc=null,xm=null,$i=0,Xc=null;function en(){return(Gt&2)!==0&&wt!==0?wt&-wt:A.T!==null?$c():yi()}function Am(){if(tn===0)if((wt&536870912)===0||Ot){var t=La;La<<=1,(La&3932160)===0&&(La=262144),tn=t}else tn=536870912;return t=Je.current,t!==null&&(t.flags|=32),tn}function Qe(t,e,n){(t===Wt&&(Xt===2||Xt===9)||t.cancelPendingCommit!==null)&&(Ks(t,0),Aa(t,wt,tn,!1)),ra(t,n),((Gt&2)===0||t!==Wt)&&(t===Wt&&((Gt&2)===0&&(ss|=n),de===4&&Aa(t,wt,tn,!1)),On(t))}function jm(t,e,n){if((Gt&6)!==0)throw Error(r(327));var s=!n&&(e&127)===0&&(e&t.expiredLanes)===0||oa(t,e),o=s?gb(t,e):Qc(t,e,!0),c=s;do{if(o===0){Is&&!s&&Aa(t,e,0,!1);break}else{if(n=t.current.alternate,c&&!mb(n)){o=Qc(t,e,!1),c=!1;continue}if(o===2){if(c=e,t.errorRecoveryDisabledLanes&c)var h=0;else h=t.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){e=h;t:{var y=t;o=Ji;var _=y.current.memoizedState.isDehydrated;if(_&&(Ks(y,h).flags|=256),h=Qc(y,h,!1),h!==2){if(Gc&&!_){y.errorRecoveryDisabledLanes|=c,ss|=c,o=4;break t}c=Ke,Ke=o,c!==null&&(Ke===null?Ke=c:Ke.push.apply(Ke,c))}o=h}if(c=!1,o!==2)continue}}if(o===1){Ks(t,0),Aa(t,e,0,!0);break}t:{switch(s=t,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:Aa(s,e,tn,!Sa);break t;case 2:Ke=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(o=So+300-Ht(),10<o)){if(Aa(s,e,tn,!Sa),Ga(s,0,!0)!==0)break t;na=e,s.timeoutHandle=np(Em.bind(null,s,n,Ke,_o,Yc,e,tn,ss,Zs,Sa,c,"Throttled",-0,0),o);break t}Em(s,n,Ke,_o,Yc,e,tn,ss,Zs,Sa,c,null,-0,0)}}break}while(!0);On(t)}function Em(t,e,n,s,o,c,h,y,_,N,z,H,k,M){if(t.timeoutHandle=-1,H=e.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gn},ym(e,c,H);var ot=(c&62914560)===c?So-Ht():(c&4194048)===c?_m-Ht():0;if(ot=$b(H,ot),ot!==null){na=c,t.cancelPendingCommit=ot(Rm.bind(null,t,e,c,n,s,o,h,y,_,z,H,null,k,M)),Aa(t,c,h,!N);return}}Rm(t,e,c,n,s,o,h,y,_)}function mb(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var o=n[s],c=o.getSnapshot;o=o.value;try{if(!Pe(c(),o))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Aa(t,e,n,s){e&=~qc,e&=~ss,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var o=e;0<o;){var c=31-Bt(o),h=1<<c;s[c]=-1,o&=~h}n!==0&&pi(t,n,e)}function xo(){return(Gt&6)===0?(Wi(0),!1):!0}function Kc(){if(Nt!==null){if(Xt===0)var t=Nt.return;else t=Nt,Zn=Pa=null,cc(t),Us=null,Bi=0,t=Nt;for(;t!==null;)am(t.alternate,t),t=t.return;Nt=null}}function Ks(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,Rb(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),na=0,Kc(),Wt=t,Nt=n=Yn(t.current,null),wt=e,Xt=0,We=null,Sa=!1,Is=oa(t,e),Gc=!1,Zs=tn=qc=ss=Ta=de=0,Ke=Ji=null,Yc=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var o=31-Bt(s),c=1<<o;e|=t[o],s&=~c}return ea=e,Yl(),n}function Cm(t,e){_t=null,A.H=Yi,e===zs||e===Jl?(e=Yf(),Xt=3):e===Jr?(e=Yf(),Xt=4):Xt=e===jc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,We=e,Nt===null&&(de=1,fo(t,un(e,t.current)))}function Nm(){var t=Je.current;return t===null?!0:(wt&4194048)===wt?mn===null:(wt&62914560)===wt||(wt&536870912)!==0?t===mn:!1}function Dm(){var t=A.H;return A.H=Yi,t===null?Yi:t}function km(){var t=A.A;return A.A=fb,t}function Ao(){de=4,Sa||(wt&4194048)!==wt&&Je.current!==null||(Is=!0),(Ta&134217727)===0&&(ss&134217727)===0||Wt===null||Aa(Wt,wt,tn,!1)}function Qc(t,e,n){var s=Gt;Gt|=2;var o=Dm(),c=km();(Wt!==t||wt!==e)&&(_o=null,Ks(t,e)),e=!1;var h=de;t:do try{if(Xt!==0&&Nt!==null){var y=Nt,_=We;switch(Xt){case 8:Kc(),h=6;break t;case 3:case 2:case 9:case 6:Je.current===null&&(e=!0);var N=Xt;if(Xt=0,We=null,Qs(t,y,_,N),n&&Is){h=0;break t}break;default:N=Xt,Xt=0,We=null,Qs(t,y,_,N)}}pb(),h=de;break}catch(z){Cm(t,z)}while(!0);return e&&t.shellSuspendCounter++,Zn=Pa=null,Gt=s,A.H=o,A.A=c,Nt===null&&(Wt=null,wt=0,Yl()),h}function pb(){for(;Nt!==null;)wm(Nt)}function gb(t,e){var n=Gt;Gt|=2;var s=Dm(),o=km();Wt!==t||wt!==e?(_o=null,To=Ht()+500,Ks(t,e)):Is=oa(t,e);t:do try{if(Xt!==0&&Nt!==null){e=Nt;var c=We;e:switch(Xt){case 1:Xt=0,We=null,Qs(t,e,c,1);break;case 2:case 9:if(Gf(c)){Xt=0,We=null,Mm(e);break}e=function(){Xt!==2&&Xt!==9||Wt!==t||(Xt=7),On(t)},c.then(e,e);break t;case 3:Xt=7;break t;case 4:Xt=5;break t;case 7:Gf(c)?(Xt=0,We=null,Mm(e)):(Xt=0,We=null,Qs(t,e,c,7));break;case 5:var h=null;switch(Nt.tag){case 26:h=Nt.memoizedState;case 5:case 27:var y=Nt;if(h?vp(h):y.stateNode.complete){Xt=0,We=null;var _=y.sibling;if(_!==null)Nt=_;else{var N=y.return;N!==null?(Nt=N,jo(N)):Nt=null}break e}}Xt=0,We=null,Qs(t,e,c,5);break;case 6:Xt=0,We=null,Qs(t,e,c,6);break;case 8:Kc(),de=6;break t;default:throw Error(r(462))}}vb();break}catch(z){Cm(t,z)}while(!0);return Zn=Pa=null,A.H=s,A.A=o,Gt=n,Nt!==null?0:(Wt=null,wt=0,Yl(),de)}function vb(){for(;Nt!==null&&!ht();)wm(Nt)}function wm(t){var e=em(t.alternate,t,ea);t.memoizedProps=t.pendingProps,e===null?jo(t):Nt=e}function Mm(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Ph(n,e,e.pendingProps,e.type,void 0,wt);break;case 11:e=Ph(n,e,e.pendingProps,e.type.render,e.ref,wt);break;case 5:cc(e);default:am(n,e),e=Nt=kf(e,ea),e=em(n,e,ea)}t.memoizedProps=t.pendingProps,e===null?jo(t):Nt=e}function Qs(t,e,n,s){Zn=Pa=null,cc(e),Us=null,Bi=0;var o=e.return;try{if(ib(t,o,e,n,wt)){de=1,fo(t,un(n,t.current)),Nt=null;return}}catch(c){if(o!==null)throw Nt=o,c;de=1,fo(t,un(n,t.current)),Nt=null;return}e.flags&32768?(Ot||s===1?t=!0:Is||(wt&536870912)!==0?t=!1:(Sa=t=!0,(s===2||s===9||s===3||s===6)&&(s=Je.current,s!==null&&s.tag===13&&(s.flags|=16384))),Om(e,t)):jo(e)}function jo(t){var e=t;do{if((e.flags&32768)!==0){Om(e,Sa);return}t=e.return;var n=rb(e.alternate,e,ea);if(n!==null){Nt=n;return}if(e=e.sibling,e!==null){Nt=e;return}Nt=e=t}while(e!==null);de===0&&(de=5)}function Om(t,e){do{var n=cb(t.alternate,t);if(n!==null){n.flags&=32767,Nt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){Nt=t;return}Nt=t=n}while(t!==null);de=6,Nt=null}function Rm(t,e,n,s,o,c,h,y,_){t.cancelPendingCommit=null;do Eo();while(Ae!==0);if((Gt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(c=e.lanes|e.childLanes,c|=zr,kl(t,n,c,h,y,_),t===Wt&&(Nt=Wt=null,wt=0),Xs=e,xa=t,na=n,Ic=c,Zc=o,xm=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Tb(et,function(){return Lm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=A.T,A.T=null,o=Z.p,Z.p=2,h=Gt,Gt|=4;try{ub(t,e,n)}finally{Gt=h,Z.p=o,A.T=s}}Ae=1,Bm(),zm(),Um()}}function Bm(){if(Ae===1){Ae=0;var t=xa,e=Xs,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=A.T,A.T=null;var s=Z.p;Z.p=2;var o=Gt;Gt|=4;try{pm(e,t);var c=lu,h=Tf(t.containerInfo),y=c.focusedElem,_=c.selectionRange;if(h!==y&&y&&y.ownerDocument&&Sf(y.ownerDocument.documentElement,y)){if(_!==null&&wr(y)){var N=_.start,z=_.end;if(z===void 0&&(z=N),"selectionStart"in y)y.selectionStart=N,y.selectionEnd=Math.min(z,y.value.length);else{var H=y.ownerDocument||document,k=H&&H.defaultView||window;if(k.getSelection){var M=k.getSelection(),ot=y.textContent.length,gt=Math.min(_.start,ot),Ft=_.end===void 0?gt:Math.min(_.end,ot);!M.extend&&gt>Ft&&(h=Ft,Ft=gt,gt=h);var E=bf(y,gt),j=bf(y,Ft);if(E&&j&&(M.rangeCount!==1||M.anchorNode!==E.node||M.anchorOffset!==E.offset||M.focusNode!==j.node||M.focusOffset!==j.offset)){var C=H.createRange();C.setStart(E.node,E.offset),M.removeAllRanges(),gt>Ft?(M.addRange(C),M.extend(j.node,j.offset)):(C.setEnd(j.node,j.offset),M.addRange(C))}}}}for(H=[],M=y;M=M.parentNode;)M.nodeType===1&&H.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<H.length;y++){var L=H[y];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}Vo=!!iu,lu=iu=null}finally{Gt=o,Z.p=s,A.T=n}}t.current=e,Ae=2}}function zm(){if(Ae===2){Ae=0;var t=xa,e=Xs,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=A.T,A.T=null;var s=Z.p;Z.p=2;var o=Gt;Gt|=4;try{um(t,e.alternate,e)}finally{Gt=o,Z.p=s,A.T=n}}Ae=3}}function Um(){if(Ae===4||Ae===3){Ae=0,xt();var t=xa,e=Xs,n=na,s=xm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Ae=5:(Ae=0,Xs=xa=null,Vm(t,t.pendingLanes));var o=t.pendingLanes;if(o===0&&(_a=null),ms(n),e=e.stateNode,J&&typeof J.onCommitFiberRoot=="function")try{J.onCommitFiberRoot(Ln,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=A.T,o=Z.p,Z.p=2,A.T=null;try{for(var c=t.onRecoverableError,h=0;h<s.length;h++){var y=s[h];c(y.value,{componentStack:y.stack})}}finally{A.T=e,Z.p=o}}(na&3)!==0&&Eo(),On(t),o=t.pendingLanes,(n&261930)!==0&&(o&42)!==0?t===Xc?$i++:($i=0,Xc=t):$i=0,Wi(0)}}function Vm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Oi(e)))}function Eo(){return Bm(),zm(),Um(),Lm()}function Lm(){if(Ae!==5)return!1;var t=xa,e=Ic;Ic=0;var n=ms(na),s=A.T,o=Z.p;try{Z.p=32>n?32:n,A.T=null,n=Zc,Zc=null;var c=xa,h=na;if(Ae=0,Xs=xa=null,na=0,(Gt&6)!==0)throw Error(r(331));var y=Gt;if(Gt|=4,Sm(c.current),vm(c,c.current,h,n),Gt=y,Wi(0,!1),J&&typeof J.onPostCommitFiberRoot=="function")try{J.onPostCommitFiberRoot(Ln,c)}catch{}return!0}finally{Z.p=o,A.T=s,Vm(t,e)}}function Hm(t,e,n){e=un(n,e),e=Ac(t.stateNode,e,2),t=ga(t,e,2),t!==null&&(ra(t,2),On(t))}function Kt(t,e,n){if(t.tag===3)Hm(t,t,n);else for(;e!==null;){if(e.tag===3){Hm(e,t,n);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(_a===null||!_a.has(s))){t=un(n,t),n=Gh(2),s=ga(e,n,2),s!==null&&(qh(n,s,e,t),ra(s,2),On(s));break}}e=e.return}}function Pc(t,e,n){var s=t.pingCache;if(s===null){s=t.pingCache=new hb;var o=new Set;s.set(e,o)}else o=s.get(e),o===void 0&&(o=new Set,s.set(e,o));o.has(n)||(Gc=!0,o.add(n),t=yb.bind(null,t,e,n),e.then(t,t))}function yb(t,e,n){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Wt===t&&(wt&n)===n&&(de===4||de===3&&(wt&62914560)===wt&&300>Ht()-So?(Gt&2)===0&&Ks(t,0):qc|=n,Zs===wt&&(Zs=0)),On(t)}function Gm(t,e){e===0&&(e=mi()),t=Xa(t,e),t!==null&&(ra(t,e),On(t))}function bb(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Gm(t,n)}function Sb(t,e){var n=0;switch(t.tag){case 31:case 13:var s=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(e),Gm(t,n)}function Tb(t,e){return ut(t,e)}var Co=null,Ps=null,Fc=!1,No=!1,Jc=!1,ja=0;function On(t){t!==Ps&&t.next===null&&(Ps===null?Co=Ps=t:Ps=Ps.next=t),No=!0,Fc||(Fc=!0,xb())}function Wi(t,e){if(!Jc&&No){Jc=!0;do for(var n=!1,s=Co;s!==null;){if(t!==0){var o=s.pendingLanes;if(o===0)var c=0;else{var h=s.suspendedLanes,y=s.pingedLanes;c=(1<<31-Bt(42|t)+1)-1,c&=o&~(h&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Zm(s,c))}else c=wt,c=Ga(s,s===Wt?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||oa(s,c)||(n=!0,Zm(s,c));s=s.next}while(n);Jc=!1}}function _b(){qm()}function qm(){No=Fc=!1;var t=0;ja!==0&&Ob()&&(t=ja);for(var e=Ht(),n=null,s=Co;s!==null;){var o=s.next,c=Ym(s,e);c===0?(s.next=null,n===null?Co=o:n.next=o,o===null&&(Ps=n)):(n=s,(t!==0||(c&3)!==0)&&(No=!0)),s=o}Ae!==0&&Ae!==5||Wi(t),ja!==0&&(ja=0)}function Ym(t,e){for(var n=t.suspendedLanes,s=t.pingedLanes,o=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var h=31-Bt(c),y=1<<h,_=o[h];_===-1?((y&n)===0||(y&s)!==0)&&(o[h]=Dl(y,e)):_<=e&&(t.expiredLanes|=y),c&=~y}if(e=Wt,n=wt,n=Ga(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,n===0||t===e&&(Xt===2||Xt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&pt(s),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||oa(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(s!==null&&pt(s),ms(n)){case 2:case 8:n=Yt;break;case 32:n=et;break;case 268435456:n=xe;break;default:n=et}return s=Im.bind(null,t),n=ut(n,s),t.callbackPriority=e,t.callbackNode=n,e}return s!==null&&s!==null&&pt(s),t.callbackPriority=2,t.callbackNode=null,2}function Im(t,e){if(Ae!==0&&Ae!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Eo()&&t.callbackNode!==n)return null;var s=wt;return s=Ga(t,t===Wt?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(jm(t,s,e),Ym(t,Ht()),t.callbackNode!=null&&t.callbackNode===n?Im.bind(null,t):null)}function Zm(t,e){if(Eo())return null;jm(t,e,!0)}function xb(){Bb(function(){(Gt&6)!==0?ut(st,_b):qm()})}function $c(){if(ja===0){var t=Rs;t===0&&(t=Sn,Sn<<=1,(Sn&261888)===0&&(Sn=256)),ja=t}return ja}function Xm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Bl(""+t)}function Km(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function Ab(t,e,n,s,o){if(e==="submit"&&n&&n.stateNode===o){var c=Xm((o[Tt]||null).action),h=s.submitter;h&&(e=(e=h[Tt]||null)?Xm(e.formAction):h.getAttribute("formAction"),e!==null&&(c=e,h=null));var y=new Ll("action","action",null,s,o);t.push({event:y,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ja!==0){var _=h?Km(o,h):new FormData(o);yc(n,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(y.preventDefault(),_=h?Km(o,h):new FormData(o),yc(n,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var Wc=0;Wc<Br.length;Wc++){var tu=Br[Wc],jb=tu.toLowerCase(),Eb=tu[0].toUpperCase()+tu.slice(1);_n(jb,"on"+Eb)}_n(Af,"onAnimationEnd"),_n(jf,"onAnimationIteration"),_n(Ef,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(qy,"onTransitionRun"),_n(Yy,"onTransitionStart"),_n(Iy,"onTransitionCancel"),_n(Cf,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tl="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(" "),Cb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(tl));function Qm(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var s=t[n],o=s.event;s=s.listeners;t:{var c=void 0;if(e)for(var h=s.length-1;0<=h;h--){var y=s[h],_=y.instance,N=y.currentTarget;if(y=y.listener,_!==c&&o.isPropagationStopped())break t;c=y,o.currentTarget=N;try{c(o)}catch(z){ql(z)}o.currentTarget=null,c=_}else for(h=0;h<s.length;h++){if(y=s[h],_=y.instance,N=y.currentTarget,y=y.listener,_!==c&&o.isPropagationStopped())break t;c=y,o.currentTarget=N;try{c(o)}catch(z){ql(z)}o.currentTarget=null,c=_}}}}function Dt(t,e){var n=e[$t];n===void 0&&(n=e[$t]=new Set);var s=t+"__bubble";n.has(s)||(Pm(e,t,2,!1),n.add(s))}function eu(t,e,n){var s=0;e&&(s|=4),Pm(n,t,s,e)}var Do="_reactListening"+Math.random().toString(36).slice(2);function nu(t){if(!t[Do]){t[Do]=!0,Gd.forEach(function(n){n!=="selectionchange"&&(Cb.has(n)||eu(n,!1,t),eu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Do]||(e[Do]=!0,eu("selectionchange",!1,e))}}function Pm(t,e,n,s){switch(Ap(e)){case 2:var o=eS;break;case 8:o=nS;break;default:o=vu}n=o.bind(null,e,n,t),o=void 0,!_r||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),s?o!==void 0?t.addEventListener(e,n,{capture:!0,passive:o}):t.addEventListener(e,n,!0):o!==void 0?t.addEventListener(e,n,{passive:o}):t.addEventListener(e,n,!1)}function au(t,e,n,s,o){var c=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var y=s.stateNode.containerInfo;if(y===o)break;if(h===4)for(h=s.return;h!==null;){var _=h.tag;if((_===3||_===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;y!==null;){if(h=vs(y),h===null)return;if(_=h.tag,_===5||_===6||_===26||_===27){s=c=h;continue t}y=y.parentNode}}s=s.return}Wd(function(){var N=c,z=Sr(n),H=[];t:{var k=Nf.get(t);if(k!==void 0){var M=Ll,ot=t;switch(t){case"keypress":if(Ul(n)===0)break t;case"keydown":case"keyup":M=Sy;break;case"focusin":ot="focus",M=Er;break;case"focusout":ot="blur",M=Er;break;case"beforeblur":case"afterblur":M=Er;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=ry;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=xy;break;case Af:case jf:case Ef:M=dy;break;case Cf:M=jy;break;case"scroll":case"scrollend":M=ly;break;case"wheel":M=Cy;break;case"copy":case"cut":case"paste":M=hy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=sf;break;case"toggle":case"beforetoggle":M=Dy}var gt=(e&4)!==0,Ft=!gt&&(t==="scroll"||t==="scrollend"),E=gt?k!==null?k+"Capture":null:k;gt=[];for(var j=N,C;j!==null;){var L=j;if(C=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||C===null||E===null||(L=_i(j,E),L!=null&&gt.push(el(j,L,C))),Ft)break;j=j.return}0<gt.length&&(k=new M(k,ot,null,n,z),H.push({event:k,listeners:gt}))}}if((e&7)===0){t:{if(k=t==="mouseover"||t==="pointerover",M=t==="mouseout"||t==="pointerout",k&&n!==br&&(ot=n.relatedTarget||n.fromElement)&&(vs(ot)||ot[kt]))break t;if((M||k)&&(k=z.window===z?z:(k=z.ownerDocument)?k.defaultView||k.parentWindow:window,M?(ot=n.relatedTarget||n.toElement,M=N,ot=ot?vs(ot):null,ot!==null&&(Ft=f(ot),gt=ot.tag,ot!==Ft||gt!==5&&gt!==27&&gt!==6)&&(ot=null)):(M=null,ot=N),M!==ot)){if(gt=nf,L="onMouseLeave",E="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(gt=sf,L="onPointerLeave",E="onPointerEnter",j="pointer"),Ft=M==null?k:Ti(M),C=ot==null?k:Ti(ot),k=new gt(L,j+"leave",M,n,z),k.target=Ft,k.relatedTarget=C,L=null,vs(z)===N&&(gt=new gt(E,j+"enter",ot,n,z),gt.target=C,gt.relatedTarget=Ft,L=gt),Ft=L,M&&ot)e:{for(gt=Nb,E=M,j=ot,C=0,L=E;L;L=gt(L))C++;L=0;for(var ft=j;ft;ft=gt(ft))L++;for(;0<C-L;)E=gt(E),C--;for(;0<L-C;)j=gt(j),L--;for(;C--;){if(E===j||j!==null&&E===j.alternate){gt=E;break e}E=gt(E),j=gt(j)}gt=null}else gt=null;M!==null&&Fm(H,k,M,gt,!1),ot!==null&&Ft!==null&&Fm(H,Ft,ot,gt,!0)}}t:{if(k=N?Ti(N):window,M=k.nodeName&&k.nodeName.toLowerCase(),M==="select"||M==="input"&&k.type==="file")var Ut=hf;else if(df(k))if(mf)Ut=Ly;else{Ut=Uy;var ct=zy}else M=k.nodeName,!M||M.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?N&&yr(N.elementType)&&(Ut=hf):Ut=Vy;if(Ut&&(Ut=Ut(t,N))){ff(H,Ut,n,z);break t}ct&&ct(t,k,N),t==="focusout"&&N&&k.type==="number"&&N.memoizedProps.value!=null&&vr(k,"number",k.value)}switch(ct=N?Ti(N):window,t){case"focusin":(df(ct)||ct.contentEditable==="true")&&(Es=ct,Mr=N,ki=null);break;case"focusout":ki=Mr=Es=null;break;case"mousedown":Or=!0;break;case"contextmenu":case"mouseup":case"dragend":Or=!1,_f(H,n,z);break;case"selectionchange":if(Gy)break;case"keydown":case"keyup":_f(H,n,z)}var At;if(Nr)t:{switch(t){case"compositionstart":var Mt="onCompositionStart";break t;case"compositionend":Mt="onCompositionEnd";break t;case"compositionupdate":Mt="onCompositionUpdate";break t}Mt=void 0}else js?cf(t,n)&&(Mt="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(Mt="onCompositionStart");Mt&&(lf&&n.locale!=="ko"&&(js||Mt!=="onCompositionStart"?Mt==="onCompositionEnd"&&js&&(At=tf()):(ca=z,xr="value"in ca?ca.value:ca.textContent,js=!0)),ct=ko(N,Mt),0<ct.length&&(Mt=new af(Mt,t,null,n,z),H.push({event:Mt,listeners:ct}),At?Mt.data=At:(At=uf(n),At!==null&&(Mt.data=At)))),(At=wy?My(t,n):Oy(t,n))&&(Mt=ko(N,"onBeforeInput"),0<Mt.length&&(ct=new af("onBeforeInput","beforeinput",null,n,z),H.push({event:ct,listeners:Mt}),ct.data=At)),Ab(H,t,N,n,z)}Qm(H,e)})}function el(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ko(t,e){for(var n=e+"Capture",s=[];t!==null;){var o=t,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=_i(t,n),o!=null&&s.unshift(el(t,o,c)),o=_i(t,e),o!=null&&s.push(el(t,o,c))),t.tag===3)return s;t=t.return}return[]}function Nb(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Fm(t,e,n,s,o){for(var c=e._reactName,h=[];n!==null&&n!==s;){var y=n,_=y.alternate,N=y.stateNode;if(y=y.tag,_!==null&&_===s)break;y!==5&&y!==26&&y!==27||N===null||(_=N,o?(N=_i(n,c),N!=null&&h.unshift(el(n,N,_))):o||(N=_i(n,c),N!=null&&h.push(el(n,N,_)))),n=n.return}h.length!==0&&t.push({event:e,listeners:h})}var Db=/\r\n?/g,kb=/\u0000|\uFFFD/g;function Jm(t){return(typeof t=="string"?t:""+t).replace(Db,`
25
- `).replace(kb,"")}function $m(t,e){return e=Jm(e),Jm(t)===e}function Pt(t,e,n,s,o,c){switch(n){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||_s(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&_s(t,""+s);break;case"className":Ol(t,"class",s);break;case"tabIndex":Ol(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ol(t,n,s);break;case"style":Jd(t,s,c);break;case"data":if(e!=="object"){Ol(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=Bl(""+s),t.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(e!=="input"&&Pt(t,e,"name",o.name,o,null),Pt(t,e,"formEncType",o.formEncType,o,null),Pt(t,e,"formMethod",o.formMethod,o,null),Pt(t,e,"formTarget",o.formTarget,o,null)):(Pt(t,e,"encType",o.encType,o,null),Pt(t,e,"method",o.method,o,null),Pt(t,e,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=Bl(""+s),t.setAttribute(n,s);break;case"onClick":s!=null&&(t.onclick=Gn);break;case"onScroll":s!=null&&Dt("scroll",t);break;case"onScrollEnd":s!=null&&Dt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}n=Bl(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""+s):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":s===!0?t.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,s):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(n,s):t.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(n):t.setAttribute(n,s);break;case"popover":Dt("beforetoggle",t),Dt("toggle",t),Ml(t,"popover",s);break;case"xlinkActuate":Hn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Hn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Hn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Hn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Hn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Hn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Hn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Hn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Hn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ml(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=sy.get(n)||n,Ml(t,n,s))}}function su(t,e,n,s,o,c){switch(n){case"style":Jd(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"children":typeof s=="string"?_s(t,s):(typeof s=="number"||typeof s=="bigint")&&_s(t,""+s);break;case"onScroll":s!=null&&Dt("scroll",t);break;case"onScrollEnd":s!=null&&Dt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Gn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qd.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),e=n.slice(2,o?n.length-7:void 0),c=t[Tt]||null,c=c!=null?c[n]:null,typeof c=="function"&&t.removeEventListener(e,c,o),typeof s=="function")){typeof c!="function"&&c!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,o);break t}n in t?t[n]=s:s===!0?t.setAttribute(n,""):Ml(t,n,s)}}}function Re(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Dt("error",t),Dt("load",t);var s=!1,o=!1,c;for(c in n)if(n.hasOwnProperty(c)){var h=n[c];if(h!=null)switch(c){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Pt(t,e,c,h,n,null)}}o&&Pt(t,e,"srcSet",n.srcSet,n,null),s&&Pt(t,e,"src",n.src,n,null);return;case"input":Dt("invalid",t);var y=c=h=o=null,_=null,N=null;for(s in n)if(n.hasOwnProperty(s)){var z=n[s];if(z!=null)switch(s){case"name":o=z;break;case"type":h=z;break;case"checked":_=z;break;case"defaultChecked":N=z;break;case"value":c=z;break;case"defaultValue":y=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,e));break;default:Pt(t,e,s,z,n,null)}}Kd(t,c,y,_,N,h,o,!1);return;case"select":Dt("invalid",t),s=h=c=null;for(o in n)if(n.hasOwnProperty(o)&&(y=n[o],y!=null))switch(o){case"value":c=y;break;case"defaultValue":h=y;break;case"multiple":s=y;default:Pt(t,e,o,y,n,null)}e=c,n=h,t.multiple=!!s,e!=null?Ts(t,!!s,e,!1):n!=null&&Ts(t,!!s,n,!0);return;case"textarea":Dt("invalid",t),c=o=s=null;for(h in n)if(n.hasOwnProperty(h)&&(y=n[h],y!=null))switch(h){case"value":s=y;break;case"defaultValue":o=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:Pt(t,e,h,y,n,null)}Pd(t,s,o,c);return;case"option":for(_ in n)if(n.hasOwnProperty(_)&&(s=n[_],s!=null))switch(_){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Pt(t,e,_,s,n,null)}return;case"dialog":Dt("beforetoggle",t),Dt("toggle",t),Dt("cancel",t),Dt("close",t);break;case"iframe":case"object":Dt("load",t);break;case"video":case"audio":for(s=0;s<tl.length;s++)Dt(tl[s],t);break;case"image":Dt("error",t),Dt("load",t);break;case"details":Dt("toggle",t);break;case"embed":case"source":case"link":Dt("error",t),Dt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in n)if(n.hasOwnProperty(N)&&(s=n[N],s!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Pt(t,e,N,s,n,null)}return;default:if(yr(e)){for(z in n)n.hasOwnProperty(z)&&(s=n[z],s!==void 0&&su(t,e,z,s,n,void 0));return}}for(y in n)n.hasOwnProperty(y)&&(s=n[y],s!=null&&Pt(t,e,y,s,n,null))}function wb(t,e,n,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,h=null,y=null,_=null,N=null,z=null;for(M in n){var H=n[M];if(n.hasOwnProperty(M)&&H!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":_=H;default:s.hasOwnProperty(M)||Pt(t,e,M,null,s,H)}}for(var k in s){var M=s[k];if(H=n[k],s.hasOwnProperty(k)&&(M!=null||H!=null))switch(k){case"type":c=M;break;case"name":o=M;break;case"checked":N=M;break;case"defaultChecked":z=M;break;case"value":h=M;break;case"defaultValue":y=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,e));break;default:M!==H&&Pt(t,e,k,M,s,H)}}gr(t,h,y,_,N,z,c,o);return;case"select":M=h=y=k=null;for(c in n)if(_=n[c],n.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":M=_;default:s.hasOwnProperty(c)||Pt(t,e,c,null,s,_)}for(o in s)if(c=s[o],_=n[o],s.hasOwnProperty(o)&&(c!=null||_!=null))switch(o){case"value":k=c;break;case"defaultValue":y=c;break;case"multiple":h=c;default:c!==_&&Pt(t,e,o,c,s,_)}e=y,n=h,s=M,k!=null?Ts(t,!!n,k,!1):!!s!=!!n&&(e!=null?Ts(t,!!n,e,!0):Ts(t,!!n,n?[]:"",!1));return;case"textarea":M=k=null;for(y in n)if(o=n[y],n.hasOwnProperty(y)&&o!=null&&!s.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Pt(t,e,y,null,s,o)}for(h in s)if(o=s[h],c=n[h],s.hasOwnProperty(h)&&(o!=null||c!=null))switch(h){case"value":k=o;break;case"defaultValue":M=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Pt(t,e,h,o,s,c)}Qd(t,k,M);return;case"option":for(var ot in n)if(k=n[ot],n.hasOwnProperty(ot)&&k!=null&&!s.hasOwnProperty(ot))switch(ot){case"selected":t.selected=!1;break;default:Pt(t,e,ot,null,s,k)}for(_ in s)if(k=s[_],M=n[_],s.hasOwnProperty(_)&&k!==M&&(k!=null||M!=null))switch(_){case"selected":t.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Pt(t,e,_,k,s,M)}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 gt in n)k=n[gt],n.hasOwnProperty(gt)&&k!=null&&!s.hasOwnProperty(gt)&&Pt(t,e,gt,null,s,k);for(N in s)if(k=s[N],M=n[N],s.hasOwnProperty(N)&&k!==M&&(k!=null||M!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,e));break;default:Pt(t,e,N,k,s,M)}return;default:if(yr(e)){for(var Ft in n)k=n[Ft],n.hasOwnProperty(Ft)&&k!==void 0&&!s.hasOwnProperty(Ft)&&su(t,e,Ft,void 0,s,k);for(z in s)k=s[z],M=n[z],!s.hasOwnProperty(z)||k===M||k===void 0&&M===void 0||su(t,e,z,k,s,M);return}}for(var E in n)k=n[E],n.hasOwnProperty(E)&&k!=null&&!s.hasOwnProperty(E)&&Pt(t,e,E,null,s,k);for(H in s)k=s[H],M=n[H],!s.hasOwnProperty(H)||k===M||k==null&&M==null||Pt(t,e,H,k,s,M)}function Wm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Mb(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var o=n[s],c=o.transferSize,h=o.initiatorType,y=o.duration;if(c&&y&&Wm(h)){for(h=0,y=o.responseEnd,s+=1;s<n.length;s++){var _=n[s],N=_.startTime;if(N>y)break;var z=_.transferSize,H=_.initiatorType;z&&Wm(H)&&(_=_.responseEnd,h+=z*(_<y?1:(y-N)/(_-N)))}if(--s,e+=8*(c+h)/(o.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var iu=null,lu=null;function wo(t){return t.nodeType===9?t:t.ownerDocument}function tp(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ep(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function ou(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var ru=null;function Ob(){var t=window.event;return t&&t.type==="popstate"?t===ru?!1:(ru=t,!0):(ru=null,!1)}var np=typeof setTimeout=="function"?setTimeout:void 0,Rb=typeof clearTimeout=="function"?clearTimeout:void 0,ap=typeof Promise=="function"?Promise:void 0,Bb=typeof queueMicrotask=="function"?queueMicrotask:typeof ap<"u"?function(t){return ap.resolve(null).then(t).catch(zb)}:np;function zb(t){setTimeout(function(){throw t})}function Ea(t){return t==="head"}function sp(t,e){var n=e,s=0;do{var o=n.nextSibling;if(t.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(o),Ws(e);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")nl(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,nl(n);for(var c=n.firstChild;c;){var h=c.nextSibling,y=c.nodeName;c[Si]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=h}}else n==="body"&&nl(t.ownerDocument.body);n=o}while(n);Ws(e)}function ip(t,e){var n=t;t=0;do{var s=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=s}while(n)}function cu(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cu(n),mr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function Ub(t,e,n,s){for(;t.nodeType===1;){var o=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Si])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==o.rel||t.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||t.getAttribute("title")!==(o.title==null?null:o.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(o.src==null?null:o.src)||t.getAttribute("type")!==(o.type==null?null:o.type)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=pn(t.nextSibling),t===null)break}return null}function Vb(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=pn(t.nextSibling),t===null))return null;return t}function lp(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=pn(t.nextSibling),t===null))return null;return t}function uu(t){return t.data==="$?"||t.data==="$~"}function du(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Lb(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var s=function(){e(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function pn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var fu=null;function op(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return pn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function rp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function cp(t,e,n){switch(e=wo(n),t){case"html":if(t=e.documentElement,!t)throw Error(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function nl(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);mr(t)}var gn=new Map,up=new Set;function Mo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var aa=Z.d;Z.d={f:Hb,r:Gb,D:qb,C:Yb,L:Ib,m:Zb,X:Kb,S:Xb,M:Qb};function Hb(){var t=aa.f(),e=xo();return t||e}function Gb(t){var e=ys(t);e!==null&&e.tag===5&&e.type==="form"?Ch(e):aa.r(t)}var Fs=typeof document>"u"?null:document;function dp(t,e,n){var s=Fs;if(s&&typeof e=="string"&&e){var o=rn(e);o='link[rel="'+t+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),up.has(o)||(up.add(o),t={rel:t,crossOrigin:n,href:e},s.querySelector(o)===null&&(e=s.createElement("link"),Re(e,"link",t),Ee(e),s.head.appendChild(e)))}}function qb(t){aa.D(t),dp("dns-prefetch",t,null)}function Yb(t,e){aa.C(t,e),dp("preconnect",t,e)}function Ib(t,e,n){aa.L(t,e,n);var s=Fs;if(s&&t&&e){var o='link[rel="preload"][as="'+rn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+rn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+rn(n.imageSizes)+'"]')):o+='[href="'+rn(t)+'"]';var c=o;switch(e){case"style":c=Js(t);break;case"script":c=$s(t)}gn.has(c)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),gn.set(c,t),s.querySelector(o)!==null||e==="style"&&s.querySelector(al(c))||e==="script"&&s.querySelector(sl(c))||(e=s.createElement("link"),Re(e,"link",t),Ee(e),s.head.appendChild(e)))}}function Zb(t,e){aa.m(t,e);var n=Fs;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+rn(s)+'"][href="'+rn(t)+'"]',c=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=$s(t)}if(!gn.has(c)&&(t=S({rel:"modulepreload",href:t},e),gn.set(c,t),n.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(sl(c)))return}s=n.createElement("link"),Re(s,"link",t),Ee(s),n.head.appendChild(s)}}}function Xb(t,e,n){aa.S(t,e,n);var s=Fs;if(s&&t){var o=bs(s).hoistableStyles,c=Js(t);e=e||"default";var h=o.get(c);if(!h){var y={loading:0,preload:null};if(h=s.querySelector(al(c)))y.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=gn.get(c))&&hu(t,n);var _=h=s.createElement("link");Ee(_),Re(_,"link",t),_._p=new Promise(function(N,z){_.onload=N,_.onerror=z}),_.addEventListener("load",function(){y.loading|=1}),_.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Oo(h,e,s)}h={type:"stylesheet",instance:h,count:1,state:y},o.set(c,h)}}}function Kb(t,e){aa.X(t,e);var n=Fs;if(n&&t){var s=bs(n).hoistableScripts,o=$s(t),c=s.get(o);c||(c=n.querySelector(sl(o)),c||(t=S({src:t,async:!0},e),(e=gn.get(o))&&mu(t,e),c=n.createElement("script"),Ee(c),Re(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function Qb(t,e){aa.M(t,e);var n=Fs;if(n&&t){var s=bs(n).hoistableScripts,o=$s(t),c=s.get(o);c||(c=n.querySelector(sl(o)),c||(t=S({src:t,async:!0,type:"module"},e),(e=gn.get(o))&&mu(t,e),c=n.createElement("script"),Ee(c),Re(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function fp(t,e,n,s){var o=(o=ye.current)?Mo(o):null;if(!o)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Js(n.href),n=bs(o).hoistableStyles,s=n.get(e),s||(s={type:"style",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Js(n.href);var c=bs(o).hoistableStyles,h=c.get(t);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,h),(c=o.querySelector(al(t)))&&!c._p&&(h.instance=c,h.state.loading=5),gn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gn.set(t,n),c||Pb(o,t,n,h.state))),e&&s===null)throw Error(r(528,""));return h}if(e&&s!==null)throw Error(r(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=$s(n),n=bs(o).hoistableScripts,s=n.get(e),s||(s={type:"script",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Js(t){return'href="'+rn(t)+'"'}function al(t){return'link[rel="stylesheet"]['+t+"]"}function hp(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function Pb(t,e,n,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),Re(e,"link",n),Ee(e),t.head.appendChild(e))}function $s(t){return'[src="'+rn(t)+'"]'}function sl(t){return"script[async]"+t}function mp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+rn(n.href)+'"]');if(s)return e.instance=s,Ee(s),s;var o=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Ee(s),Re(s,"style",o),Oo(s,n.precedence,t),e.instance=s;case"stylesheet":o=Js(n.href);var c=t.querySelector(al(o));if(c)return e.state.loading|=4,e.instance=c,Ee(c),c;s=hp(n),(o=gn.get(o))&&hu(s,o),c=(t.ownerDocument||t).createElement("link"),Ee(c);var h=c;return h._p=new Promise(function(y,_){h.onload=y,h.onerror=_}),Re(c,"link",s),e.state.loading|=4,Oo(c,n.precedence,t),e.instance=c;case"script":return c=$s(n.src),(o=t.querySelector(sl(c)))?(e.instance=o,Ee(o),o):(s=n,(o=gn.get(c))&&(s=S({},n),mu(s,o)),t=t.ownerDocument||t,o=t.createElement("script"),Ee(o),Re(o,"link",s),t.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,Oo(s,n.precedence,t));return e.instance}function Oo(t,e,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,c=o,h=0;h<s.length;h++){var y=s[h];if(y.dataset.precedence===e)c=y;else if(c!==o)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function hu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function mu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Ro=null;function pp(t,e,n){if(Ro===null){var s=new Map,o=Ro=new Map;o.set(n,s)}else o=Ro,s=o.get(n),s||(s=new Map,o.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),o=0;o<n.length;o++){var c=n[o];if(!(c[Si]||c[$]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var h=c.getAttribute(e)||"";h=t+h;var y=s.get(h);y?y.push(c):s.set(h,[c])}}return s}function gp(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function Fb(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function vp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Jb(t,e,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Js(s.href),c=e.querySelector(al(o));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Bo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=c,Ee(c);return}c=e.ownerDocument||e,s=hp(s),(o=gn.get(o))&&hu(s,o),c=c.createElement("link"),Ee(c);var h=c;h._p=new Promise(function(y,_){h.onload=y,h.onerror=_}),Re(c,"link",s),n.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=Bo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var pu=0;function $b(t,e){return t.stylesheets&&t.count===0&&Uo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var s=setTimeout(function(){if(t.stylesheets&&Uo(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&pu===0&&(pu=62500*Mb());var o=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Uo(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>pu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function Bo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var zo=null;function Uo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,zo=new Map,e.forEach(Wb,t),zo=null,Bo.call(t))}function Wb(t,e){if(!(e.state.loading&4)){var n=zo.get(t);if(n)var s=n.get(null);else{n=new Map,zo.set(t,n);for(var o=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var h=o[c];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),s=h)}s&&n.set(null,s)}o=e.instance,h=o.getAttribute("data-precedence"),c=n.get(h)||s,c===s&&n.set(null,o),n.set(h,o),this.count++,s=Bo.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),c?c.parentNode.insertBefore(o,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(o,t.firstChild)),e.state.loading|=4}}var il={$$typeof:R,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function tS(t,e,n,s,o,c,h,y,_){this.tag=1,this.containerInfo=t,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=s,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function yp(t,e,n,s,o,c,h,y,_,N,z,H){return t=new tS(t,e,n,h,_,N,z,H,y),e=1,c===!0&&(e|=24),c=Fe(3,null,null,e),t.current=c,c.stateNode=t,e=Qr(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:e},$r(c),t}function bp(t){return t?(t=Ds,t):Ds}function Sp(t,e,n,s,o,c){o=bp(o),s.context===null?s.context=o:s.pendingContext=o,s=pa(e),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=ga(t,s,e),n!==null&&(Qe(n,t,e),Ui(n,t,e))}function Tp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function gu(t,e){Tp(t,e),(t=t.alternate)&&Tp(t,e)}function _p(t){if(t.tag===13||t.tag===31){var e=Xa(t,67108864);e!==null&&Qe(e,t,67108864),gu(t,67108864)}}function xp(t){if(t.tag===13||t.tag===31){var e=en();e=hs(e);var n=Xa(t,e);n!==null&&Qe(n,t,e),gu(t,e)}}var Vo=!0;function eS(t,e,n,s){var o=A.T;A.T=null;var c=Z.p;try{Z.p=2,vu(t,e,n,s)}finally{Z.p=c,A.T=o}}function nS(t,e,n,s){var o=A.T;A.T=null;var c=Z.p;try{Z.p=8,vu(t,e,n,s)}finally{Z.p=c,A.T=o}}function vu(t,e,n,s){if(Vo){var o=yu(s);if(o===null)au(t,e,s,Lo,n),jp(t,s);else if(sS(o,t,e,n,s))s.stopPropagation();else if(jp(t,s),e&4&&-1<aS.indexOf(t)){for(;o!==null;){var c=ys(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var h=Dn(c.pendingLanes);if(h!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;h;){var _=1<<31-Bt(h);y.entanglements[1]|=_,h&=~_}On(c),(Gt&6)===0&&(To=Ht()+500,Wi(0))}}break;case 31:case 13:y=Xa(c,2),y!==null&&Qe(y,c,2),xo(),gu(c,2)}if(c=yu(s),c===null&&au(t,e,s,Lo,n),c===o)break;o=c}o!==null&&s.stopPropagation()}else au(t,e,s,null,n)}}function yu(t){return t=Sr(t),bu(t)}var Lo=null;function bu(t){if(Lo=null,t=vs(t),t!==null){var e=f(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=d(e),t!==null)return t;t=null}else if(n===31){if(t=p(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Lo=t,null}function Ap(t){switch(t){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(dt()){case st:return 2;case Yt:return 8;case et:case Zt:return 32;case xe:return 268435456;default:return 32}default:return 32}}var Su=!1,Ca=null,Na=null,Da=null,ll=new Map,ol=new Map,ka=[],aS="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 jp(t,e){switch(t){case"focusin":case"focusout":Ca=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":Da=null;break;case"pointerover":case"pointerout":ll.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ol.delete(e.pointerId)}}function rl(t,e,n,s,o,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[o]},e!==null&&(e=ys(e),e!==null&&_p(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function sS(t,e,n,s,o){switch(e){case"focusin":return Ca=rl(Ca,t,e,n,s,o),!0;case"dragenter":return Na=rl(Na,t,e,n,s,o),!0;case"mouseover":return Da=rl(Da,t,e,n,s,o),!0;case"pointerover":var c=o.pointerId;return ll.set(c,rl(ll.get(c)||null,t,e,n,s,o)),!0;case"gotpointercapture":return c=o.pointerId,ol.set(c,rl(ol.get(c)||null,t,e,n,s,o)),!0}return!1}function Ep(t){var e=vs(t.target);if(e!==null){var n=f(e);if(n!==null){if(e=n.tag,e===13){if(e=d(n),e!==null){t.blockedOn=e,bi(t.priority,function(){xp(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,bi(t.priority,function(){xp(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ho(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=yu(t.nativeEvent);if(n===null){n=t.nativeEvent;var s=new n.constructor(n.type,n);br=s,n.target.dispatchEvent(s),br=null}else return e=ys(n),e!==null&&_p(e),t.blockedOn=n,!1;e.shift()}return!0}function Cp(t,e,n){Ho(t)&&n.delete(e)}function iS(){Su=!1,Ca!==null&&Ho(Ca)&&(Ca=null),Na!==null&&Ho(Na)&&(Na=null),Da!==null&&Ho(Da)&&(Da=null),ll.forEach(Cp),ol.forEach(Cp)}function Go(t,e){t.blockedOn===e&&(t.blockedOn=null,Su||(Su=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,iS)))}var qo=null;function Np(t){qo!==t&&(qo=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){qo===t&&(qo=null);for(var e=0;e<t.length;e+=3){var n=t[e],s=t[e+1],o=t[e+2];if(typeof s!="function"){if(bu(s||n)===null)continue;break}var c=ys(n);c!==null&&(t.splice(e,3),e-=3,yc(c,{pending:!0,data:o,method:n.method,action:s},s,o))}}))}function Ws(t){function e(_){return Go(_,t)}Ca!==null&&Go(Ca,t),Na!==null&&Go(Na,t),Da!==null&&Go(Da,t),ll.forEach(e),ol.forEach(e);for(var n=0;n<ka.length;n++){var s=ka[n];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ka.length&&(n=ka[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&ka.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var o=n[s],c=n[s+1],h=o[Tt]||null;if(typeof c=="function")h||Np(n);else if(h){var y=null;if(c&&c.hasAttribute("formAction")){if(o=c,h=c[Tt]||null)y=h.formAction;else if(bu(o)!==null)continue}else y=h.action;typeof y=="function"?n[s+1]=y:(n.splice(s,3),s-=3),Np(n)}}}function Dp(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function e(){o!==null&&(o(),o=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),o!==null&&(o(),o=null)}}}function Tu(t){this._internalRoot=t}Yo.prototype.render=Tu.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var n=e.current,s=en();Sp(n,s,t,e,null,null)},Yo.prototype.unmount=Tu.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Sp(t.current,2,null,t,null,null),xo(),e[kt]=null}};function Yo(t){this._internalRoot=t}Yo.prototype.unstable_scheduleHydration=function(t){if(t){var e=yi();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ka.length&&e!==0&&e<ka[n].priority;n++);ka.splice(n,0,t),n===0&&Ep(t)}};var kp=i.version;if(kp!=="19.2.4")throw Error(r(527,kp,"19.2.4"));Z.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=v(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var lS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Io=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Io.isDisabled&&Io.supportsFiber)try{Ln=Io.inject(lS),J=Io}catch{}}return cl.createRoot=function(t,e){if(!u(t))throw Error(r(299));var n=!1,s="",o=Uh,c=Vh,h=Lh;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(o=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(h=e.onRecoverableError)),e=yp(t,1,!1,null,null,n,s,null,o,c,h,Dp),t[kt]=e.current,nu(t),new Tu(e)},cl.hydrateRoot=function(t,e,n){if(!u(t))throw Error(r(299));var s=!1,o="",c=Uh,h=Vh,y=Lh,_=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError),n.formState!==void 0&&(_=n.formState)),e=yp(t,1,!0,e,n??null,s,o,_,c,h,y,Dp),e.context=bp(null),n=e.current,s=en(),s=hs(s),o=pa(s),o.callback=null,ga(n,o,s),n=s,e.current.lanes=n,ra(e,n),On(e),t[kt]=e.current,nu(t),new Yo(e)},cl.version="19.2.4",cl}var Up;function _S(){if(Up)return _u.exports;Up=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),_u.exports=TS(),_u.exports}var xS=_S();function Ge(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function pl(a,i){return console.warn(`[ws] Malformed "${a}" message: ${i}`),!1}function AS(a){return Ge(a)&&typeof a.id=="string"&&typeof a.displayName=="string"&&typeof a.adapterType=="string"&&typeof a.defaultRuntime=="string"&&typeof a.status=="string"&&typeof a.bootstrapped=="boolean"}function Vp(a){return Ge(a)&&typeof a.id=="string"&&typeof a.environmentId=="string"&&typeof a.runtime=="string"&&typeof a.status=="string"&&typeof a.prompt=="string"&&typeof a.startedAt=="string"&&(a.endedAt===void 0||typeof a.endedAt=="string")&&(a.error===void 0||typeof a.error=="string")}function Lp(a){return Ge(a)&&typeof a.sessionId=="string"&&typeof a.eventType=="string"&&typeof a.timestamp=="string"&&typeof a.content=="string"}function jS(a){return Ge(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.repoUrl=="string"&&typeof a.defaultEnvironmentId=="string"&&typeof a.status=="string"&&typeof a.createdAt=="string"}function ES(a){return Ge(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.title=="string"&&typeof a.status=="string"&&typeof a.branch=="string"&&typeof a.sortOrder=="number"&&typeof a.depth=="number"&&Array.isArray(a.dependsOn)&&Array.isArray(a.childTaskIds)}function CS(a){return Ge(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.taskId=="string"&&typeof a.sessionId=="string"&&typeof a.category=="string"&&typeof a.title=="string"&&typeof a.content=="string"&&Array.isArray(a.tags)&&typeof a.createdAt=="string"}function NS(a){return Ge(a)&&typeof a.name=="string"&&typeof a.tokenType=="string"&&typeof a.envVar=="string"&&typeof a.filePath=="string"&&typeof a.expiresAt=="string"}function DS(a){return Ge(a)&&typeof a.environmentId=="string"&&typeof a.stage=="string"&&typeof a.message=="string"&&typeof a.progress=="number"}function kS(a){return Ge(a)&&typeof a.name=="string"&&typeof a.repository=="string"&&typeof a.state=="string"&&typeof a.gitStatus=="string"}function wS(a){return Ge(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.systemPrompt=="string"&&typeof a.toolConfig=="string"&&typeof a.runtime=="string"&&typeof a.model=="string"&&typeof a.maxTurns=="number"&&typeof a.mcpServers=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function Rn(a,i,l,r){return Array.isArray(a)?a.filter((u,f)=>i(u)?!0:(pl(l,`item at index ${f} in "${r}" has unexpected shape`),!1)):(pl(l,`expected "${r}" to be an array, got ${typeof a}`),[])}function MS(a){let i;try{i=JSON.parse(a)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Ge(i)||typeof i.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",i);return}return{type:i.type,payload:Ge(i.payload)?i.payload:void 0}}const OS=3e3,ti=5e3;function RS(a){const i=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(i)}`:"ws://localhost:3000",r=T.useRef(void 0),[u,f]=T.useState(!1),[d,p]=T.useState([]),[g,v]=T.useState([]),[b,S]=T.useState([]),[x,D]=T.useState(0),[w,O]=T.useState(void 0),[q,B]=T.useState([]),[X,R]=T.useState([]),[K,G]=T.useState([]),[Q,W]=T.useState([]),[V,F]=T.useState({}),[rt,mt]=T.useState([]),[Et,P]=T.useState(""),[Lt,zt]=T.useState(!1),[A,Z]=T.useState([]),[at,tt]=T.useState({}),[jt,Jt]=T.useState(!1),[Rt,St]=T.useState(void 0),Y=T.useCallback(J=>{var Ct;((Ct=r.current)==null?void 0:Ct.readyState)===WebSocket.OPEN&&r.current.send(JSON.stringify(J))},[]);T.useEffect(()=>{let J,Ct;function Bt(){J=new WebSocket(l),r.current=J,J.onopen=()=>{f(!0),Y({type:"list_environments"}),Y({type:"list_sessions"}),Y({type:"list_projects"}),Y({type:"list_tokens"}),Y({type:"list_personas"}),Y({type:"subscribe_all"})},J.onmessage=ie=>{var Nn,Sn,La,Ha,Dn,Ga,oa,Dl,mi,fs,ra,kl,pi,gi,vi,hs,ms,yi,bi,Tn;if(typeof ie.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const vt=MS(ie.data);if(vt)switch(vt.type){case"environments":p(Rn((Nn=vt.payload)==null?void 0:Nn.environments,AS,"environments","environments"));break;case"sessions":v(Rn((Sn=vt.payload)==null?void 0:Sn.sessions,Vp,"sessions","sessions"));break;case"session_event":{if(!Lp(vt.payload)){pl("session_event","payload is not a valid SessionEvent");break}const $=vt.payload;let Tt=0;S(kt=>{const $t=[...kt,$];return $t.length>ti?(Tt=$t.length-ti,$t.slice(-ti)):$t}),Tt>0&&D(kt=>kt+Tt),$.eventType==="status"&&v(kt=>kt.map($t=>$t.id===$.sessionId?{...$t,status:$.content}:$t));break}case"session_events":{const $=Rn((La=vt.payload)==null?void 0:La.events,Lp,"session_events","events"),Tt=(Ha=vt.payload)==null?void 0:Ha.sessionId;if(typeof Tt!="string"){pl("session_events","missing or non-string sessionId");break}if($.length>0){let kt=0;S($t=>{const gs=[...$t.filter(wl=>wl.sessionId!==Tt),...$];return gs.length>ti?(kt=gs.length-ti,gs.slice(-ti)):gs}),kt>0&&D($t=>$t+kt)}break}case"spawned":{const $=(Dn=vt.payload)==null?void 0:Dn.sessionId;typeof $=="string"&&$&&O($),Y({type:"list_sessions"});break}case"projects":B(Rn((Ga=vt.payload)==null?void 0:Ga.projects,jS,"projects","projects"));break;case"project_created":Jt(!1),Y({type:"list_projects"});break;case"project_archived":Y({type:"list_projects"});break;case"tasks":{const $=Rn((oa=vt.payload)==null?void 0:oa.tasks,ES,"tasks","tasks"),Tt=(typeof((Dl=vt.payload)==null?void 0:Dl.projectId)=="string"?vt.payload.projectId:"")||($.length>0?$[0].projectId:"");if(!Tt){R($);break}R(kt=>[...kt.filter($t=>$t.projectId!==Tt),...$]);break}case"task_created":{const $=(mi=vt.payload)==null?void 0:mi.task;if(Ge($)){const Tt=typeof $.project_id=="string"?$.project_id:typeof $.projectId=="string"?$.projectId:"";Tt&&Y({type:"list_tasks",payload:{projectId:Tt}})}break}case"task_started":{const $=vt.payload;if(!Ge($))break;St(kt=>$.taskId&&kt===$.taskId?void 0:kt),$.sessionId&&Y({type:"list_sessions"});const Tt=typeof $.projectId=="string"?$.projectId:void 0;Tt?Y({type:"list_tasks",payload:{projectId:Tt}}):$.taskId&&R(kt=>{const $t=kt.find(ps=>ps.id===$.taskId);return $t&&Y({type:"list_tasks",payload:{projectId:$t.projectId}}),kt});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const $=vt.payload;if(!Ge($))break;const Tt=typeof $.projectId=="string"?$.projectId:void 0;Tt?Y({type:"list_tasks",payload:{projectId:Tt}}):$.taskId&&R(kt=>{const $t=kt.find(ps=>ps.id===$.taskId);return $t&&Y({type:"list_tasks",payload:{projectId:$t.projectId}}),kt});break}case"findings":G(Rn((fs=vt.payload)==null?void 0:fs.findings,CS,"findings","findings"));break;case"finding_posted":typeof((ra=vt.payload)==null?void 0:ra.projectId)=="string"&&Y({type:"list_findings",payload:{projectId:vt.payload.projectId}});break;case"tokens":W(Rn((kl=vt.payload)==null?void 0:kl.tokens,NS,"tokens","tokens"));break;case"token_changed":Y({type:"list_tokens"});break;case"provision_progress":{if(!DS(vt.payload)){pl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const $=vt.payload;F(Tt=>({...Tt,[$.environmentId]:{stage:$.stage,message:$.message,progress:$.progress}})),$.stage==="ready"&&setTimeout(()=>{F(kt=>{const $t={...kt};return delete $t[$.environmentId],$t})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((pi=vt.payload)==null?void 0:pi.environmentId)=="string"){const $=vt.payload.environmentId;p(Tt=>Tt.filter(kt=>kt.id!==$)),F(Tt=>{const kt={...Tt};return delete kt[$],kt})}Y({type:"list_sessions"});break;case"codespaces_list":{const $=Rn((gi=vt.payload)==null?void 0:gi.codespaces,kS,"codespaces_list","codespaces"),Tt=typeof((vi=vt.payload)==null?void 0:vi.error)=="string"?vt.payload.error:"";mt($),P(Tt);break}case"codespace_created":{zt(!1),Y({type:"list_codespaces"});break}case"codespace_create_error":{zt(!1);const $=typeof((hs=vt.payload)==null?void 0:hs.message)=="string"?vt.payload.message:"Failed to create codespace";P($);break}case"personas":{const $=Rn((ms=vt.payload)==null?void 0:ms.personas,wS,"personas","personas");Z($);break}case"persona_created":case"persona_updated":case"persona_deleted":Y({type:"list_personas"});break;case"task_sessions":{const $=(yi=vt.payload)==null?void 0:yi.taskId;if(typeof $!="string"||!$)break;const Tt=Rn((bi=vt.payload)==null?void 0:bi.sessions,Vp,"task_sessions","sessions");tt(kt=>({...kt,[$]:Tt}));break}case"error":console.error("[ws]",(Tn=vt.payload)==null?void 0:Tn.message);break}},J.onclose=()=>{f(!1),r.current=void 0,Jt(!1),St(void 0),clearTimeout(Ct),Ct=setTimeout(Bt,OS)},J.onerror=()=>{J.close()}}return Bt(),()=>{clearTimeout(Ct),J==null||J.close()}},[l,Y]);const te=T.useCallback((J,Ct,Bt,ie,vt)=>{Y({type:"spawn",payload:{environmentId:J,prompt:Ct,model:Bt||"",runtime:ie||"",personaId:vt||""}})},[Y]),ye=T.useCallback((J,Ct)=>{Y({type:"send_input",payload:{sessionId:J,text:Ct}})},[Y]),re=T.useCallback(J=>{Y({type:"kill",payload:{sessionId:J}})},[Y]),qe=T.useCallback(()=>{Y({type:"list_environments"}),Y({type:"list_sessions"}),Y({type:"list_projects"}),Y({type:"list_tokens"})},[Y]),bt=T.useCallback(J=>{Y({type:"get_session_events",payload:{sessionId:J}})},[Y]),ce=T.useCallback(()=>{S([]),D(0)},[]),De=T.useCallback((J,Ct,Bt,ie)=>{Jt(!0),Y({type:"create_project",payload:{name:J,description:Ct||"",repoUrl:Bt||"",defaultEnvironmentId:ie||""}})},[Y]),Ve=T.useCallback(J=>{Y({type:"archive_project",payload:{projectId:J}})},[Y]),bn=T.useCallback(J=>{Y({type:"list_tasks",payload:{projectId:J}})},[Y]),ke=T.useCallback((J,Ct,Bt,ie,vt,Nn,Sn)=>{Y({type:"create_task",payload:{projectId:J,title:Ct,description:Bt||"",environmentId:ie||"",dependsOn:vt||[],parentTaskId:Nn||"",personaId:Sn||""}})},[Y]),ln=T.useCallback((J,Ct,Bt,ie)=>{St(J),Y({type:"start_task",payload:{taskId:J,runtime:Ct||"",model:Bt||"",personaId:ie||""}})},[Y]),Cn=T.useCallback(J=>{Y({type:"approve_task",payload:{taskId:J}})},[Y]),I=T.useCallback((J,Ct)=>{Y({type:"reject_task",payload:{taskId:J,reviewNotes:Ct}})},[Y]),it=T.useCallback(J=>{Y({type:"delete_task",payload:{taskId:J}})},[Y]),lt=T.useCallback(J=>{Y({type:"list_findings",payload:{projectId:J}})},[Y]),ut=T.useCallback((J,Ct,Bt,ie,vt)=>{Y({type:"post_finding",payload:{projectId:J,title:Ct,content:Bt,category:ie||"general",tags:vt||[]}})},[Y]),pt=T.useCallback(()=>{Y({type:"list_tokens"})},[Y]),ht=T.useCallback((J,Ct,Bt,ie,vt)=>{Y({type:"set_token",payload:{name:J,value:Ct,tokenType:Bt,envVar:ie,filePath:vt}})},[Y]),xt=T.useCallback(J=>{Y({type:"delete_token",payload:{name:J}})},[Y]),Ht=T.useCallback((J,Ct,Bt,ie)=>{const vt={displayName:J,adapterType:Ct,adapterConfig:Bt||{}};ie&&(vt.defaultRuntime=ie),Y({type:"add_environment",payload:vt})},[Y]),dt=T.useCallback(J=>{Y({type:"provision_environment",payload:{environmentId:J}})},[Y]),st=T.useCallback(J=>{Y({type:"stop_environment",payload:{environmentId:J}})},[Y]),Yt=T.useCallback(J=>{Y({type:"remove_environment",payload:{environmentId:J}})},[Y]),et=T.useCallback(()=>{Y({type:"list_codespaces"})},[Y]),Zt=T.useCallback(J=>{if(!u){P("Not connected to server. Please try again once the connection is restored.");return}zt(!0),P(""),Y({type:"create_codespace",payload:{repo:J}})},[Y,u]),xe=T.useCallback((J,Ct,Bt,ie,vt,Nn)=>{Y({type:"create_persona",payload:{name:J,description:Ct,systemPrompt:Bt,runtime:ie||"",model:vt||"",maxTurns:Nn||0}})},[Y]),fi=T.useCallback((J,Ct,Bt,ie,vt,Nn,Sn)=>{Y({type:"update_persona",payload:{personaId:J,name:Ct||"",description:Bt||"",systemPrompt:ie||"",runtime:vt||"",model:Nn||"",maxTurns:Sn||0}})},[Y]),hi=T.useCallback(J=>{Y({type:"delete_persona",payload:{personaId:J}})},[Y]),Ln=T.useCallback(J=>{Y({type:"get_task_sessions",payload:{taskId:J}})},[Y]);return{connected:u,environments:d,sessions:g,events:b,eventsDropped:x,lastSpawnedId:w,projects:q,tasks:X,findings:K,tokens:Q,spawn:te,sendInput:ye,kill:re,refresh:qe,loadSessionEvents:bt,clearEvents:ce,createProject:De,archiveProject:Ve,loadTasks:bn,createTask:ke,startTask:ln,approveTask:Cn,rejectTask:I,deleteTask:it,loadFindings:lt,postFinding:ut,addEnvironment:Ht,loadTokens:pt,setToken:ht,deleteToken:xt,provisionStatus:V,provisionEnvironment:dt,stopEnvironment:st,removeEnvironment:Yt,codespaces:rt,codespaceError:Et,codespaceCreating:Lt,listCodespaces:et,createCodespace:Zt,projectCreating:jt,taskStartingId:Rt,personas:A,createPersona:xe,updatePersona:fi,deletePersona:hi,taskSessions:at,loadTaskSessions:Ln}}const sd=T.createContext(void 0);function BS({children:a}){const i=RS();return m.jsx(sd.Provider,{value:i,children:a})}function En(){const a=T.useContext(sd);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const zS=[{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}],US=[{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"}],VS=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
26
- - src/middleware/auth.ts
27
- - src/routes/login.ts
28
- - src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
29
- \`\`\`typescript
30
- import jwt from "jsonwebtoken";
31
- import type { Request, Response, NextFunction } from "express";
32
-
33
- const JWT_SECRET = process.env.JWT_SECRET || "change-me";
34
-
35
- export function verifyToken(req: Request, res: Response, next: NextFunction): void {
36
- const header = req.headers.authorization;
37
- if (!header?.startsWith("Bearer ")) {
38
- res.status(401).json({ error: "Missing token" });
39
- return;
40
- }
41
- try {
42
- const decoded = jwt.verify(header.slice(7), JWT_SECRET);
43
- req.user = decoded;
44
- next();
45
- } catch {
46
- res.status(403).json({ error: "Invalid token" });
47
- }
48
- }
49
- \`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],LS=[{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",createdAt:"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",createdAt:"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",createdAt:"2025-11-20T09:00:00Z"}],HS=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"in_progress",branch:"feat/jwt-auth",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,personaId:"persona-arch"},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"done",branch:"feat/jwt-auth/design-token-schema",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"in_progress",branch:"feat/jwt-auth/implement-auth-middleware",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{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:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-tester"},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"review",branch:"feat/openapi-docs",environmentId:"env-local-01",sessionId:"sess-002",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"done",branch:"feat/db-pool",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"LGTM — pool size and idle timeout values are sensible.",sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{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:"assigned",branch:"fix/user-list-n1",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"The fix breaks pagination — cursor should reference the joined table, not the subquery.",sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{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:"in_progress",branch:"feat/parquet-export",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,personaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"done",branch:"feat/parquet-export/define-parquet-schema-mapping",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"done",branch:"feat/parquet-export/implement-row-group-writer",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006a"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"in_progress",branch:"feat/parquet-export/add-compression-options",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{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:"pending",branch:"",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006c"],reviewNotes:"",sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"in_progress",branch:"feat/incremental",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,personaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"done",branch:"feat/incremental/design-watermark-storage",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{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",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-007a"],reviewNotes:"Query fails on tables without a monotonic primary key",sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"review",branch:"feat/monitoring",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""}],Hp=[{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"}],GS=[{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:""}],qS=[{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"}],YS={"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 je(a){return new Date(Date.now()+a).toISOString()}const Gp=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:je(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:je(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:je(1600),content:`Found 5 endpoints that need refactoring:
50
- - GET /api/users
51
- - POST /api/users
52
- - GET /api/users/:id
53
- - PUT /api/users/:id
54
- - DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:je(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:je(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:je(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:je(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:je(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:je(1400),content:`Found tables to modify:
55
- - users (add column: last_login_at)
56
- - sessions (add index on expires_at)
57
- - audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:je(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
58
- The table has 50,000+ rows — this may lock the table briefly.
59
-
60
- Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:je(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:je(1e3),content:`Migration 001_add_last_login.sql applied successfully.
61
- Migration 002_sessions_index.sql applied successfully.
62
- Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:je(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:je(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:je(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:je(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:je(1800),content:`Writing test cases:
63
- - should calculate monthly total
64
- - should apply discount codes
65
- - should handle currency conversion
66
- - should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:je(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
67
- The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:je(3500),content:"failed"}}]}],qp=400;function IS({children:a}){const[i,l]=T.useState(US),[r,u]=T.useState(VS),[f,d]=T.useState(void 0),[p,g]=T.useState(LS),[v,b]=T.useState(HS),[S,x]=T.useState(Hp),[D,w]=T.useState(GS),[O,q]=T.useState(qS),[B]=T.useState(YS),X=T.useRef(0),R=T.useRef(0),K=T.useRef(new Set),G=T.useRef(new Map),Q=T.useRef(v);Q.current=v;const W=T.useRef(new Map),V=T.useRef(new Map),F=T.useCallback(I=>(X.current+=1,`mock-${I}-${String(X.current).padStart(3,"0")}`),[]),rt=T.useCallback(()=>{const I=Gp[R.current%Gp.length];return R.current+=1,I},[]),mt=T.useCallback((I,it,lt)=>{const ut=setTimeout(()=>{var pt;K.current.delete(ut),lt&&((pt=G.current.get(lt))==null||pt.delete(ut)),I()},it);K.current.add(ut),lt&&(G.current.has(lt)||G.current.set(lt,new Set),G.current.get(lt).add(ut))},[]),Et=T.useCallback(I=>{const it=G.current.get(I);it&&(it.forEach(lt=>{clearTimeout(lt),K.current.delete(lt)}),G.current.delete(I))},[]),P=T.useCallback((I,it)=>{l(lt=>lt.map(ut=>ut.id===I?{...ut,status:it}:ut))},[]),Lt=T.useCallback(I=>{u(it=>[...it,I])},[]),zt=T.useCallback((I,it,lt)=>{it.forEach((ut,pt)=>{mt(()=>{const ht={sessionId:I,...ut.event,timestamp:new Date().toISOString()};Lt(ht),ut.event.eventType==="status"&&P(I,ut.event.content),pt===it.length-1&&lt&&lt()},ut.delayMs,I)})},[mt,Lt,P]),A=T.useCallback((I,it,lt,ut)=>{console.log("[MockGrackle] spawn",{environmentId:I,prompt:it,runtime:ut});const pt=F("sess"),ht={id:pt,environmentId:I,runtime:ut||"claude-code",status:"running",prompt:it,startedAt:new Date().toISOString()};l(Ht=>[...Ht,ht]),d(pt);const xt=rt();if(console.log(`[MockGrackle] Playing scenario: ${xt.label}`),xt.pauseForInput){const Ht=xt.pauseAfterStep??xt.steps.length-1,dt=xt.steps.slice(0,Ht+1),st=dt.length>0?dt[dt.length-1].delayMs:0;zt(pt,dt),mt(()=>{P(pt,"waiting_input"),Lt({sessionId:pt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},st+qp,pt),xt.resumeSteps&&W.current.set(pt,xt.resumeSteps)}else zt(pt,xt.steps)},[F,rt,zt,mt,P,Lt]),Z=T.useCallback(I=>{console.log("[MockGrackle] kill",I),Et(I),W.current.delete(I),P(I,"killed"),Lt({sessionId:I,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),b(it=>it.map(lt=>lt.sessionId===I&&lt.status==="in_progress"?{...lt,status:"failed"}:lt))},[Et,P,Lt]),at=T.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),tt=T.useCallback(I=>{console.log("[MockGrackle] loadSessionEvents",I)},[]),jt=T.useCallback(()=>{console.log("[MockGrackle] clearEvents"),u([])},[]),Jt=T.useCallback((I,it,lt,ut)=>{console.log("[MockGrackle] createProject",{name:I,description:it});const pt={id:F("proj"),name:I,description:it||"",repoUrl:lt||"",defaultEnvironmentId:ut||"",status:"active",createdAt:new Date().toISOString()};g(ht=>[...ht,pt])},[F]),Rt=T.useCallback(I=>{console.log("[MockGrackle] archiveProject",I),g(it=>it.map(lt=>lt.id===I?{...lt,status:"archived"}:lt))},[]),St=T.useCallback(I=>{console.log("[MockGrackle] loadTasks",I)},[]),Y=T.useCallback((I,it,lt,ut,pt,ht)=>{console.log("[MockGrackle] createTask",{projectId:I,title:it,parentTaskId:ht}),b(xt=>{const dt=xt.filter(Zt=>Zt.projectId===I).reduce((Zt,xe)=>Math.max(Zt,xe.sortOrder),0),st=ht?xt.find(Zt=>Zt.id===ht):void 0;if(ht&&!st)return console.warn("[MockGrackle] Parent task not found:",ht),xt;if(st&&!st.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",ht),xt;const Yt=st?st.depth+1:0,et={id:F("task"),projectId:I,title:it,description:lt||"",status:"pending",branch:"",environmentId:ut||"",sessionId:"",dependsOn:pt||[],reviewNotes:"",sortOrder:dt+1,createdAt:new Date().toISOString(),parentTaskId:ht||"",depth:Yt,childTaskIds:[],canDecompose:!ht,personaId:""};return[...xt,et]})},[F]),te=T.useCallback((I,it,lt)=>{var st;console.log("[MockGrackle] startTask",{taskId:I,runtime:it});const ut=Q.current.find(Yt=>Yt.id===I),pt=(ut==null?void 0:ut.environmentId)??"",ht=(ut==null?void 0:ut.title)??"",xt=F("sess"),Ht={id:xt,environmentId:pt||"env-local-01",runtime:it||"claude-code",status:"running",prompt:ht||I,startedAt:new Date().toISOString()};l(Yt=>[...Yt,Ht]),b(Yt=>Yt.map(et=>et.id===I?{...et,status:"in_progress",sessionId:xt,branch:`mock/${I.slice(0,8)}`}:et));const dt=rt();if(console.log(`[MockGrackle] Playing task scenario: ${dt.label}`),dt.pauseForInput){const Yt=dt.pauseAfterStep??dt.steps.length-1,et=dt.steps.slice(0,Yt+1),Zt=et.length>0?et[et.length-1].delayMs:0;if(zt(xt,et),mt(()=>{P(xt,"waiting_input"),Lt({sessionId:xt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},Zt+qp,xt),dt.resumeSteps){const xe=[...dt.resumeSteps];W.current.set(xt,xe);const fi=xe.reduce((hi,Ln)=>Math.max(hi,Ln.delayMs),0);V.current.set(xt,{taskId:I,delayAfterResume:fi+200})}}else{const Yt=dt.steps.length>0?dt.steps[dt.steps.length-1].delayMs:0;zt(xt,dt.steps);const et=(st=dt.steps[dt.steps.length-1])==null?void 0:st.event.content;mt(()=>{et==="completed"?b(Zt=>Zt.map(xe=>xe.id===I&&xe.status==="in_progress"?{...xe,status:"review"}:xe)):et==="failed"&&b(Zt=>Zt.map(xe=>xe.id===I&&xe.status==="in_progress"?{...xe,status:"failed"}:xe))},Yt+100,xt)}},[F,rt,zt,mt,P,Lt]),ye=T.useCallback((I,it)=>{console.log("[MockGrackle] sendInput",{sessionId:I,text:it}),Lt({sessionId:I,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${it}`}),P(I,"running"),Lt({sessionId:I,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const lt=W.current.get(I);if(lt)W.current.delete(I),zt(I,lt);else{const pt=[{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"}}];zt(I,pt)}const ut=V.current.get(I);ut&&(V.current.delete(I),mt(()=>{b(pt=>pt.map(ht=>ht.id===ut.taskId&&ht.status==="in_progress"?{...ht,status:"review"}:ht))},ut.delayAfterResume,I))},[Lt,P,zt,mt]),re=T.useCallback(I=>{console.log("[MockGrackle] approveTask",I),b(it=>it.map(lt=>lt.id===I?{...lt,status:"done"}:lt))},[]),qe=T.useCallback((I,it)=>{console.log("[MockGrackle] rejectTask",{taskId:I,reviewNotes:it}),b(lt=>lt.map(ut=>ut.id===I?{...ut,status:"assigned",reviewNotes:it,sessionId:""}:ut))},[]),bt=T.useCallback(I=>{console.log("[MockGrackle] deleteTask",I),b(it=>it.filter(lt=>lt.id!==I))},[]),ce=T.useCallback(I=>{console.log("[MockGrackle] loadFindings",I),x(Hp.filter(it=>it.projectId===I))},[]),De=T.useCallback((I,it,lt,ut,pt)=>{console.log("[MockGrackle] postFinding",{projectId:I,title:it});const ht={id:F("find"),projectId:I,taskId:"",sessionId:"",category:ut||"general",title:it,content:lt,tags:pt||[],createdAt:new Date().toISOString()};x(xt=>[...xt,ht])},[F]),Ve=T.useCallback((I,it,lt,ut)=>{console.log("[MockGrackle] addEnvironment",{displayName:I,adapterType:it,adapterConfig:lt,defaultRuntime:ut})},[]),bn=T.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),ke=T.useCallback((I,it,lt,ut,pt)=>{console.log("[MockGrackle] setToken",{name:I,tokenType:lt}),w(ht=>[...ht.filter(Ht=>Ht.name!==I),{name:I,tokenType:lt,envVar:ut,filePath:pt,expiresAt:""}])},[]),ln=T.useCallback(I=>{console.log("[MockGrackle] deleteToken",I),w(it=>it.filter(lt=>lt.name!==I))},[]);T.useEffect(()=>()=>{K.current.forEach(clearTimeout),K.current.clear()},[]);const Cn=T.useMemo(()=>({connected:!0,environments:zS,sessions:i,events:r,eventsDropped:0,lastSpawnedId:f,projects:p,tasks:v,findings:S,tokens:D,spawn:A,sendInput:ye,kill:Z,refresh:at,loadSessionEvents:tt,clearEvents:jt,createProject:Jt,archiveProject:Rt,loadTasks:St,createTask:Y,startTask:te,approveTask:re,rejectTask:qe,deleteTask:bt,loadFindings:ce,postFinding:De,addEnvironment:Ve,loadTokens:bn,setToken:ke,deleteToken:ln,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:O,createPersona:(I,it,lt,ut,pt,ht)=>{console.log("[MockGrackle] createPersona",{name:I});const xt={id:`mock-persona-${Date.now()}`,name:I,description:it,systemPrompt:lt,toolConfig:"{}",runtime:ut??"claude-code",model:pt||"",maxTurns:ht||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};q(Ht=>[...Ht,xt])},updatePersona:(I,it,lt,ut,pt,ht,xt)=>{console.log("[MockGrackle] updatePersona",{personaId:I,name:it}),q(Ht=>Ht.map(dt=>dt.id!==I?dt:{...dt,...it!==void 0?{name:it}:{},...lt!==void 0?{description:lt}:{},...ut!==void 0?{systemPrompt:ut}:{},...pt!==void 0?{runtime:pt}:{},...ht!==void 0?{model:ht}:{},...xt!==void 0?{maxTurns:xt}:{},updatedAt:new Date().toISOString()}))},deletePersona:I=>{console.log("[MockGrackle] deletePersona",I),q(it=>it.filter(lt=>lt.id!==I))},taskSessions:B,loadTaskSessions:I=>{console.log("[MockGrackle] loadTaskSessions",I)}}),[i,r,f,p,v,S,D,O,B,A,ye,Z,at,tt,jt,Jt,Rt,St,Y,te,re,qe,bt,ce,De,Ve,bn,ke,ln]);return m.jsx(sd.Provider,{value:Cn,children:a})}const v0=T.createContext(void 0),ZS=4e3;function XS({children:a}){const[i,l]=T.useState([]),r=T.useRef(0),u=T.useCallback(d=>{l(p=>p.filter(g=>g.id!==d))},[]),f=T.useCallback((d,p="info",g=ZS)=>{const v=`toast-${++r.current}`;l(b=>[...b,{id:v,message:d,variant:p,duration:g}])},[]);return m.jsx(v0.Provider,{value:{toasts:i,showToast:f,dismissToast:u},children:a})}function id(){const a=T.useContext(v0);if(!a)throw new Error("useToast must be used within ToastProvider");return a}const KS="_container_ew76q_1",QS="_brand_ew76q_26",PS="_info_ew76q_34",FS="_connectionDot_ew76q_41",JS="_connected_ew76q_44",$S="_disconnected_ew76q_48",WS="_settingsButton_ew76q_52",Ma={container:KS,brand:QS,info:PS,connectionDot:FS,connected:JS,disconnected:$S,settingsButton:WS};function t1({setViewMode:a}){const{connected:i,environments:l,sessions:r}=En(),u=l.length,f=l.filter(p=>p.status==="connected").length,d=r.filter(p=>["running","waiting_input"].includes(p.status)).length;return m.jsxs("div",{className:Ma.container,children:[m.jsx("div",{className:Ma.brand,children:"Grackle"}),m.jsxs("div",{className:Ma.info,children:[m.jsxs("span",{children:[m.jsx("span",{className:`${Ma.connectionDot} ${i?Ma.connected:Ma.disconnected}`,children:"●"})," ",i?"Connected":"Disconnected"]}),m.jsxs("span",{children:[f,"/",u," env",u!==1?"s":""]}),m.jsxs("span",{children:[d," active"]}),a&&m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Ma.settingsButton,onClick:()=>a({kind:"persona_management"}),title:"Personas",children:"👤"}),m.jsx("button",{className:Ma.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})]})}const ld=T.createContext({});function od(a){const i=T.useRef(null);return i.current===null&&(i.current=a()),i.current}const rr=T.createContext(null),rd=T.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class e1 extends T.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(l&&i.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=l.offsetHeight||0,r.width=l.offsetWidth||0,r.top=l.offsetTop,r.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function n1({children:a,isPresent:i}){const l=T.useId(),r=T.useRef(null),u=T.useRef({width:0,height:0,top:0,left:0}),{nonce:f}=T.useContext(rd);return T.useInsertionEffect(()=>{const{width:d,height:p,top:g,left:v}=u.current;if(i||!r.current||!d||!p)return;r.current.dataset.motionPopId=l;const b=document.createElement("style");return f&&(b.nonce=f),document.head.appendChild(b),b.sheet&&b.sheet.insertRule(`
68
- [data-motion-pop-id="${l}"] {
69
- position: absolute !important;
70
- width: ${d}px !important;
71
- height: ${p}px !important;
72
- top: ${g}px !important;
73
- left: ${v}px !important;
74
- }
75
- `),()=>{document.head.removeChild(b)}},[i]),m.jsx(e1,{isPresent:i,childRef:r,sizeRef:u,children:T.cloneElement(a,{ref:r})})}const a1=({children:a,initial:i,isPresent:l,onExitComplete:r,custom:u,presenceAffectsLayout:f,mode:d})=>{const p=od(s1),g=T.useId(),v=T.useCallback(S=>{p.set(S,!0);for(const x of p.values())if(!x)return;r&&r()},[p,r]),b=T.useMemo(()=>({id:g,initial:i,isPresent:l,custom:u,onExitComplete:v,register:S=>(p.set(S,!1),()=>p.delete(S))}),f?[Math.random(),v]:[l,v]);return T.useMemo(()=>{p.forEach((S,x)=>p.set(x,!1))},[l]),T.useEffect(()=>{!l&&!p.size&&r&&r()},[l]),d==="popLayout"&&(a=m.jsx(n1,{isPresent:l,children:a})),m.jsx(rr.Provider,{value:b,children:a})};function s1(){return new Map}function y0(a=!0){const i=T.useContext(rr);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:r,register:u}=i,f=T.useId();T.useEffect(()=>{a&&u(f)},[a]);const d=T.useCallback(()=>a&&r&&r(f),[f,r,a]);return!l&&r?[!1,d]:[!0]}const Xo=a=>a.key||"";function Yp(a){const i=[];return T.Children.forEach(a,l=>{T.isValidElement(l)&&i.push(l)}),i}const cd=typeof window<"u",b0=cd?T.useLayoutEffect:T.useEffect,ci=({children:a,custom:i,initial:l=!0,onExitComplete:r,presenceAffectsLayout:u=!0,mode:f="sync",propagate:d=!1})=>{const[p,g]=y0(d),v=T.useMemo(()=>Yp(a),[a]),b=d&&!p?[]:v.map(Xo),S=T.useRef(!0),x=T.useRef(v),D=od(()=>new Map),[w,O]=T.useState(v),[q,B]=T.useState(v);b0(()=>{S.current=!1,x.current=v;for(let K=0;K<q.length;K++){const G=Xo(q[K]);b.includes(G)?D.delete(G):D.get(G)!==!0&&D.set(G,!1)}},[q,b.length,b.join("-")]);const X=[];if(v!==w){let K=[...v];for(let G=0;G<q.length;G++){const Q=q[G],W=Xo(Q);b.includes(W)||(K.splice(G,0,Q),X.push(Q))}f==="wait"&&X.length&&(K=X),B(Yp(K)),O(v);return}const{forceRender:R}=T.useContext(ld);return m.jsx(m.Fragment,{children:q.map(K=>{const G=Xo(K),Q=d&&!p?!1:v===q||b.includes(G),W=()=>{if(D.has(G))D.set(G,!0);else return;let V=!0;D.forEach(F=>{F||(V=!1)}),V&&(R==null||R(),B(x.current),d&&(g==null||g()),r&&r())};return m.jsx(a1,{isPresent:Q,initial:!S.current||l?void 0:!1,custom:Q?void 0:i,presenceAffectsLayout:u,mode:f,onExitComplete:Q?void 0:W,children:K},G)})})},nn=a=>a;let S0=nn;const i1={useManualTiming:!1};function l1(a){let i=new Set,l=new Set,r=!1,u=!1;const f=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(v){f.has(v)&&(g.schedule(v),a()),v(d)}const g={schedule:(v,b=!1,S=!1)=>{const D=S&&r?i:l;return b&&f.add(v),D.has(v)||D.add(v),v},cancel:v=>{l.delete(v),f.delete(v)},process:v=>{if(d=v,r){u=!0;return}r=!0,[i,l]=[l,i],i.forEach(p),i.clear(),r=!1,u&&(u=!1,g.process(v))}};return g}const Ko=["read","resolveKeyframes","update","preRender","render","postRender"],o1=40;function T0(a,i){let l=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},f=()=>l=!0,d=Ko.reduce((B,X)=>(B[X]=l1(f),B),{}),{read:p,resolveKeyframes:g,update:v,preRender:b,render:S,postRender:x}=d,D=()=>{const B=performance.now();l=!1,u.delta=r?1e3/60:Math.max(Math.min(B-u.timestamp,o1),1),u.timestamp=B,u.isProcessing=!0,p.process(u),g.process(u),v.process(u),b.process(u),S.process(u),x.process(u),u.isProcessing=!1,l&&i&&(r=!1,a(D))},w=()=>{l=!0,r=!0,u.isProcessing||a(D)};return{schedule:Ko.reduce((B,X)=>{const R=d[X];return B[X]=(K,G=!1,Q=!1)=>(l||w(),R.schedule(K,G,Q)),B},{}),cancel:B=>{for(let X=0;X<Ko.length;X++)d[Ko[X]].cancel(B)},state:u,steps:d}}const{schedule:ae,cancel:za,state:Be,steps:ju}=T0(typeof requestAnimationFrame<"u"?requestAnimationFrame:nn,!0),_0=T.createContext({strict:!1}),Ip={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"]},li={};for(const a in Ip)li[a]={isEnabled:i=>Ip[a].some(l=>!!i[l])};function r1(a){for(const i in a)li[i]={...li[i],...a[i]}}const c1=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 tr(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||c1.has(a)}let x0=a=>!tr(a);function u1(a){a&&(x0=i=>i.startsWith("on")?!tr(i):a(i))}try{u1(require("@emotion/is-prop-valid").default)}catch{}function d1(a,i,l){const r={};for(const u in a)u==="values"&&typeof a.values=="object"||(x0(u)||l===!0&&tr(u)||!i&&!tr(u)||a.draggable&&u.startsWith("onDrag"))&&(r[u]=a[u]);return r}function f1(a){if(typeof Proxy>"u")return a;const i=new Map,l=(...r)=>a(...r);return new Proxy(l,{get:(r,u)=>u==="create"?a:(i.has(u)||i.set(u,a(u)),i.get(u))})}const cr=T.createContext({});function Sl(a){return typeof a=="string"||Array.isArray(a)}function ur(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const ud=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],dd=["initial",...ud];function dr(a){return ur(a.animate)||dd.some(i=>Sl(a[i]))}function A0(a){return!!(dr(a)||a.variants)}function h1(a,i){if(dr(a)){const{initial:l,animate:r}=a;return{initial:l===!1||Sl(l)?l:void 0,animate:Sl(r)?r:void 0}}return a.inherit!==!1?i:{}}function m1(a){const{initial:i,animate:l}=h1(a,T.useContext(cr));return T.useMemo(()=>({initial:i,animate:l}),[Zp(i),Zp(l)])}function Zp(a){return Array.isArray(a)?a.join(" "):a}const p1=Symbol.for("motionComponentSymbol");function ei(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function g1(a,i,l){return T.useCallback(r=>{r&&a.onMount&&a.onMount(r),i&&(r?i.mount(r):i.unmount()),l&&(typeof l=="function"?l(r):ei(l)&&(l.current=r))},[i])}const fd=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),v1="framerAppearId",j0="data-"+fd(v1),{schedule:hd}=T0(queueMicrotask,!1),E0=T.createContext({});function y1(a,i,l,r,u){var f,d;const{visualElement:p}=T.useContext(cr),g=T.useContext(_0),v=T.useContext(rr),b=T.useContext(rd).reducedMotion,S=T.useRef(null);r=r||g.renderer,!S.current&&r&&(S.current=r(a,{visualState:i,parent:p,props:l,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:b}));const x=S.current,D=T.useContext(E0);x&&!x.projection&&u&&(x.type==="html"||x.type==="svg")&&b1(S.current,l,u,D);const w=T.useRef(!1);T.useInsertionEffect(()=>{x&&w.current&&x.update(l,v)});const O=l[j0],q=T.useRef(!!O&&!(!((f=window.MotionHandoffIsComplete)===null||f===void 0)&&f.call(window,O))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,O)));return b0(()=>{x&&(w.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),hd.render(x.render),q.current&&x.animationState&&x.animationState.animateChanges())}),T.useEffect(()=>{x&&(!q.current&&x.animationState&&x.animationState.animateChanges(),q.current&&(queueMicrotask(()=>{var B;(B=window.MotionHandoffMarkAsComplete)===null||B===void 0||B.call(window,O)}),q.current=!1))}),x}function b1(a,i,l,r){const{layoutId:u,layout:f,drag:d,dragConstraints:p,layoutScroll:g,layoutRoot:v}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:C0(a.parent)),a.projection.setOptions({layoutId:u,layout:f,alwaysMeasureLayout:!!d||p&&ei(p),visualElement:a,animationType:typeof f=="string"?f:"both",initialPromotionConfig:r,layoutScroll:g,layoutRoot:v})}function C0(a){if(a)return a.options.allowProjection!==!1?a.projection:C0(a.parent)}function S1({preloadedFeatures:a,createVisualElement:i,useRender:l,useVisualState:r,Component:u}){var f,d;a&&r1(a);function p(v,b){let S;const x={...T.useContext(rd),...v,layoutId:T1(v)},{isStatic:D}=x,w=m1(v),O=r(v,D);if(!D&&cd){_1();const q=x1(x);S=q.MeasureLayout,w.visualElement=y1(u,O,x,i,q.ProjectionNode)}return m.jsxs(cr.Provider,{value:w,children:[S&&w.visualElement?m.jsx(S,{visualElement:w.visualElement,...x}):null,l(u,v,g1(O,w.visualElement,b),O,D,w.visualElement)]})}p.displayName=`motion.${typeof u=="string"?u:`create(${(d=(f=u.displayName)!==null&&f!==void 0?f:u.name)!==null&&d!==void 0?d:""})`}`;const g=T.forwardRef(p);return g[p1]=u,g}function T1({layoutId:a}){const i=T.useContext(ld).id;return i&&a!==void 0?i+"-"+a:a}function _1(a,i){T.useContext(_0).strict}function x1(a){const{drag:i,layout:l}=li;if(!i&&!l)return{};const r={...i,...l};return{MeasureLayout:i!=null&&i.isEnabled(a)||l!=null&&l.isEnabled(a)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const A1=["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 md(a){return typeof a!="string"||a.includes("-")?!1:!!(A1.indexOf(a)>-1||/[A-Z]/u.test(a))}function Xp(a){const i=[{},{}];return a==null||a.values.forEach((l,r)=>{i[0][r]=l.get(),i[1][r]=l.getVelocity()}),i}function pd(a,i,l,r){if(typeof i=="function"){const[u,f]=Xp(r);i=i(l!==void 0?l:a.custom,u,f)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[u,f]=Xp(r);i=i(l!==void 0?l:a.custom,u,f)}return i}const Gu=a=>Array.isArray(a),j1=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),E1=a=>Gu(a)?a[a.length-1]||0:a,Ue=a=>!!(a&&a.getVelocity);function Jo(a){const i=Ue(a)?a.get():a;return j1(i)?i.toValue():i}function C1({scrapeMotionValuesFromProps:a,createRenderState:i,onUpdate:l},r,u,f){const d={latestValues:N1(r,u,f,a),renderState:i()};return l&&(d.onMount=p=>l({props:r,current:p,...d}),d.onUpdate=p=>l(p)),d}const N0=a=>(i,l)=>{const r=T.useContext(cr),u=T.useContext(rr),f=()=>C1(a,i,r,u);return l?f():od(f)};function N1(a,i,l,r){const u={},f=r(a,{});for(const x in f)u[x]=Jo(f[x]);let{initial:d,animate:p}=a;const g=dr(a),v=A0(a);i&&v&&!g&&a.inherit!==!1&&(d===void 0&&(d=i.initial),p===void 0&&(p=i.animate));let b=l?l.initial===!1:!1;b=b||d===!1;const S=b?p:d;if(S&&typeof S!="boolean"&&!ur(S)){const x=Array.isArray(S)?S:[S];for(let D=0;D<x.length;D++){const w=pd(a,x[D]);if(w){const{transitionEnd:O,transition:q,...B}=w;for(const X in B){let R=B[X];if(Array.isArray(R)){const K=b?R.length-1:0;R=R[K]}R!==null&&(u[X]=R)}for(const X in O)u[X]=O[X]}}}return u}const ui=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ds=new Set(ui),D0=a=>i=>typeof i=="string"&&i.startsWith(a),k0=D0("--"),D1=D0("var(--"),gd=a=>D1(a)?k1.test(a.split("/*")[0].trim()):!1,k1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,w0=(a,i)=>i&&typeof a=="number"?i.transform(a):a,la=(a,i,l)=>l>i?i:l<a?a:l,di={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},Tl={...di,transform:a=>la(0,1,a)},Qo={...di,default:1},jl=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),Oa=jl("deg"),zn=jl("%"),yt=jl("px"),w1=jl("vh"),M1=jl("vw"),Kp={...zn,parse:a=>zn.parse(a)/100,transform:a=>zn.transform(a*100)},O1={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,radius:yt,borderTopLeftRadius:yt,borderTopRightRadius:yt,borderBottomRightRadius:yt,borderBottomLeftRadius:yt,width:yt,maxWidth:yt,height:yt,maxHeight:yt,top:yt,right:yt,bottom:yt,left:yt,padding:yt,paddingTop:yt,paddingRight:yt,paddingBottom:yt,paddingLeft:yt,margin:yt,marginTop:yt,marginRight:yt,marginBottom:yt,marginLeft:yt,backgroundPositionX:yt,backgroundPositionY:yt},R1={rotate:Oa,rotateX:Oa,rotateY:Oa,rotateZ:Oa,scale:Qo,scaleX:Qo,scaleY:Qo,scaleZ:Qo,skew:Oa,skewX:Oa,skewY:Oa,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:Tl,originX:Kp,originY:Kp,originZ:yt},Qp={...di,transform:Math.round},vd={...O1,...R1,zIndex:Qp,size:yt,fillOpacity:Tl,strokeOpacity:Tl,numOctaves:Qp},B1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},z1=ui.length;function U1(a,i,l){let r="",u=!0;for(let f=0;f<z1;f++){const d=ui[f],p=a[d];if(p===void 0)continue;let g=!0;if(typeof p=="number"?g=p===(d.startsWith("scale")?1:0):g=parseFloat(p)===0,!g||l){const v=w0(p,vd[d]);if(!g){u=!1;const b=B1[d]||d;r+=`${b}(${v}) `}l&&(i[d]=v)}}return r=r.trim(),l?r=l(i,u?"":r):u&&(r="none"),r}function yd(a,i,l){const{style:r,vars:u,transformOrigin:f}=a;let d=!1,p=!1;for(const g in i){const v=i[g];if(ds.has(g)){d=!0;continue}else if(k0(g)){u[g]=v;continue}else{const b=w0(v,vd[g]);g.startsWith("origin")?(p=!0,f[g]=b):r[g]=b}}if(i.transform||(d||l?r.transform=U1(i,a.transform,l):r.transform&&(r.transform="none")),p){const{originX:g="50%",originY:v="50%",originZ:b=0}=f;r.transformOrigin=`${g} ${v} ${b}`}}const V1={offset:"stroke-dashoffset",array:"stroke-dasharray"},L1={offset:"strokeDashoffset",array:"strokeDasharray"};function H1(a,i,l=1,r=0,u=!0){a.pathLength=1;const f=u?V1:L1;a[f.offset]=yt.transform(-r);const d=yt.transform(i),p=yt.transform(l);a[f.array]=`${d} ${p}`}function Pp(a,i,l){return typeof a=="string"?a:yt.transform(i+l*a)}function G1(a,i,l){const r=Pp(i,a.x,a.width),u=Pp(l,a.y,a.height);return`${r} ${u}`}function bd(a,{attrX:i,attrY:l,attrScale:r,originX:u,originY:f,pathLength:d,pathSpacing:p=1,pathOffset:g=0,...v},b,S){if(yd(a,v,S),b){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:x,style:D,dimensions:w}=a;x.transform&&(w&&(D.transform=x.transform),delete x.transform),w&&(u!==void 0||f!==void 0||D.transform)&&(D.transformOrigin=G1(w,u!==void 0?u:.5,f!==void 0?f:.5)),i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),r!==void 0&&(x.scale=r),d!==void 0&&H1(x,d,p,g,!1)}const Sd=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),M0=()=>({...Sd(),attrs:{}}),Td=a=>typeof a=="string"&&a.toLowerCase()==="svg";function O0(a,{style:i,vars:l},r,u){Object.assign(a.style,i,u&&u.getProjectionStyles(r));for(const f in l)a.style.setProperty(f,l[f])}const R0=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 B0(a,i,l,r){O0(a,i,void 0,r);for(const u in i.attrs)a.setAttribute(R0.has(u)?u:fd(u),i.attrs[u])}const er={};function q1(a){Object.assign(er,a)}function z0(a,{layout:i,layoutId:l}){return ds.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!er[a]||a==="opacity")}function _d(a,i,l){var r;const{style:u}=a,f={};for(const d in u)(Ue(u[d])||i.style&&Ue(i.style[d])||z0(d,a)||((r=l==null?void 0:l.getValue(d))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(f[d]=u[d]);return f}function U0(a,i,l){const r=_d(a,i,l);for(const u in a)if(Ue(a[u])||Ue(i[u])){const f=ui.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;r[f]=a[u]}return r}function Y1(a,i){try{i.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{i.dimensions={x:0,y:0,width:0,height:0}}}const Fp=["x","y","width","height","cx","cy","r"],I1={useVisualState:N0({scrapeMotionValuesFromProps:U0,createRenderState:M0,onUpdate:({props:a,prevProps:i,current:l,renderState:r,latestValues:u})=>{if(!l)return;let f=!!a.drag;if(!f){for(const p in u)if(ds.has(p)){f=!0;break}}if(!f)return;let d=!i;if(i)for(let p=0;p<Fp.length;p++){const g=Fp[p];a[g]!==i[g]&&(d=!0)}d&&ae.read(()=>{Y1(l,r),ae.render(()=>{bd(r,u,Td(l.tagName),a.transformTemplate),B0(l,r)})})}})},Z1={useVisualState:N0({scrapeMotionValuesFromProps:_d,createRenderState:Sd})};function V0(a,i,l){for(const r in i)!Ue(i[r])&&!z0(r,l)&&(a[r]=i[r])}function X1({transformTemplate:a},i){return T.useMemo(()=>{const l=Sd();return yd(l,i,a),Object.assign({},l.vars,l.style)},[i])}function K1(a,i){const l=a.style||{},r={};return V0(r,l,a),Object.assign(r,X1(a,i)),r}function Q1(a,i){const l={},r=K1(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=r,l}function P1(a,i,l,r){const u=T.useMemo(()=>{const f=M0();return bd(f,i,Td(r),a.transformTemplate),{...f.attrs,style:{...f.style}}},[i]);if(a.style){const f={};V0(f,a.style,a),u.style={...f,...u.style}}return u}function F1(a=!1){return(l,r,u,{latestValues:f},d)=>{const g=(md(l)?P1:Q1)(r,f,d,l),v=d1(r,typeof l=="string",a),b=l!==T.Fragment?{...v,...g,ref:u}:{},{children:S}=r,x=T.useMemo(()=>Ue(S)?S.get():S,[S]);return T.createElement(l,{...b,children:x})}}function J1(a,i){return function(r,{forwardMotionProps:u}={forwardMotionProps:!1}){const d={...md(r)?I1:Z1,preloadedFeatures:a,useRender:F1(u),createVisualElement:i,Component:r};return S1(d)}}function L0(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let r=0;r<l;r++)if(i[r]!==a[r])return!1;return!0}function fr(a,i,l){const r=a.getProps();return pd(r,i,l!==void 0?l:r.custom,a)}function xd(a,i){return a?a[i]||a.default||a:void 0}const H0=new Set(["width","height","top","left","right","bottom",...ui]);let $o;function $1(){$o=void 0}const Un={now:()=>($o===void 0&&Un.set(Be.isProcessing||i1.useManualTiming?Be.timestamp:performance.now()),$o),set:a=>{$o=a,queueMicrotask($1)}};function Ad(a,i){a.indexOf(i)===-1&&a.push(i)}function jd(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}class Ed{constructor(){this.subscriptions=[]}add(i){return Ad(this.subscriptions,i),()=>jd(this.subscriptions,i)}notify(i,l,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,r);else for(let f=0;f<u;f++){const d=this.subscriptions[f];d&&d(i,l,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function G0(a,i){return i?a*(1e3/i):0}const Jp=30,W1=a=>!isNaN(parseFloat(a));class tT{constructor(i,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,u=!0)=>{const f=Un.now();this.updatedAt!==f&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),u&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=Un.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=W1(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new Ed);const r=this.events[i].add(l);return i==="change"?()=>{r(),ae.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i,l=!0){!l||!this.passiveEffect?this.updateAndNotify(i,l):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,l,r){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-r}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Un.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>Jp)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,Jp);return G0(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(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 _l(a,i){return new tT(a,i)}function eT(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,_l(l))}function nT(a,i){const l=fr(a,i);let{transitionEnd:r={},transition:u={},...f}=l||{};f={...f,...r};for(const d in f){const p=E1(f[d]);eT(a,d,p)}}function aT(a){return!!(Ue(a)&&a.add)}function qu(a,i){const l=a.getValue("willChange");if(aT(l))return l.add(i)}function q0(a){return a.props[j0]}function Cd(a){let i;return()=>(i===void 0&&(i=a()),i)}const sT=Cd(()=>window.ScrollTimeline!==void 0);class iT{constructor(i){this.stop=()=>this.runAll("stop"),this.animations=i.filter(Boolean)}get finished(){return Promise.all(this.animations.map(i=>"finished"in i?i.finished:i))}getAll(i){return this.animations[0][i]}setAll(i,l){for(let r=0;r<this.animations.length;r++)this.animations[r][i]=l}attachTimeline(i,l){const r=this.animations.map(u=>{if(sT()&&u.attachTimeline)return u.attachTimeline(i);if(typeof l=="function")return l(u)});return()=>{r.forEach((u,f)=>{u&&u(),this.animations[f].stop()})}}get time(){return this.getAll("time")}set time(i){this.setAll("time",i)}get speed(){return this.getAll("speed")}set speed(i){this.setAll("speed",i)}get startTime(){return this.getAll("startTime")}get duration(){let i=0;for(let l=0;l<this.animations.length;l++)i=Math.max(i,this.animations[l].duration);return i}runAll(i){this.animations.forEach(l=>l[i]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class lT extends iT{then(i,l){return Promise.all(this.animations).then(i).catch(l)}}const sa=a=>a*1e3,ia=a=>a/1e3;function Nd(a){return typeof a=="function"}function $p(a,i){a.timeline=i,a.onfinish=null}const Dd=a=>Array.isArray(a)&&typeof a[0]=="number",oT={linearEasing:void 0};function rT(a,i){const l=Cd(a);return()=>{var r;return(r=oT[i])!==null&&r!==void 0?r:l()}}const nr=rT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),oi=(a,i,l)=>{const r=i-a;return r===0?1:(l-a)/r},Y0=(a,i,l=10)=>{let r="";const u=Math.max(Math.round(i/l),2);for(let f=0;f<u;f++)r+=a(oi(0,u-1,f))+", ";return`linear(${r.substring(0,r.length-2)})`};function I0(a){return!!(typeof a=="function"&&nr()||!a||typeof a=="string"&&(a in Yu||nr())||Dd(a)||Array.isArray(a)&&a.every(I0))}const fl=([a,i,l,r])=>`cubic-bezier(${a}, ${i}, ${l}, ${r})`,Yu={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 Z0(a,i){if(a)return typeof a=="function"&&nr()?Y0(a,i):Dd(a)?fl(a):Array.isArray(a)?a.map(l=>Z0(l,i)||Yu.easeOut):Yu[a]}const X0=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,cT=1e-7,uT=12;function dT(a,i,l,r,u){let f,d,p=0;do d=i+(l-i)/2,f=X0(d,r,u)-a,f>0?l=d:i=d;while(Math.abs(f)>cT&&++p<uT);return d}function El(a,i,l,r){if(a===i&&l===r)return nn;const u=f=>dT(f,0,1,a,l);return f=>f===0||f===1?f:X0(u(f),i,r)}const K0=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,Q0=a=>i=>1-a(1-i),P0=El(.33,1.53,.69,.99),kd=Q0(P0),F0=K0(kd),J0=a=>(a*=2)<1?.5*kd(a):.5*(2-Math.pow(2,-10*(a-1))),wd=a=>1-Math.sin(Math.acos(a)),$0=Q0(wd),W0=K0(wd),tv=a=>/^0[^.\s]+$/u.test(a);function fT(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||tv(a):!0}const gl=a=>Math.round(a*1e5)/1e5,Md=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hT(a){return a==null}const mT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Od=(a,i)=>l=>!!(typeof l=="string"&&mT.test(l)&&l.startsWith(a)||i&&!hT(l)&&Object.prototype.hasOwnProperty.call(l,i)),ev=(a,i,l)=>r=>{if(typeof r!="string")return r;const[u,f,d,p]=r.match(Md);return{[a]:parseFloat(u),[i]:parseFloat(f),[l]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},pT=a=>la(0,255,a),Eu={...di,transform:a=>Math.round(pT(a))},cs={test:Od("rgb","red"),parse:ev("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:r=1})=>"rgba("+Eu.transform(a)+", "+Eu.transform(i)+", "+Eu.transform(l)+", "+gl(Tl.transform(r))+")"};function gT(a){let i="",l="",r="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),r=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),r=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,r+=r,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const Iu={test:Od("#"),parse:gT,transform:cs.transform},ni={test:Od("hsl","hue"),parse:ev("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:r=1})=>"hsla("+Math.round(a)+", "+zn.transform(gl(i))+", "+zn.transform(gl(l))+", "+gl(Tl.transform(r))+")"},ze={test:a=>cs.test(a)||Iu.test(a)||ni.test(a),parse:a=>cs.test(a)?cs.parse(a):ni.test(a)?ni.parse(a):Iu.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?cs.transform(a):ni.transform(a)},vT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yT(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(Md))===null||i===void 0?void 0:i.length)||0)+(((l=a.match(vT))===null||l===void 0?void 0:l.length)||0)>0}const nv="number",av="color",bT="var",ST="var(",Wp="${}",TT=/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 xl(a){const i=a.toString(),l=[],r={color:[],number:[],var:[]},u=[];let f=0;const p=i.replace(TT,g=>(ze.test(g)?(r.color.push(f),u.push(av),l.push(ze.parse(g))):g.startsWith(ST)?(r.var.push(f),u.push(bT),l.push(g)):(r.number.push(f),u.push(nv),l.push(parseFloat(g))),++f,Wp)).split(Wp);return{values:l,split:p,indexes:r,types:u}}function sv(a){return xl(a).values}function iv(a){const{split:i,types:l}=xl(a),r=i.length;return u=>{let f="";for(let d=0;d<r;d++)if(f+=i[d],u[d]!==void 0){const p=l[d];p===nv?f+=gl(u[d]):p===av?f+=ze.transform(u[d]):f+=u[d]}return f}}const _T=a=>typeof a=="number"?0:a;function xT(a){const i=sv(a);return iv(a)(i.map(_T))}const Ua={test:yT,parse:sv,createTransformer:iv,getAnimatableNone:xT},AT=new Set(["brightness","contrast","saturate","opacity"]);function jT(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[r]=l.match(Md)||[];if(!r)return a;const u=l.replace(r,"");let f=AT.has(i)?1:0;return r!==l&&(f*=100),i+"("+f+u+")"}const ET=/\b([a-z-]*)\(.*?\)/gu,Zu={...Ua,getAnimatableNone:a=>{const i=a.match(ET);return i?i.map(jT).join(" "):a}},CT={...vd,color:ze,backgroundColor:ze,outlineColor:ze,fill:ze,stroke:ze,borderColor:ze,borderTopColor:ze,borderRightColor:ze,borderBottomColor:ze,borderLeftColor:ze,filter:Zu,WebkitFilter:Zu},Rd=a=>CT[a];function lv(a,i){let l=Rd(a);return l!==Zu&&(l=Ua),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const NT=new Set(["auto","none","0"]);function DT(a,i,l){let r=0,u;for(;r<a.length&&!u;){const f=a[r];typeof f=="string"&&!NT.has(f)&&xl(f).values.length&&(u=a[r]),r++}if(u&&l)for(const f of i)a[f]=lv(l,u)}const tg=a=>a===di||a===yt,eg=(a,i)=>parseFloat(a.split(", ")[i]),ng=(a,i)=>(l,{transform:r})=>{if(r==="none"||!r)return 0;const u=r.match(/^matrix3d\((.+)\)$/u);if(u)return eg(u[1],i);{const f=r.match(/^matrix\((.+)\)$/u);return f?eg(f[1],a):0}},kT=new Set(["x","y","z"]),wT=ui.filter(a=>!kT.has(a));function MT(a){const i=[];return wT.forEach(l=>{const r=a.getValue(l);r!==void 0&&(i.push([l,r.get()]),r.set(l.startsWith("scale")?1:0))}),i}const ri={width:({x:a},{paddingLeft:i="0",paddingRight:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),height:({y:a},{paddingTop:i="0",paddingBottom:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:ng(4,13),y:ng(5,14)};ri.translateX=ri.x;ri.translateY=ri.y;const us=new Set;let Xu=!1,Ku=!1;function ov(){if(Ku){const a=Array.from(us).filter(r=>r.needsMeasurement),i=new Set(a.map(r=>r.element)),l=new Map;i.forEach(r=>{const u=MT(r);u.length&&(l.set(r,u),r.render())}),a.forEach(r=>r.measureInitialState()),i.forEach(r=>{r.render();const u=l.get(r);u&&u.forEach(([f,d])=>{var p;(p=r.getValue(f))===null||p===void 0||p.set(d)})}),a.forEach(r=>r.measureEndState()),a.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ku=!1,Xu=!1,us.forEach(a=>a.complete()),us.clear()}function rv(){us.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Ku=!0)})}function OT(){rv(),ov()}class Bd{constructor(i,l,r,u,f,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=r,this.motionValue=u,this.element=f,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(us.add(this),Xu||(Xu=!0,ae.read(rv),ae.resolveKeyframes(ov))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:r,motionValue:u}=this;for(let f=0;f<i.length;f++)if(i[f]===null)if(f===0){const d=u==null?void 0:u.get(),p=i[i.length-1];if(d!==void 0)i[0]=d;else if(r&&l){const g=r.readValue(l,p);g!=null&&(i[0]=g)}i[0]===void 0&&(i[0]=p),u&&d===void 0&&u.set(i[0])}else i[f]=i[f-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),us.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,us.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const cv=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),RT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BT(a){const i=RT.exec(a);if(!i)return[,];const[,l,r,u]=i;return[`--${l??r}`,u]}function uv(a,i,l=1){const[r,u]=BT(a);if(!r)return;const f=window.getComputedStyle(i).getPropertyValue(r);if(f){const d=f.trim();return cv(d)?parseFloat(d):d}return gd(u)?uv(u,i,l+1):u}const dv=a=>i=>i.test(a),zT={test:a=>a==="auto",parse:a=>a},fv=[di,yt,zn,Oa,M1,w1,zT],ag=a=>fv.find(dv(a));class hv extends Bd{constructor(i,l,r,u,f){super(i,l,r,u,f,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:r}=this;if(!l||!l.current)return;super.readKeyframes();for(let g=0;g<i.length;g++){let v=i[g];if(typeof v=="string"&&(v=v.trim(),gd(v))){const b=uv(v,l.current);b!==void 0&&(i[g]=b),g===i.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!H0.has(r)||i.length!==2)return;const[u,f]=i,d=ag(u),p=ag(f);if(d!==p)if(tg(d)&&tg(p))for(let g=0;g<i.length;g++){const v=i[g];typeof v=="string"&&(i[g]=parseFloat(v))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,r=[];for(let u=0;u<i.length;u++)fT(i[u])&&r.push(u);r.length&&DT(i,r,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:r}=this;if(!i||!i.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ri[r](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(r,u).jump(u,!1)}measureEndState(){var i;const{element:l,name:r,unresolvedKeyframes:u}=this;if(!l||!l.current)return;const f=l.getValue(r);f&&f.jump(this.measuredOrigin,!1);const d=u.length-1,p=u[d];u[d]=ri[r](l.measureViewportBox(),window.getComputedStyle(l.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((i=this.removedTransforms)===null||i===void 0)&&i.length&&this.removedTransforms.forEach(([g,v])=>{l.getValue(g).set(v)}),this.resolveNoneKeyframes()}}const sg=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(Ua.test(a)||a==="0")&&!a.startsWith("url("));function UT(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function VT(a,i,l,r){const u=a[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const f=a[a.length-1],d=sg(u,i),p=sg(f,i);return!d||!p?!1:UT(a)||(l==="spring"||Nd(l))&&r}const LT=a=>a!==null;function hr(a,{repeat:i,repeatType:l="loop"},r){const u=a.filter(LT),f=i&&l!=="loop"&&i%2===1?0:u.length-1;return!f||r===void 0?u[f]:r}const HT=40;class mv{constructor({autoplay:i=!0,delay:l=0,type:r="keyframes",repeat:u=0,repeatDelay:f=0,repeatType:d="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Un.now(),this.options={autoplay:i,delay:l,type:r,repeat:u,repeatDelay:f,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>HT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&OT(),this._resolved}onKeyframesResolved(i,l){this.resolvedAt=Un.now(),this.hasAttemptedResolve=!0;const{name:r,type:u,velocity:f,delay:d,onComplete:p,onUpdate:g,isGenerator:v}=this.options;if(!v&&!VT(i,r,u,f))if(d)this.options.duration=0;else{g&&g(hr(i,this.options,l)),p&&p(),this.resolveFinishedPromise();return}const b=this.initPlayback(i,l);b!==!1&&(this._resolved={keyframes:i,finalKeyframe:l,...b},this.onPostResolved())}onPostResolved(){}then(i,l){return this.currentFinishedPromise.then(i,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(i=>{this.resolveFinishedPromise=i})}}const Qu=2e4;function pv(a){let i=0;const l=50;let r=a.next(i);for(;!r.done&&i<Qu;)i+=l,r=a.next(i);return i>=Qu?1/0:i}const oe=(a,i,l)=>a+(i-a)*l;function Cu(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function GT({hue:a,saturation:i,lightness:l,alpha:r}){a/=360,i/=100,l/=100;let u=0,f=0,d=0;if(!i)u=f=d=l;else{const p=l<.5?l*(1+i):l+i-l*i,g=2*l-p;u=Cu(g,p,a+1/3),f=Cu(g,p,a),d=Cu(g,p,a-1/3)}return{red:Math.round(u*255),green:Math.round(f*255),blue:Math.round(d*255),alpha:r}}function ar(a,i){return l=>l>0?i:a}const Nu=(a,i,l)=>{const r=a*a,u=l*(i*i-r)+r;return u<0?0:Math.sqrt(u)},qT=[Iu,cs,ni],YT=a=>qT.find(i=>i.test(a));function ig(a){const i=YT(a);if(!i)return!1;let l=i.parse(a);return i===ni&&(l=GT(l)),l}const lg=(a,i)=>{const l=ig(a),r=ig(i);if(!l||!r)return ar(a,i);const u={...l};return f=>(u.red=Nu(l.red,r.red,f),u.green=Nu(l.green,r.green,f),u.blue=Nu(l.blue,r.blue,f),u.alpha=oe(l.alpha,r.alpha,f),cs.transform(u))},IT=(a,i)=>l=>i(a(l)),Cl=(...a)=>a.reduce(IT),Pu=new Set(["none","hidden"]);function ZT(a,i){return Pu.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function XT(a,i){return l=>oe(a,i,l)}function zd(a){return typeof a=="number"?XT:typeof a=="string"?gd(a)?ar:ze.test(a)?lg:PT:Array.isArray(a)?gv:typeof a=="object"?ze.test(a)?lg:KT:ar}function gv(a,i){const l=[...a],r=l.length,u=a.map((f,d)=>zd(f)(f,i[d]));return f=>{for(let d=0;d<r;d++)l[d]=u[d](f);return l}}function KT(a,i){const l={...a,...i},r={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(r[u]=zd(a[u])(a[u],i[u]));return u=>{for(const f in r)l[f]=r[f](u);return l}}function QT(a,i){var l;const r=[],u={color:0,var:0,number:0};for(let f=0;f<i.values.length;f++){const d=i.types[f],p=a.indexes[d][u[d]],g=(l=a.values[p])!==null&&l!==void 0?l:0;r[f]=g,u[d]++}return r}const PT=(a,i)=>{const l=Ua.createTransformer(i),r=xl(a),u=xl(i);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?Pu.has(a)&&!u.values.length||Pu.has(i)&&!r.values.length?ZT(a,i):Cl(gv(QT(r,u),u.values),l):ar(a,i)};function vv(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?oe(a,i,l):zd(a)(a,i)}const FT=5;function yv(a,i,l){const r=Math.max(i-FT,0);return G0(l-a(r),i-r)}const fe={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},Du=.001;function JT({duration:a=fe.duration,bounce:i=fe.bounce,velocity:l=fe.velocity,mass:r=fe.mass}){let u,f,d=1-i;d=la(fe.minDamping,fe.maxDamping,d),a=la(fe.minDuration,fe.maxDuration,ia(a)),d<1?(u=v=>{const b=v*d,S=b*a,x=b-l,D=Fu(v,d),w=Math.exp(-S);return Du-x/D*w},f=v=>{const S=v*d*a,x=S*l+l,D=Math.pow(d,2)*Math.pow(v,2)*a,w=Math.exp(-S),O=Fu(Math.pow(v,2),d);return(-u(v)+Du>0?-1:1)*((x-D)*w)/O}):(u=v=>{const b=Math.exp(-v*a),S=(v-l)*a+1;return-Du+b*S},f=v=>{const b=Math.exp(-v*a),S=(l-v)*(a*a);return b*S});const p=5/a,g=WT(u,f,p);if(a=sa(a),isNaN(g))return{stiffness:fe.stiffness,damping:fe.damping,duration:a};{const v=Math.pow(g,2)*r;return{stiffness:v,damping:d*2*Math.sqrt(r*v),duration:a}}}const $T=12;function WT(a,i,l){let r=l;for(let u=1;u<$T;u++)r=r-a(r)/i(r);return r}function Fu(a,i){return a*Math.sqrt(1-i*i)}const t_=["duration","bounce"],e_=["stiffness","damping","mass"];function og(a,i){return i.some(l=>a[l]!==void 0)}function n_(a){let i={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...a};if(!og(a,e_)&&og(a,t_))if(a.visualDuration){const l=a.visualDuration,r=2*Math.PI/(l*1.2),u=r*r,f=2*la(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:fe.mass,stiffness:u,damping:f}}else{const l=JT(a);i={...i,...l,mass:fe.mass},i.isResolvedFromDuration=!0}return i}function bv(a=fe.visualDuration,i=fe.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:r,restDelta:u}=l;const f=l.keyframes[0],d=l.keyframes[l.keyframes.length-1],p={done:!1,value:f},{stiffness:g,damping:v,mass:b,duration:S,velocity:x,isResolvedFromDuration:D}=n_({...l,velocity:-ia(l.velocity||0)}),w=x||0,O=v/(2*Math.sqrt(g*b)),q=d-f,B=ia(Math.sqrt(g/b)),X=Math.abs(q)<5;r||(r=X?fe.restSpeed.granular:fe.restSpeed.default),u||(u=X?fe.restDelta.granular:fe.restDelta.default);let R;if(O<1){const G=Fu(B,O);R=Q=>{const W=Math.exp(-O*B*Q);return d-W*((w+O*B*q)/G*Math.sin(G*Q)+q*Math.cos(G*Q))}}else if(O===1)R=G=>d-Math.exp(-B*G)*(q+(w+B*q)*G);else{const G=B*Math.sqrt(O*O-1);R=Q=>{const W=Math.exp(-O*B*Q),V=Math.min(G*Q,300);return d-W*((w+O*B*q)*Math.sinh(V)+G*q*Math.cosh(V))/G}}const K={calculatedDuration:D&&S||null,next:G=>{const Q=R(G);if(D)p.done=G>=S;else{let W=0;O<1&&(W=G===0?sa(w):yv(R,G,Q));const V=Math.abs(W)<=r,F=Math.abs(d-Q)<=u;p.done=V&&F}return p.value=p.done?d:Q,p},toString:()=>{const G=Math.min(pv(K),Qu),Q=Y0(W=>K.next(G*W).value,G,30);return G+"ms "+Q}};return K}function rg({keyframes:a,velocity:i=0,power:l=.8,timeConstant:r=325,bounceDamping:u=10,bounceStiffness:f=500,modifyTarget:d,min:p,max:g,restDelta:v=.5,restSpeed:b}){const S=a[0],x={done:!1,value:S},D=V=>p!==void 0&&V<p||g!==void 0&&V>g,w=V=>p===void 0?g:g===void 0||Math.abs(p-V)<Math.abs(g-V)?p:g;let O=l*i;const q=S+O,B=d===void 0?q:d(q);B!==q&&(O=B-S);const X=V=>-O*Math.exp(-V/r),R=V=>B+X(V),K=V=>{const F=X(V),rt=R(V);x.done=Math.abs(F)<=v,x.value=x.done?B:rt};let G,Q;const W=V=>{D(x.value)&&(G=V,Q=bv({keyframes:[x.value,w(x.value)],velocity:yv(R,V,x.value),damping:u,stiffness:f,restDelta:v,restSpeed:b}))};return W(0),{calculatedDuration:null,next:V=>{let F=!1;return!Q&&G===void 0&&(F=!0,K(V),W(V)),G!==void 0&&V>=G?Q.next(V-G):(!F&&K(V),x)}}}const a_=El(.42,0,1,1),s_=El(0,0,.58,1),Sv=El(.42,0,.58,1),i_=a=>Array.isArray(a)&&typeof a[0]!="number",l_={linear:nn,easeIn:a_,easeInOut:Sv,easeOut:s_,circIn:wd,circInOut:W0,circOut:$0,backIn:kd,backInOut:F0,backOut:P0,anticipate:J0},cg=a=>{if(Dd(a)){S0(a.length===4);const[i,l,r,u]=a;return El(i,l,r,u)}else if(typeof a=="string")return l_[a];return a};function o_(a,i,l){const r=[],u=l||vv,f=a.length-1;for(let d=0;d<f;d++){let p=u(a[d],a[d+1]);if(i){const g=Array.isArray(i)?i[d]||nn:i;p=Cl(g,p)}r.push(p)}return r}function r_(a,i,{clamp:l=!0,ease:r,mixer:u}={}){const f=a.length;if(S0(f===i.length),f===1)return()=>i[0];if(f===2&&i[0]===i[1])return()=>i[1];const d=a[0]===a[1];a[0]>a[f-1]&&(a=[...a].reverse(),i=[...i].reverse());const p=o_(i,r,u),g=p.length,v=b=>{if(d&&b<a[0])return i[0];let S=0;if(g>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const x=oi(a[S],a[S+1],b);return p[S](x)};return l?b=>v(la(a[0],a[f-1],b)):v}function c_(a,i){const l=a[a.length-1];for(let r=1;r<=i;r++){const u=oi(0,i,r);a.push(oe(l,1,u))}}function u_(a){const i=[0];return c_(i,a.length-1),i}function d_(a,i){return a.map(l=>l*i)}function f_(a,i){return a.map(()=>i||Sv).splice(0,a.length-1)}function sr({duration:a=300,keyframes:i,times:l,ease:r="easeInOut"}){const u=i_(r)?r.map(cg):cg(r),f={done:!1,value:i[0]},d=d_(l&&l.length===i.length?l:u_(i),a),p=r_(d,i,{ease:Array.isArray(u)?u:f_(i,u)});return{calculatedDuration:a,next:g=>(f.value=p(g),f.done=g>=a,f)}}const h_=a=>{const i=({timestamp:l})=>a(l);return{start:()=>ae.update(i,!0),stop:()=>za(i),now:()=>Be.isProcessing?Be.timestamp:Un.now()}},m_={decay:rg,inertia:rg,tween:sr,keyframes:sr,spring:bv},p_=a=>a/100;class Ud extends mv{constructor(i){super(i),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:g}=this.options;g&&g()};const{name:l,motionValue:r,element:u,keyframes:f}=this.options,d=(u==null?void 0:u.KeyframeResolver)||Bd,p=(g,v)=>this.onKeyframesResolved(g,v);this.resolver=new d(f,p,l,r,u),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(i){const{type:l="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:f,velocity:d=0}=this.options,p=Nd(l)?l:m_[l]||sr;let g,v;p!==sr&&typeof i[0]!="number"&&(g=Cl(p_,vv(i[0],i[1])),i=[0,100]);const b=p({...this.options,keyframes:i});f==="mirror"&&(v=p({...this.options,keyframes:[...i].reverse(),velocity:-d})),b.calculatedDuration===null&&(b.calculatedDuration=pv(b));const{calculatedDuration:S}=b,x=S+u,D=x*(r+1)-u;return{generator:b,mirroredGenerator:v,mapPercentToKeyframes:g,calculatedDuration:S,resolvedDuration:x,totalDuration:D}}onPostResolved(){const{autoplay:i=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!i?this.pause():this.state=this.pendingPlayState}tick(i,l=!1){const{resolved:r}=this;if(!r){const{keyframes:V}=this.options;return{done:!0,value:V[V.length-1]}}const{finalKeyframe:u,generator:f,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:g,calculatedDuration:v,totalDuration:b,resolvedDuration:S}=r;if(this.startTime===null)return f.next(0);const{delay:x,repeat:D,repeatType:w,repeatDelay:O,onUpdate:q}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-b/this.speed,this.startTime)),l?this.currentTime=i:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(i-this.startTime)*this.speed;const B=this.currentTime-x*(this.speed>=0?1:-1),X=this.speed>=0?B<0:B>b;this.currentTime=Math.max(B,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=b);let R=this.currentTime,K=f;if(D){const V=Math.min(this.currentTime,b)/S;let F=Math.floor(V),rt=V%1;!rt&&V>=1&&(rt=1),rt===1&&F--,F=Math.min(F,D+1),!!(F%2)&&(w==="reverse"?(rt=1-rt,O&&(rt-=O/S)):w==="mirror"&&(K=d)),R=la(0,1,rt)*S}const G=X?{done:!1,value:g[0]}:K.next(R);p&&(G.value=p(G.value));let{done:Q}=G;!X&&v!==null&&(Q=this.speed>=0?this.currentTime>=b:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Q);return W&&u!==void 0&&(G.value=hr(g,this.options,u)),q&&q(G.value),W&&this.finish(),G}get duration(){const{resolved:i}=this;return i?ia(i.calculatedDuration):0}get time(){return ia(this.currentTime)}set time(i){i=sa(i),this.currentTime=i,this.holdTime!==null||this.speed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.speed)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;this.playbackSpeed=i,l&&(this.time=ia(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:i=h_,onPlay:l,startTime:r}=this.options;this.driver||(this.driver=i(f=>this.tick(f))),l&&l();const u=this.driver.now();this.holdTime!==null?this.startTime=u-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=u):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var i;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(i=this.currentTime)!==null&&i!==void 0?i:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:i}=this.options;i&&i()}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(i){return this.startTime=0,this.tick(i,!0)}}const g_=new Set(["opacity","clipPath","filter","transform"]);function v_(a,i,l,{delay:r=0,duration:u=300,repeat:f=0,repeatType:d="loop",ease:p="easeInOut",times:g}={}){const v={[i]:l};g&&(v.offset=g);const b=Z0(p,u);return Array.isArray(b)&&(v.easing=b),a.animate(v,{delay:r,duration:u,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:f+1,direction:d==="reverse"?"alternate":"normal"})}const y_=Cd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ir=10,b_=2e4;function S_(a){return Nd(a.type)||a.type==="spring"||!I0(a.ease)}function T_(a,i){const l=new Ud({...i,keyframes:a,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:a[0]};const u=[];let f=0;for(;!r.done&&f<b_;)r=l.sample(f),u.push(r.value),f+=ir;return{times:void 0,keyframes:u,duration:f-ir,ease:"linear"}}const Tv={anticipate:J0,backInOut:F0,circInOut:W0};function __(a){return a in Tv}class ug extends mv{constructor(i){super(i);const{name:l,motionValue:r,element:u,keyframes:f}=this.options;this.resolver=new hv(f,(d,p)=>this.onKeyframesResolved(d,p),l,r,u),this.resolver.scheduleResolve()}initPlayback(i,l){let{duration:r=300,times:u,ease:f,type:d,motionValue:p,name:g,startTime:v}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof f=="string"&&nr()&&__(f)&&(f=Tv[f]),S_(this.options)){const{onComplete:S,onUpdate:x,motionValue:D,element:w,...O}=this.options,q=T_(i,O);i=q.keyframes,i.length===1&&(i[1]=i[0]),r=q.duration,u=q.times,f=q.ease,d="keyframes"}const b=v_(p.owner.current,g,i,{...this.options,duration:r,times:u,ease:f});return b.startTime=v??this.calcStartTime(),this.pendingTimeline?($p(b,this.pendingTimeline),this.pendingTimeline=void 0):b.onfinish=()=>{const{onComplete:S}=this.options;p.set(hr(i,this.options,l)),S&&S(),this.cancel(),this.resolveFinishedPromise()},{animation:b,duration:r,times:u,type:d,ease:f,keyframes:i}}get duration(){const{resolved:i}=this;if(!i)return 0;const{duration:l}=i;return ia(l)}get time(){const{resolved:i}=this;if(!i)return 0;const{animation:l}=i;return ia(l.currentTime||0)}set time(i){const{resolved:l}=this;if(!l)return;const{animation:r}=l;r.currentTime=sa(i)}get speed(){const{resolved:i}=this;if(!i)return 1;const{animation:l}=i;return l.playbackRate}set speed(i){const{resolved:l}=this;if(!l)return;const{animation:r}=l;r.playbackRate=i}get state(){const{resolved:i}=this;if(!i)return"idle";const{animation:l}=i;return l.playState}get startTime(){const{resolved:i}=this;if(!i)return null;const{animation:l}=i;return l.startTime}attachTimeline(i){if(!this._resolved)this.pendingTimeline=i;else{const{resolved:l}=this;if(!l)return nn;const{animation:r}=l;$p(r,i)}return nn}play(){if(this.isStopped)return;const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:i}=this;if(!i)return;const{animation:l,keyframes:r,duration:u,type:f,ease:d,times:p}=i;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:v,onUpdate:b,onComplete:S,element:x,...D}=this.options,w=new Ud({...D,keyframes:r,duration:u,type:f,ease:d,times:p,isGenerator:!0}),O=sa(this.time);v.setWithVelocity(w.sample(O-ir).value,w.sample(O).value,ir)}const{onStop:g}=this.options;g&&g(),this.cancel()}complete(){const{resolved:i}=this;i&&i.animation.finish()}cancel(){const{resolved:i}=this;i&&i.animation.cancel()}static supports(i){const{motionValue:l,name:r,repeatDelay:u,repeatType:f,damping:d,type:p}=i;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:v}=l.owner.getProps();return y_()&&r&&g_.has(r)&&!g&&!v&&!u&&f!=="mirror"&&d!==0&&p!=="inertia"}}const x_={type:"spring",stiffness:500,damping:25,restSpeed:10},A_=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),j_={type:"keyframes",duration:.8},E_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},C_=(a,{keyframes:i})=>i.length>2?j_:ds.has(a)?a.startsWith("scale")?A_(i[1]):x_:E_;function N_({when:a,delay:i,delayChildren:l,staggerChildren:r,staggerDirection:u,repeat:f,repeatType:d,repeatDelay:p,from:g,elapsed:v,...b}){return!!Object.keys(b).length}const Vd=(a,i,l,r={},u,f)=>d=>{const p=xd(r,a)||{},g=p.delay||r.delay||0;let{elapsed:v=0}=r;v=v-sa(g);let b={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...p,delay:-v,onUpdate:x=>{i.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:a,motionValue:i,element:f?void 0:u};N_(p)||(b={...b,...C_(a,b)}),b.duration&&(b.duration=sa(b.duration)),b.repeatDelay&&(b.repeatDelay=sa(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(b.duration=0,b.delay===0&&(S=!0)),S&&!f&&i.get()!==void 0){const x=hr(b.keyframes,p);if(x!==void 0)return ae.update(()=>{b.onUpdate(x),b.onComplete()}),new lT([])}return!f&&ug.supports(b)?new ug(b):new Ud(b)};function D_({protectedKeys:a,needsAnimating:i},l){const r=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,r}function _v(a,i,{delay:l=0,transitionOverride:r,type:u}={}){var f;let{transition:d=a.getDefaultTransition(),transitionEnd:p,...g}=i;r&&(d=r);const v=[],b=u&&a.animationState&&a.animationState.getState()[u];for(const S in g){const x=a.getValue(S,(f=a.latestValues[S])!==null&&f!==void 0?f:null),D=g[S];if(D===void 0||b&&D_(b,S))continue;const w={delay:l,...xd(d||{},S)};let O=!1;if(window.MotionHandoffAnimation){const B=q0(a);if(B){const X=window.MotionHandoffAnimation(B,S,ae);X!==null&&(w.startTime=X,O=!0)}}qu(a,S),x.start(Vd(S,x,D,a.shouldReduceMotion&&H0.has(S)?{type:!1}:w,a,O));const q=x.animation;q&&v.push(q)}return p&&Promise.all(v).then(()=>{ae.update(()=>{p&&nT(a,p)})}),v}function Ju(a,i,l={}){var r;const u=fr(a,i,l.type==="exit"?(r=a.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:f=a.getDefaultTransition()||{}}=u||{};l.transitionOverride&&(f=l.transitionOverride);const d=u?()=>Promise.all(_v(a,u,l)):()=>Promise.resolve(),p=a.variantChildren&&a.variantChildren.size?(v=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:x}=f;return k_(a,i,b+v,S,x,l)}:()=>Promise.resolve(),{when:g}=f;if(g){const[v,b]=g==="beforeChildren"?[d,p]:[p,d];return v().then(()=>b())}else return Promise.all([d(),p(l.delay)])}function k_(a,i,l=0,r=0,u=1,f){const d=[],p=(a.variantChildren.size-1)*r,g=u===1?(v=0)=>v*r:(v=0)=>p-v*r;return Array.from(a.variantChildren).sort(w_).forEach((v,b)=>{v.notify("AnimationStart",i),d.push(Ju(v,i,{...f,delay:l+g(b)}).then(()=>v.notify("AnimationComplete",i)))}),Promise.all(d)}function w_(a,i){return a.sortNodePosition(i)}function M_(a,i,l={}){a.notify("AnimationStart",i);let r;if(Array.isArray(i)){const u=i.map(f=>Ju(a,f,l));r=Promise.all(u)}else if(typeof i=="string")r=Ju(a,i,l);else{const u=typeof i=="function"?fr(a,i,l.custom):i;r=Promise.all(_v(a,u,l))}return r.then(()=>{a.notify("AnimationComplete",i)})}const O_=dd.length;function xv(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?xv(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<O_;l++){const r=dd[l],u=a.props[r];(Sl(u)||u===!1)&&(i[r]=u)}return i}const R_=[...ud].reverse(),B_=ud.length;function z_(a){return i=>Promise.all(i.map(({animation:l,options:r})=>M_(a,l,r)))}function U_(a){let i=z_(a),l=dg(),r=!0;const u=g=>(v,b)=>{var S;const x=fr(a,b,g==="exit"?(S=a.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(x){const{transition:D,transitionEnd:w,...O}=x;v={...v,...O,...w}}return v};function f(g){i=g(a)}function d(g){const{props:v}=a,b=xv(a.parent)||{},S=[],x=new Set;let D={},w=1/0;for(let q=0;q<B_;q++){const B=R_[q],X=l[B],R=v[B]!==void 0?v[B]:b[B],K=Sl(R),G=B===g?X.isActive:null;G===!1&&(w=q);let Q=R===b[B]&&R!==v[B]&&K;if(Q&&r&&a.manuallyAnimateOnMount&&(Q=!1),X.protectedKeys={...D},!X.isActive&&G===null||!R&&!X.prevProp||ur(R)||typeof R=="boolean")continue;const W=V_(X.prevProp,R);let V=W||B===g&&X.isActive&&!Q&&K||q>w&&K,F=!1;const rt=Array.isArray(R)?R:[R];let mt=rt.reduce(u(B),{});G===!1&&(mt={});const{prevResolvedValues:Et={}}=X,P={...Et,...mt},Lt=Z=>{V=!0,x.has(Z)&&(F=!0,x.delete(Z)),X.needsAnimating[Z]=!0;const at=a.getValue(Z);at&&(at.liveStyle=!1)};for(const Z in P){const at=mt[Z],tt=Et[Z];if(D.hasOwnProperty(Z))continue;let jt=!1;Gu(at)&&Gu(tt)?jt=!L0(at,tt):jt=at!==tt,jt?at!=null?Lt(Z):x.add(Z):at!==void 0&&x.has(Z)?Lt(Z):X.protectedKeys[Z]=!0}X.prevProp=R,X.prevResolvedValues=mt,X.isActive&&(D={...D,...mt}),r&&a.blockInitialAnimation&&(V=!1),V&&(!(Q&&W)||F)&&S.push(...rt.map(Z=>({animation:Z,options:{type:B}})))}if(x.size){const q={};x.forEach(B=>{const X=a.getBaseTarget(B),R=a.getValue(B);R&&(R.liveStyle=!0),q[B]=X??null}),S.push({animation:q})}let O=!!S.length;return r&&(v.initial===!1||v.initial===v.animate)&&!a.manuallyAnimateOnMount&&(O=!1),r=!1,O?i(S):Promise.resolve()}function p(g,v){var b;if(l[g].isActive===v)return Promise.resolve();(b=a.variantChildren)===null||b===void 0||b.forEach(x=>{var D;return(D=x.animationState)===null||D===void 0?void 0:D.setActive(g,v)}),l[g].isActive=v;const S=d(g);for(const x in l)l[x].protectedKeys={};return S}return{animateChanges:d,setActive:p,setAnimateFunction:f,getState:()=>l,reset:()=>{l=dg(),r=!0}}}function V_(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!L0(i,a):!1}function is(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dg(){return{animate:is(!0),whileInView:is(),whileHover:is(),whileTap:is(),whileDrag:is(),whileFocus:is(),exit:is()}}class Va{constructor(i){this.isMounted=!1,this.node=i}update(){}}class L_ extends Va{constructor(i){super(i),i.animationState||(i.animationState=U_(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();ur(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)===null||i===void 0||i.call(this)}}let H_=0;class G_ extends Va{constructor(){super(...arguments),this.id=H_++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===r)return;const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>l(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const q_={animation:{Feature:L_},exit:{Feature:G_}},jn={x:!1,y:!1};function Av(){return jn.x||jn.y}function Y_(a){return a==="x"||a==="y"?jn[a]?null:(jn[a]=!0,()=>{jn[a]=!1}):jn.x||jn.y?null:(jn.x=jn.y=!0,()=>{jn.x=jn.y=!1})}const Ld=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function Al(a,i,l,r={passive:!0}){return a.addEventListener(i,l,r),()=>a.removeEventListener(i,l)}function Nl(a){return{point:{x:a.pageX,y:a.pageY}}}const I_=a=>i=>Ld(i)&&a(i,Nl(i));function vl(a,i,l,r){return Al(a,i,I_(l),r)}const fg=(a,i)=>Math.abs(a-i);function Z_(a,i){const l=fg(a.x,i.x),r=fg(a.y,i.y);return Math.sqrt(l**2+r**2)}class jv{constructor(i,l,{transformPagePoint:r,contextWindow:u,dragSnapToOrigin:f=!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 S=wu(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,D=Z_(S.offset,{x:0,y:0})>=3;if(!x&&!D)return;const{point:w}=S,{timestamp:O}=Be;this.history.push({...w,timestamp:O});const{onStart:q,onMove:B}=this.handlers;x||(q&&q(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),B&&B(this.lastMoveEvent,S)},this.handlePointerMove=(S,x)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=ku(x,this.transformPagePoint),ae.update(this.updatePoint,!0)},this.handlePointerUp=(S,x)=>{this.end();const{onEnd:D,onSessionEnd:w,resumeAnimation:O}=this.handlers;if(this.dragSnapToOrigin&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const q=wu(S.type==="pointercancel"?this.lastMoveEventInfo:ku(x,this.transformPagePoint),this.history);this.startEvent&&D&&D(S,q),w&&w(S,q)},!Ld(i))return;this.dragSnapToOrigin=f,this.handlers=l,this.transformPagePoint=r,this.contextWindow=u||window;const d=Nl(i),p=ku(d,this.transformPagePoint),{point:g}=p,{timestamp:v}=Be;this.history=[{...g,timestamp:v}];const{onSessionStart:b}=l;b&&b(i,wu(p,this.history)),this.removeListeners=Cl(vl(this.contextWindow,"pointermove",this.handlePointerMove),vl(this.contextWindow,"pointerup",this.handlePointerUp),vl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),za(this.updatePoint)}}function ku(a,i){return i?{point:i(a.point)}:a}function hg(a,i){return{x:a.x-i.x,y:a.y-i.y}}function wu({point:a},i){return{point:a,delta:hg(a,Ev(i)),offset:hg(a,X_(i)),velocity:K_(i,.1)}}function X_(a){return a[0]}function Ev(a){return a[a.length-1]}function K_(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,r=null;const u=Ev(a);for(;l>=0&&(r=a[l],!(u.timestamp-r.timestamp>sa(i)));)l--;if(!r)return{x:0,y:0};const f=ia(u.timestamp-r.timestamp);if(f===0)return{x:0,y:0};const d={x:(u.x-r.x)/f,y:(u.y-r.y)/f};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const Cv=1e-4,Q_=1-Cv,P_=1+Cv,Nv=.01,F_=0-Nv,J_=0+Nv;function sn(a){return a.max-a.min}function $_(a,i,l){return Math.abs(a-i)<=l}function mg(a,i,l,r=.5){a.origin=r,a.originPoint=oe(i.min,i.max,a.origin),a.scale=sn(l)/sn(i),a.translate=oe(l.min,l.max,a.origin)-a.originPoint,(a.scale>=Q_&&a.scale<=P_||isNaN(a.scale))&&(a.scale=1),(a.translate>=F_&&a.translate<=J_||isNaN(a.translate))&&(a.translate=0)}function yl(a,i,l,r){mg(a.x,i.x,l.x,r?r.originX:void 0),mg(a.y,i.y,l.y,r?r.originY:void 0)}function pg(a,i,l){a.min=l.min+i.min,a.max=a.min+sn(i)}function W_(a,i,l){pg(a.x,i.x,l.x),pg(a.y,i.y,l.y)}function gg(a,i,l){a.min=i.min-l.min,a.max=a.min+sn(i)}function bl(a,i,l){gg(a.x,i.x,l.x),gg(a.y,i.y,l.y)}function tx(a,{min:i,max:l},r){return i!==void 0&&a<i?a=r?oe(i,a,r.min):Math.max(a,i):l!==void 0&&a>l&&(a=r?oe(l,a,r.max):Math.min(a,l)),a}function vg(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function ex(a,{top:i,left:l,bottom:r,right:u}){return{x:vg(a.x,l,u),y:vg(a.y,i,r)}}function yg(a,i){let l=i.min-a.min,r=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,r]=[r,l]),{min:l,max:r}}function nx(a,i){return{x:yg(a.x,i.x),y:yg(a.y,i.y)}}function ax(a,i){let l=.5;const r=sn(a),u=sn(i);return u>r?l=oi(i.min,i.max-r,a.min):r>u&&(l=oi(a.min,a.max-u,i.min)),la(0,1,l)}function sx(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const $u=.35;function ix(a=$u){return a===!1?a=0:a===!0&&(a=$u),{x:bg(a,"left","right"),y:bg(a,"top","bottom")}}function bg(a,i,l){return{min:Sg(a,i),max:Sg(a,l)}}function Sg(a,i){return typeof a=="number"?a:a[i]||0}const Tg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ai=()=>({x:Tg(),y:Tg()}),_g=()=>({min:0,max:0}),ve=()=>({x:_g(),y:_g()});function yn(a){return[a("x"),a("y")]}function Dv({top:a,left:i,right:l,bottom:r}){return{x:{min:i,max:l},y:{min:a,max:r}}}function lx({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function ox(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),r=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:r.y,right:r.x}}function Mu(a){return a===void 0||a===1}function Wu({scale:a,scaleX:i,scaleY:l}){return!Mu(a)||!Mu(i)||!Mu(l)}function os(a){return Wu(a)||kv(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function kv(a){return xg(a.x)||xg(a.y)}function xg(a){return a&&a!=="0%"}function lr(a,i,l){const r=a-l,u=i*r;return l+u}function Ag(a,i,l,r,u){return u!==void 0&&(a=lr(a,u,r)),lr(a,l,r)+i}function td(a,i=0,l=1,r,u){a.min=Ag(a.min,i,l,r,u),a.max=Ag(a.max,i,l,r,u)}function wv(a,{x:i,y:l}){td(a.x,i.translate,i.scale,i.originPoint),td(a.y,l.translate,l.scale,l.originPoint)}const jg=.999999999999,Eg=1.0000000000001;function rx(a,i,l,r=!1){const u=l.length;if(!u)return;i.x=i.y=1;let f,d;for(let p=0;p<u;p++){f=l[p],d=f.projectionDelta;const{visualElement:g}=f.options;g&&g.props.style&&g.props.style.display==="contents"||(r&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ii(a,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),d&&(i.x*=d.x.scale,i.y*=d.y.scale,wv(a,d)),r&&os(f.latestValues)&&ii(a,f.latestValues))}i.x<Eg&&i.x>jg&&(i.x=1),i.y<Eg&&i.y>jg&&(i.y=1)}function si(a,i){a.min=a.min+i,a.max=a.max+i}function Cg(a,i,l,r,u=.5){const f=oe(a.min,a.max,u);td(a,i,l,f,r)}function ii(a,i){Cg(a.x,i.x,i.scaleX,i.scale,i.originX),Cg(a.y,i.y,i.scaleY,i.scale,i.originY)}function Mv(a,i){return Dv(ox(a.getBoundingClientRect(),i))}function cx(a,i,l){const r=Mv(a,l),{scroll:u}=i;return u&&(si(r.x,u.offset.x),si(r.y,u.offset.y)),r}const Ov=({current:a})=>a?a.ownerDocument.defaultView:null,ux=new WeakMap;class dx{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ve(),this.visualElement=i}start(i,{snapToCursor:l=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const u=b=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(Nl(b).point)},f=(b,S)=>{const{drag:x,dragPropagation:D,onDragStart:w}=this.getProps();if(x&&!D&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Y_(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yn(q=>{let B=this.getAxisMotionValue(q).get()||0;if(zn.test(B)){const{projection:X}=this.visualElement;if(X&&X.layout){const R=X.layout.layoutBox[q];R&&(B=sn(R)*(parseFloat(B)/100))}}this.originPoint[q]=B}),w&&ae.postRender(()=>w(b,S)),qu(this.visualElement,"transform");const{animationState:O}=this.visualElement;O&&O.setActive("whileDrag",!0)},d=(b,S)=>{const{dragPropagation:x,dragDirectionLock:D,onDirectionLock:w,onDrag:O}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:q}=S;if(D&&this.currentDirection===null){this.currentDirection=fx(q),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",S.point,q),this.updateAxis("y",S.point,q),this.visualElement.render(),O&&O(b,S)},p=(b,S)=>this.stop(b,S),g=()=>yn(b=>{var S;return this.getAnimationState(b)==="paused"&&((S=this.getAxisMotionValue(b).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:v}=this.getProps();this.panSession=new jv(i,{onSessionStart:u,onStart:f,onMove:d,onSessionEnd:p,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,contextWindow:Ov(this.visualElement)})}stop(i,l){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:u}=l;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&ae.postRender(()=>f(i,l))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(i,l,r){const{drag:u}=this.getProps();if(!r||!Po(i,u,this.currentDirection))return;const f=this.getAxisMotionValue(i);let d=this.originPoint[i]+r[i];this.constraints&&this.constraints[i]&&(d=tx(d,this.constraints[i],this.elastic[i])),f.set(d)}resolveConstraints(){var i;const{dragConstraints:l,dragElastic:r}=this.getProps(),u=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)===null||i===void 0?void 0:i.layout,f=this.constraints;l&&ei(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&u?this.constraints=ex(u.layoutBox,l):this.constraints=!1,this.elastic=ix(r),f!==this.constraints&&u&&this.constraints&&!this.hasMutatedConstraints&&yn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=sx(u.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!ei(i))return!1;const r=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const f=cx(r,u.root,this.visualElement.getTransformPagePoint());let d=nx(u.layout.layoutBox,f);if(l){const p=l(lx(d));this.hasMutatedConstraints=!!p,p&&(d=Dv(p))}return d}startAnimation(i){const{drag:l,dragMomentum:r,dragElastic:u,dragTransition:f,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),g=this.constraints||{},v=yn(b=>{if(!Po(b,l,this.currentDirection))return;let S=g&&g[b]||{};d&&(S={min:0,max:0});const x=u?200:1e6,D=u?40:1e7,w={type:"inertia",velocity:r?i[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...f,...S};return this.startAxisValueAnimation(b,w)});return Promise.all(v).then(p)}startAxisValueAnimation(i,l){const r=this.getAxisMotionValue(i);return qu(this.visualElement,i),r.start(Vd(i,r,0,l,this.visualElement,!1))}stopAnimation(){yn(i=>this.getAxisMotionValue(i).stop())}pauseAnimation(){yn(i=>{var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(i){var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,r=this.visualElement.getProps(),u=r[l];return u||this.visualElement.getValue(i,(r.initial?r.initial[i]:void 0)||0)}snapToCursor(i){yn(l=>{const{drag:r}=this.getProps();if(!Po(l,r,this.currentDirection))return;const{projection:u}=this.visualElement,f=this.getAxisMotionValue(l);if(u&&u.layout){const{min:d,max:p}=u.layout.layoutBox[l];f.set(i[l]-oe(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:r}=this.visualElement;if(!ei(l)||!r||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};yn(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const g=p.get();u[d]=ax({min:g,max:g},this.constraints[d])}});const{transformTemplate:f}=this.visualElement.getProps();this.visualElement.current.style.transform=f?f({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yn(d=>{if(!Po(d,i,null))return;const p=this.getAxisMotionValue(d),{min:g,max:v}=this.constraints[d];p.set(oe(g,v,u[d]))})}addListeners(){if(!this.visualElement.current)return;ux.set(this.visualElement,this);const i=this.visualElement.current,l=vl(i,"pointerdown",g=>{const{drag:v,dragListener:b=!0}=this.getProps();v&&b&&this.start(g)}),r=()=>{const{dragConstraints:g}=this.getProps();ei(g)&&g.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,f=u.addEventListener("measure",r);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),ae.read(r);const d=Al(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:v})=>{this.isDragging&&v&&(yn(b=>{const S=this.getAxisMotionValue(b);S&&(this.originPoint[b]+=g[b].translate,S.set(S.get()+g[b].translate))}),this.visualElement.render())}));return()=>{d(),l(),f(),p&&p()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:r=!1,dragPropagation:u=!1,dragConstraints:f=!1,dragElastic:d=$u,dragMomentum:p=!0}=i;return{...i,drag:l,dragDirectionLock:r,dragPropagation:u,dragConstraints:f,dragElastic:d,dragMomentum:p}}}function Po(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function fx(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class hx extends Va{constructor(i){super(i),this.removeGroupControls=nn,this.removeListeners=nn,this.controls=new dx(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ng=a=>(i,l)=>{a&&ae.postRender(()=>a(i,l))};class mx extends Va{constructor(){super(...arguments),this.removePointerDownListener=nn}onPointerDown(i){this.session=new jv(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ov(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:Ng(i),onStart:Ng(l),onMove:r,onEnd:(f,d)=>{delete this.session,u&&ae.postRender(()=>u(f,d))}}}mount(){this.removePointerDownListener=vl(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Wo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Dg(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const ul={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(yt.test(a))a=parseFloat(a);else return a;const l=Dg(a,i.target.x),r=Dg(a,i.target.y);return`${l}% ${r}%`}},px={correct:(a,{treeScale:i,projectionDelta:l})=>{const r=a,u=Ua.parse(a);if(u.length>5)return r;const f=Ua.createTransformer(a),d=typeof u[0]!="number"?1:0,p=l.x.scale*i.x,g=l.y.scale*i.y;u[0+d]/=p,u[1+d]/=g;const v=oe(p,g,.5);return typeof u[2+d]=="number"&&(u[2+d]/=v),typeof u[3+d]=="number"&&(u[3+d]/=v),f(u)}};class gx extends T.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r,layoutId:u}=this.props,{projection:f}=i;q1(vx),f&&(l.group&&l.group.add(f),r&&r.register&&u&&r.register(f),f.root.didUpdate(),f.addEventListener("animationComplete",()=>{this.safeToRemove()}),f.setOptions({...f.options,onExitComplete:()=>this.safeToRemove()})),Wo.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:r,drag:u,isPresent:f}=this.props,d=r.projection;return d&&(d.isPresent=f,u||i.layoutDependency!==l||l===void 0?d.willUpdate():this.safeToRemove(),i.isPresent!==f&&(f?d.promote():d.relegate()||ae.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:i}=this.props.visualElement;i&&(i.root.didUpdate(),hd.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r}=this.props,{projection:u}=i;u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function Rv(a){const[i,l]=y0(),r=T.useContext(ld);return m.jsx(gx,{...a,layoutGroup:r,switchLayoutGroup:T.useContext(E0),isPresent:i,safeToRemove:l})}const vx={borderRadius:{...ul,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ul,borderTopRightRadius:ul,borderBottomLeftRadius:ul,borderBottomRightRadius:ul,boxShadow:px};function yx(a,i,l){const r=Ue(a)?a:_l(a);return r.start(Vd("",r,i,l)),r.animation}function bx(a){return a instanceof SVGElement&&a.tagName!=="svg"}const Sx=(a,i)=>a.depth-i.depth;class Tx{constructor(){this.children=[],this.isDirty=!1}add(i){Ad(this.children,i),this.isDirty=!0}remove(i){jd(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(Sx),this.isDirty=!1,this.children.forEach(i)}}function _x(a,i){const l=Un.now(),r=({timestamp:u})=>{const f=u-l;f>=i&&(za(r),a(f-i))};return ae.read(r,!0),()=>za(r)}const Bv=["TopLeft","TopRight","BottomLeft","BottomRight"],xx=Bv.length,kg=a=>typeof a=="string"?parseFloat(a):a,wg=a=>typeof a=="number"||yt.test(a);function Ax(a,i,l,r,u,f){u?(a.opacity=oe(0,l.opacity!==void 0?l.opacity:1,jx(r)),a.opacityExit=oe(i.opacity!==void 0?i.opacity:1,0,Ex(r))):f&&(a.opacity=oe(i.opacity!==void 0?i.opacity:1,l.opacity!==void 0?l.opacity:1,r));for(let d=0;d<xx;d++){const p=`border${Bv[d]}Radius`;let g=Mg(i,p),v=Mg(l,p);if(g===void 0&&v===void 0)continue;g||(g=0),v||(v=0),g===0||v===0||wg(g)===wg(v)?(a[p]=Math.max(oe(kg(g),kg(v),r),0),(zn.test(v)||zn.test(g))&&(a[p]+="%")):a[p]=v}(i.rotate||l.rotate)&&(a.rotate=oe(i.rotate||0,l.rotate||0,r))}function Mg(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const jx=zv(0,.5,$0),Ex=zv(.5,.95,nn);function zv(a,i,l){return r=>r<a?0:r>i?1:l(oi(a,i,r))}function Og(a,i){a.min=i.min,a.max=i.max}function vn(a,i){Og(a.x,i.x),Og(a.y,i.y)}function Rg(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}function Bg(a,i,l,r,u){return a-=i,a=lr(a,1/l,r),u!==void 0&&(a=lr(a,1/u,r)),a}function Cx(a,i=0,l=1,r=.5,u,f=a,d=a){if(zn.test(i)&&(i=parseFloat(i),i=oe(d.min,d.max,i/100)-d.min),typeof i!="number")return;let p=oe(f.min,f.max,r);a===f&&(p-=i),a.min=Bg(a.min,i,l,p,u),a.max=Bg(a.max,i,l,p,u)}function zg(a,i,[l,r,u],f,d){Cx(a,i[l],i[r],i[u],i.scale,f,d)}const Nx=["x","scaleX","originX"],Dx=["y","scaleY","originY"];function Ug(a,i,l,r){zg(a.x,i,Nx,l?l.x:void 0,r?r.x:void 0),zg(a.y,i,Dx,l?l.y:void 0,r?r.y:void 0)}function Vg(a){return a.translate===0&&a.scale===1}function Uv(a){return Vg(a.x)&&Vg(a.y)}function Lg(a,i){return a.min===i.min&&a.max===i.max}function kx(a,i){return Lg(a.x,i.x)&&Lg(a.y,i.y)}function Hg(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function Vv(a,i){return Hg(a.x,i.x)&&Hg(a.y,i.y)}function Gg(a){return sn(a.x)/sn(a.y)}function qg(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}class wx{constructor(){this.members=[]}add(i){Ad(this.members,i),i.scheduleRender()}remove(i){if(jd(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){const l=this.members.findIndex(u=>i===u);if(l===0)return!1;let r;for(let u=l;u>=0;u--){const f=this.members[u];if(f.isPresent!==!1){r=f;break}}return r?(this.promote(r),!0):!1}promote(i,l){const r=this.lead;if(i!==r&&(this.prevLead=r,this.lead=i,i.show(),r)){r.instance&&r.scheduleRender(),i.scheduleRender(),i.resumeFrom=r,l&&(i.resumeFrom.preserveOpacity=!0),r.snapshot&&(i.snapshot=r.snapshot,i.snapshot.latestValues=r.animationValues||r.latestValues),i.root&&i.root.isUpdating&&(i.isLayoutDirty=!0);const{crossfade:u}=i.options;u===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(i=>{const{options:l,resumingFrom:r}=i;l.onExitComplete&&l.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(i=>{i.instance&&i.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Mx(a,i,l){let r="";const u=a.x.translate/i.x,f=a.y.translate/i.y,d=(l==null?void 0:l.z)||0;if((u||f||d)&&(r=`translate3d(${u}px, ${f}px, ${d}px) `),(i.x!==1||i.y!==1)&&(r+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:v,rotate:b,rotateX:S,rotateY:x,skewX:D,skewY:w}=l;v&&(r=`perspective(${v}px) ${r}`),b&&(r+=`rotate(${b}deg) `),S&&(r+=`rotateX(${S}deg) `),x&&(r+=`rotateY(${x}deg) `),D&&(r+=`skewX(${D}deg) `),w&&(r+=`skewY(${w}deg) `)}const p=a.x.scale*i.x,g=a.y.scale*i.y;return(p!==1||g!==1)&&(r+=`scale(${p}, ${g})`),r||"none"}const rs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},hl=typeof window<"u"&&window.MotionDebug!==void 0,Ou=["","X","Y","Z"],Ox={visibility:"hidden"},Yg=1e3;let Rx=0;function Ru(a,i,l,r){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),r&&(r[a]=0))}function Lv(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=q0(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:f}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",ae,!(u||f))}const{parent:r}=a;r&&!r.hasCheckedOptimisedAppear&&Lv(r)}function Hv({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(d={},p=i==null?void 0:i()){this.id=Rx++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,hl&&(rs.totalNodes=rs.resolvedTargetDeltas=rs.recalculatedProjection=0),this.nodes.forEach(Ux),this.nodes.forEach(qx),this.nodes.forEach(Yx),this.nodes.forEach(Vx),hl&&window.MotionDebug.record(rs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new Tx)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new Ed),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const g=this.eventHandlers.get(d);g&&g.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=bx(d),this.instance=d;const{layoutId:g,layout:v,visualElement:b}=this.options;if(b&&!b.current&&b.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(v||g)&&(this.isLayoutDirty=!0),a){let S;const x=()=>this.root.updateBlockedByResize=!1;a(d,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=_x(x,250),Wo.hasAnimatedSinceResize&&(Wo.hasAnimatedSinceResize=!1,this.nodes.forEach(Zg))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&b&&(g||v)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:x,hasRelativeTargetChanged:D,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=this.options.transition||b.getDefaultTransition()||Qx,{onLayoutAnimationStart:q,onLayoutAnimationComplete:B}=b.getProps(),X=!this.targetLayout||!Vv(this.targetLayout,w)||D,R=!x&&D;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||x&&(X||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,R);const K={...xd(O,"layout"),onPlay:q,onComplete:B};(b.shouldReduceMotion||this.options.layoutRoot)&&(K.delay=0,K.type=!1),this.startAnimation(K)}else x||Zg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}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,za(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(Ix),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&&Lv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:p,layout:g}=this.options;if(p===void 0&&!g)return;const v=this.getTransformTemplate();this.prevTransformTemplateValue=v?v(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ig);return}this.isUpdating||this.nodes.forEach(Hx),this.isUpdating=!1,this.nodes.forEach(Gx),this.nodes.forEach(Bx),this.nodes.forEach(zx),this.clearAllSnapshots();const p=Un.now();Be.delta=la(0,1e3/60,p-Be.timestamp),Be.timestamp=p,Be.isProcessing=!0,ju.update.process(Be),ju.preRender.process(Be),ju.render.process(Be),Be.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Lx),this.sharedNodes.forEach(Zx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ae.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 g=0;g<this.path.length;g++)this.path[g].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ve(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(p=!1),p){const g=r(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:g,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!u)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!Uv(this.projectionDelta),g=this.getTransformTemplate(),v=g?g(this.latestValues,""):void 0,b=v!==this.prevTransformTemplateValue;d&&(p||os(this.latestValues)||b)&&(u(this.instance,v),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let g=this.removeElementScroll(p);return d&&(g=this.removeTransform(g)),Px(g),{animationId:this.root.animationId,measuredBox:p,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:p}=this.options;if(!p)return ve();const g=p.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(Fx))){const{scroll:b}=this.root;b&&(si(g.x,b.offset.x),si(g.y,b.offset.y))}return g}removeElementScroll(d){var p;const g=ve();if(vn(g,d),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return g;for(let v=0;v<this.path.length;v++){const b=this.path[v],{scroll:S,options:x}=b;b!==this.root&&S&&x.layoutScroll&&(S.wasRoot&&vn(g,d),si(g.x,S.offset.x),si(g.y,S.offset.y))}return g}applyTransform(d,p=!1){const g=ve();vn(g,d);for(let v=0;v<this.path.length;v++){const b=this.path[v];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&ii(g,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),os(b.latestValues)&&ii(g,b.latestValues)}return os(this.latestValues)&&ii(g,this.latestValues),g}removeTransform(d){const p=ve();vn(p,d);for(let g=0;g<this.path.length;g++){const v=this.path[g];if(!v.instance||!os(v.latestValues))continue;Wu(v.latestValues)&&v.updateSnapshot();const b=ve(),S=v.measurePageBox();vn(b,S),Ug(p,v.latestValues,v.snapshot?v.snapshot.layoutBox:void 0,b)}return os(this.latestValues)&&Ug(p,this.latestValues),p}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!==Be.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var p;const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const v=!!this.resumingFrom||this!==g;if(!(d||v&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:x}=this.options;if(!(!this.layout||!(S||x))){if(this.resolvedRelativeTargetAt=Be.timestamp,!this.targetDelta&&!this.relativeTarget){const D=this.getClosestProjectingParent();D&&D.layout&&this.animationProgress!==1?(this.relativeParent=D,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ve(),this.relativeTargetOrigin=ve(),bl(this.relativeTargetOrigin,this.layout.layoutBox,D.layout.layoutBox),vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ve(),this.targetWithTransforms=ve()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),W_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vn(this.target,this.layout.layoutBox),wv(this.target,this.targetDelta)):vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const D=this.getClosestProjectingParent();D&&!!D.resumingFrom==!!this.resumingFrom&&!D.options.layoutScroll&&D.target&&this.animationProgress!==1?(this.relativeParent=D,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ve(),this.relativeTargetOrigin=ve(),bl(this.relativeTargetOrigin,this.target,D.target),vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}hl&&rs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Wu(this.parent.latestValues)||kv(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 p=this.getLead(),g=!!this.resumingFrom||this!==p;let v=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(v=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===Be.timestamp&&(v=!1),v)return;const{layout:b,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(b||S))return;vn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,D=this.treeScale.y;rx(this.layoutCorrected,this.treeScale,this.path,g),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=ve());const{target:w}=p;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Rg(this.prevProjectionDelta.x,this.projectionDelta.x),Rg(this.prevProjectionDelta.y,this.projectionDelta.y)),yl(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==D||!qg(this.projectionDelta.x,this.prevProjectionDelta.x)||!qg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),hl&&rs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),d){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ai(),this.projectionDelta=ai(),this.projectionDeltaWithTransform=ai()}setAnimationOrigin(d,p=!1){const g=this.snapshot,v=g?g.latestValues:{},b={...this.latestValues},S=ai();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=ve(),D=g?g.source:void 0,w=this.layout?this.layout.source:void 0,O=D!==w,q=this.getStack(),B=!q||q.members.length<=1,X=!!(O&&!B&&this.options.crossfade===!0&&!this.path.some(Kx));this.animationProgress=0;let R;this.mixTargetDelta=K=>{const G=K/1e3;Xg(S.x,d.x,G),Xg(S.y,d.y,G),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bl(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xx(this.relativeTarget,this.relativeTargetOrigin,x,G),R&&kx(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=ve()),vn(R,this.relativeTarget)),O&&(this.animationValues=b,Ax(b,v,this.latestValues,G,X,B)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=G},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&&(za(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ae.update(()=>{Wo.hasAnimatedSinceResize=!0,this.currentAnimation=yx(0,Yg,{...d,onUpdate:p=>{this.mixTargetDelta(p),d.onUpdate&&d.onUpdate(p)},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(Yg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:g,layout:v,latestValues:b}=d;if(!(!p||!g||!v)){if(this!==d&&this.layout&&v&&Gv(this.options.animationType,this.layout.layoutBox,v.layoutBox)){g=this.target||ve();const S=sn(this.layout.layoutBox.x);g.x.min=d.target.x.min,g.x.max=g.x.min+S;const x=sn(this.layout.layoutBox.y);g.y.min=d.target.y.min,g.y.max=g.y.min+x}vn(p,g),ii(p,b),yl(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new wx),this.sharedNodes.get(d).add(p);const v=p.options.initialPromotionConfig;p.promote({transition:v?v.transition:void 0,preserveFollowOpacity:v&&v.shouldPreserveFollowOpacity?v.shouldPreserveFollowOpacity(p):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:p}=this.options;return p?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:p}=this.options;return p?(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:p,preserveFollowOpacity:g}={}){const v=this.getStack();v&&v.promote(this,g),d&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let p=!1;const{latestValues:g}=d;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(p=!0),!p)return;const v={};g.z&&Ru("z",d,v,this.animationValues);for(let b=0;b<Ou.length;b++)Ru(`rotate${Ou[b]}`,d,v,this.animationValues),Ru(`skew${Ou[b]}`,d,v,this.animationValues);d.render();for(const b in v)d.setStaticValue(b,v[b]),this.animationValues&&(this.animationValues[b]=v[b]);d.scheduleRender()}getProjectionStyles(d){var p,g;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ox;const v={visibility:""},b=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Jo(d==null?void 0:d.pointerEvents)||"",v.transform=b?b(this.latestValues,""):"none",v;const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){const O={};return this.options.layoutId&&(O.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,O.pointerEvents=Jo(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!os(this.latestValues)&&(O.transform=b?b({},""):"none",this.hasProjected=!1),O}const x=S.animationValues||S.latestValues;this.applyTransformsToTarget(),v.transform=Mx(this.projectionDeltaWithTransform,this.treeScale,x),b&&(v.transform=b(x,v.transform));const{x:D,y:w}=this.projectionDelta;v.transformOrigin=`${D.origin*100}% ${w.origin*100}% 0`,S.animationValues?v.opacity=S===this?(g=(p=x.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&g!==void 0?g:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:v.opacity=S===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const O in er){if(x[O]===void 0)continue;const{correct:q,applyTo:B}=er[O],X=v.transform==="none"?x[O]:q(x[O],S);if(B){const R=B.length;for(let K=0;K<R;K++)v[B[K]]=X}else v[O]=X}return this.options.layoutId&&(v.pointerEvents=S===this?Jo(d==null?void 0:d.pointerEvents)||"":"none"),v}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var p;return(p=d.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Ig),this.root.sharedNodes.clear()}}}function Bx(a){a.updateLayout()}function zx(a){var i;const l=((i=a.resumeFrom)===null||i===void 0?void 0:i.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&l&&a.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:u}=a.layout,{animationType:f}=a.options,d=l.source!==a.layout.source;f==="size"?yn(S=>{const x=d?l.measuredBox[S]:l.layoutBox[S],D=sn(x);x.min=r[S].min,x.max=x.min+D}):Gv(f,l.layoutBox,r)&&yn(S=>{const x=d?l.measuredBox[S]:l.layoutBox[S],D=sn(r[S]);x.max=x.min+D,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+D)});const p=ai();yl(p,r,l.layoutBox);const g=ai();d?yl(g,a.applyTransform(u,!0),l.measuredBox):yl(g,r,l.layoutBox);const v=!Uv(p);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:x,layout:D}=S;if(x&&D){const w=ve();bl(w,l.layoutBox,x.layoutBox);const O=ve();bl(O,r,D.layoutBox),Vv(w,O)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=O,a.relativeTargetOrigin=w,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:r,snapshot:l,delta:g,layoutDelta:p,hasLayoutChanged:v,hasRelativeTargetChanged:b})}else if(a.isLead()){const{onExitComplete:r}=a.options;r&&r()}a.options.transition=void 0}function Ux(a){hl&&rs.totalNodes++,a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function Vx(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function Lx(a){a.clearSnapshot()}function Ig(a){a.clearMeasurements()}function Hx(a){a.isLayoutDirty=!1}function Gx(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function Zg(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function qx(a){a.resolveTargetDelta()}function Yx(a){a.calcProjection()}function Ix(a){a.resetSkewAndRotation()}function Zx(a){a.removeLeadSnapshot()}function Xg(a,i,l){a.translate=oe(i.translate,0,l),a.scale=oe(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function Kg(a,i,l,r){a.min=oe(i.min,l.min,r),a.max=oe(i.max,l.max,r)}function Xx(a,i,l,r){Kg(a.x,i.x,l.x,r),Kg(a.y,i.y,l.y,r)}function Kx(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const Qx={duration:.45,ease:[.4,0,.1,1]},Qg=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),Pg=Qg("applewebkit/")&&!Qg("chrome/")?Math.round:nn;function Fg(a){a.min=Pg(a.min),a.max=Pg(a.max)}function Px(a){Fg(a.x),Fg(a.y)}function Gv(a,i,l){return a==="position"||a==="preserve-aspect"&&!$_(Gg(i),Gg(l),.2)}function Fx(a){var i;return a!==a.root&&((i=a.scroll)===null||i===void 0?void 0:i.wasRoot)}const Jx=Hv({attachResizeListener:(a,i)=>Al(a,"resize",i),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bu={current:void 0},qv=Hv({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Bu.current){const a=new Jx({});a.mount(window),a.setOptions({layoutScroll:!0}),Bu.current=a}return Bu.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),$x={pan:{Feature:mx},drag:{Feature:hx,ProjectionNode:qv,MeasureLayout:Rv}};function Wx(a,i,l){var r;if(a instanceof Element)return[a];if(typeof a=="string"){let u=document;const f=(r=void 0)!==null&&r!==void 0?r:u.querySelectorAll(a);return f?Array.from(f):[]}return Array.from(a)}function Yv(a,i){const l=Wx(a),r=new AbortController,u={passive:!0,...i,signal:r.signal};return[l,u,()=>r.abort()]}function Jg(a){return i=>{i.pointerType==="touch"||Av()||a(i)}}function t2(a,i,l={}){const[r,u,f]=Yv(a,l),d=Jg(p=>{const{target:g}=p,v=i(p);if(typeof v!="function"||!g)return;const b=Jg(S=>{v(S),g.removeEventListener("pointerleave",b)});g.addEventListener("pointerleave",b,u)});return r.forEach(p=>{p.addEventListener("pointerenter",d,u)}),f}function $g(a,i,l){const{props:r}=a;a.animationState&&r.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,f=r[u];f&&ae.postRender(()=>f(i,Nl(i)))}class e2 extends Va{mount(){const{current:i}=this.node;i&&(this.unmount=t2(i,l=>($g(this.node,l,"Start"),r=>$g(this.node,r,"End"))))}unmount(){}}class n2 extends Va{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!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=Cl(Al(this.node.current,"focus",()=>this.onFocus()),Al(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Iv=(a,i)=>i?a===i?!0:Iv(a,i.parentElement):!1,a2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function s2(a){return a2.has(a.tagName)||a.tabIndex!==-1}const ml=new WeakSet;function Wg(a){return i=>{i.key==="Enter"&&a(i)}}function zu(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const i2=(a,i)=>{const l=a.currentTarget;if(!l)return;const r=Wg(()=>{if(ml.has(l))return;zu(l,"down");const u=Wg(()=>{zu(l,"up")}),f=()=>zu(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",f,i)});l.addEventListener("keydown",r,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",r),i)};function t0(a){return Ld(a)&&!Av()}function l2(a,i,l={}){const[r,u,f]=Yv(a,l),d=p=>{const g=p.currentTarget;if(!t0(p)||ml.has(g))return;ml.add(g);const v=i(p),b=(D,w)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",x),!(!t0(D)||!ml.has(g))&&(ml.delete(g),typeof v=="function"&&v(D,{success:w}))},S=D=>{b(D,l.useGlobalTarget||Iv(g,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",x,u)};return r.forEach(p=>{!s2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(l.useGlobalTarget?window:p).addEventListener("pointerdown",d,u),p.addEventListener("focus",v=>i2(v,u),u)}),f}function e0(a,i,l){const{props:r}=a;a.animationState&&r.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),f=r[u];f&&ae.postRender(()=>f(i,Nl(i)))}class o2 extends Va{mount(){const{current:i}=this.node;i&&(this.unmount=l2(i,l=>(e0(this.node,l,"Start"),(r,{success:u})=>e0(this.node,r,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ed=new WeakMap,Uu=new WeakMap,r2=a=>{const i=ed.get(a.target);i&&i(a)},c2=a=>{a.forEach(r2)};function u2({root:a,...i}){const l=a||document;Uu.has(l)||Uu.set(l,{});const r=Uu.get(l),u=JSON.stringify(i);return r[u]||(r[u]=new IntersectionObserver(c2,{root:a,...i})),r[u]}function d2(a,i,l){const r=u2(i);return ed.set(a,l),r.observe(a),()=>{ed.delete(a),r.unobserve(a)}}const f2={some:0,all:1};class h2 extends Va{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:l,margin:r,amount:u="some",once:f}=i,d={root:l?l.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:f2[u]},p=g=>{const{isIntersecting:v}=g;if(this.isInView===v||(this.isInView=v,f&&!v&&this.hasEnteredView))return;v&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",v);const{onViewportEnter:b,onViewportLeave:S}=this.node.getProps(),x=v?b:S;x&&x(g)};return d2(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(m2(i,l))&&this.startObserver()}unmount(){}}function m2({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const p2={inView:{Feature:h2},tap:{Feature:o2},focus:{Feature:n2},hover:{Feature:e2}},g2={layout:{ProjectionNode:qv,MeasureLayout:Rv}},nd={current:null},Zv={current:!1};function v2(){if(Zv.current=!0,!!cd)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>nd.current=a.matches;a.addListener(i),i()}else nd.current=!1}const y2=[...fv,ze,Ua],b2=a=>y2.find(dv(a)),n0=new WeakMap;function S2(a,i,l){for(const r in i){const u=i[r],f=l[r];if(Ue(u))a.addValue(r,u);else if(Ue(f))a.addValue(r,_l(u,{owner:a}));else if(f!==u)if(a.hasValue(r)){const d=a.getValue(r);d.liveStyle===!0?d.jump(u):d.hasAnimated||d.set(u)}else{const d=a.getStaticValue(r);a.addValue(r,_l(d!==void 0?d:u,{owner:a}))}}for(const r in l)i[r]===void 0&&a.removeValue(r);return i}const a0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class T2{scrapeMotionValuesFromProps(i,l,r){return{}}constructor({parent:i,props:l,presenceContext:r,reducedMotionConfig:u,blockInitialAnimation:f,visualState:d},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Bd,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 D=Un.now();this.renderScheduledAt<D&&(this.renderScheduledAt=D,ae.render(this.render,!1,!0))};const{latestValues:g,renderState:v,onUpdate:b}=d;this.onUpdate=b,this.latestValues=g,this.baseTarget={...g},this.initialValues=l.initial?{...g}:{},this.renderState=v,this.parent=i,this.props=l,this.presenceContext=r,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!f,this.isControllingVariants=dr(l),this.isVariantNode=A0(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:S,...x}=this.scrapeMotionValuesFromProps(l,{},this);for(const D in x){const w=x[D];g[D]!==void 0&&Ue(w)&&w.set(g[D],!1)}}mount(i){this.current=i,n0.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,r)=>this.bindToMotionValue(r,l)),Zv.current||v2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nd.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){n0.delete(this.current),this.projection&&this.projection.unmount(),za(this.notifyUpdate),za(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const l=this.features[i];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(i,l){this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)();const r=ds.has(i),u=l.on("change",p=>{this.latestValues[i]=p,this.props.onUpdate&&ae.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),f=l.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),f(),d&&d(),l.owner&&l.stop()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in li){const l=li[i];if(!l)continue;const{isEnabled:r,Feature:u}=l;if(!this.features[i]&&u&&r(this.props)&&(this.features[i]=new u(this)),this.features[i]){const f=this.features[i];f.isMounted?f.update():(f.mount(),f.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ve()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let r=0;r<a0.length;r++){const u=a0[r];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const f="on"+u,d=i[f];d&&(this.propEventSubscriptions[u]=this.on(u,d))}this.prevMotionValues=S2(this,this.scrapeMotionValuesFromProps(i,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]: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(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const r=this.values.get(i);l!==r&&(r&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let r=this.values.get(i);return r===void 0&&l!==void 0&&(r=_l(l===null?void 0:l,{owner:this}),this.addValue(i,r)),r}readValue(i,l){var r;let u=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(r=this.getBaseTargetFromProps(this.props,i))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,i,this.options);return u!=null&&(typeof u=="string"&&(cv(u)||tv(u))?u=parseFloat(u):!b2(u)&&Ua.test(l)&&(u=lv(i,l)),this.setBaseTarget(i,Ue(u)?u.get():u)),Ue(u)?u.get():u}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var l;const{initial:r}=this.props;let u;if(typeof r=="string"||typeof r=="object"){const d=pd(this.props,r,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);d&&(u=d[i])}if(r&&u!==void 0)return u;const f=this.getBaseTargetFromProps(this.props,i);return f!==void 0&&!Ue(f)?f:this.initialValues[i]!==void 0&&u===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new Ed),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}}class Xv extends T2{constructor(){super(...arguments),this.KeyframeResolver=hv}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){return i.style?i.style[l]:void 0}removeValueFromRenderState(i,{vars:l,style:r}){delete l[i],delete r[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;Ue(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function _2(a){return window.getComputedStyle(a)}class x2 extends Xv{constructor(){super(...arguments),this.type="html",this.renderInstance=O0}readValueFromInstance(i,l){if(ds.has(l)){const r=Rd(l);return r&&r.default||0}else{const r=_2(i),u=(k0(l)?r.getPropertyValue(l):r[l])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(i,{transformPagePoint:l}){return Mv(i,l)}build(i,l,r){yd(i,l,r.transformTemplate)}scrapeMotionValuesFromProps(i,l,r){return _d(i,l,r)}}class A2 extends Xv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ve}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(ds.has(l)){const r=Rd(l);return r&&r.default||0}return l=R0.has(l)?l:fd(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,r){return U0(i,l,r)}build(i,l,r){bd(i,l,this.isSVGTag,r.transformTemplate)}renderInstance(i,l,r,u){B0(i,l,r,u)}mount(i){this.isSVGTag=Td(i.tagName),super.mount(i)}}const j2=(a,i)=>md(a)?new A2(i):new x2(i,{allowProjection:a!==T.Fragment}),E2=J1({...q_,...p2,...$x,...g2},j2),Vn=f1(E2);var he;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.TEXT=1]="TEXT",a[a.TOOL_USE=2]="TOOL_USE",a[a.TOOL_RESULT=3]="TOOL_RESULT",a[a.ERROR=4]="ERROR",a[a.STATUS=5]="STATUS",a[a.SYSTEM=6]="SYSTEM",a[a.FINDING=7]="FINDING",a[a.SUBTASK_CREATE=8]="SUBTASK_CREATE",a[a.USER_INPUT=9]="USER_INPUT"})(he||(he={}));var Ne;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.PENDING=1]="PENDING",a[a.ASSIGNED=2]="ASSIGNED",a[a.IN_PROGRESS=3]="IN_PROGRESS",a[a.REVIEW=4]="REVIEW",a[a.DONE=5]="DONE",a[a.FAILED=6]="FAILED",a[a.WAITING_INPUT=7]="WAITING_INPUT"})(Ne||(Ne={}));var Ra;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ACTIVE=1]="ACTIVE",a[a.ARCHIVED=2]="ARCHIVED"})(Ra||(Ra={}));var Ba;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(Ba||(Ba={}));const C2=8;Object.assign(Object.create(null),{"":he.UNSPECIFIED,text:he.TEXT,tool_use:he.TOOL_USE,tool_result:he.TOOL_RESULT,error:he.ERROR,status:he.STATUS,system:he.SYSTEM,finding:he.FINDING,subtask_create:he.SUBTASK_CREATE,user_input:he.USER_INPUT});he.UNSPECIFIED+"",he.TEXT+"",he.TOOL_USE+"",he.TOOL_RESULT+"",he.ERROR+"",he.STATUS+"",he.SYSTEM+"",he.FINDING+"",he.SUBTASK_CREATE+"",he.USER_INPUT+"";Object.assign(Object.create(null),{"":Ne.UNSPECIFIED,pending:Ne.PENDING,assigned:Ne.ASSIGNED,in_progress:Ne.IN_PROGRESS,review:Ne.REVIEW,done:Ne.DONE,failed:Ne.FAILED,waiting_input:Ne.WAITING_INPUT});Ne.UNSPECIFIED+"",Ne.PENDING+"",Ne.ASSIGNED+"",Ne.IN_PROGRESS+"",Ne.REVIEW+"",Ne.DONE+"",Ne.FAILED+"",Ne.WAITING_INPUT+"";Object.assign(Object.create(null),{"":Ra.UNSPECIFIED,active:Ra.ACTIVE,archived:Ra.ARCHIVED});Ra.UNSPECIFIED+"",Ra.ACTIVE+"",Ra.ARCHIVED+"";Object.assign(Object.create(null),{"":Ba.UNSPECIFIED,open:Ba.OPEN,closed:Ba.CLOSED});Ba.UNSPECIFIED+"",Ba.OPEN+"",Ba.CLOSED+"";function ad(){ad=function(u,f){return new l(u,void 0,f)};var a=RegExp.prototype,i=new WeakMap;function l(u,f,d){var p=new RegExp(u,f);return i.set(p,d||i.get(u)),or(p,l.prototype)}function r(u,f){var d=i.get(f);return Object.keys(d).reduce(function(p,g){var v=d[g];if(typeof v=="number")p[g]=u[v];else{for(var b=0;u[v[b]]===void 0&&b+1<v.length;)b++;p[g]=u[v[b]]}return p},Object.create(null))}return(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),f&&or(u,f)})(l,RegExp),l.prototype.exec=function(u){var f=a.exec.call(this,u);if(f){f.groups=r(f,this);var d=f.indices;d&&(d.groups=r(d,this))}return f},l.prototype[Symbol.replace]=function(u,f){if(typeof f=="string"){var d=i.get(this);return a[Symbol.replace].call(this,u,f.replace(/\$<([^>]+)>/g,function(g,v){var b=d[v];return"$"+(Array.isArray(b)?b.join("$"):b)}))}if(typeof f=="function"){var p=this;return a[Symbol.replace].call(this,u,function(){var g=arguments;return typeof g[g.length-1]!="object"&&(g=[].slice.call(g)).push(r(g,p)),f.apply(this,g)})}return a[Symbol.replace].call(this,u,f)},ad.apply(this,arguments)}function or(a,i){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,r){return l.__proto__=r,l},or(a,i)}function s0(a,i){(i==null||i>a.length)&&(i=a.length);for(var l=0,r=new Array(i);l<i;l++)r[l]=a[l];return r}function Vu(a,i){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=(function(u,f){if(u){if(typeof u=="string")return s0(u,f);var d=Object.prototype.toString.call(u).slice(8,-1);return d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set"?Array.from(u):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?s0(u,f):void 0}})(a))||i){l&&(a=l);var r=0;return function(){return r>=a.length?{done:!0}:{done:!1,value:a[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N2=(function(a){return function(i){return i===void 0&&(i={}),(function(r,u){if(u&&!r.registered(u))throw new Error('The default language "'+u+'" is not registered with refractor.')})(a,i.defaultLanguage),function(r){cS(r,"element",l)};function l(r,u,f){var d,p;if(f&&f.tagName==="pre"&&r.tagName==="code"){var g=(r==null||(d=r.data)==null?void 0:d.meta)||(r==null||(p=r.properties)==null?void 0:p.metastring)||"";r.properties.className?typeof r.properties.className=="boolean"?r.properties.className=[]:Array.isArray(r.properties.className)||(r.properties.className=[r.properties.className]):r.properties.className=[];var v,b,S=(function(G){for(var Q,W=Vu(G.properties.className);!(Q=W()).done;){var V=Q.value;if(V.slice(0,9)==="language-")return V.slice(9).toLowerCase()}return null})(r);if(!S&&i.defaultLanguage&&r.properties.className.push("language-"+(S=i.defaultLanguage)),r.properties.className.push("code-highlight"),S)try{var x,D;D=(x=S)!=null&&x.includes("diff-")?S.split("-")[1]:S,v=a.highlight(Zo(r),D),f.properties.className=(f.properties.className||[]).concat("language-"+D)}catch(G){if(!i.ignoreMissing||!/Unknown language/.test(G.message))throw G;v=r}else v=r;v.children=(b=1,function G(Q){return Q.reduce(function(W,V){if(V.type==="text"){var F=V.value,rt=(F.match(/\n/g)||"").length;if(rt===0)V.position={start:{line:b,column:1},end:{line:b,column:1}},W.push(V);else for(var mt,Et=F.split(`
77
- `),P=Vu(Et.entries());!(mt=P()).done;){var Lt=mt.value,zt=Lt[0],A=Lt[1];W.push({type:"text",value:zt===Et.length-1?A:A+`
78
- `,position:{start:{line:b+zt,column:1},end:{line:b+zt,column:1}}})}return b+=rt,W}if(Object.prototype.hasOwnProperty.call(V,"children")){var Z=b;return V.children=G(V.children),W.push(V),V.position={start:{line:Z,column:1},end:{line:b,column:1}},W}return W.push(V),W},[])})(v.children),v.position=v.children.length>0?{start:{line:v.children[0].position.start.line,column:0},end:{line:v.children[v.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var w,O=(function(G){var Q=/{([\d,-]+)}/,W=G.split(",").map(function(rt){return rt.trim()}).join();if(Q.test(W)){var V=Q.exec(W)[1],F=dS(V);return function(rt){return F.includes(rt+1)}}return function(){return!1}})(g),q=(function(G){var Q=ad(/showLineNumbers=(\d+)/i,{lines:1});if(Q.test(G)){var W=Q.exec(G);return Number(W.groups.lines)}return 1})(g),B=(function(G){for(var Q=new Array(G),W=0;W<G;W++)Q[W]={type:"element",tagName:"span",properties:{className:[]},children:[]};return Q})(v.position.end.line),X=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],R=function(){var G,Q,W=w.value,V=W[0],F=W[1];F.properties.className=["code-line"];var rt=fS(v,function(mt){return mt.position.start.line<=V+1&&mt.position.end.line>=V+1});F.children=rt.children,(g.toLowerCase().includes("showLineNumbers".toLowerCase())||i.showLineNumbers===!0||typeof i.showLineNumbers=="object"&&i.showLineNumbers.includes(S))&&!X.some(function(mt){return g.toLowerCase().includes(mt)})&&(F.properties.line=[(V+q).toString()],F.properties.className.push("line-number")),O(V)&&F.properties.className.push("highlight-line"),(S==="diff"||(G=S)!=null&&G.includes("diff-"))&&Zo(F).substring(0,1)==="-"?F.properties.className.push("deleted"):(S==="diff"||(Q=S)!=null&&Q.includes("diff-"))&&Zo(F).substring(0,1)==="+"&&F.properties.className.push("inserted")},K=Vu(B.entries());!(w=K()).done;)R();B.length>0&&Zo(B[B.length-1]).trim()===""&&B.pop(),r.children=B}}}})(uS);const D2="_systemEvent_11qnw_1",k2="_systemTimestamp_11qnw_9",w2="_textEvent_11qnw_13",M2="_toolUseEvent_11qnw_100",O2="_toolUsePrefix_11qnw_116",R2="_toolResultEvent_11qnw_120",B2="_toolResultSummary_11qnw_126",z2="_toolResultPre_11qnw_140",U2="_errorEvent_11qnw_154",V2="_statusEvent_11qnw_163",L2="_userInputEvent_11qnw_173",H2="_userInputContent_11qnw_180",G2="_defaultEvent_11qnw_191",an={systemEvent:D2,systemTimestamp:k2,textEvent:w2,toolUseEvent:M2,toolUsePrefix:O2,toolResultEvent:R2,toolResultSummary:B2,toolResultPre:z2,errorEvent:U2,statusEvent:V2,userInputEvent:L2,userInputContent:H2,defaultEvent:G2};function q2({time:a,content:i}){return m.jsxs("div",{className:an.systemEvent,children:[m.jsxs("span",{className:an.systemTimestamp,children:["[",a,"]"]})," ",i]})}function Y2({content:a}){return m.jsx("div",{className:an.textEvent,children:m.jsx(p0,{remarkPlugins:[g0],rehypePlugins:[N2],children:a})})}function I2({content:a}){let i=a;try{const l=JSON.parse(a);i=`${l.tool}: ${JSON.stringify(l.args,null,2)}`}catch{}return m.jsxs("div",{className:an.toolUseEvent,children:[m.jsx("span",{className:an.toolUsePrefix,children:">"})," ",i]})}function Z2({content:a}){return m.jsxs("details",{className:an.toolResultEvent,children:[m.jsx("summary",{className:an.toolResultSummary,children:"Tool output"}),m.jsx("pre",{className:an.toolResultPre,children:a})]})}function X2({content:a}){return m.jsxs("div",{className:an.errorEvent,children:["Error: ",a]})}function K2({content:a}){return m.jsxs("div",{className:an.statusEvent,children:["--- ",a," ---"]})}function Q2({content:a}){return m.jsx("div",{className:an.userInputEvent,children:m.jsx("span",{className:an.userInputContent,children:a})})}function P2({content:a}){return m.jsx("div",{className:an.defaultEvent,children:a})}function Kv({event:a}){const i=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return m.jsx(q2,{time:i,content:a.content});case"text":case"output":return m.jsx(Y2,{content:a.content});case"tool_use":return m.jsx(I2,{content:a.content});case"tool_result":return m.jsx(Z2,{content:a.content});case"error":return m.jsx(X2,{content:a.content});case"status":return m.jsx(K2,{content:a.content});case"user_input":return m.jsx(Q2,{content:a.content});default:return m.jsx(P2,{content:a.content})}}const F2="_overlay_1hz80_1",J2="_dialog_1hz80_13",$2="_title_1hz80_31",W2="_description_1hz80_39",tA="_actions_1hz80_46",eA="_cancelButton_1hz80_53",nA="_confirmButton_1hz80_71",ls={overlay:F2,dialog:J2,title:$2,description:W2,actions:tA,cancelButton:eA,confirmButton:nA};function Hd({isOpen:a,title:i,description:l,confirmLabel:r="Delete",onConfirm:u,onCancel:f}){const d=T.useId(),p=T.useId();return m.jsx(ci,{children:a&&m.jsx(Vn.div,{className:ls.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:f,onKeyDown:g=>{g.key==="Escape"&&f()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":l?p:void 0,children:m.jsxs(Vn.div,{className:ls.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:g=>g.stopPropagation(),children:[m.jsx("h3",{id:d,className:ls.title,children:i}),l&&m.jsx("p",{id:p,className:ls.description,children:l}),m.jsxs("div",{className:ls.actions,children:[m.jsx("button",{type:"button",className:ls.cancelButton,onClick:f,autoFocus:!0,children:"Cancel"}),m.jsx("button",{type:"button",className:ls.confirmButton,onClick:u,children:r})]})]})})})}const aA="_spinner_13c8l_1",sA="_spin_13c8l_1",iA="_sm_13c8l_14",lA="_md_13c8l_20",oA="_lg_13c8l_26",i0={spinner:aA,spin:sA,sm:iA,md:lA,lg:oA};function l0({size:a="md",className:i,label:l="Loading",liveRegion:r=!1}){return m.jsx("span",{className:`${i0.spinner} ${i0[a]} ${i??""}`,role:r?"status":void 0,"aria-label":l,"aria-hidden":r?void 0:!0})}const rA="_container_d6rhh_1",cA="_header_d6rhh_5",uA="_addButton_d6rhh_17",dA="_createForm_d6rhh_35",fA="_createInput_d6rhh_41",hA="_createButton_d6rhh_71",mA="_creatingHint_d6rhh_107",pA="_projectRow_d6rhh_116",gA="_selected_d6rhh_136",vA="_expandArrow_d6rhh_143",yA="_expanded_d6rhh_150",bA="_projectName_d6rhh_154",SA="_taskCount_d6rhh_158",TA="_newTaskButton_d6rhh_164",_A="_taskRow_d6rhh_182",xA="_taskStatusIcon_d6rhh_211",AA="_taskTitle_d6rhh_215",jA="_dependencyBadge_d6rhh_222",EA="_blockedBadge_d6rhh_234",CA="_leafSpacer_d6rhh_239",NA="_childCountBadge_d6rhh_244",DA="_addChildButton_d6rhh_257",kA="_emptyCta_d6rhh_292",wA="_ctaDescription_d6rhh_305",MA="_ctaButton_d6rhh_311",OA="_emptyTaskCta_d6rhh_341",RA="_createTaskLink_d6rhh_346",qt={container:rA,header:cA,addButton:uA,createForm:dA,createInput:fA,createButton:hA,creatingHint:mA,projectRow:pA,selected:gA,expandArrow:vA,expanded:yA,projectName:bA,taskCount:SA,newTaskButton:TA,taskRow:_A,taskStatusIcon:xA,taskTitle:AA,dependencyBadge:jA,blockedBadge:EA,leafSpacer:CA,childCountBadge:NA,addChildButton:DA,emptyCta:kA,ctaDescription:wA,ctaButton:MA,emptyTaskCta:OA,createTaskLink:RA},o0={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function BA(a){const i=new Map(a.map(r=>[r.id,{...r,children:[]}])),l=[];for(const r of i.values())r.parentTaskId&&i.has(r.parentTaskId)?i.get(r.parentTaskId).children.push(r):l.push(r);for(const r of i.values())r.children.sort((u,f)=>u.sortOrder-f.sortOrder);return l.sort((r,u)=>r.sortOrder-u.sortOrder)}const zA=34,UA=16;function Qv({node:a,depth:i,expandedTasks:l,toggleTask:r,selectedTaskId:u,setViewMode:f,projectId:d,taskStatusById:p}){const{personas:g}=En(),v=o0[a.status]||o0.pending,b=a.dependsOn.length>0&&a.dependsOn.some(O=>p.get(O)!=="done"),S=l.has(a.id),x=a.children.length>0,D=u===a.id,w=zA+i*UA;return m.jsxs(m.Fragment,{children:[m.jsxs("div",{onClick:()=>f({kind:"task",taskId:a.id}),className:`${qt.taskRow} ${D?qt.selected:""}`,style:{paddingLeft:w},"data-task-id":a.id,children:[x&&m.jsx("span",{className:`${qt.expandArrow} ${S?qt.expanded:""}`,role:"button",tabIndex:0,"aria-label":S?"Collapse task":"Expand task",onClick:O=>{O.stopPropagation(),r(a.id)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),r(a.id))},children:"▸"}),!x&&m.jsx("span",{className:qt.leafSpacer}),m.jsx("span",{className:qt.taskStatusIcon,style:{color:v.color},children:v.icon}),m.jsx("span",{className:qt.taskTitle,title:a.title,children:a.title}),x&&m.jsxs("span",{className:qt.childCountBadge,children:[a.children.filter(O=>O.status==="done").length,"/",a.children.length]}),a.dependsOn.length>0&&m.jsx("span",{className:`${qt.dependencyBadge} ${b?qt.blockedBadge:""}`,title:`Depends on: ${a.dependsOn.join(", ")}`,children:b?"blocked":"dep"}),a.personaId&&(()=>{const O=g.find(q=>q.id===a.personaId);return O?m.jsx("span",{className:qt.dependencyBadge,title:`Persona: ${O.name}`,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"8rem"},children:O.name}):null})(),i<C2&&m.jsx("button",{onClick:O=>{O.stopPropagation(),f({kind:"new_task",projectId:d,parentTaskId:a.id})},title:"Add child task","aria-label":"Add child task",className:qt.addChildButton,children:"+"})]}),m.jsx(ci,{children:x&&S&&m.jsx(Vn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:a.children.map(O=>m.jsx(Qv,{node:O,depth:i+1,expandedTasks:l,toggleTask:r,selectedTaskId:u,setViewMode:f,projectId:d,taskStatusById:p},O.id))})})]})}function VA({viewMode:a,setViewMode:i}){const{projects:l,tasks:r,loadTasks:u,createProject:f,projectCreating:d}=En(),[p,g]=T.useState(new Set),[v,b]=T.useState(new Set),[S,x]=T.useState(new Set),[D,w]=T.useState(!1),[O,q]=T.useState(""),B=a.kind==="project"?a.projectId:void 0,X=a.kind==="task"?a.taskId:void 0,R=T.useRef(p);R.current=p;const K=T.useMemo(()=>new Map(r.map(V=>[V.id,V.status])),[r]),G=V=>{g(F=>{const rt=new Set(F);return rt.has(V)?rt.delete(V):(rt.add(V),u(V)),rt})},Q=V=>{b(F=>{const rt=new Set(F);return rt.has(V)?(rt.delete(V),x(mt=>new Set(mt).add(V))):(rt.add(V),x(mt=>{const Et=new Set(mt);return Et.delete(V),Et})),rt})};T.useEffect(()=>{const V=new Set(r.filter(F=>F.parentTaskId).map(F=>F.parentTaskId));V.size>0&&b(F=>{const rt=new Set(F);for(const mt of V)S.has(mt)||rt.add(mt);return rt})},[r,S]),T.useEffect(()=>{B&&!R.current.has(B)&&(g(V=>new Set(V).add(B)),u(B))},[B,u]);const W=()=>{!O.trim()||d||(f(O.trim()),q(""),w(!1))};return m.jsxs("div",{className:qt.container,children:[m.jsxs("div",{className:qt.header,children:[m.jsx("span",{children:"Projects"}),m.jsx("button",{className:qt.addButton,onClick:()=>w(!D),"aria-label":"Create project",title:"Create project",children:"+"})]}),D&&m.jsxs("div",{className:qt.createForm,children:[m.jsx("input",{type:"text",value:O,onChange:V=>q(V.target.value),onKeyDown:V=>V.key==="Enter"&&W(),placeholder:"Project name...",autoFocus:!0,disabled:d,className:qt.createInput}),m.jsx("button",{onClick:W,className:qt.createButton,disabled:d,children:d?m.jsx(l0,{size:"sm",label:"Creating project"}):"OK"})]}),d&&m.jsxs("div",{className:qt.creatingHint,children:[m.jsx(l0,{size:"sm",label:"Creating project"}),"Creating project…"]}),l.length===0&&!D&&m.jsxs("div",{className:qt.emptyCta,children:[m.jsx("button",{className:qt.ctaButton,onClick:()=>w(!0),children:"Create Project"}),m.jsx("div",{className:qt.ctaDescription,children:"Organize your work into projects"})]}),l.map(V=>{const F=p.has(V.id),rt=r.filter(P=>P.projectId===V.id),mt=B===V.id,Et=F?BA(rt):[];return m.jsxs("div",{children:[m.jsxs("div",{onClick:()=>{mt?G(V.id):(F||G(V.id),i({kind:"project",projectId:V.id}))},className:`${qt.projectRow} ${mt?qt.selected:""}`,children:[m.jsx("span",{className:`${qt.expandArrow} ${F?qt.expanded:""}`,children:"▸"}),m.jsx("span",{className:qt.projectName,title:V.name,children:V.name}),m.jsx("span",{className:qt.taskCount,children:rt.length>0&&`${rt.filter(P=>P.status==="done").length}/${rt.length}`}),m.jsx("button",{onClick:P=>{P.stopPropagation(),i({kind:"new_task",projectId:V.id})},title:"New task",className:qt.newTaskButton,children:"+"})]}),m.jsx(ci,{children:F&&m.jsxs(Vn.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:[Et.map(P=>m.jsx(Qv,{node:P,depth:0,expandedTasks:v,toggleTask:Q,selectedTaskId:X,setViewMode:i,projectId:V.id,taskStatusById:K},P.id)),rt.length===0&&m.jsx("div",{className:qt.emptyTaskCta,children:m.jsx("button",{className:qt.createTaskLink,onClick:()=>i({kind:"new_task",projectId:V.id}),children:"+ Create Task"})})]})})]},V.id)})]})}const LA="_container_1xzk5_1",HA="_content_1xzk5_28",r0={container:LA,content:HA},GA=320,Pv=220,Fv=600,Jv="grackle-sidebar-width";function qA(){try{const a=localStorage.getItem(Jv);if(a!==null){const i=Number(a);if(Number.isFinite(i)&&i>=Pv&&i<=Fv)return i}}catch{}return GA}function YA(a){try{localStorage.setItem(Jv,String(a))}catch{}}function IA({viewMode:a,setViewMode:i}){const[l]=T.useState(qA),r=T.useRef(null);return T.useEffect(()=>{const u=r.current;if(!u)return;const f=new ResizeObserver(d=>{for(const p of d){const g=p.borderBoxSize[0];if(g){const v=Math.round(g.inlineSize);v>=Pv&&v<=Fv&&YA(v)}}});return f.observe(u),()=>{f.disconnect()}},[]),m.jsx("div",{className:r0.container,ref:r,"data-testid":"sidebar",style:{width:l},children:m.jsx("div",{className:r0.content,children:m.jsx(VA,{viewMode:a,setViewMode:i})})})}const ZA="_bar_5apte_1",XA="_barColumn_5apte_25",KA="_barRow_5apte_50",QA="_input_5apte_56",PA="_inputSmall_5apte_84",FA="_textarea_5apte_113",JA="_select_5apte_145",$A="_btnPrimary_5apte_174",WA="_btnDanger_5apte_200",tj="_btnGhost_5apte_232",ej="_badge_5apte_251",nj="_statusText_5apte_261",aj="_statusCompleted_5apte_266",sj="_statusFailed_5apte_270",ij="_statusBlocked_5apte_274",lj="_hintText_5apte_279",oj="_creatingHint_5apte_284",rj="_errorHint_5apte_292",nt={bar:ZA,barColumn:XA,barRow:KA,input:QA,inputSmall:PA,textarea:FA,select:JA,btnPrimary:$A,btnDanger:WA,btnGhost:tj,badge:ej,statusText:nj,statusCompleted:aj,statusFailed:sj,statusBlocked:ij,hintText:lj,creatingHint:oj,errorHint:rj};function c0({value:a,onChange:i,testId:l}){return m.jsxs("select",{"data-testid":l,value:a,onChange:r=>i(r.target.value),className:nt.select,children:[m.jsx("option",{value:"claude-code",children:"claude-code"}),m.jsx("option",{value:"codex",children:"codex"}),m.jsx("option",{value:"copilot",children:"copilot"}),m.jsx("option",{value:"stub",children:"stub"})]})}function cj({viewMode:a,setViewMode:i}){const{spawn:l,sendInput:r,kill:u,sessions:f,tasks:d,environments:p,personas:g,createTask:v,addEnvironment:b,codespaces:S,codespaceError:x,codespaceCreating:D,listCodespaces:w,createCodespace:O}=En(),{showToast:q}=id(),[B,X]=T.useState(""),[R,K]=T.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[G,Q]=T.useState(""),[W,V]=T.useState(""),[F,rt]=T.useState(""),[mt,Et]=T.useState(""),[P,Lt]=T.useState(""),zt=dt=>{Et(dt)},A=dt=>{if(Lt(dt),dt){const st=g.find(Yt=>Yt.id===dt);st!=null&&st.runtime&&K(st.runtime)}},[Z,at]=T.useState(""),[tt,jt]=T.useState("local"),[Jt,Rt]=T.useState("claude-code"),[St,Y]=T.useState(""),[te,ye]=T.useState(""),[re,qe]=T.useState(""),[bt,ce]=T.useState(""),[De,Ve]=T.useState(""),[bn,ke]=T.useState(""),[ln,Cn]=T.useState(""),[I,it]=T.useState(""),[lt,ut]=T.useState("pick");T.useEffect(()=>{if(a.kind==="new_chat"&&K(a.runtime),a.kind==="new_task"&&a.parentTaskId){const dt=d.find(st=>st.id===a.parentTaskId);dt!=null&&dt.environmentId&&rt(dt.environmentId)}a.kind==="new_task"&&!a.parentTaskId&&p.length===1&&rt(p[0].id)},[a]);const pt=a.kind==="session"?f.find(dt=>dt.id===a.sessionId):void 0,ht=a.kind==="task"?d.find(dt=>dt.id===a.taskId):void 0,xt=ht!=null&&ht.sessionId?f.find(dt=>dt.id===ht.sessionId):void 0,Ht=ht?ht.dependsOn.some(dt=>{const st=d.find(Yt=>Yt.id===dt);return st&&st.status!=="done"}):!1;if(a.kind==="empty")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Select a session or click + to start"})});if(a.kind==="new_environment"){const dt=et=>{if(!et.trim())return!0;const Zt=Number(et);return Number.isInteger(Zt)&&Zt>=1&&Zt<=65535},st=()=>!(!Z.trim()||tt==="ssh"&&!St.trim()||tt==="codespace"&&!bn.trim()||(tt==="local"||tt==="ssh")&&!dt(te)),Yt=()=>{if(!st())return;const et={};if(tt==="local"){if(St.trim()&&(et.host=St.trim()),te.trim()){const Zt=Number(te);Number.isInteger(Zt)&&(et.port=Zt)}}else if(tt==="ssh"){if(et.host=St.trim(),re.trim()&&(et.user=re.trim()),te.trim()){const Zt=Number(te);Number.isInteger(Zt)&&(et.sshPort=Zt)}ln.trim()&&(et.identityFile=ln.trim())}else tt==="docker"?(bt.trim()&&(et.image=bt.trim()),De.trim()&&(et.repo=De.trim())):tt==="codespace"&&(et.codespaceName=bn.trim());b(Z.trim(),tt,et,Jt),q("Environment added successfully","success"),at(""),jt("local"),Rt("claude-code"),Y(""),ye(""),qe(""),ce(""),Ve(""),ke(""),Cn(""),it(""),ut("pick"),i({kind:"settings"})};return m.jsxs("div",{className:nt.barColumn,children:[m.jsxs("div",{className:nt.barRow,children:[m.jsx("span",{className:nt.badge,children:"new env"}),m.jsx("input",{type:"text",value:Z,onChange:et=>at(et.target.value),placeholder:"Environment name...",autoFocus:!0,className:nt.input}),m.jsxs("select",{value:tt,onChange:et=>{jt(et.target.value),et.target.value==="codespace"&&(w(),ut("pick"),ke(""))},className:nt.select,children:[m.jsx("option",{value:"local",children:"local"}),m.jsx("option",{value:"ssh",children:"ssh"}),m.jsx("option",{value:"docker",children:"docker"}),m.jsx("option",{value:"codespace",children:"codespace"})]}),m.jsx(c0,{value:Jt,onChange:Rt,testId:"new-environment-runtime-select"}),m.jsx("button",{onClick:Yt,disabled:!st(),className:nt.btnPrimary,children:"Add"})]}),m.jsxs("div",{className:nt.barRow,children:[tt==="local"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:St,onChange:et=>Y(et.target.value),placeholder:"Host (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"number",min:1,max:65535,value:te,onChange:et=>ye(et.target.value),placeholder:"Port (optional)...",className:nt.inputSmall})]}),tt==="ssh"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:St,onChange:et=>Y(et.target.value),placeholder:"Host (required)...",className:nt.inputSmall}),m.jsx("input",{type:"text",value:re,onChange:et=>qe(et.target.value),placeholder:"User (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"number",min:1,max:65535,value:te,onChange:et=>ye(et.target.value),placeholder:"SSH port (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"text",value:ln,onChange:et=>Cn(et.target.value),placeholder:"Identity file (optional)...",className:nt.inputSmall})]}),tt==="docker"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:bt,onChange:et=>ce(et.target.value),placeholder:"Image (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"text",value:De,onChange:et=>Ve(et.target.value),placeholder:"Repo (optional)...",className:nt.inputSmall})]}),tt==="codespace"&&lt==="pick"&&m.jsxs(m.Fragment,{children:[m.jsxs("select",{value:bn,onChange:et=>{et.target.value==="__create__"?(ut("create"),ke("")):(ke(et.target.value),et.target.value&&!Z.trim()&&at(et.target.value))},disabled:D,className:nt.select,children:[m.jsx("option",{value:"",children:"Select a codespace..."}),S.map(et=>m.jsxs("option",{value:et.name,children:[et.name," (",et.repository,") — ",et.state]},et.name)),m.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),D&&m.jsx("span",{className:nt.creatingHint,children:"Creating codespace..."}),x&&m.jsx("span",{className:nt.errorHint,children:x})]}),tt==="codespace"&&lt==="create"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:I,onChange:et=>it(et.target.value),placeholder:"owner/repo",className:nt.inputSmall}),m.jsx("button",{onClick:()=>{I.trim()&&(O(I.trim()),ut("pick"),it(""))},disabled:!I.trim(),className:nt.btnPrimary,children:"Create"}),m.jsx("button",{onClick:()=>{ut("pick"),it("")},className:nt.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task"){const dt=st=>{G.trim()&&(v(a.projectId,G.trim(),W,F,void 0,a.parentTaskId,mt),q("Task created successfully","success"),Q(""),V(""),rt(""),Et(""),i({kind:"project",projectId:a.projectId}))};return m.jsxs("div",{className:nt.barColumn,children:[m.jsxs("div",{className:nt.barRow,children:[m.jsx("span",{className:nt.badge,children:a.parentTaskId?"child task":"new task"}),m.jsx("input",{type:"text",value:G,onChange:st=>Q(st.target.value),placeholder:"Task title...",autoFocus:!0,className:nt.input}),m.jsxs("select",{value:F,onChange:st=>rt(st.target.value),className:nt.select,children:[m.jsx("option",{value:"",children:"Default env"}),p.map(st=>m.jsx("option",{value:st.id,children:st.displayName},st.id))]}),m.jsxs("select",{value:mt,onChange:st=>zt(st.target.value),className:nt.select,children:[m.jsx("option",{value:"",children:"No persona"}),g.map(st=>m.jsx("option",{value:st.id,children:st.name},st.id))]}),m.jsx("button",{onClick:()=>dt(),disabled:!G.trim(),className:nt.btnPrimary,children:"Create"})]}),m.jsx("textarea",{value:W,onChange:st=>V(st.target.value),placeholder:"Description (optional)...",className:nt.textarea,rows:3})]})}if(a.kind==="task"&&ht){if(ht.status==="pending"||ht.status==="assigned"){const dt=Ht?ht.dependsOn.map(st=>d.find(Yt=>Yt.id===st)).filter(st=>st&&st.status!=="done").map(st=>st.title):[];return m.jsx("div",{className:nt.bar,children:Ht?m.jsxs("span",{className:nt.statusBlocked,children:["Blocked by: ",dt.join(", ")]}):m.jsx("span",{className:nt.hintText,children:"Use the buttons above to start or manage this task"})})}if(ht.status==="in_progress"||ht.status==="waiting_input"){if((xt==null?void 0:xt.status)==="waiting_input"){const st=Yt=>{Yt.preventDefault(),!(!B.trim()||!ht.sessionId)&&(r(ht.sessionId,B),X(""))};return m.jsxs("form",{onSubmit:st,className:nt.bar,children:[m.jsx("input",{type:"text",value:B,onChange:Yt=>X(Yt.target.value),placeholder:"Type a message...",autoFocus:!0,className:nt.input}),m.jsx("button",{type:"submit",disabled:!B.trim(),className:nt.btnPrimary,children:"Send"})]})}return m.jsx("div",{className:nt.bar,children:m.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:nt.input})})}if(ht.status==="review")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Review the changes above, then approve or reject in the header"})});if(ht.status==="done")return m.jsxs("div",{className:nt.bar,children:[m.jsx("span",{className:`${nt.statusText} ${nt.statusCompleted}`,children:"Task completed"}),m.jsx("button",{onClick:()=>i({kind:"new_task",projectId:ht.projectId}),className:nt.btnPrimary,children:"+ New Task"})]});if(ht.status==="failed")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:`${nt.statusText} ${nt.statusFailed}`,children:"Task failed"})})}if(a.kind==="new_chat"){const dt=st=>{st.preventDefault(),B.trim()&&(l(a.environmentId,B,void 0,R,P),q("Session started","success"),X(""),Lt(""))};return m.jsxs("form",{onSubmit:dt,className:nt.bar,children:[m.jsx("span",{className:nt.badge,children:"new chat"}),m.jsx("input",{type:"text",value:B,onChange:st=>X(st.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:nt.input}),m.jsx(c0,{value:R,onChange:K,testId:"new-chat-runtime-select"}),m.jsxs("select",{value:P,onChange:st=>A(st.target.value),className:nt.select,children:[m.jsx("option",{value:"",children:"No persona"}),g.map(st=>m.jsx("option",{value:st.id,children:st.name},st.id))]}),m.jsx("button",{type:"submit",disabled:!B.trim(),className:nt.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const dt=(pt==null?void 0:pt.status)==="running",st=(pt==null?void 0:pt.status)==="waiting_input",Yt=pt!==void 0&&["completed","failed","killed"].includes(pt.status);if(dt)return m.jsxs("div",{className:nt.bar,children:[m.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:nt.input}),m.jsx("button",{onClick:()=>u(a.sessionId),className:nt.btnDanger,title:"Stop session",children:"Stop"})]});if(st){const et=Zt=>{Zt.preventDefault(),B.trim()&&(r(a.sessionId,B),X(""))};return m.jsxs("form",{onSubmit:et,className:nt.bar,children:[m.jsx("input",{type:"text",value:B,onChange:Zt=>X(Zt.target.value),placeholder:"Type a message...",autoFocus:!0,className:nt.input}),m.jsx("button",{type:"submit",disabled:!B.trim(),className:nt.btnPrimary,children:"Send"}),m.jsx("button",{type:"button",onClick:()=>u(a.sessionId),className:nt.btnDanger,title:"Stop session",children:"Stop"})]})}if(Yt&&pt)return m.jsxs("div",{className:nt.bar,children:[m.jsxs("span",{className:`${nt.statusText} ${nt.hintText}`,children:["Session ",pt.status]}),m.jsx("button",{onClick:()=>i({kind:"new_chat",environmentId:pt.environmentId,runtime:pt.runtime}),className:nt.btnPrimary,children:"+ New Chat"})]})}return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Loading..."})})}const uj="_container_twqwx_1",dj="_emptyState_twqwx_8",fj="_card_twqwx_14",hj="_cardHeader_twqwx_34",mj="_categoryBadge_twqwx_41",pj="_findingTitle_twqwx_49",gj="_findingDate_twqwx_55",vj="_findingContent_twqwx_61",yj="_tags_twqwx_67",bj="_tag_twqwx_67",Bn={container:uj,emptyState:dj,card:fj,cardHeader:hj,categoryBadge:mj,findingTitle:pj,findingDate:gj,findingContent:vj,tags:yj,tag:bj};function Sj(a){const i=new Date(a),l=new Date,r=l.getTime()-i.getTime(),u=Math.floor(r/1e3),f=Math.floor(u/60),d=Math.floor(f/60),p=Math.floor(d/24);if(u<60)return"just now";if(f<60)return`${f}m ago`;if(d<24)return`${d}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const g=i.getFullYear()===l.getFullYear(),v=i.toLocaleString("en-US",{month:"short"}),b=i.getDate();return g?`${v} ${b}`:`${v} ${b} ${i.getFullYear()}`}const Tj={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)"}},_j={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function xj({projectId:a}){const{findings:i}=En(),l=i.filter(r=>r.projectId===a);return l.length===0?m.jsx("div",{className:Bn.emptyState,children:"No findings yet. Agents will post discoveries here."}):m.jsx("div",{className:Bn.container,children:l.map((r,u)=>{const f=Tj[r.category]||_j;return m.jsxs(Vn.div,{className:Bn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:u*.05,duration:.2},children:[m.jsxs("div",{className:Bn.cardHeader,children:[m.jsx("span",{className:Bn.categoryBadge,style:{background:f.bg,color:f.text},children:r.category}),m.jsx("span",{className:Bn.findingTitle,children:r.title}),m.jsx("span",{className:Bn.findingDate,title:r.createdAt,children:Sj(r.createdAt)})]}),m.jsx("div",{className:Bn.findingContent,children:r.content.length>300?r.content.slice(0,300)+"...":r.content}),r.tags.length>0&&m.jsx("div",{className:Bn.tags,children:r.tags.map(d=>m.jsx("span",{className:Bn.tag,style:{color:f.text,textShadow:`0 0 8px ${f.text}`},children:d},d))})]},r.id)})})}const Aj="_container_vs9om_1",jj="_header_vs9om_5",Ej="_headerLabel_vs9om_12",Cj="_addButton_vs9om_20",Nj="_envRow_vs9om_46",Dj="_targeted_vs9om_60",kj="_expanded_vs9om_63",wj="_statusDot_vs9om_67",Mj="_pulse_vs9om_70",Oj="_envName_vs9om_74",Rj="_envActions_vs9om_78",Bj="_idleLabel_vs9om_85",zj="_newChatButton_vs9om_90",Uj="_envActionsRow_vs9om_108",Vj="_connectButton_vs9om_116",Lj="_stopButton_vs9om_133",Hj="_deleteButton_vs9om_150",Gj="_provisionMessage_vs9om_168",qj="_errorMessage_vs9om_175",Yj="_sessionRow_vs9om_182",Ij="_selected_vs9om_200",Zj="_sessionDot_vs9om_207",Xj="_sessionSummaryRow_vs9om_211",Kj="_sessionExpandArrow_vs9om_233",Qj="_sessionSummaryText_vs9om_244",Pj="_sessionCountBadge_vs9om_251",Fj="_emptyCta_vs9om_274",Jj="_ctaDescription_vs9om_287",$j="_ctaButton_vs9om_293",It={container:Aj,header:jj,headerLabel:Ej,addButton:Cj,envRow:Nj,targeted:Dj,expanded:kj,statusDot:wj,pulse:Mj,envName:Oj,envActions:Rj,idleLabel:Bj,newChatButton:zj,envActionsRow:Uj,connectButton:Vj,stopButton:Lj,deleteButton:Hj,provisionMessage:Gj,errorMessage:qj,sessionRow:Yj,selected:Ij,sessionDot:Zj,sessionSummaryRow:Xj,sessionExpandArrow:Kj,sessionSummaryText:Qj,sessionCountBadge:Pj,emptyCta:Fj,ctaDescription:Jj,ctaButton:$j},Wj={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},tE={running:"running",waiting_input:"awaiting input",failed:"failed",killed:"killed",completed:"completed"},u0=["running","waiting_input","failed","killed","completed"],eE=.2;function nE(a){const i={};for(const f of a)i[f.status]=(i[f.status]||0)+1;const l=u0.filter(f=>i[f]>0).map(f=>`${i[f]} ${tE[f]||f}`),r=new Set(u0),u=Object.keys(i).filter(f=>!r.has(f)).sort().map(f=>`${i[f]} ${f}`);return[...l,...u].join(", ")}function aE({status:a}){const i=a==="running"?"var(--accent-green)":a==="waiting_input"?"var(--accent-yellow)":a==="completed"?"var(--text-secondary)":a==="failed"||a==="killed"?"var(--accent-red)":"var(--text-tertiary)";return m.jsx("span",{className:It.sessionDot,style:{color:i},children:"●"})}function sE({env:a,envSessions:i,selectedSessionId:l,isNewChatTarget:r,expanded:u,onToggleExpand:f,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:g,onProvision:v,onStop:b,onRemove:S,setViewMode:x}){const[D,w]=T.useState(!1),O=Wj[a.status]||"var(--text-tertiary)",q=a.status==="connected",B=a.status==="connecting",X=a.status==="disconnected"||a.status==="error";return m.jsxs("div",{children:[m.jsx(Hd,{isOpen:D,title:"Delete Environment?",description:`"${a.displayName||a.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{S(a.id),w(!1)},onCancel:()=>w(!1)}),m.jsxs("div",{className:`${It.envRow} ${r?It.targeted:""} ${u?It.expanded:""}`,"data-testid":"env-row",onClick:f,children:[m.jsx("span",{className:`${It.statusDot} ${q?It.pulse:""}`,style:{color:O},children:"●"}),m.jsx("span",{className:It.envName,title:a.displayName||a.id,children:a.displayName||a.id}),m.jsxs("span",{className:It.envActions,children:[i.length===0&&!r&&!u&&m.jsx("span",{className:It.idleLabel,children:"(idle)"}),q&&m.jsx("button",{onClick:R=>{R.stopPropagation(),x({kind:"new_chat",environmentId:a.id,runtime:a.defaultRuntime||"claude-code"})},title:"New chat",className:It.newChatButton,children:"+"})]})]}),u&&m.jsxs("div",{className:It.envActionsRow,children:[B&&g&&m.jsx("span",{className:It.provisionMessage,children:g.message}),a.status==="error"&&(g==null?void 0:g.stage)==="error"&&m.jsx("span",{className:It.errorMessage,children:g.message}),X&&m.jsx("button",{onClick:R=>{R.stopPropagation(),v(a.id)},className:It.connectButton,children:a.status==="error"?"Retry":"Connect"}),q&&m.jsx("button",{onClick:R=>{R.stopPropagation(),b(a.id)},className:It.stopButton,children:"Stop"}),!B&&m.jsx("button",{onClick:R=>{R.stopPropagation(),w(!0)},className:It.deleteButton,children:"Delete"})]}),i.length>0&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:It.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p())},children:[m.jsx("span",{className:`${It.sessionExpandArrow} ${d?It.expanded:""}`,children:"▸"}),m.jsx("span",{className:It.sessionSummaryText,children:nE(i)}),m.jsx("span",{className:It.sessionCountBadge,children:i.length})]}),m.jsx(ci,{children:d&&m.jsx(Vn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:eE,ease:"easeInOut"},style:{overflow:"hidden"},children:i.map(R=>m.jsxs("div",{onClick:K=>{K.stopPropagation(),x({kind:"session",sessionId:R.id})},className:`${It.sessionRow} ${l===R.id?It.selected:""}`,title:R.prompt,"data-testid":"session-row",children:[m.jsx(aE,{status:R.status})," ",R.prompt.length>24?R.prompt.slice(0,24)+"...":R.prompt]},R.id))})})]})]})}function iE({viewMode:a,setViewMode:i}){const{environments:l,sessions:r,provisionStatus:u,provisionEnvironment:f,stopEnvironment:d,removeEnvironment:p}=En(),[g,v]=T.useState(null),[b,S]=T.useState(new Set),x=a.kind==="session"?a.sessionId:void 0,D=a.kind==="new_chat"?a.environmentId:void 0;return m.jsxs("div",{className:It.container,children:[m.jsxs("div",{className:It.header,children:[m.jsx("span",{className:It.headerLabel,children:"Environments"}),m.jsx("button",{className:It.addButton,onClick:()=>i({kind:"new_environment"}),title:"Add environment",children:"+ Add Environment"})]}),l.length===0&&m.jsxs("div",{className:It.emptyCta,children:[m.jsx("button",{className:It.ctaButton,onClick:()=>i({kind:"new_environment"}),children:"Add Environment"}),m.jsx("div",{className:It.ctaDescription,children:"Connect an environment to run agents"})]}),l.map(w=>{const O=r.filter(q=>q.environmentId===w.id);return m.jsx(sE,{env:w,envSessions:O,selectedSessionId:x,isNewChatTarget:D===w.id,expanded:g===w.id,onToggleExpand:()=>v(g===w.id?null:w.id),sessionsExpanded:b.has(w.id),onToggleSessionsExpand:()=>{S(q=>{const B=new Set(q);return B.has(w.id)?B.delete(w.id):B.add(w.id),B})},provisionProgress:u[w.id],onProvision:f,onStop:d,onRemove:p,setViewMode:i},w.id)})]})}const lE="_container_8bik7_1",oE="_heading_8bik7_7",rE="_section_8bik7_14",cE="_sectionTitle_8bik7_25",uE="_sectionDescription_8bik7_34",dE="_tokenList_8bik7_47",fE="_tokenRow_8bik7_54",hE="_tokenBadge_8bik7_67",mE="_tokenName_8bik7_82",pE="_tokenTarget_8bik7_89",gE="_deleteButton_8bik7_98",vE="_addForm_8bik7_112",yE="_formRow_8bik7_118",bE="_input_8bik7_124",SE="_select_8bik7_153",TE="_addButton_8bik7_184",_E="_emptyStateInfo_8bik7_213",le={container:lE,heading:oE,section:rE,sectionTitle:cE,sectionDescription:uE,tokenList:dE,tokenRow:fE,tokenBadge:hE,tokenName:mE,tokenTarget:pE,deleteButton:gE,addForm:vE,formRow:yE,input:bE,select:SE,addButton:TE,emptyStateInfo:_E},xE=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function AE({viewMode:a,setViewMode:i}){const{tokens:l,setToken:r,deleteToken:u}=En(),{showToast:f}=id(),[d,p]=T.useState(""),[g,v]=T.useState(""),[b,S]=T.useState("env_var"),[x,D]=T.useState(""),[w,O]=T.useState(null),q=R=>{if(R.preventDefault(),!d||!g)return;const K=b==="env_var"?x||d.toUpperCase()+"_TOKEN":"";r(d,g,b,K,b==="file"?x:""),f("Token saved successfully","success"),p(""),v(""),D("")},B=R=>{O(R)},X=()=>{w&&(u(w),f("Token deleted","info")),O(null)};return m.jsxs("div",{className:le.container,children:[m.jsx(Hd,{isOpen:w!==null,title:"Delete Token?",description:w?`"${w}" will be permanently removed.`:void 0,onConfirm:X,onCancel:()=>O(null)}),m.jsx("h2",{className:le.heading,children:"Settings"}),m.jsxs("section",{className:le.section,children:[m.jsx("h3",{className:le.sectionTitle,children:"Environments"}),m.jsx("p",{className:le.sectionDescription,children:"Environments are compute workspaces where agents run. Configure once, reuse across projects."}),m.jsx(iE,{viewMode:a,setViewMode:i})]}),m.jsxs("section",{className:le.section,children:[m.jsx("h3",{className:le.sectionTitle,children:"Tokens"}),m.jsx("p",{className:le.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),l.length===0?m.jsx("div",{className:le.emptyStateInfo,children:"Add your first API token to enable service integrations."}):m.jsx("div",{className:le.tokenList,children:l.map(R=>m.jsxs("div",{className:le.tokenRow,children:[m.jsx("span",{className:le.tokenBadge,children:R.tokenType}),m.jsx("span",{className:le.tokenName,children:R.name}),m.jsx("span",{className:le.tokenTarget,children:R.tokenType==="env_var"?R.envVar:R.filePath}),m.jsx("button",{className:le.deleteButton,onClick:()=>B(R.name),title:`Delete ${R.name}`,children:"×"})]},R.name))}),m.jsxs("form",{className:le.addForm,onSubmit:q,children:[m.jsxs("div",{className:le.formRow,children:[m.jsx("input",{className:le.input,type:"text",placeholder:"Token name",value:d,onChange:R=>p(R.target.value)}),m.jsx("input",{className:le.input,type:"password",placeholder:"Value",value:g,onChange:R=>v(R.target.value)})]}),m.jsxs("div",{className:le.formRow,children:[m.jsx("select",{className:le.select,value:b,onChange:R=>S(R.target.value),children:xE.map(R=>m.jsx("option",{value:R.value,children:R.label},R.value))}),m.jsx("input",{className:le.input,type:"text",placeholder:b==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:x,onChange:R=>D(R.target.value)}),m.jsx("button",{className:le.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const jE="_container_14lk7_1",EE="_header_14lk7_7",CE="_form_14lk7_18",NE="_formActions_14lk7_61",DE="_list_14lk7_67",kE="_card_14lk7_73",wE="_active_14lk7_79",ME="_cardHeader_14lk7_83",OE="_cardActions_14lk7_92",RE="_description_14lk7_97",BE="_meta_14lk7_103",zE="_promptDetails_14lk7_116",UE="_promptText_14lk7_128",VE="_empty_14lk7_140",LE="_btnPrimary_14lk7_146",HE="_btnSecondary_14lk7_160",GE="_btnSmall_14lk7_174",qE="_btnDanger_14lk7_188",ge={container:jE,header:EE,form:CE,formActions:NE,list:DE,card:kE,active:wE,cardHeader:ME,cardActions:OE,description:RE,meta:BE,promptDetails:zE,promptText:UE,empty:VE,btnPrimary:LE,btnSecondary:HE,btnSmall:GE,btnDanger:qE};function YE(){const{personas:a,createPersona:i,updatePersona:l,deletePersona:r}=En(),[u,f]=T.useState(null),[d,p]=T.useState(!1),[g,v]=T.useState(null),[b,S]=T.useState(""),[x,D]=T.useState(""),[w,O]=T.useState(""),[q,B]=T.useState(""),[X,R]=T.useState(""),[K,G]=T.useState(0),Q=()=>{S(""),D(""),O(""),B(""),R(""),G(0)},W=()=>{Q(),f(null),p(!0)},V=P=>{S(P.name),D(P.description),O(P.systemPrompt),B(P.runtime),R(P.model),G(P.maxTurns),f(P),p(!1)},F=P=>{P.preventDefault(),!(!b.trim()||!w.trim())&&(u?(l(u.id,b,x,w,q,X,K),f(null)):(i(b,x,w,q,X,K),p(!1)),Q())},rt=P=>{r(P),v(null),(u==null?void 0:u.id)===P&&(f(null),Q())},mt=()=>{f(null),p(!1),Q()},Et=()=>m.jsxs("form",{onSubmit:F,className:ge.form,children:[m.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),m.jsxs("label",{children:["Name",m.jsx("input",{type:"text",value:b,onChange:P=>S(P.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),m.jsxs("label",{children:["Description",m.jsx("input",{type:"text",value:x,onChange:P=>D(P.target.value),placeholder:"Brief description..."})]}),m.jsxs("label",{children:["Runtime",m.jsxs("select",{value:q,onChange:P=>B(P.target.value),children:[m.jsx("option",{value:"",children:"Default"}),m.jsx("option",{value:"claude-code",children:"claude-code"}),m.jsx("option",{value:"codex",children:"codex"}),m.jsx("option",{value:"copilot",children:"copilot"})]})]}),m.jsxs("label",{children:["Model",m.jsx("input",{type:"text",value:X,onChange:P=>R(P.target.value),placeholder:"e.g. sonnet"})]}),m.jsxs("label",{children:["Max Turns",m.jsx("input",{type:"number",value:K,onChange:P=>G(parseInt(P.target.value,10)||0),min:0})]}),m.jsxs("label",{children:["System Prompt",m.jsx("textarea",{value:w,onChange:P=>O(P.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),m.jsxs("div",{className:ge.formActions,children:[m.jsx("button",{type:"submit",className:ge.btnPrimary,children:u?"Save":"Create"}),m.jsx("button",{type:"button",onClick:mt,className:ge.btnSecondary,children:"Cancel"})]})]});return m.jsxs("div",{className:ge.container,children:[m.jsxs("div",{className:ge.header,children:[m.jsx("h2",{children:"Personas"}),m.jsx("button",{onClick:W,className:ge.btnPrimary,children:"+ New Persona"})]}),(d||u)&&Et(),a.length===0&&!d?m.jsx("p",{className:ge.empty,children:"No personas yet. Create one to get started."}):m.jsx("div",{className:ge.list,children:a.map(P=>m.jsxs("div",{className:`${ge.card} ${(u==null?void 0:u.id)===P.id?ge.active:""}`,children:[m.jsxs("div",{className:ge.cardHeader,children:[m.jsx("strong",{children:P.name}),m.jsxs("div",{className:ge.cardActions,children:[m.jsx("button",{onClick:()=>V(P),className:ge.btnSmall,children:"Edit"}),g===P.id?m.jsxs(m.Fragment,{children:[m.jsx("button",{onClick:()=>rt(P.id),className:ge.btnDanger,children:"Confirm"}),m.jsx("button",{onClick:()=>v(null),className:ge.btnSmall,children:"Cancel"})]}):m.jsx("button",{onClick:()=>v(P.id),className:ge.btnSmall,children:"Delete"})]})]}),P.description&&m.jsx("p",{className:ge.description,children:P.description}),m.jsxs("div",{className:ge.meta,children:[P.runtime&&m.jsxs("span",{children:["Runtime: ",P.runtime]}),P.model&&m.jsxs("span",{children:["Model: ",P.model]}),P.maxTurns>0&&m.jsxs("span",{children:["Max turns: ",P.maxTurns]})]}),m.jsxs("details",{className:ge.promptDetails,children:[m.jsx("summary",{children:"System Prompt"}),m.jsx("pre",{className:ge.promptText,children:P.systemPrompt})]})]},P.id))})]})}const d0=220,f0=70,IE=40,ZE=60,XE="hierarchy",KE="dependency";function QE(a){return T.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const i=new wp.graphlib.Graph({multigraph:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:"TB",nodesep:IE,ranksep:ZE});const l=new Map(a.map(d=>[d.id,d])),r=new Map;for(const d of a)if(d.parentTaskId&&l.has(d.parentTaskId)){const p=r.get(d.parentTaskId)||[];p.push(d),r.set(d.parentTaskId,p)}for(const d of a)i.setNode(d.id,{width:d0,height:f0});const u=[];for(const d of a){if(d.parentTaskId&&l.has(d.parentTaskId)){const p=`hierarchy-${d.parentTaskId}-${d.id}`;i.setEdge(d.parentTaskId,d.id,{},p),u.push({id:p,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:XE},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of d.dependsOn)if(l.has(p)){const g=`dependency-${p}-${d.id}`;i.setEdge(p,d.id,{},g),u.push({id:g,source:p,target:d.id,type:"smoothstep",data:{edgeType:KE},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return wp.layout(i),{nodes:a.map(d=>{const p=i.node(d.id),g=r.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-d0/2,y:p.y-f0/2},data:{task:d,childCount:g.length,doneChildCount:g.filter(v=>v.status==="done").length,hasDependencies:d.dependsOn.length>0}}}),edges:u}},[a])}const PE="_dagContainer_iizup_1",FE="_taskNode_iizup_26",JE="_taskNodeBorder_iizup_48",$E="_taskNodeContent_iizup_54",WE="_taskNodeHeader_iizup_64",tC="_taskNodeIcon_iizup_71",eC="_taskNodeTitle_iizup_76",nC="_taskNodeBadges_iizup_84",aC="_childBadge_iizup_89",sC="_depBadge_iizup_101",iC="_handle_iizup_113",lC="_emptyCta_iizup_120",oC="_ctaDescription_iizup_131",rC="_ctaButton_iizup_138",He={dagContainer:PE,taskNode:FE,taskNodeBorder:JE,taskNodeContent:$E,taskNodeHeader:WE,taskNodeIcon:tC,taskNodeTitle:eC,taskNodeBadges:nC,childBadge:aC,depBadge:sC,handle:iC,emptyCta:lC,ctaDescription:oC,ctaButton:rC},h0={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function cC({data:a}){const{task:i,childCount:l,doneChildCount:r,hasDependencies:u}=a,f=h0[i.status]||h0.pending;return m.jsxs("div",{className:He.taskNode,"data-task-id":i.id,"data-task-title":i.title,children:[m.jsx(Mp,{type:"target",position:Op.Top,className:He.handle}),m.jsx("div",{className:He.taskNodeBorder,style:{backgroundColor:f.color}}),m.jsxs("div",{className:He.taskNodeContent,children:[m.jsxs("div",{className:He.taskNodeHeader,children:[m.jsx("span",{className:He.taskNodeIcon,style:{color:f.color},children:f.icon}),m.jsx("span",{className:He.taskNodeTitle,children:i.title})]}),m.jsxs("div",{className:He.taskNodeBadges,children:[l>0&&m.jsxs("span",{className:He.childBadge,children:[r,"/",l]}),u&&m.jsx("span",{className:He.depBadge,children:"dep"})]})]}),m.jsx(Mp,{type:"source",position:Op.Bottom,className:He.handle})]})}const m0={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting_input:"#f0c040"},uC={task:cC};function dC({projectId:a,setViewMode:i}){const{tasks:l}=En(),r=T.useMemo(()=>l.filter(g=>g.projectId===a),[l,a]),{nodes:u,edges:f}=QE(r),d=T.useCallback((g,v)=>{i({kind:"task",taskId:v.id})},[i]),p=T.useCallback(g=>{const v=g.data;return m0[v.task.status]||m0.pending},[]);return r.length===0?m.jsxs("div",{className:He.emptyCta,children:[m.jsx("button",{className:He.ctaButton,onClick:()=>i({kind:"new_task",projectId:a}),children:"Create Task"}),m.jsx("div",{className:He.ctaDescription,children:"Create tasks to see the dependency graph"})]}):m.jsx("div",{className:He.dagContainer,children:m.jsxs(mS,{nodes:u,edges:f,nodeTypes:uC,onNodeClick:d,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[m.jsx(pS,{variant:gS.Dots,gap:20,size:1,color:"rgba(255,255,255,0.05)"}),m.jsx(vS,{showInteractive:!1}),m.jsx(yS,{nodeColor:p,maskColor:"rgba(10, 12, 20, 0.7)",style:{background:"var(--bg-inset)"}})]})})}const fC="_panelContainer_k8otb_1",hC="_emptyState_k8otb_8",mC="_projectSummary_k8otb_17",pC="_projectSummaryTitle_k8otb_28",gC="_projectSummarySubtitle_k8otb_32",vC="_header_k8otb_36",yC="_headerInfo_k8otb_62",bC="_killButton_k8otb_68",SC="_headerTitle_k8otb_89",TC="_headerActions_k8otb_99",_C="_taskStatusBadge_k8otb_106",xC="_taskBranch_k8otb_115",AC="_taskBlockedBadge_k8otb_121",jC="_btnPrimary_k8otb_129",EC="_btnDanger_k8otb_155",CC="_rejectInput_k8otb_187",NC="_tabBar_k8otb_216",DC="_tab_k8otb_216",kC="_active_k8otb_239",wC="_eventScroll_k8otb_244",MC="_tabContent_k8otb_250",OC="_noContext_k8otb_255",RC="_overviewContent_k8otb_261",BC="_overviewDashboard_k8otb_270",zC="_overviewHero_k8otb_276",UC="_statusBadge_k8otb_283",VC="_statusPending_k8otb_295",LC="_statusAssigned_k8otb_300",HC="_statusInProgress_k8otb_305",GC="_statusReview_k8otb_310",qC="_statusDone_k8otb_315",YC="_statusFailed_k8otb_320",IC="_statusWaitingInput_k8otb_325",ZC="_overviewBranchPill_k8otb_330",XC="_branchLink_k8otb_345",KC="_overviewSection_k8otb_356",QC="_overviewLabel_k8otb_362",PC="_overviewValue_k8otb_369",FC="_overviewMuted_k8otb_374",JC="_overviewMarkdown_k8otb_380",$C="_envRow_k8otb_449",WC="_envDot_k8otb_455",tN="_envDotGreen_k8otb_462",eN="_envDotYellow_k8otb_467",nN="_envDotRed_k8otb_472",aN="_envDotGray_k8otb_477",sN="_depList_k8otb_481",iN="_depItem_k8otb_487",lN="_depBlocked_k8otb_494",oN="_depDone_k8otb_498",rN="_timeline_k8otb_502",cN="_timelineRow_k8otb_508",uN="_timelineKey_k8otb_515",dN="_timelineValue_k8otb_521",fN="_timelineDelta_k8otb_525",hN="_reviewNotes_k8otb_536",mN="_waitingMessage_k8otb_553",pN="_errorMessage_k8otb_557",gN="_eventOverflowWarning_k8otb_561",vN="_attemptSelector_k8otb_575",yN="_attemptLabel_k8otb_586",bN="_attemptButton_k8otb_590",SN="_attemptActive_k8otb_607",TN="_attemptStatus_k8otb_613",_N="_emptyCta_k8otb_619",xN="_ctaTitle_k8otb_631",AN="_ctaDescription_k8otb_637",jN="_ctaButton_k8otb_644",U={panelContainer:fC,emptyState:hC,projectSummary:mC,projectSummaryTitle:pC,projectSummarySubtitle:gC,header:vC,headerInfo:yC,killButton:bC,headerTitle:SC,headerActions:TC,taskStatusBadge:_C,taskBranch:xC,taskBlockedBadge:AC,btnPrimary:jC,btnDanger:EC,rejectInput:CC,tabBar:NC,tab:DC,active:kC,eventScroll:wC,tabContent:MC,noContext:OC,overviewContent:RC,overviewDashboard:BC,overviewHero:zC,statusBadge:UC,statusPending:VC,statusAssigned:LC,statusInProgress:HC,statusReview:GC,statusDone:qC,statusFailed:YC,statusWaitingInput:IC,overviewBranchPill:ZC,branchLink:XC,overviewSection:KC,overviewLabel:QC,overviewValue:PC,overviewMuted:FC,overviewMarkdown:JC,envRow:$C,envDot:WC,envDotGreen:tN,envDotYellow:eN,envDotRed:nN,envDotGray:aN,depList:sN,depItem:iN,depBlocked:lN,depDone:oN,timeline:rN,timelineRow:cN,timelineKey:uN,timelineValue:dN,timelineDelta:fN,reviewNotes:hN,waitingMessage:mN,errorMessage:pN,eventOverflowWarning:gN,attemptSelector:vN,attemptLabel:yN,attemptButton:bN,attemptActive:SN,attemptStatus:TN,emptyCta:_N,ctaTitle:xN,ctaDescription:AN,ctaButton:jN};function EN({sessionId:a,session:i,isActive:l,onKill:r}){return m.jsxs("div",{className:U.header,children:[m.jsxs("span",{children:["Session: ",a.slice(0,8),i&&` | ${i.runtime} | ${i.status}`]}),m.jsxs("span",{className:U.headerInfo,children:[i&&m.jsx("span",{children:i.prompt.length>60?i.prompt.slice(0,60)+"...":i.prompt}),l&&m.jsx("button",{onClick:()=>r(a),title:"Stop session",className:U.killButton,children:"×"})]})]})}function $v({eventsDropped:a}){return a<=0?m.jsx(m.Fragment,{}):m.jsxs("div",{className:U.eventOverflowWarning,role:"alert",children:["⚠ ",a.toLocaleString()," older event",a===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function CN({sessionEvents:a,session:i,eventsDropped:l,scrollRef:r}){const u=i&&["completed","failed","killed"].includes(i.status),f=u?`Session ${i.status} with no events recorded.`:"Waiting for events...";return m.jsxs("div",{ref:r,className:U.eventScroll,children:[a.length===0&&m.jsx("div",{className:u?U.errorMessage:U.waitingMessage,children:f}),m.jsx($v,{eventsDropped:l}),a.map((d,p)=>m.jsx(Kv,{event:d},`${d.sessionId}-${d.timestamp}-${p}`))]})}function NN(a){const i=[];for(const l of a){const r=i[i.length-1];l.eventType==="text"&&(r==null?void 0:r.eventType)==="text"?i[i.length-1]={...r,content:r.content+l.content}:i.push(l)}return i}function Fo(a){if(!a)return"—";const i=new Date(a);return isNaN(i.getTime())?"—":i.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Lu(a,i){if(!a||!i)return;const l=new Date(i).getTime()-new Date(a).getTime();if(isNaN(l)||l<0)return;const r=Math.floor(l/6e4),u=Math.floor(l%6e4/1e3);if(r===0)return`${u}s`;const f=Math.floor(r/60),d=r%60;return f===0?`${r}m ${u}s`:`${f}h ${d}m`}function DN(a){const i=a.toLowerCase();return i==="ready"||i==="running"||i==="available"||i==="connected"?U.envDotGreen:i==="provisioning"||i==="starting"||i==="pending"||i==="connecting"?U.envDotYellow:i==="error"||i==="failed"||i==="disconnected"?U.envDotRed:U.envDotGray}function kN({status:a}){const i={pending:"Pending",assigned:"Assigned",in_progress:"In Progress",waiting_input:"Waiting for Input",review:"Review",done:"Done",failed:"Failed"},l={pending:U.statusPending,assigned:U.statusAssigned,in_progress:U.statusInProgress,waiting_input:U.statusWaitingInput,review:U.statusReview,done:U.statusDone,failed:U.statusFailed};return m.jsx("span",{className:`${U.statusBadge} ${l[a]??U.statusPending}`,children:i[a]??a})}function wN({task:a,tasksById:i,environments:l,projects:r}){const u=l.find(p=>p.id===a.environmentId),f=r.find(p=>p.id===a.projectId),d=a.branch&&(f!=null&&f.repoUrl)?`${f.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(a.branch)}`:void 0;return m.jsxs("div",{className:U.overviewDashboard,children:[m.jsxs("div",{className:U.overviewHero,children:[m.jsx(kN,{status:a.status}),a.branch&&m.jsx("span",{className:U.overviewBranchPill,children:d?m.jsxs("a",{href:d,target:"_blank",rel:"noreferrer noopener",className:U.branchLink,children:["🔗"," ",a.branch]}):m.jsxs("span",{children:["🔗"," ",a.branch]})})]}),typeof a.description=="string"&&a.description&&m.jsxs("div",{className:U.overviewSection,children:[m.jsx("div",{className:U.overviewLabel,children:"Description"}),m.jsx("div",{className:U.overviewMarkdown,children:m.jsx(p0,{remarkPlugins:[g0],children:a.description})})]}),a.environmentId&&m.jsxs("div",{className:U.overviewSection,children:[m.jsx("div",{className:U.overviewLabel,children:"Environment"}),m.jsxs("div",{className:U.envRow,children:[u&&m.jsx("span",{className:`${U.envDot} ${DN(u.status)}`,title:u.status,"aria-label":`Status: ${u.status}`,role:"img"}),m.jsx("span",{className:U.overviewValue,children:(u==null?void 0:u.displayName)??a.environmentId})]})]}),m.jsxs("div",{className:U.overviewSection,children:[m.jsx("div",{className:U.overviewLabel,children:"Dependencies"}),a.dependsOn.length===0?m.jsx("div",{className:U.overviewMuted,children:"None"}):m.jsx("div",{className:U.depList,children:a.dependsOn.map(p=>{const g=i.get(p),v=(g==null?void 0:g.status)==="done";return m.jsxs("div",{className:`${U.depItem} ${v?U.depDone:U.depBlocked}`,children:[m.jsx("span",{children:v?"✓":"○"}),m.jsx("span",{children:(g==null?void 0:g.title)??p})]},p)})})]}),m.jsxs("div",{className:U.overviewSection,children:[m.jsx("div",{className:U.overviewLabel,children:"Timeline"}),m.jsxs("div",{className:U.timeline,children:[a.createdAt&&m.jsxs("div",{className:U.timelineRow,children:[m.jsx("span",{className:U.timelineKey,children:"Created"}),m.jsx("span",{className:U.timelineValue,children:Fo(a.createdAt)})]}),a.assignedAt&&(()=>{const p=Lu(a.createdAt,a.assignedAt);return m.jsxs("div",{className:U.timelineRow,children:[m.jsx("span",{className:U.timelineKey,children:"Assigned"}),m.jsx("span",{className:U.timelineValue,children:Fo(a.assignedAt)}),p!==void 0&&m.jsx("span",{className:U.timelineDelta,children:p})]})})(),a.startedAt&&(()=>{const p=Lu(a.assignedAt??a.createdAt,a.startedAt);return m.jsxs("div",{className:U.timelineRow,children:[m.jsx("span",{className:U.timelineKey,children:"Started"}),m.jsx("span",{className:U.timelineValue,children:Fo(a.startedAt)}),p!==void 0&&m.jsx("span",{className:U.timelineDelta,children:p})]})})(),a.completedAt&&(()=>{const p=Lu(a.startedAt,a.completedAt);return m.jsxs("div",{className:U.timelineRow,children:[m.jsx("span",{className:U.timelineKey,children:"Completed"}),m.jsx("span",{className:U.timelineValue,children:Fo(a.completedAt)}),p!==void 0&&m.jsx("span",{className:U.timelineDelta,children:p})]})})(),!a.createdAt&&!a.assignedAt&&!a.startedAt&&!a.completedAt&&m.jsx("div",{className:U.overviewMuted,children:"No timing data"})]})]}),a.reviewNotes&&m.jsxs("div",{className:U.overviewSection,children:[m.jsx("div",{className:U.overviewLabel,children:"Review Notes"}),m.jsx("div",{className:U.reviewNotes,children:a.reviewNotes})]})]})}function MN({task:a,sessionId:i,isBlocked:l,rejectNotes:r,onRejectNotesChange:u,onStart:f,onStop:d,onApprove:p,onReject:g,onDelete:v}){if(a.status==="pending"||a.status==="assigned")return l?m.jsx("div",{className:U.headerActions,children:m.jsx("button",{onClick:v,className:U.btnDanger,children:"Delete"})}):m.jsxs("div",{className:U.headerActions,children:[m.jsx("button",{onClick:f,className:U.btnPrimary,children:"Start"}),m.jsx("button",{onClick:v,className:U.btnDanger,children:"Delete"})]});if(a.status==="in_progress"||a.status==="waiting_input")return m.jsx("div",{className:U.headerActions,children:m.jsx("button",{onClick:d,disabled:!i,className:U.btnDanger,children:"Stop"})});if(a.status==="review")return m.jsxs("div",{className:U.headerActions,children:[m.jsx("input",{type:"text",value:r,onChange:b=>u(b.target.value),placeholder:"Rejection notes...",className:U.rejectInput}),m.jsx("button",{onClick:p,className:U.btnPrimary,children:"Approve"}),m.jsx("button",{onClick:g,className:U.btnDanger,children:"Reject"})]});if(a.status==="done")return m.jsx("div",{className:U.headerActions,children:m.jsx("button",{onClick:v,className:U.btnDanger,children:"Delete"})});if(a.status==="failed")return m.jsxs("div",{className:U.headerActions,children:[m.jsx("button",{onClick:f,className:U.btnPrimary,children:"Retry"}),m.jsx("button",{onClick:v,className:U.btnDanger,children:"Delete"})]})}function ON({taskSessions:a,selectedSessionId:i,onSelect:l}){if(!(a.length<2))return m.jsxs("div",{className:U.attemptSelector,"data-testid":"attempt-selector",children:[m.jsx("span",{className:U.attemptLabel,children:"Attempts:"}),a.map((r,u)=>{const f=r.id===i,d=r.status==="completed"?"✓":r.status==="failed"?"✗":r.status==="running"||r.status==="waiting_input"?"●":"";return m.jsxs("button",{className:`${U.attemptButton} ${f?U.attemptActive:""}`,onClick:()=>l(r.id),title:`Attempt #${u+1} — ${r.status}`,"aria-label":`Attempt #${u+1}, ${r.status}`,"aria-pressed":f,"data-testid":`attempt-${u+1}`,children:["#",u+1,d&&m.jsx("span",{className:U.attemptStatus,children:d})]},r.id)})]})}function RN({viewMode:a,setViewMode:i}){const{events:l,eventsDropped:r,sessions:u,tasks:f,environments:d,loadSessionEvents:p,loadFindings:g,kill:v,startTask:b,approveTask:S,rejectTask:x,deleteTask:D,projects:w,createProject:O,taskSessions:q,loadTaskSessions:B}=En(),X=T.useRef(null),R=T.useRef(void 0),[K,G]=T.useState("overview"),[Q,W]=T.useState("tasks"),[V,F]=T.useState(""),[rt,mt]=T.useState(!1),[Et,P]=T.useState(void 0),Lt=T.useRef(void 0),zt=T.useRef(void 0);let A,Z;a.kind==="task"&&(A=f.find(bt=>bt.id===a.taskId),Z=(A==null?void 0:A.projectId)||void 0);const at=A?q[A.id]??[]:[];let tt;a.kind==="session"?tt=a.sessionId:a.kind==="task"&&(Et&&at.some(bt=>bt.id===Et)?tt=Et:tt=(A==null?void 0:A.sessionId)||void 0);const jt=()=>{mt(!0)},Jt=()=>{A&&(D(A.id),mt(!1),i({kind:"project",projectId:A.projectId}))};a.kind==="task"&&(A==null?void 0:A.id)!==Lt.current&&(Lt.current=A==null?void 0:A.id,K!=="overview"&&G("overview"),V!==""&&F(""),Et!==void 0&&P(void 0));const Rt=T.useRef(void 0),St=T.useRef(void 0);if(T.useEffect(()=>{if(!(A!=null&&A.id))return;const bt=A.id!==Rt.current,ce=A.sessionId!==St.current;(bt||ce)&&(Rt.current=A.id,St.current=A.sessionId,B(A.id))},[A==null?void 0:A.id,A==null?void 0:A.sessionId,B]),(A==null?void 0:A.status)!==zt.current){zt.current=A==null?void 0:A.status;const bt=(A==null?void 0:A.status)==="pending"||(A==null?void 0:A.status)==="assigned"?"overview":(A==null?void 0:A.status)==="in_progress"||(A==null?void 0:A.status)==="waiting_input"||(A==null?void 0:A.status)==="review"?"stream":(A==null?void 0:A.status)==="done"?"findings":void 0;bt&&bt!==K&&G(bt)}const Y=T.useMemo(()=>{const bt=tt?l.filter(ce=>ce.sessionId===tt):[];return NN(bt)},[l,tt]),te=T.useMemo(()=>new Map(f.map(bt=>[bt.id,bt])),[f]),ye=A?A.dependsOn.some(bt=>{const ce=te.get(bt);return ce!==void 0&&ce.status!=="done"}):!1,re=tt?u.find(bt=>bt.id===tt)??void 0:void 0;if(T.useEffect(()=>{tt&&tt!==R.current&&(R.current=tt,p(tt))},[tt,p]),T.useEffect(()=>{K==="findings"&&Z&&g(Z)},[K,Z,g]),T.useEffect(()=>{X.current&&K==="stream"&&(X.current.scrollTop=X.current.scrollHeight)},[Y.length,K]),a.kind==="settings")return m.jsx(AE,{viewMode:a,setViewMode:i});if(a.kind==="persona_management")return m.jsx(YE,{});if(a.kind==="empty")return w.length===0?m.jsxs("div",{className:U.emptyCta,children:[m.jsx("div",{className:U.ctaTitle,children:"Welcome to Grackle"}),m.jsx("div",{className:U.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),m.jsx("button",{className:U.ctaButton,onClick:()=>{const bt=window.prompt("Project name:");bt!=null&&bt.trim()&&O(bt.trim())},children:"Create Your First Project"})]}):m.jsx("div",{className:U.emptyState,children:"Select a project or task to get started"});if(a.kind==="new_chat")return m.jsx("div",{className:U.emptyState,children:"Enter a prompt below to start a new session"});if(a.kind==="project"){const bt=f.filter(Ve=>Ve.projectId===a.projectId),ce=bt.filter(Ve=>Ve.status==="done").length,De=bt.length;return m.jsxs("div",{className:U.panelContainer,children:[m.jsxs("div",{className:U.tabBar,role:"tablist","aria-label":"Project view",children:[m.jsx("button",{role:"tab","aria-selected":Q==="graph",className:`${U.tab} ${Q==="graph"?U.active:""}`,onClick:()=>W("graph"),children:"Graph"}),m.jsx("button",{role:"tab","aria-selected":Q==="tasks",className:`${U.tab} ${Q==="tasks"?U.active:""}`,onClick:()=>W("tasks"),children:"Tasks"})]}),Q==="tasks"&&De>0&&m.jsxs("div",{className:U.projectSummary,children:[m.jsx("span",{className:U.projectSummaryTitle,children:`${ce}/${De} tasks complete`}),m.jsx("span",{className:U.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),Q==="tasks"&&De===0&&m.jsxs("div",{className:U.emptyCta,children:[m.jsx("button",{className:U.ctaButton,onClick:()=>i({kind:"new_task",projectId:a.projectId}),children:"Create Task"}),m.jsx("div",{className:U.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),Q==="graph"&&m.jsx(dC,{projectId:a.projectId,setViewMode:i})]})}if(a.kind==="new_environment")return m.jsx("div",{className:U.emptyState,children:"Configure the new environment below"});if(a.kind==="new_task")return m.jsx("div",{className:U.emptyState,children:"Fill in the task details below"});if(a.kind==="task")return m.jsxs("div",{className:U.panelContainer,children:[m.jsxs("div",{className:U.header,children:[m.jsxs("span",{className:U.headerTitle,children:[m.jsx("span",{"data-testid":"task-title",children:(A==null?void 0:A.title)||a.taskId}),A&&m.jsx("span",{className:U.taskStatusBadge,"data-testid":"task-status",children:A.status}),(A==null?void 0:A.branch)&&m.jsx("span",{className:U.taskBranch,children:A.branch}),ye&&m.jsx("span",{className:U.taskBlockedBadge,children:"blocked"})]}),A&&m.jsx(MN,{task:A,sessionId:tt,isBlocked:ye,rejectNotes:V,onRejectNotesChange:F,onStart:()=>b(A.id),onStop:()=>tt&&v(tt),onApprove:()=>S(A.id),onReject:()=>{x(A.id,V),F("")},onDelete:jt})]}),m.jsxs("div",{className:U.tabBar,role:"tablist","aria-label":"Task view",children:[m.jsx("button",{role:"tab","aria-selected":K==="overview",className:`${U.tab} ${K==="overview"?U.active:""}`,onClick:()=>G("overview"),children:"Overview"}),m.jsx("button",{role:"tab","aria-selected":K==="stream",className:`${U.tab} ${K==="stream"?U.active:""}`,onClick:()=>G("stream"),children:"Stream"}),m.jsx("button",{role:"tab","aria-selected":K==="findings",className:`${U.tab} ${K==="findings"?U.active:""}`,onClick:()=>G("findings"),children:"Findings"})]}),m.jsxs(ci,{mode:"wait",children:[K==="overview"&&m.jsx(Vn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:U.overviewContent,children:A?m.jsx(wN,{task:A,tasksById:te,environments:d,projects:w}):m.jsx("div",{className:U.waitingMessage,children:"No additional details"})},"overview"),K==="stream"&&m.jsxs(Vn.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:[m.jsx(ON,{taskSessions:at,selectedSessionId:tt,onSelect:bt=>{P(bt)}}),m.jsxs("div",{ref:X,className:U.eventScroll,children:[!tt&&A&&m.jsxs("div",{className:U.emptyCta,children:[m.jsx("button",{className:U.ctaButton,onClick:()=>b(A.id),children:"Start Task"}),m.jsx("div",{className:U.ctaDescription,children:"Click to begin agent execution"})]}),tt&&Y.length===0&&m.jsx("div",{className:U.waitingMessage,children:"Waiting for events..."}),m.jsx($v,{eventsDropped:r}),Y.map((bt,ce)=>m.jsx(Kv,{event:bt},`${bt.sessionId}-${bt.timestamp}-${ce}`))]})]},"stream"),K==="findings"&&m.jsx(Vn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:U.tabContent,children:Z?m.jsx(xj,{projectId:Z}):m.jsx("div",{className:U.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),A&&m.jsx(Hd,{isOpen:rt,title:"Delete Task?",description:`"${A.title}" will be permanently removed.`,onConfirm:Jt,onCancel:()=>mt(!1)})]});if(!tt)return m.jsx("div",{className:U.emptyState,children:"No session selected"});const qe=(re==null?void 0:re.status)==="running"||(re==null?void 0:re.status)==="waiting_input";return m.jsxs("div",{className:U.panelContainer,children:[m.jsx(EN,{sessionId:tt,session:re,isActive:qe,onKill:v}),m.jsx(CN,{sessionEvents:Y,session:re,eventsDropped:r,scrollRef:X})]})}const BN="_toast_1bnyi_1",zN="_success_1bnyi_17",UN="_icon_1bnyi_21",VN="_error_1bnyi_24",LN="_warning_1bnyi_31",HN="_info_1bnyi_37",GN="_message_1bnyi_52",qN="_close_1bnyi_59",dl={toast:BN,success:zN,icon:UN,error:VN,warning:LN,info:HN,message:GN,close:qN},YN={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function IN({toast:a,onDismiss:i}){return T.useEffect(()=>{const l=setTimeout(()=>i(a.id),a.duration);return()=>clearTimeout(l)},[a.id,a.duration,i]),m.jsxs(Vn.div,{className:`${dl.toast} ${dl[a.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:[m.jsx("span",{className:dl.icon,"aria-hidden":"true",children:YN[a.variant]}),m.jsx("span",{className:dl.message,children:a.message}),m.jsx("button",{type:"button",className:dl.close,onClick:()=>i(a.id),"aria-label":"Dismiss notification",children:"×"})]})}const ZN="_container_qqse2_1",XN={container:ZN};function KN(){const{toasts:a,dismissToast:i}=id();return m.jsx("div",{className:XN.container,"data-testid":"toast-container",children:m.jsx(ci,{children:a.map(l=>m.jsx(IN,{toast:l,onDismiss:i},l.id))})})}const QN="_root_cdda9_1",PN="_body_cdda9_7",FN="_main_cdda9_13",Hu={root:QN,body:PN,main:FN},JN=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function $N(){const[a,i]=T.useState({kind:"empty"}),{lastSpawnedId:l}=En();return T.useEffect(()=>{l&&i({kind:"session",sessionId:l})},[l]),m.jsxs("div",{className:Hu.root,children:[m.jsx(t1,{setViewMode:i}),m.jsxs("div",{className:Hu.body,children:[m.jsx(IA,{viewMode:a,setViewMode:i}),m.jsxs("div",{className:Hu.main,children:[m.jsx(RN,{viewMode:a,setViewMode:i},a.kind==="task"?a.taskId:a.kind==="session"?a.sessionId:a.kind),m.jsx(cj,{viewMode:a,setViewMode:i})]})]}),m.jsx(KN,{})]})}function WN(){const a=JN?IS:BS;return m.jsx(XS,{children:m.jsx(a,{children:m.jsx($N,{})})})}xS.createRoot(document.getElementById("root")).render(m.jsx(T.StrictMode,{children:m.jsx(WN,{})}));